git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 26, 2013, 17:00 UTC
Message-ID
<7vsj4jm2m9.fsf@alter.siamese.dyndns.org>
In-Reply-To
<vpq1uc3cagy.fsf@grenoble-inp.fr>
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> 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.
Show 8 quoted lines
> 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.

Previous: Matthieu MoyNext: Gunnlaugur Thor Briem
Message 4 of 5 in “Better handling of erroneous git stash save "somemessage" --keep-index”
  1. Gunnlaugur Thor BriemFeb 26, 2013
  2. Junio C HamanoFeb 26, 2013
  3. Matthieu MoyFeb 26, 2013
  4. Junio C HamanoFeb 26, 2013
  5. Gunnlaugur Thor BriemFeb 26, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.