diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-09-06 16:47:32 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-09-06 16:47:32 -0700 |
commit | 4a09bc966449ca0a7e9a5bb70f91b47debdd7c4e (patch) | |
tree | e5bfb6f6467031660b19a3afeb51cbd732664342 /git-stash.sh | |
parent | Merge branch 'jc/maint-log-grep' (diff) | |
parent | Update draft release notes for 1.6.0.2 (diff) | |
download | tgif-4a09bc966449ca0a7e9a5bb70f91b47debdd7c4e.tar.xz |
Merge branch 'maint'
* maint:
Update draft release notes for 1.6.0.2
stash: refresh the index before deciding if the work tree is dirty
Mention the fact that 'git annotate' is only for backward compatibility.
"blame -c" should be compatible with "annotate"
git-gui: Fix diff parsing for lines starting with "--" or "++"
git-gui: Fix string escaping in po2msg.sh
git gui: show diffs with a minimum of 1 context line
git-gui: update all remaining translations to French.
git-gui: Update french translation
Diffstat (limited to 'git-stash.sh')
-rwxr-xr-x | git-stash.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/git-stash.sh b/git-stash.sh index e15c12abc3..d799c76378 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -39,6 +39,7 @@ clear_stash () { create_stash () { stash_msg="$1" + git update-index -q --refresh if no_changes then exit 0 @@ -101,6 +102,7 @@ save_stash () { stash_msg="$*" + git update-index -q --refresh if no_changes then echo 'No local changes to save' @@ -150,6 +152,7 @@ show_stash () { } apply_stash () { + git update-index -q --refresh && git diff-files --quiet --ignore-submodules || die 'Cannot restore on top of a dirty state' |