X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=git-stash.sh;h=0f858d334c756f9cd4028b4950a3912d0f6182dd;hb=a7e664fc2a43c93da57c827b8ef9b7e15de2f249;hp=59db3dc38e72fda88d521171a174c08b919677a9;hpb=055e1e29696c0fb06582c1592ee6b58643dcc514;p=git.git diff --git a/git-stash.sh b/git-stash.sh index 59db3dc38..0f858d334 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" ) ) ||