From: Martin Ă…gren Date: Sat, 08 Aug 2020 08:48:40 GMT Subject: Re: [PATCH 1/1] diff-lib: use worktree mode in diffs from i-t-a entries Message-ID: In-Reply-To: <20200808075323.36041-1-ray@ameretat.dev> On Sat, 8 Aug 2020 at 09:55, Raymond E. Pasco 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