Re: Doing a git add '' will add more files then expected
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 17, 2014, 19:08 UTC
- Message-ID
- <xmqqh9xxy79x.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <vpqa93p8y9n.fsf@anie.imag.fr>
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
Show 6 quoted lines
> Andreas Schwab <schwab@linux-m68k.org> writes: > >> The argument to git add is a pathspec, and the empty pathspec matches >> all files. > > Err, why does the empty pathspec match all files? Isn't that a bug?
That is debatable.
cd Documentation
git add "a"would be equivalent to typing
git add Documentation/"a"
so
cd Documentation
git add ""would be equivalent to typing
git add Documentation/""
And doing the same from the top-level of the working tree can be argued to be a natural extension.