Re: [RFC PATCH] stash: accept options also when subcommand 'save' is omitted

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, 18 Aug 2009, Jeff King wrote:

> On Tue, Aug 18, 2009 at 11:42:58PM +0200, Johannes Schindelin wrote:
> 
> > > I think yours is nicer, especially as we have just added the 
> > > '-p|--patch' option, as well. With what is there now, you can do 
> > > "git stash -p", but not "git stash -p -k".
> > 
> > But it is sloppy, in that it blindly accepts options that might be 
> > valid for several subcommands, not just "save".
> > 
> > That was the reason I did not implement it this way.
> > 
> > But we do not have such ambiguous options yet.
> > 
> > Or do we?  Look at what "list" accepts!
> > 
> > So please register my objection.
> 
> I don't see the problem. Either the option works for "stash save" or it
> does not.  If I say "git stash --quiet", then it _must_ be "git stash
> save --quiet", and not "git stash pop --quiet", because "save" is the
> only default command.

So if I say "git stash -q" by mistake, but wanted to say "git stash drop 
-q", then I am borked?

Bah!  I say: bah!

You're basically reintroducing at least part of the DWIMery that was 
reverted in 9488e875 and I have the distinct feeling that some people in 
this thread do not think hard enough about what would adher to the 
principle of least surprise even in the future (or even for people 
introducing other stash save options).

Well, you just go ahead and push through your patch, and I do what I 
promised on my blog.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]