Re: Better handling of erroneous git stash save "somemessage" --keep-index

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

 



On Tue, Feb 26, 2013 at 4:10 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Then the user cannot say
>
>         git stash save some message that consists of multiple words
>
> no?  You may have a WIP to enhance the behaviour of one option and
> you might want to say
>
>         git stash save wip: tweak behaviour of --keep-index
>
> to save it away when switching to higher priority task.

In this case (which must be rarer than --keep-index intended as a
parameter) the user gets the error message, the problem is pretty
clear, and the workaround is very easy, quote the message:

        git stash save "wip: tweak behaviour of --keep-index"

... which also is more conventional on the command line.

To minimize the behavior change, it could apply solely for the case of
known parameters to this command (like --keep-index), so that:

        git stash save wip: tweak behaviour of --froob-nob

would still work like before. That's less consistent, but then again,
this is just a matter of catching very likely errors to avoid lost
work.

Expressing a multi-word message without quotes on the command line is
unconventional (in general, though maybe not in the use of git-stash)
so it seems reasonable to let that usage be the one that gets
inconvenienced.

-Gulli

(Sorry about the initial reply to you alone Junio)
--
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]