{"thread":{"id":"51063","subject":"How to exchange rerere/redo resolutions?","startedAt":"2019-05-09T23:23:30Z","lastAt":"2019-05-15T01:12:41Z","messageCount":10,"participants":["Philip Oakley","Ævar Arnfjörð Bjarmason","Torsten Bögershausen","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"375273","messageId":"b8e56556-6c83-9e37-38e9-ac67f51b5cd2@iee.org","threadId":"51063","inReplyTo":null,"subject":"How to exchange rerere/redo resolutions?","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":"2019-05-09T23:23:28Z","receivedAt":"2019-05-09T23:23:30Z","isPatch":false,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"Hi,\n\nIs there a mechanism for exchanging the rerere resolutions, so that \nfuture fixups, e.g. future clashes on pu rather than master, can be sent \nwith patch series?\n\nMy current use case that there is a large patch [1] for updating long to \nsize_t for use on Windows, which notes that it will have clashes with \npu, but doesn't appear to have any method  of sending a rerere \nresolution (which the author is already aware of) to the list. Being \nable to flag up such fixes should simplify such conflict resolutions.\n\nI had some very rough ideas about how the resolutions should look rather \nsimilar to three-way conflict markers, with the resolution as the 'base' \n(between the ||| - ||| marks), which would be resolved via a --base \nmerge strategy.\n\nHowever if there is already a method for exchanging resolutions, where \nshould I look?\n\nPhilip\n\n[1] <20190413151850.29037-1-tboegi@web.de> [PATCH v3 1/1] Use size_t \ninstead of 'unsigned long' for data in memory\n\n-- \nPhilip\n\n"},{"id":"375274","messageId":"871s17xk79.fsf@evledraar.gmail.com","threadId":"51063","inReplyTo":"b8e56556-6c83-9e37-38e9-ac67f51b5cd2@iee.org","subject":"Re: How to exchange rerere/redo resolutions?","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2019-05-09T23:49:14Z","receivedAt":"2019-05-09T23:49:20Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Fri, May 10 2019, Philip Oakley wrote:\n\n> Is there a mechanism for exchanging the rerere resolutions, so that\n> future fixups, e.g. future clashes on pu rather than master, can be\n> sent with patch series?\n>\n> My current use case that there is a large patch [1] for updating long\n> to size_t for use on Windows, which notes that it will have clashes\n> with pu, but doesn't appear to have any method  of sending a rerere\n> resolution (which the author is already aware of) to the list. Being\n> able to flag up such fixes should simplify such conflict resolutions.\n>\n> I had some very rough ideas about how the resolutions should look\n> rather similar to three-way conflict markers, with the resolution as\n> the 'base' (between the ||| - ||| marks), which would be resolved via\n> a --base merge strategy.\n>\n> However if there is already a method for exchanging resolutions, where\n> should I look?\n>\n> Philip\n>\n> [1] <20190413151850.29037-1-tboegi@web.de> [PATCH v3 1/1] Use size_t\n> instead of 'unsigned long' for data in memory\n\nYou can publish your merged branch somewhere, and others can use\ncontrib/rerere-train.sh to learn from the resolution.\n\nSupposedly, I've never actually used it...\n"},{"id":"375297","messageId":"20190510140539.77elozdmfnlkys3v@tb-raspi4","threadId":"51063","inReplyTo":"b8e56556-6c83-9e37-38e9-ac67f51b5cd2@iee.org","subject":"Re: How to exchange rerere/redo resolutions?","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2019-05-10T14:05:40Z","receivedAt":"2019-05-10T14:05:49Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On Fri, May 10, 2019 at 12:23:28AM +0100, Philip Oakley wrote:\n> Hi,\n>\n> Is there a mechanism for exchanging the rerere resolutions, so that future\n> fixups, e.g. future clashes on pu rather than master, can be sent with patch\n> series?\n>\n> My current use case that there is a large patch [1] for updating long to\n> size_t for use on Windows, which notes that it will have clashes with pu,\n> but doesn't appear to have any method  of sending a rerere resolution (which\n> the author is already aware of) to the list. Being able to flag up such\n> fixes should simplify such conflict resolutions.\n>\n> I had some very rough ideas about how the resolutions should look rather\n> similar to three-way conflict markers, with the resolution as the 'base'\n> (between the ||| - ||| marks), which would be resolved via a --base merge\n> strategy.\n>\n> However if there is already a method for exchanging resolutions, where\n> should I look?\n>\n> Philip\n>\n> [1] <20190413151850.29037-1-tboegi@web.de> [PATCH v3 1/1] Use size_t instead\n> of 'unsigned long' for data in memory\n>\n> --\n> Philip\n>\n\nThat is not an answer to the question.\nIf it helps, I can rebase the first patch onto git.git/master, and the\ncherry-pick the next patches. That can happen next week or so.\nAnd then let it go through the normal pu->next->master->git-for-windows workflow.\n\n"},{"id":"375298","messageId":"37ccaad0-40b4-ca63-e057-791119d7fa69@talktalk.net","threadId":"51063","inReplyTo":"871s17xk79.fsf@evledraar.gmail.com","subject":"Re: How to exchange rerere/redo resolutions?","fromName":"Philip Oakley","fromEmail":"philipoakley@talktalk.net","sentAt":"2019-05-10T14:59:59Z","receivedAt":"2019-05-10T15:00:04Z","isPatch":false,"sender":{"key":"philipoakley@talktalk.net","avatar":null},"body":"On 10/05/2019 00:49, Ævar Arnfjörð Bjarmason wrote:\n> On Fri, May 10 2019, Philip Oakley wrote:\n>\n>> Is there a mechanism for exchanging the rerere resolutions, so that\n>> future fixups, e.g. future clashes on pu rather than master, can be\n>> sent with patch series?\n>>\n>> My current use case that there is a large patch [1] for updating long\n>> to size_t for use on Windows, which notes that it will have clashes\n>> with pu, but doesn't appear to have any method  of sending a rerere\n>> resolution (which the author is already aware of) to the list. Being\n>> able to flag up such fixes should simplify such conflict resolutions.\n>>\n>> I had some very rough ideas about how the resolutions should look\n>> rather similar to three-way conflict markers, with the resolution as\n>> the 'base' (between the ||| - ||| marks), which would be resolved via\n>> a --base merge strategy.\n>>\n>> However if there is already a method for exchanging resolutions, where\n>> should I look?\n>>\n>> Philip\n>>\n>> [1] <20190413151850.29037-1-tboegi@web.de> [PATCH v3 1/1] Use size_t\n>> instead of 'unsigned long' for data in memory\n> You can publish your merged branch somewhere, and others can use\n> contrib/rerere-train.sh to learn from the resolution.\n>\n> Supposedly, I've never actually used it...\nThe tricky part is when the patch series doesn't apply so the conflict \nisn't yet on any branch..\n\nI'm looking to write up some suggestions as a potential project, so that \nwe can all make better use of this capability (hence the `redo` synonym \nalias suggestion).\nPhilip\n"},{"id":"375300","messageId":"744473e7-14e6-fed0-664b-ac0a75e80919@iee.org","threadId":"51063","inReplyTo":"20190510140539.77elozdmfnlkys3v@tb-raspi4","subject":"Re: How to exchange rerere/redo resolutions?","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":"2019-05-10T15:10:39Z","receivedAt":"2019-05-10T15:10:43Z","isPatch":false,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"Hi Torsten,\n\nOn 10/05/2019 15:05, Torsten Bögershausen wrote:\n> On Fri, May 10, 2019 at 12:23:28AM +0100, Philip Oakley wrote:\n>> Hi,\n>>\n>> Is there a mechanism for exchanging the rerere resolutions, so that future\n>> fixups, e.g. future clashes on pu rather than master, can be sent with patch\n>> series?\n>>\n>> My current use case that there is a large patch [1] for updating long to\n>> size_t for use on Windows, which notes that it will have clashes with pu,\n>> but doesn't appear to have any method  of sending a rerere resolution (which\n>> the author is already aware of) to the list. Being able to flag up such\n>> fixes should simplify such conflict resolutions.\n>>\n>> I had some very rough ideas about how the resolutions should look rather\n>> similar to three-way conflict markers, with the resolution as the 'base'\n>> (between the ||| - ||| marks), which would be resolved via a --base merge\n>> strategy.\n>>\n>> However if there is already a method for exchanging resolutions, where\n>> should I look?\n>>\n>> Philip\n>>\n>> [1] <20190413151850.29037-1-tboegi@web.de> [PATCH v3 1/1] Use size_t instead\n>> of 'unsigned long' for data in memory\n>>\n>> --\n>> Philip\n>>\n> That is not an answer to the question.\n> If it helps, I can rebase the first patch onto git.git/master, and the\n> cherry-pick the next patches. That can happen next week or so.\n> And then let it go through the normal pu->next->master->git-for-windows workflow.\n>\nThanks for the offer, but I should be OK. dscho has already asked that \nfor testing on Git for Windows I rebase my series back onto master, \nrather than pu. The series is at \nhttps://github.com/git-for-windows/git/pull/2179#issuecomment-491095412\n--\nPhilip\n"},{"id":"375423","messageId":"d139d79a-f35a-e00c-3790-104146b066c7@iee.org","threadId":"51063","inReplyTo":"37ccaad0-40b4-ca63-e057-791119d7fa69@talktalk.net","subject":"Re: How to exchange rerere/redo resolutions?","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":"2019-05-13T22:24:41Z","receivedAt":"2019-05-13T22:24:45Z","isPatch":false,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"Hi All,\n\nOn 10/05/2019 15:59, Philip Oakley wrote:\n>> You can publish your merged branch somewhere, and others can use\n>> contrib/rerere-train.sh to learn from the resolution.\n>>\n>> Supposedly, I've never actually used it...\n\nDoes the contrib/rerere-train.sh actually work? I'm reading the code to \nensure I understand what rerere/redo is doing, and in the training it \ntries to detect MERGE_RR via L87\n\n     if test -s \"$GIT_DIR/MERGE_RR\"\n\nIt's not clear if that is an internal implementation detail, or a \nmistaken use of a historic path name. Can anyone enlighten me?\n\n> The tricky part is when the patch series doesn't apply so the conflict \n> isn't yet on any branch.. \nWhen copying patches across to Git for Windows, the conflict resolution \ncan be tricky.\n--\nPhilip\n\n"},{"id":"375431","messageId":"xmqqsgti9dmq.fsf@gitster-ct.c.googlers.com","threadId":"51063","inReplyTo":"d139d79a-f35a-e00c-3790-104146b066c7@iee.org","subject":"Re: How to exchange rerere/redo resolutions?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-05-13T22:46:21Z","receivedAt":"2019-05-13T22:46:27Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Philip Oakley <philipoakley@iee.org> writes:\n\n> Does the contrib/rerere-train.sh actually work?\n\nYes, but it predates many esoteric things like multiple worktrees.\n\n"},{"id":"375474","messageId":"87mujpwiod.fsf@evledraar.gmail.com","threadId":"51063","inReplyTo":"d139d79a-f35a-e00c-3790-104146b066c7@iee.org","subject":"Re: How to exchange rerere/redo resolutions?","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2019-05-14T08:21:06Z","receivedAt":"2019-05-14T08:21:12Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Tue, May 14 2019, Philip Oakley wrote:\n\n> Hi All,\n>\n> On 10/05/2019 15:59, Philip Oakley wrote:\n>>> You can publish your merged branch somewhere, and others can use\n>>> contrib/rerere-train.sh to learn from the resolution.\n>>>\n>>> Supposedly, I've never actually used it...\n>\n> Does the contrib/rerere-train.sh actually work? I'm reading the code\n> to ensure I understand what rerere/redo is doing, and in the training\n> it tries to detect MERGE_RR via L87\n>\n>     if test -s \"$GIT_DIR/MERGE_RR\"\n>\n> It's not clear if that is an internal implementation detail, or a\n> mistaken use of a historic path name. Can anyone enlighten me?\n\nHistoric? No, this is path.c now on master:\n\n    path.c:1454:REPO_GIT_PATH_FUNC(merge_rr, \"MERGE_RR\")\n\nInternal, sure. We don't document it so it could change in theory, but\nthen we'd probably change rerere-train.sh along with it...\n\n>> The tricky part is when the patch series doesn't apply so the\n>> conflict isn't yet on any branch..\n> When copying patches across to Git for Windows, the conflict\n> resolution can be tricky.\n"},{"id":"375570","messageId":"acad0bcf-e124-156d-569e-21024b7617a7@iee.org","threadId":"51063","inReplyTo":"87mujpwiod.fsf@evledraar.gmail.com","subject":"Re: How to exchange rerere/redo resolutions?","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":"2019-05-14T23:11:09Z","receivedAt":"2019-05-14T23:11:12Z","isPatch":false,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"Hi Ævar,\n\nOn 14/05/2019 09:21, Ævar Arnfjörð Bjarmason wrote:\n> On Tue, May 14 2019, Philip Oakley wrote:\n>\n>> Hi All,\n>>\n>> On 10/05/2019 15:59, Philip Oakley wrote:\n>>>> You can publish your merged branch somewhere, and others can use\n>>>> contrib/rerere-train.sh to learn from the resolution.\n>>>>\n>>>> Supposedly, I've never actually used it...\n>> Does the contrib/rerere-train.sh actually work? I'm reading the code\n>> to ensure I understand what rerere/redo is doing, and in the training\n>> it tries to detect MERGE_RR via L87\n>>\n>>      if test -s \"$GIT_DIR/MERGE_RR\"\n>>\n>> It's not clear if that is an internal implementation detail, or a\n>> mistaken use of a historic path name. Can anyone enlighten me?\n> Historic? No, this is path.c now on master:\nHmm, I'd now agree it's not a mistake, but the implementation detail is \nhistoric. I've now found [1,2,3,4] from before I knew of Git! And it's \nnot mentioned in any of the documentation.\n>\n>      path.c:1454:REPO_GIT_PATH_FUNC(merge_rr, \"MERGE_RR\")\n>\n> Internal, sure. We don't document it so it could change in theory, but\n> then we'd probably change rerere-train.sh along with it...\nHopefully it'll be integrated into rerere/redo before that ;-), along \nwith a bit more documentation on the capability for those who arrived \nlate to the party. The use of this implementation detail came up \nyesterday in [5].\n>>> The tricky part is when the patch series doesn't apply so the\n>>> conflict isn't yet on any branch..\n>> When copying patches across to Git for Windows, the conflict\n>> resolution can be tricky.\n--\nPhilip\n\n[1] git-rerere: reuse recorded resolve, 29 Jan 2006, \nhttps://public-inbox.org/git/7v4q3no0v7.fsf@assigned-by-dhcp.cox.net/\n[2] StGIT and rerere, 26 Oct 2006, \nhttps://public-inbox.org/git/7vfydbkn64.fsf@assigned-by-dhcp.cox.net/\n[3] git-explain, 04 Dec 2006, \nhttps://public-inbox.org/git/7vwt57j94c.fsf_-_@assigned-by-dhcp.cox.net/\n[4] Make git-rerere a builtin, 20 Dec 2006, \nhttps://public-inbox.org/git/Pine.LNX.4.63.0612201738000.19693@wbgn013.biozentrum.uni-wuerzburg.de/ \n\n[5] merge: add --quit, 14 May 2019 , \nhttps://public-inbox.org/git/nycvar.QRO.7.76.6.1905141540300.44@tvgsbejvaqbjf.bet/\n"},{"id":"375578","messageId":"xmqqr2908qrh.fsf@gitster-ct.c.googlers.com","threadId":"51063","inReplyTo":"87mujpwiod.fsf@evledraar.gmail.com","subject":"Re: How to exchange rerere/redo resolutions?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-05-15T01:12:34Z","receivedAt":"2019-05-15T01:12:41Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n>>     if test -s \"$GIT_DIR/MERGE_RR\"\n>>\n>> It's not clear if that is an internal implementation detail, or a\n>> mistaken use of a historic path name. Can anyone enlighten me?\n>\n> Historic? No, this is path.c now on master:\n>\n>     path.c:1454:REPO_GIT_PATH_FUNC(merge_rr, \"MERGE_RR\")\n>\n> Internal, sure. We don't document it so it could change in theory, but\n> then we'd probably change rerere-train.sh along with it...\n\nDoesn't the function defined by REPO_GIT_PATH_FUNC() do far more\nthan a simple concatenation?  I suspect that he questions why\n\"$GIT_DIR/MERGE_RR\" is an OK substitute for that.\n\nThe $GIT_DIR variable in the script is set by inclusion of\ngit-sh-setup, that runs \"git rev-parse --git-dir\"; in post \"git\nworktree\" world, where \".git\" may be a \"gitdir: $real_location\" text\nfile, this will give the actual directory, not the path to a regular\nfile at the top of the working tree whose name is \".git\", so the\nanswer to the question is that the concatenation we see should be\nOK, even in the \"git worktree\" world.\n\n"}]}