Re: [RFC/PATCH] add: warn when -u or -A is used without filepattern
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Jan 21, 2013, 15:16 UTC
- Message-ID
- <vpqy5fmva6b.fsf@grenoble-inp.fr>
- In-Reply-To
- <1217961884.4232967.1358780423428.JavaMail.root@dewire.com>
Robin Rosenberg <robin.rosenberg@dewire.com> writes:
> git add -u without filepattern is, I believe very common, so no noisy > output there please.
What are you exactly suggesting? That we keep the inconsistant semantics of "git add -u" or "git add -A"? Or another migration plan?
> git diff > #looks good > git add -u
That's indeed the kind of mistake I'd like to avoid. In your example, "git diff" is tree-wide, and "git add -u" is limited to ., so in general "git add -u" won't stage the same thing as "git diff" just showed.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/