On Sat, 8 Aug 2020 at 09:55, Raymond E. Pasco <ray@xxxxxxxxxxxx> wrote: > > 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. Good catch! Describing the current state of affairs and using imperative mode, it could be something like: When creating "new file" diffs against i-t-a index entries, diff-lib erroneously uses the mode of the cache entry rather than the mode of the file in the worktree. Change run_diff_files() to correctly use the mode of the worktree file in this case. More importantly: I can confirm that the bug is there before your patch and that your patch fixes it. Could you add a test in this patch so we can trust that this stays fixed? Martin