summaryrefslogtreecommitdiff
path: root/git-stash.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2008-05-14 18:03:59 +0100
committerJunio C Hamano <gitster@pobox.com>2008-05-15 16:12:43 -0700
commit6848d58c60b7af365ce54cf3e3b274a2f9da2e7e (patch)
tree381f5f3f7a3bce86560329e9ad2290cc71e758e6 /git-stash.sh
parent5fdeacb0ca3935923ab988c81414c16080db6a32 (diff)
downloadgit-6848d58c60b7af365ce54cf3e3b274a2f9da2e7e.tar.gz
Ignore dirty submodule states during rebase and stash
When rebasing or stashing, chances are that you do not care about dirty submodules, since they are not updated by those actions anyway. So ignore the submodules' states. Note: the submodule states -- as committed in the superproject -- will still be stashed and rebased, it is _just_ the state of the submodule in the working tree which is ignored. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-stash.sh')
-rwxr-xr-xgit-stash.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/git-stash.sh b/git-stash.sh
index c2b68205a2..4938ade589 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -15,8 +15,8 @@ trap 'rm -f "$TMP-*"' 0
ref_stash=refs/stash
no_changes () {
- git diff-index --quiet --cached HEAD -- &&
- git diff-files --quiet
+ git diff-index --quiet --cached HEAD --ignore-submodules -- &&
+ git diff-files --quiet --ignore-submodules
}
clear_stash () {
@@ -130,7 +130,7 @@ show_stash () {
}
apply_stash () {
- git diff-files --quiet ||
+ git diff-files --quiet --ignore-submodules ||
die 'Cannot restore on top of a dirty state'
unstash_index=