aboutsummaryrefslogtreecommitdiff
path: root/git-stash.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-12-06 09:23:42 -0800
committerJunio C Hamano <gitster@pobox.com>2017-12-06 09:23:43 -0800
commit714485c7deb63e91b1ee7ba07be5f5a55fe03a39 (patch)
treed0d08d2e31f2287af477b48079338e10eb6d6f85 /git-stash.sh
parent79bafd23a82a883ab054c9fcaf1e3d3bea57e4b9 (diff)
parent5675473fcbd18fb320ca17cffc107506f09c7464 (diff)
downloadgit-714485c7deb63e91b1ee7ba07be5f5a55fe03a39.tar.gz
git-714485c7deb63e91b1ee7ba07be5f5a55fe03a39.tar.xz
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-xgit-stash.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/git-stash.sh b/git-stash.sh
index 4b7495144..1114005ce 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
;;