From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Junio C Hamano <gitster@pobox.com>
Cc: Duy Nguyen <pclouds@gmail.com>,
Antoine Pelisse <apelisse@gmail.com>,
Thomas Ferris Nicolaisen <tfnico@gmail.com>,
"git\@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: git add -A fails in empty repository since 1.8.5
Date: Wed, 18 Dec 2013 20:24:35 +0100 [thread overview]
Message-ID: <vpqvbymarnw.fsf@anie.imag.fr> (raw)
In-Reply-To: <xmqqioumhtvp.fsf@gitster.dls.corp.google.com> (Junio C. Hamano's message of "Wed, 18 Dec 2013 10:54:50 -0800")
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/
next prev parent reply other threads:[~2013-12-18 19:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-18 8:06 git add -A fails in empty repository since 1.8.5 Thomas Ferris Nicolaisen
2013-12-18 8:44 ` Antoine Pelisse
2013-12-18 11:59 ` Duy Nguyen
2013-12-18 18:54 ` Junio C Hamano
2013-12-18 19:24 ` Matthieu Moy [this message]
2013-12-18 19:56 ` Junio C Hamano
2013-12-18 20:57 ` Junio C Hamano
2013-12-19 0:49 ` Duy Nguyen
2013-12-23 9:02 ` [PATCH] add: don't complain when adding empty project root Nguyễn Thái Ngọc Duy
2013-12-23 17:48 ` Torsten Bögershausen
2013-12-23 23:46 ` Duy Nguyen
2013-12-24 21:48 ` Torsten Bögershausen
2013-12-24 23:49 ` Duy Nguyen
2014-01-30 11:39 ` Torsten Bögershausen
2014-01-31 18:10 ` Junio C Hamano
2013-12-26 17:25 ` Jonathan Nieder
2013-12-26 18:54 ` Junio C Hamano
2013-12-26 19:24 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vpqvbymarnw.fsf@anie.imag.fr \
--to=matthieu.moy@grenoble-inp.fr \
--cc=apelisse@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
--cc=tfnico@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).