Re: [PATCH 1/2] Add proper 'stage' command
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Aug 29, 2013, 18:47 UTC
- Message-ID
- <521f9739dad63_16921225e7477096@nysa.mail>
- In-Reply-To
- <vpq8uzks5ou.fsf@anie.imag.fr>
Matthieu Moy wrote:
Show 9 quoted lines
> Felipe Contreras <felipe.contreras@gmail.com> writes: > > > +COMMANDS > > +-------- > > + > > +With no arguments, it's a synonym for linkgit:git-add[1]. > > This would not be very useful since "git add" errors out when called > without arguments ;-).
Right.
Show 5 quoted lines
> The accurate description of your code would be closer to "When the first > argument is not a subcommand, it's a synonym for linkgit:git-add[1].". > I'm not sure I like it, as it creates ambiguities (e.g. need to spell > "git stage -- diff" to add a file called "diff". Not a strong objection > though, as we already have refs Vs filename ambiguities in many places.
Yes, I thought really hard about this, but I think it's the best alternative. In adition, we could stat to see if there's a file with the same name as the assumed subcommand, and warn about the ambiguity, and the recommended way to add the file.
-- Felipe Contreras