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, 14:21 UTC
- Message-ID
- <CAN0heSpY5w5n71C24bNSfJr3tThbVQgHxKS4Wb4PvEECCYHu-A@mail.gmail.com>
- In-Reply-To
- <C4RJZM9BYO1C.21M5GRE871JIN@ziyou.local>
On Sat, 8 Aug 2020 at 13:24, Raymond E. Pasco <ray@ameretat.dev> wrote:
Show 15 quoted lines
> > On Sat Aug 8, 2020 at 4:48 AM EDT, Martin Ågren wrote: > > 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. > > I see both styles around in the tree (past for the state of the world > before this patch, present for the state of the world as of this patch, > vs. present for the state of the world just before and just after > applying this patch). Neither is unreadable to me so I just want to do > whatever's the standard around here.
Yeah, there are all kinds of log messages in the history. SubmittingPatches (search for "imperative") recommends this way of writing.
Show 6 quoted lines
> (I'm not convinced, as a matter of grammar, that the > commit-message-present verb form is really in the imperative mood; I > think the freeform nature of English grammar obscures that it's the > present active infinitive, analogous to, say, the fact that a French > software program with an "open file" button will say "ouvrir" and not > "ouvrez".)
When you put it that way, I'm also not sure. :-)
> The whole set of i-t-a diffing behaviors needs a test suite (unless I've > grepped very poorly), which will come in another patchset. t4140 in this > thread's main patchset assumes they work.
I did grep a little when I wrote my previous reply and I didn't find anything either.
I guess you could add a very small testcase here and then base that future series on top of this commit. Or in lieu of a test, maybe this could be used:
Tested-by: Martin Ågren <martin.agren@gmail.com>
Martin