From: Omar Polo Subject: Re: got: rm * removes current directory To: Mikhail Cc: gameoftrees@openbsd.org Date: Sat, 27 May 2023 10:15:53 +0200 On 2023/05/27 10:58:41 +0300, Mikhail wrote: > core:~/work/got$ cd got > core:~/work/got/got$ ls > Makefile git-repository.5 got-worktree.5 got.1 > got.c got.conf.5 > core:~/work/got/got$ got rm * > D got/Makefile > D got/git-repository.5 > D got/got-worktree.5 > D got/got.1 > D got/got.c > D got/got.conf.5 > core:~/work/got/got$ ls > colorls: .: No such file or directory > core:~/work/got/got$ cd .. > core:~/work/got$ ls got > colorls: got: No such file or directory > > git rm * removes only files, not current directory > > in case this is a bug here is a test case: Since git doesn't track directories, having 'got rm' removing empty directories seems a useful feature to me, even though having $PWD disappearing from under your feets is not nice. However, what would be the value in keeping empty directories on-disk around?