Thread (1 message) 1 message, 1 author, 2017-11-22

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

From: Junio C Hamano <hidden>
Date: 2017-11-22 04:44:48

Phil Hord [off-list ref] writes:
`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.  Nothing
in the documentation suggests this syntax should work, but it does
work for `git commit`, and my fingers have learned this pattern long
ago.

Teach `git stash` to parse -mFoo and --message=Foo the same as
`git commit` would do.

Signed-off-by: Phil Hord <redacted>
---
 git-stash.sh | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
Makes sense.  Thanks.

I wonder if you want to add a trivial test or two for this, if "git
stash [save|push|nothing] -m foo" is already tested.  It appears
that t3903 already has a test that does 'push -m "test message"' and
sees if that appears in the output of "list", which looks like the
ideal place to do so.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help