X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-stash.sh;h=4938ade589f2f7d1c69bd53f7bc7bc1bd33f488c;hb=6fd6aec44fe79dff61fd37a5fec2456c5458b574;hp=c2b68205a2b69eb91b2403e11238093fc65c04ef;hpb=bd56ff54f710d463a6858bdc7ef6245f9ef30f42;p=git.git diff --git a/git-stash.sh b/git-stash.sh index c2b68205a..4938ade58 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=