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

Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Junio C Hamano 2007-07-02 23:15:45 -07:00
parent 5be60078c9
commit fcb10a9648
2 changed files with 7 additions and 6 deletions

View File

@ -13,7 +13,7 @@ SYNOPSIS
DESCRIPTION DESCRIPTION
----------- -----------


Use 'git-stash save' when you want to record the current state of the Use 'git-stash' when you want to record the current state of the
working directory and the index, but want to go back to a clean working directory and the index, but want to go back to a clean
working directory. The command saves your local modifications away working directory. The command saves your local modifications away
and reverts the working directory to match the `HEAD` commit. 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
`git-stash list`, inspected with `git-stash show`, and restored `git-stash list`, inspected with `git-stash show`, and restored
(potentially on top of a different commit) with `git-stash apply`. (potentially on top of a different commit) with `git-stash apply`.
Calling git-stash without any arguments is equivalent to `git-stash Calling git-stash without any arguments is equivalent to `git-stash
list`. save`.


The latest stash you created is stored in `$GIT_DIR/refs/stash`; older The latest stash you created is stored in `$GIT_DIR/refs/stash`; older
stashes are found in the reflog of this reference and can be named using stashes are found in the reflog of this reference and can be named using
@ -36,7 +36,8 @@ OPTIONS
save:: save::


Save your local modifications to a new 'stash', and run `git-reset Save your local modifications to a new 'stash', and run `git-reset
--hard` to revert them. --hard` to revert them. This is the default action when no
subcommand is given.


list:: list::



View File

@ -137,8 +137,8 @@ apply_stash () {


# Main command set # Main command set
case "$1" in case "$1" in
list | '') list)
test $# -gt 0 && shift shift
if test $# = 0 if test $# = 0
then then
set x -n 10 set x -n 10
@ -157,7 +157,7 @@ apply)
clear) clear)
clear_stash clear_stash
;; ;;
save) save | '')
save_stash && git-reset --hard save_stash && git-reset --hard
;; ;;
*) *)