diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-12-06 18:23:42 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-12-06 18:23:43 +0100 |
commit | 714485c7deb63e91b1ee7ba07be5f5a55fe03a39 (patch) | |
tree | d0d08d2e31f2287af477b48079338e10eb6d6f85 /git-stash.sh | |
parent | Merge branch 'jk/fewer-pack-rescan' (diff) | |
parent | stash: learn to parse -m/--message like commit does (diff) | |
download | git-714485c7deb63e91b1ee7ba07be5f5a55fe03a39.tar.xz git-714485c7deb63e91b1ee7ba07be5f5a55fe03a39.zip |
Merge branch 'ph/stash-save-m-option-fix'
In addition to "git stash -m message", the command learned to
accept "git stash -mmessage" form.
* ph/stash-save-m-option-fix:
stash: learn to parse -m/--message like commit does
Diffstat (limited to 'git-stash.sh')
-rwxr-xr-x | git-stash.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/git-stash.sh b/git-stash.sh index 4b74951440..1114005ce2 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -76,6 +76,12 @@ create_stash () { shift stash_msg=${1?"BUG: create_stash () -m requires an argument"} ;; + -m*) + stash_msg=${1#-m} + ;; + --message=*) + stash_msg=${1#--message=} + ;; -u|--include-untracked) shift untracked=${1?"BUG: create_stash () -u requires an argument"} @@ -193,6 +199,12 @@ store_stash () { shift stash_msg="$1" ;; + -m*) + stash_msg=${1#-m} + ;; + --message=*) + stash_msg=${1#--message=} + ;; -q|--quiet) quiet=t ;; @@ -251,6 +263,12 @@ push_stash () { test -z ${1+x} && usage stash_msg=$1 ;; + -m*) + stash_msg=${1#-m} + ;; + --message=*) + stash_msg=${1#--message=} + ;; --help) show_help ;; |