"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: got: rm * removes current directory
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
Omar Polo <op@omarpolo.com>, gameoftrees@openbsd.org
Date:
Tue, 30 May 2023 19:47:32 +0200

Download raw body.

Thread
On Tue, May 30, 2023 at 05:27:46PM +0200, Christian Weisgerber wrote:
> Omar Polo:
> 
> > what do you expect after doing "got rm foo/bar.c foo/x.y" ?
> > 
> > If everything, I'd prefer if we settle on "got rm foo/bar.c foo/x.y"
> > leaving "foo" around (which is what I assume jamsek intended), it
> > would be coherent with rm and don't have any special case.
> 
> I don't object, but I have a questions: Under which circumstances
> will "foo" be removed then?  "got up"?

The "foo" directory would no longer be present in the tree for the
commit created from this state. Only the one work tree in which the
above rm command was run would still have "foo" on disk.
And you would simply run rmdir foo if you wanted to get rid of it I guess.
 
> I'm mildly worried about obsolete directories sticking around.  The
> classic problem is that "make obj" creates an "obj" symlink, which
> means the directory isn't empty, which means it isn't pruned by
> "cvs up -P" etc. even once all files under version control have
> been removed.  And I seem to recall that there was at least one
> instance in the history of OpenBSD where the persistence of an
> obsolete directory caused a build problem.

That was an 'obj' directory and some files within checked into CVS
somewhere under gnu/llvm, wasn't it? And it ended up in the Git
repository conversion and stuck around on some anoncvs mirrors for
a while. That's a repository-side issue, while the above case only
concerns one specific work tree.