Re: [PATCH] add -p: coalesce hunks before testing applicability

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

On 03/06/2019 14:40, Johannes Schindelin wrote:
Hi Phillip,

On Sun, 2 Jun 2019, Phillip Wood wrote:

On 22/03/2019 14:06, Johannes Schindelin wrote:

On Thu, 13 Sep 2018, Phillip Wood wrote:

On 03/09/2018 20:01, Jochen Sprickerhof wrote:

* Phillip Wood <phillip.wood@xxxxxxxxxxxx> [2018-08-30 14:47]:

We could restore the old test condition and coalesce the hunks
by copying all the hunks and setting $hunk->{USE}=1 when
creating the test patch if that turns out to be useful (it would
be interesting to see if the test still passes with that
change).

We set USE=1 for $newhunk already, or where would you set it?

To match the old test it needs to be set on the hunks we've skipped
or haven't got to yet so they're all in the patch that's tested
after editing a hunk.

The way I fixed this in the C code is by teaching the equivalent of
the `coalesce_overlapping_hunks()` function to simply ignore the
equivalent of `$hunk->{USE}`: the function signature takes an
additional `use_all` parameter, which will override the `use` field.

That sounds like a good solution. Thanks for working on the conversion
to C, I'll try and find time look at the code on github.

Please note that I did not update the Pull Requests on GitGitGadget
lately, as I had no reviewer feedback on #170 and did not want to waste
too much time on synchronizing my work between those PRs and Git for Windows
(which now has the built-in `git add -i` as an opt-in feature).

So: the latest patches (as of time of writing) can be found here:
https://github.com/git-for-windows/git/compare/9f09372011%5E...9f09372011%5E2

Thanks, I left some comments on the commits on the add-p-in-c branch at https://github.com/dscho [1,2] before I saw your email. I've still got quite a few commits to look at so I'll leave any further comments on the git-for-windows repo instead.

Best Wishes

Phillip
[1] https://github.com/dscho/git/commit/9b7d0fbb095e9e14491d4344981ae346c97e1692

[2] https://github.com/dscho/git/commit/74e058179ae7743a8a99e5a20d5362bf55563505




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux