Re: git add -A fails in empty repository since 1.8.5
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Dec 18, 2013, 19:24 UTC
- Message-ID
- <vpqvbymarnw.fsf@anie.imag.fr>
- In-Reply-To
- <xmqqioumhtvp.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
> It could be argued that a "git add [<any option>] .", with an > explicit "." given by the end-user, that is run in an empty > directory may be an error worth reporting.
But what we have right now is really weird:
# setup repo with one empty dir: $ rm -fr test $ git init test Initialized empty Git repository in /tmp/test/.git/ $ cd test $ mkdir foo
$ git add . fatal: pathspec '.' did not match any files
=> The one we're discussing.
$ git add foo
=> No error when an empty directory other than . is given.
$ cd foo $ git add .
=> No error either for "git add ." when not at the root of the repo.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/