Add diff-option --ext-diff
[gitweb.git] / git-stash.sh
index 777d1e13515960e20e50efa8eeb05289b8d225fb..9deda443eddd6c12f8c8926610a6de8634bd6dec 100755 (executable)
@@ -67,7 +67,7 @@ save_stash () {
                die "Cannot save the current worktree state"
 
        # create the stash
-       w_commit=$(printf 'WIP on %s' "$msg" |
+       w_commit=$(printf 'WIP on %s\n' "$msg" |
                git commit-tree $w_tree -p $b_commit -p $i_commit) ||
                die "Cannot record working tree state"
 
@@ -137,8 +137,8 @@ apply_stash () {
 
 # Main command set
 case "$1" in
-list | '')
-       test $# -gt 0 && shift
+list)
+       shift
        if test $# = 0
        then
                set x -n 10
@@ -157,7 +157,7 @@ apply)
 clear)
        clear_stash
        ;;
-save)
+save | '')
        save_stash && git-reset --hard
        ;;
 *)