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

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

 



Matthieu Moy <Matthieu.Moy@xxxxxxxxxxxxxxx> writes:

> I didn't even know that multi-words messages would be allowed this way.
> That seems to me to be really weird indeed.

Yeah, but it is understandable why it was done that way, considering
taht the whole point of "stash" is to save away quickly for higher
priority interrupt. IIRC, earlier iterations of the command did not
even require you to say "save", i.e.

	git stash wip: futzing with --keep-index

would have been a perfectly good invocation.

> My feeling is that "git stash save" should learn a "-m, --message"
> option analogous to the one of "git commit", and then the "message on
> the command-line" syntax could be deprecated.
>
> (One nice side effect would be that in the very long term, we may want
> to allow "git stash save -- <pathspecs>" to do a limited stash)
>
> But maybe it's not worth the effort, I don't know.

Yeah, if the user wants to be more elaborate perhaps

	git checkout -b temp
        git commit -m 'whatever message' -a
	git checkout -

would suffice; "stash" is for smaller changes in a very tentative
nature that do not deserve such a long command sequence, so
requiring "-m" may make the command less useful.
--
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]