summaryrefslogtreecommitdiff
path: root/tests/diff/parse.c
diff options
context:
space:
mode:
authorDavid Turner <novalis@novalis.org>2018-06-04 12:56:08 -0400
committerDavid Turner <novalis@novalis.org>2018-06-06 14:45:56 -0400
commit5a7d454bf657fdf4d726f2319bf554ffd4486ed3 (patch)
tree3851bd2fceb18cf3d641670874aac4eb1b44795f /tests/diff/parse.c
parentbae6ed62010508c2e2b0559f9eee41e62e52eb7a (diff)
downloadlibgit2-5a7d454bf657fdf4d726f2319bf554ffd4486ed3.tar.gz
Fix stash save bug with fast path index check
If the index contains stat data for a modified file, and the file is not racily dirty, and there exists an untracked working tree directory alphabetically after that file, and there are no other changes to the repo, then git_stash_save would fail. It would confuse the untracked working tree directory for the modified file, because they have the same sha: zero. The wt directory has a sha of zero because it's a directory, and the file would have a zero sha because we wouldn't read the file -- we would just know that it doesn't match the index. To fix this confusion, we simply check mode as well as SHA.
Diffstat (limited to 'tests/diff/parse.c')
0 files changed, 0 insertions, 0 deletions