Re: [RFC/PATCH] add: warn when -u or -A is used without filepattern

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [RFC/PATCH] add: warn when -u or -A is used without filepattern

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:55:50

Robin Rosenberg [off-list ref] 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/

Re: [RFC/PATCH] add: warn when -u or -A is used without filepattern

From: Robin Rosenberg <hidden>
Date: 2016-06-15 22:55:50


----- Ursprungligt meddelande -----
quoted
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.
Good point. I rarely cd to anything but the top of the tree, but that
might be just me. OTOH, git diff after -u would remind me. It would bad if -u 
was tree wide and diff wasn't, but fortunately that's not the case.

The -A is a bit worse since it adds all the crap files lying around.

-- robin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help