Re: git rm bug
- Date: Wed, 6 Jun 2018 16:20:09 -0400 (EDT)
- From: "Robert P. J. Day" <rpjday@xxxxxxxxxxxxxx>
- Subject: Re: git rm bug
On Thu, 7 Jun 2018, Timothy Rice wrote:
> > It does seem like something which could be noted in the git
> > rm docs. Perhaps you'd care to take a stab at a patch to
> > add a note to Documentation/git-rm.txt Thomas? Maybe a note
> > at the end of the DISCUSSION section?
> That same documentation could mention a common workaround for when
> someone does really want to keep the empty directories:
> $ touch ./path/to/empty/dir/.keep
> $ git add ./path/to/empty/dir/.keep
> $ git commit -m "Keep that empty directory because it is needed for <whatever>"
> This would obviate the need for a new flag to switch behaviours.
i'm going to be contrarian and obstinate and suggest that the
current behaviour is fine, since there is no compelling rationale for
any *other* behaviour.
invariably, every defense for hanging on to empty directories boils
down to, "i might do something in the future that expects those
directories to exist." well, if that's the case, then create them when
you need them -- nothing you do should ever simply *assume* the
existence of essential directories.
in addition, by "untracking" those directories, you're suggesting
that git quietly do what should normally be done by "git rm --cached".
if i want that behaviour, i would prefer to have to type it myself.
i'm fine with just adding a note to "git rm" making it clear what
happens in this case. i see no value in supporting extra options that
simply encourage bad behaviour.
Robert P. J. Day Ottawa, Ontario, CANADA