Re: [PATCH 1/1] diff-lib: use worktree mode in diffs from i-t-a entries
- From
- Martin Ågren <martin.agren@gmail.com>
- Date
- Aug 8, 2020, 08:48 UTC
- Message-ID
- <CAN0heSoVs+ApvanSOGZJeOvy5DNEMrMAZ41BKUkchmfVE2kTjg@mail.gmail.com>
- In-Reply-To
- <20200808075323.36041-1-ray@ameretat.dev>
On Sat, 8 Aug 2020 at 09:55, Raymond E. Pasco <ray@ameretat.dev> wrote:
Show 5 quoted lines
> > 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