diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-12-20 01:45:33 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-12-20 01:45:33 +0300 |
commit | db09f21bbd74d87ef26c059d39442518c44a422c (patch) | |
tree | a460e6c7edc86d9620ae0f7e7dd41824761079d5 /git-stash.sh | |
parent | da72ee87fb5f27f44b1b48a18765ab1c6280f070 (diff) | |
parent | 9d4e28ead5bf133d014dfc9e9345f6bf083eefea (diff) |
Merge branch 'jk/stash-disable-renames-internally'
When diff.renames configuration is on (and with Git 2.9 and later,
it is enabled by default, which made it worse), "git stash"
misbehaved if a file is removed and another file with a very
similar content is added.
* jk/stash-disable-renames-internally:
stash: prefer plumbing over git-diff
Diffstat (limited to 'git-stash.sh')
-rwxr-xr-x | git-stash.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git-stash.sh b/git-stash.sh index 4546abaaef..10c284d1aa 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -115,7 +115,7 @@ create_stash () { git read-tree --index-output="$TMPindex" -m $i_tree && GIT_INDEX_FILE="$TMPindex" && export GIT_INDEX_FILE && - git diff --name-only -z HEAD -- >"$TMP-stagenames" && + git diff-index --name-only -z HEAD -- >"$TMP-stagenames" && git update-index -z --add --remove --stdin <"$TMP-stagenames" && git write-tree && rm -f "$TMPindex" |