Re: [RFC/PATCH] add: warn when -u or -A is used without filepattern
- From
Robin Rosenberg <robin.rosenberg@dewire.com>
- Date
- Jan 21, 2013, 15:00 UTC
- Message-ID
- <1217961884.4232967.1358780423428.JavaMail.root@dewire.com>
- In-Reply-To
- <1358769611-3625-1-git-send-email-Matthieu.Moy@imag.fr>
----- Ursprungligt meddelande -----
Show 19 quoted lines
> Most git commands that can be used with our without a filepattern are > tree-wide by default, the filepattern being used to restrict their > scope. > A few exceptions are: 'git grep', 'git clean', 'git add -u' and 'git > add -A'. > > The inconsistancy of 'git add -u' and 'git add -A' are particularly > problematic since other 'git add' subcommands (namely 'git add -p' > and > 'git add -e') are tree-wide by default. > > Flipping the default now is unacceptable, so this patch starts > training > users to type explicitely 'git add -u|-A :/' or 'git add -u|-A .', to > prepare > for the next steps: > > * forbid 'git add -u|-A' without filepattern (like 'git add' without > option)
git add -u without filepattern is, I believe very common, so no noisy output there please.
git diff #looks good git add -u
-- robin