git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Philip Oakley <philipoakley@iee.email>
To: Git List <git@vger.kernel.org>
Subject: Trimming 'deadheads' (TREESAME 2nd parent) from revision walks?
Date: Sat, 18 Sep 2021 15:18:47 +0100	[thread overview]
Message-ID: <01fe28d8-2887-bc42-c91b-c3237b5186a7@iee.email> (raw)

Hi all,

Is there a method within `git rev-list` to trim side branch merges where
the merge's tree is identical to the first parent's commit-tree?

One back-story: In the Git-for Windows repository, the previous releases
are 'deadheaded' by merging with the upstream git, and simply taking the
upstream's tree unconditionally. The Git-for-Windows `fixes` are then
rebased onto that merge.

This does mean that all the fixes keep repeating down the 2nd parent
line. So, for example, grep'ing for changes can tricky with so much
repeated chaff, but at least all old versions are directly in the history.

Sometimes it's nice to 'pretend' (a simplified history) that there is
only the one latest series of this 'long lived feature branch' (along
with a similar desire for 'gfw/next` and `gfw/seen`). (one method has
been to `git replace` that merge commit `{/"Start the"}` with it's
parent on a temporary basis).

From my reading of the `rev-list` manual this is similar to the <paths>
TREESAME capability, but without specifying any paths (maybe just `.` ?).

* Is there an existing method for specifying that simplified history?
* Is there a proper term for the treesame condition of the commit-tree
(as recorded in the commit object)?
* Thought's on adding an option for `--follow-treesame`?

The desire also came up in my pondering about progressive/partial merges
(how to represent/hold current state/history) of a large tree, whereby
different authors take different 'bites at the melon' of merging a long
lasting feature branch (the 'ball of mud' type), whereby the result
could be an octopus merge of the main/feature/partial commits, which is
repeated until the partial becomes a finalised merge (the book-ending
and octo-merge is still wip, but would also benefit from the 'feature'
merge technique used by GfW.

--
Philip

             reply	other threads:[~2021-09-18 14:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-18 14:18 Philip Oakley [this message]
2021-09-19 18:59 ` Trimming 'deadheads' (TREESAME 2nd parent) from revision walks? Jeff King
2021-09-19 23:44   ` Ævar Arnfjörð Bjarmason
2021-09-20 11:40     ` Philip Oakley
2021-09-20 20:50       ` Jeff King
2021-09-21 13:36         ` Philip Oakley
2021-09-21 18:24           ` Philip Oakley
2021-10-05 10:53 ` Johannes Schindelin
2021-10-06 14:03   ` Philip Oakley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=01fe28d8-2887-bc42-c91b-c3237b5186a7@iee.email \
    --to=philipoakley@iee.email \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).