Re: [PATCH] stash: Learn to parse -m/--message like commit does
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 22, 2017, 04:44 UTC
- Message-ID
- <xmqqh8tmvs5j.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20171121232643.8380-1-phil.hord@gmail.com>
Phil Hord <phil.hord@gmail.com> writes:
Show 14 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. 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 <phil.hord@gmail.com> > --- > 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.