summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1b118da)
raw | patch | inline | side by side (parent: 1b118da)
author | Junio C Hamano <gitster@pobox.com> | |
Thu, 4 Sep 2008 09:41:22 +0000 (02:41 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 6 Sep 2008 23:16:42 +0000 (16:16 -0700) |
Unlike the case where the user does have a real change in the work tree,
refusing to work because of unclean stat information is not very helpful.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Nanako Shiraishi <nanako3@lavabit.com>
refusing to work because of unclean stat information is not very helpful.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Nanako Shiraishi <nanako3@lavabit.com>
git-stash.sh | patch | blob | history |
diff --git a/git-stash.sh b/git-stash.sh
index e15c12abc31c1e4d22bb3943d70a65ddf33abb53..d799c763788ecd64b2508668f04c329b2de0c391 100755 (executable)
--- a/git-stash.sh
+++ b/git-stash.sh
create_stash () {
stash_msg="$1"
+ git update-index -q --refresh
if no_changes
then
exit 0
stash_msg="$*"
+ git update-index -q --refresh
if no_changes
then
echo 'No local changes to save'
}
apply_stash () {
+ git update-index -q --refresh &&
git diff-files --quiet --ignore-submodules ||
die 'Cannot restore on top of a dirty state'