@matheusbsbs / matheus-bagliano / commits / fcb10a9648
Fork 0

git-stash: make "save" the default action again.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Jul 2, 2007 at 23:15 UTC fcb10a964875a987f764af401537689e4aea82c6
2 files changed +7 -6
Documentation/git-stash.txt
+4 -3
@@ -13,7 +13,7 @@ SYNOPSIS
13 DESCRIPTION
14 -----------
15
16 -Use 'git-stash save' when you want to record the current state of the
16 +Use 'git-stash' when you want to record the current state of the
17 working directory and the index, but want to go back to a clean
18 working directory. The command saves your local modifications away
19 and reverts the working directory to match the `HEAD` commit.
@@ -22,7 +22,7 @@ The modifications stashed away by this command can be listed with
22 `git-stash list`, inspected with `git-stash show`, and restored
23 (potentially on top of a different commit) with `git-stash apply`.
24 Calling git-stash without any arguments is equivalent to `git-stash
25 -list`.
25 +save`.
26
27 The latest stash you created is stored in `$GIT_DIR/refs/stash`; older
28 stashes are found in the reflog of this reference and can be named using
@@ -36,7 +36,8 @@ OPTIONS
36 save::
37
38 Save your local modifications to a new 'stash', and run `git-reset
39 - --hard` to revert them.
39 + --hard` to revert them. This is the default action when no
40 + subcommand is given.
41
42 list::
43
git-stash.sh
+3 -3
@@ -137,8 +137,8 @@ apply_stash () {
137
138 # Main command set
139 case "$1" in
140 -list | '')
141 - test $# -gt 0 && shift
140 +list)
141 + shift
142 if test $# = 0
143 then
144 set x -n 10
@@ -157,7 +157,7 @@ apply)
157 clear)
158 clear_stash
159 ;;
160 -save)
160 +save | '')
161 save_stash && git-reset --hard
162 ;;
163 *)