]> asedeno.scripts.mit.edu Git - git.git/blobdiff - git-stash.sh
GIT 1.5.5-rc2
[git.git] / git-stash.sh
index 5e3eb56791463e8aa10a6b8683411a5c231f1274..c2b68205a2b69eb91b2403e11238093fc65c04ef 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Copyright (c) 2007, Nanako Shiraishi
 
-USAGE='[  | save | list | show | apply | clear | drop | create ]'
+USAGE='[  | save | list | show | apply | clear | drop | pop | create ]'
 
 SUBDIRECTORY_OK=Yes
 OPTIONS_SPEC=
@@ -256,6 +256,14 @@ drop)
        shift
        drop_stash "$@"
        ;;
+pop)
+       shift
+       if apply_stash "$@"
+       then
+               test -z "$unstash_index" || shift
+               drop_stash "$@"
+       fi
+       ;;
 *)
        if test $# -eq 0
        then