X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=git-stash.sh;h=1d95447d03f342811dd77386f2e83d0814beabf2;hb=48c250a121a425a1860226b6a7061aecfbab5246;hp=908aab2659ca5d66d8091e474c484dd8d9b88c0c;hpb=e2ab0227aab5cdcede3b39e4c95b118f09a71d29;p=git.git diff --git a/git-stash.sh b/git-stash.sh index 908aab265..1d95447d0 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -86,7 +86,7 @@ create_stash () { GIT_INDEX_FILE="$TMP-index" && export GIT_INDEX_FILE && git read-tree -m $i_tree && - git add -u && + git diff --name-only -z HEAD | git update-index -z --add --remove --stdin && git write-tree && rm -f "$TMP-index" ) ) ||