diff-lib: use worktree mode in diffs from i-t-a entries
authorRaymond E. Pasco <ray@ameretat.dev>
Sat, 8 Aug 2020 07:53:23 +0000 (03:53 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sun, 9 Aug 2020 18:14:29 +0000 (11:14 -0700)
commitcb0dd22b827a0533a8ba105764388269e59d010c
tree5c79283df944289084e0b2943336dc8767933528
parent3080c5098049228cd561f08ee4cc31839251d579
diff-lib: use worktree mode in diffs from i-t-a entries

When creating "new file" diffs against i-t-a index entries, diff-lib
erroneously used the mode of the cache entry rather than the mode of the
file in the worktree. This changes run_diff_files() to correctly use the
mode of the worktree file in this case.

Signed-off-by: Raymond E. Pasco <ray@ameretat.dev>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff-lib.c