Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: Andreas Schwab <schwab@linux-m68k.org>,
	Guilherme <guibufolo@gmail.com>,
	git@vger.kernel.org
Subject: Re: Doing a git add '' will add more files then expected
Date: Mon, 17 Nov 2014 11:08:26 -0800	[thread overview]
Message-ID: <xmqqh9xxy79x.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <vpqa93p8y9n.fsf@anie.imag.fr> (Matthieu Moy's message of "Mon, 17 Nov 2014 19:42:12 +0100")

Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:

> 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.

  reply	other threads:[~2014-11-17 19:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-17 16:25 Doing a git add '' will add more files then expected Guilherme
2014-11-17 18:15 ` Andreas Schwab
2014-11-17 18:42   ` Matthieu Moy
2014-11-17 19:08     ` Junio C Hamano [this message]
2014-11-23 19:06       ` Javier Domingo Cansino

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=xmqqh9xxy79x.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=guibufolo@gmail.com \
    --cc=schwab@linux-m68k.org \
    /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