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

Re: [PATCH v2] Teach stash to parse -m/--message like commit does

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 24, 2017, 05:47 UTC
Message-ID
<xmqq4lpkp6rq.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20171122212031.5988-1-phil.hord@gmail.com>
Phil Hord <phil.hord@gmail.com> writes:
Show 9 quoted lines
> `git stash push -m foo` uses "foo" as the message for the stash. But
> `git stash push -m"foo"` does not parse successfully.  Similarly
> `git stash push --message="My stash message"` also fails.  The stash
> documentation doesn't suggest this syntax should work, but gitcli
> does and my fingers have learned this pattern long ago for `commit`.
>
> Teach `git stash` and `git store` to parse -mFoo and --message=Foo
> the same as `git commit` would do.  Even though it's an internal
> function, add similar support to create_stash() for consistency.

I sense some typo around "git store", but I am not exactly sure what the right spelling should be. "git stash -m..", "git stash save -m..", "git stash push -m.." and "git stash store -m..", if you want a full enumeration, but stepping back a bit, mentioning "git stash" ought to be sufficient. A need to spell all of them whose handling of -m you fixed would imply there may be some others whose handling of -m is still broken, which is not a good place for us to end up with.

> Reviewd-by: Junio C Hamano <gitster@pobox.com>
Heh, I didn't review this version and certainly not its test.  
I didn't see anything questionable there after a quick read, though.
Thanks.
Previous: Jeff King
Message 3 of 3 in “Teach stash to parse -m/--message like commit does”
  1. Teach stash to parse -m/--message like commit doesPhil Hord, Nov 22, 2017
  2. Jeff KingNov 22, 2017
  3. Junio C HamanoNov 24, 2017

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.