]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-stash.sh
git-stash: use stdout instead of stderr for non error messages
[thirdparty/git.git] / git-stash.sh
index f16fd9c3c0e5b9248623d1d65146504c603fc840..4d5e5c0be7941b48fcf33364ee36d08d626ea487 100755 (executable)
@@ -86,7 +86,7 @@ save_stash () {
 
        if no_changes
        then
-               echo >&2 'No local changes to save'
+               echo 'No local changes to save'
                exit 0
        fi
        test -f "$GIT_DIR/logs/$ref_stash" ||
@@ -99,7 +99,7 @@ save_stash () {
 
        git update-ref -m "$stash_msg" $ref_stash $w_commit ||
                die "Cannot save the current status"
-       printf >&2 'Saved "%s"\n' "$stash_msg"
+       printf 'Saved working directory and index state "%s"\n' "$stash_msg"
 }
 
 have_stash () {
@@ -228,7 +228,9 @@ create)
 *)
        if test $# -eq 0
        then
-               save_stash && git-reset --hard
+               save_stash &&
+               echo '(To restore them type "git stash apply")' &&
+               git-reset --hard
        else
                usage
        fi