threads / discuss / 51063

How to exchange rerere/redo resolutions?

Subject: How to exchange rerere/redo resolutions?

## tl;dr

10 messages between May 9, 2019 and May 15, 2019.

replies: 9people: 5as markdown or json

Philip Oakley· May 9, 2019, 23:23 UTC · lore
Hi,

Is there a mechanism for exchanging the rerere resolutions, so that future fixups, e.g. future clashes on pu rather than master, can be sent with patch series?

My current use case that there is a large patch [1] for updating long to size_t for use on Windows, which notes that it will have clashes with pu, but doesn't appear to have any method  of sending a rerere resolution (which the author is already aware of) to the list. Being able to flag up such fixes should simplify such conflict resolutions.

I had some very rough ideas about how the resolutions should look rather similar to three-way conflict markers, with the resolution as the 'base' (between the ||| - ||| marks), which would be resolved via a --base merge strategy.

However if there is already a method for exchanging resolutions, where should I look?

Philip

[1] <20190413151850.29037-1-tboegi@web.de> [PATCH v3 1/1] Use size_t instead of 'unsigned long' for data in memory

-- 
Philip
Ævar Arnfjörð Bjarmason· May 9, 2019, 23:49 UTC · re: Philip Oakley · lore

Re: How to exchange rerere/redo resolutions?

On Fri, May 10 2019, Philip Oakley wrote:
Show 22 quoted lines
> Is there a mechanism for exchanging the rerere resolutions, so that
> future fixups, e.g. future clashes on pu rather than master, can be
> sent with patch series?
>
> My current use case that there is a large patch [1] for updating long
> to size_t for use on Windows, which notes that it will have clashes
> with pu, but doesn't appear to have any method  of sending a rerere
> resolution (which the author is already aware of) to the list. Being
> able to flag up such fixes should simplify such conflict resolutions.
>
> I had some very rough ideas about how the resolutions should look
> rather similar to three-way conflict markers, with the resolution as
> the 'base' (between the ||| - ||| marks), which would be resolved via
> a --base merge strategy.
>
> However if there is already a method for exchanging resolutions, where
> should I look?
>
> Philip
>
> [1] <20190413151850.29037-1-tboegi@web.de> [PATCH v3 1/1] Use size_t
> instead of 'unsigned long' for data in memory

You can publish your merged branch somewhere, and others can use contrib/rerere-train.sh to learn from the resolution.

Supposedly, I've never actually used it...
Philip Oakley· May 10, 2019, 14:59 UTC · re: Ævar Arnfjörð Bjarmason · lore

Re: How to exchange rerere/redo resolutions?

On 10/05/2019 00:49, Ævar Arnfjörð Bjarmason wrote:
Show 28 quoted lines
> On Fri, May 10 2019, Philip Oakley wrote:
>
>> Is there a mechanism for exchanging the rerere resolutions, so that
>> future fixups, e.g. future clashes on pu rather than master, can be
>> sent with patch series?
>>
>> My current use case that there is a large patch [1] for updating long
>> to size_t for use on Windows, which notes that it will have clashes
>> with pu, but doesn't appear to have any method  of sending a rerere
>> resolution (which the author is already aware of) to the list. Being
>> able to flag up such fixes should simplify such conflict resolutions.
>>
>> I had some very rough ideas about how the resolutions should look
>> rather similar to three-way conflict markers, with the resolution as
>> the 'base' (between the ||| - ||| marks), which would be resolved via
>> a --base merge strategy.
>>
>> However if there is already a method for exchanging resolutions, where
>> should I look?
>>
>> Philip
>>
>> [1] <20190413151850.29037-1-tboegi@web.de> [PATCH v3 1/1] Use size_t
>> instead of 'unsigned long' for data in memory
> You can publish your merged branch somewhere, and others can use
> contrib/rerere-train.sh to learn from the resolution.
>
> Supposedly, I've never actually used it...

The tricky part is when the patch series doesn't apply so the conflict isn't yet on any branch..

I'm looking to write up some suggestions as a potential project, so that we can all make better use of this capability (hence the `redo` synonym alias suggestion). Philip

Philip Oakley· May 13, 2019, 22:24 UTC · re: Philip Oakley · lore

Re: How to exchange rerere/redo resolutions?

Hi All,
On 10/05/2019 15:59, Philip Oakley wrote:
>> You can publish your merged branch somewhere, and others can use
>> contrib/rerere-train.sh to learn from the resolution.
>>
>> Supposedly, I've never actually used it...

Does the contrib/rerere-train.sh actually work? I'm reading the code to ensure I understand what rerere/redo is doing, and in the training it tries to detect MERGE_RR via L87

     if test -s "$GIT_DIR/MERGE_RR"

It's not clear if that is an internal implementation detail, or a mistaken use of a historic path name. Can anyone enlighten me?

> The tricky part is when the patch series doesn't apply so the conflict 
> isn't yet on any branch.. 

When copying patches across to Git for Windows, the conflict resolution can be tricky. -- Philip

Junio C Hamano· May 13, 2019, 22:46 UTC · re: Philip Oakley · lore

Re: How to exchange rerere/redo resolutions?

Philip Oakley <philipoakley@iee.org> writes:
> Does the contrib/rerere-train.sh actually work?
Yes, but it predates many esoteric things like multiple worktrees.
Ævar Arnfjörð Bjarmason· May 14, 2019, 08:21 UTC · re: Philip Oakley · lore

Re: How to exchange rerere/redo resolutions?

On Tue, May 14 2019, Philip Oakley wrote:
Show 16 quoted lines
> Hi All,
>
> On 10/05/2019 15:59, Philip Oakley wrote:
>>> You can publish your merged branch somewhere, and others can use
>>> contrib/rerere-train.sh to learn from the resolution.
>>>
>>> Supposedly, I've never actually used it...
>
> Does the contrib/rerere-train.sh actually work? I'm reading the code
> to ensure I understand what rerere/redo is doing, and in the training
> it tries to detect MERGE_RR via L87
>
>     if test -s "$GIT_DIR/MERGE_RR"
>
> It's not clear if that is an internal implementation detail, or a
> mistaken use of a historic path name. Can anyone enlighten me?
Historic? No, this is path.c now on master:
    path.c:1454:REPO_GIT_PATH_FUNC(merge_rr, "MERGE_RR")

Internal, sure. We don't document it so it could change in theory, but then we'd probably change rerere-train.sh along with it...

>> The tricky part is when the patch series doesn't apply so the
>> conflict isn't yet on any branch..
> When copying patches across to Git for Windows, the conflict
> resolution can be tricky.
Philip Oakley· May 14, 2019, 23:11 UTC · re: Ævar Arnfjörð Bjarmason · lore

Re: How to exchange rerere/redo resolutions?

Hi Ævar,
On 14/05/2019 09:21, Ævar Arnfjörð Bjarmason wrote:
Show 18 quoted lines
> On Tue, May 14 2019, Philip Oakley wrote:
>
>> Hi All,
>>
>> On 10/05/2019 15:59, Philip Oakley wrote:
>>>> You can publish your merged branch somewhere, and others can use
>>>> contrib/rerere-train.sh to learn from the resolution.
>>>>
>>>> Supposedly, I've never actually used it...
>> Does the contrib/rerere-train.sh actually work? I'm reading the code
>> to ensure I understand what rerere/redo is doing, and in the training
>> it tries to detect MERGE_RR via L87
>>
>>      if test -s "$GIT_DIR/MERGE_RR"
>>
>> It's not clear if that is an internal implementation detail, or a
>> mistaken use of a historic path name. Can anyone enlighten me?
> Historic? No, this is path.c now on master:

Hmm, I'd now agree it's not a mistake, but the implementation detail is historic. I've now found [1,2,3,4] from before I knew of Git! And it's not mentioned in any of the documentation.

Show 5 quoted lines
>
>      path.c:1454:REPO_GIT_PATH_FUNC(merge_rr, "MERGE_RR")
>
> Internal, sure. We don't document it so it could change in theory, but
> then we'd probably change rerere-train.sh along with it...

Hopefully it'll be integrated into rerere/redo before that ;-), along with a bit more documentation on the capability for those who arrived late to the party. The use of this implementation detail came up yesterday in [5].

>>> The tricky part is when the patch series doesn't apply so the
>>> conflict isn't yet on any branch..
>> When copying patches across to Git for Windows, the conflict
>> resolution can be tricky.

-- Philip

[1] git-rerere: reuse recorded resolve, 29 Jan 2006, https://public-inbox.org/git/7v4q3no0v7.fsf@assigned-by-dhcp.cox.net/ [2] StGIT and rerere, 26 Oct 2006, https://public-inbox.org/git/7vfydbkn64.fsf@assigned-by-dhcp.cox.net/ [3] git-explain, 04 Dec 2006, https://public-inbox.org/git/7vwt57j94c.fsf_-_@assigned-by-dhcp.cox.net/ [4] Make git-rerere a builtin, 20 Dec 2006, https://public-inbox.org/git/Pine.LNX.4.63.0612201738000.19693@wbgn013.biozentrum.uni-wuerzburg.de/

[5] merge: add --quit, 14 May 2019 , https://public-inbox.org/git/nycvar.QRO.7.76.6.1905141540300.44@tvgsbejvaqbjf.bet/

Junio C Hamano· May 15, 2019, 01:12 UTC · re: Ævar Arnfjörð Bjarmason · lore

Re: How to exchange rerere/redo resolutions?

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 11 quoted lines
>>     if test -s "$GIT_DIR/MERGE_RR"
>>
>> It's not clear if that is an internal implementation detail, or a
>> mistaken use of a historic path name. Can anyone enlighten me?
>
> Historic? No, this is path.c now on master:
>
>     path.c:1454:REPO_GIT_PATH_FUNC(merge_rr, "MERGE_RR")
>
> Internal, sure. We don't document it so it could change in theory, but
> then we'd probably change rerere-train.sh along with it...

Doesn't the function defined by REPO_GIT_PATH_FUNC() do far more than a simple concatenation? I suspect that he questions why "$GIT_DIR/MERGE_RR" is an OK substitute for that.

The $GIT_DIR variable in the script is set by inclusion of git-sh-setup, that runs "git rev-parse --git-dir"; in post "git worktree" world, where ".git" may be a "gitdir: $real_location" text file, this will give the actual directory, not the path to a regular file at the top of the working tree whose name is ".git", so the answer to the question is that the concatenation we see should be OK, even in the "git worktree" world.

Torsten Bögershausen· May 10, 2019, 14:05 UTC · re: Philip Oakley · lore

Re: How to exchange rerere/redo resolutions?

On Fri, May 10, 2019 at 12:23:28AM +0100, Philip Oakley wrote:
Show 28 quoted lines
> Hi,
>
> Is there a mechanism for exchanging the rerere resolutions, so that future
> fixups, e.g. future clashes on pu rather than master, can be sent with patch
> series?
>
> My current use case that there is a large patch [1] for updating long to
> size_t for use on Windows, which notes that it will have clashes with pu,
> but doesn't appear to have any method  of sending a rerere resolution (which
> the author is already aware of) to the list. Being able to flag up such
> fixes should simplify such conflict resolutions.
>
> I had some very rough ideas about how the resolutions should look rather
> similar to three-way conflict markers, with the resolution as the 'base'
> (between the ||| - ||| marks), which would be resolved via a --base merge
> strategy.
>
> However if there is already a method for exchanging resolutions, where
> should I look?
>
> Philip
>
> [1] <20190413151850.29037-1-tboegi@web.de> [PATCH v3 1/1] Use size_t instead
> of 'unsigned long' for data in memory
>
> --
> Philip
>

That is not an answer to the question. If it helps, I can rebase the first patch onto git.git/master, and the cherry-pick the next patches. That can happen next week or so. And then let it go through the normal pu->next->master->git-for-windows workflow.

Philip Oakley· May 10, 2019, 15:10 UTC · re: Torsten Bögershausen · lore

Re: How to exchange rerere/redo resolutions?

Hi Torsten,
On 10/05/2019 15:05, Torsten Bögershausen wrote:
Show 34 quoted lines
> On Fri, May 10, 2019 at 12:23:28AM +0100, Philip Oakley wrote:
>> Hi,
>>
>> Is there a mechanism for exchanging the rerere resolutions, so that future
>> fixups, e.g. future clashes on pu rather than master, can be sent with patch
>> series?
>>
>> My current use case that there is a large patch [1] for updating long to
>> size_t for use on Windows, which notes that it will have clashes with pu,
>> but doesn't appear to have any method  of sending a rerere resolution (which
>> the author is already aware of) to the list. Being able to flag up such
>> fixes should simplify such conflict resolutions.
>>
>> I had some very rough ideas about how the resolutions should look rather
>> similar to three-way conflict markers, with the resolution as the 'base'
>> (between the ||| - ||| marks), which would be resolved via a --base merge
>> strategy.
>>
>> However if there is already a method for exchanging resolutions, where
>> should I look?
>>
>> Philip
>>
>> [1] <20190413151850.29037-1-tboegi@web.de> [PATCH v3 1/1] Use size_t instead
>> of 'unsigned long' for data in memory
>>
>> --
>> Philip
>>
> That is not an answer to the question.
> If it helps, I can rebase the first patch onto git.git/master, and the
> cherry-pick the next patches. That can happen next week or so.
> And then let it go through the normal pu->next->master->git-for-windows workflow.
>

Thanks for the offer, but I should be OK. dscho has already asked that for testing on Git for Windows I rebase my series back onto master, rather than pu. The series is at https://github.com/git-for-windows/git/pull/2179#issuecomment-491095412 -- Philip

← back to recent threads