git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Trimming 'deadheads' (TREESAME 2nd parent) from revision walks?

From
Philip Oakley <philipoakley@iee.email>
Date
Sep 21, 2021, 18:24 UTC
Message-ID
<be7ec330-2b2c-a01f-c7ca-e5e752493ee0@iee.email>
In-Reply-To
<9b85811f-de5d-24b3-36f6-7e2f9be6cae0@iee.email>
On 21/09/2021 14:36, Philip Oakley wrote:
Show 12 quoted lines
> The `theirs` strategy is really only suitable for maintainers, rather
> than solo coders, as it need to be 'old releases` that are kept, rather
> 'old cruft` (I've generated too much of that in my time).
>
> Dscho's scripts (for anyone interested) for GfW are in
> https://github.com/git-for-windows/build-extra/blob/main/shears.sh#L16-L18
> and 
> https://github.com/git-for-windows/build-extra/blob/main/ever-green.sh,
> though from the script perspective it's an 'ours' strategy.
>
> Dscho has to locate the start commit via it's subject line, rather than
> it's topology.

It's taken me a while to realise why/how Dscho is using 'ours', for a 'theirs' merge.

He is inserting that merge into the start of the --merging-rebase's instruction sheet, which means that the rebase itself will reverse the meaning of 'ours' and 'theirs' as it checks out the 'theirs' branch first before performing the actions in the instruction sheet.

Thus the 'ours' strategy now works in our favour, to effectively deadhead the old hear as a 'theirs' merge and then begin the rebasing of the Git-for-Windows patch thicket on top of the latest Git.

Sneaky.

-- Philip (added dscho as cc, just in case I've got it wrong again;-)

Previous: Philip OakleyNext: Johannes Schindelin
Message 7 of 9 in “Trimming 'deadheads' (TREESAME 2nd parent) from revision walks?”
  1. Philip OakleySep 18, 2021
  2. Jeff KingSep 19, 2021
  3. Ævar Arnfjörð BjarmasonSep 19, 2021
  4. Philip OakleySep 20, 2021
  5. Jeff KingSep 20, 2021
  6. Philip OakleySep 21, 2021
  7. Philip OakleySep 21, 2021
  8. Johannes SchindelinOct 5, 2021
  9. Philip OakleyOct 6, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.