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

git-log - hide parent (was: merging two equivalent branches)

From
David Reitter <david.reitter@gmail.com>
Date
Jan 7, 2010, 21:16 UTC
Message-ID
<DF05F91F-CBFD-458A-A99F-79E98ACA5146@gmail.com>
In-Reply-To
<46d6db661001071022t79ca65foac249d948a20c328@mail.gmail.com>
On Jan 7, 2010, at 1:22 PM, Christian MICHON wrote:
> I recall asking a similar question in 2008, and the answer was to look
> at "git graft" and use "git filter-branch" to recreate history.
Thanks, I've tried that and I recall that filter-branch wasn't willing to rewrite just the recent history - at least in started going over all 100k revisions at a very slow pace.  

I'm still unsure how, after the filter-branch, I would have some ancestor from the B series so that future pulls from the remote work, while having an ancestor from A, to make sure I can continue merging into C. If history is rewritten, I'll get new revisions and lose ancestors. I'm beginning to thing that the cutting and pasting I'd like is conceptually impossible.

So what one would need is to specify a "silent parent" for a revision that is relevant w.r.t. future three-way merges, but indicates that the history behind the silent parent is irrelevant and shouldn't be shown in a git-log.  The runaway parent would be guaranteed to _not_ contribute any content to the tree of the child revision, as is the case with a "merge ours".
This could be implemented as a way to mark a parent as silent (checked by git-log at least), but one could also allow for an empty commit that, while having a normal parent, clears out the tree. 
Let me know if this idea is completely crazy. 
Previous: Christian MICHONNext: Christian Couder
Message 3 of 6 in “merging two equivalent branches”
  1. David ReitterJan 7, 2010
  2. Christian MICHONJan 7, 2010
  3. git-log - hide parent (was: merging two equivalent branches)David Reitter, Jan 7, 2010
  4. Christian CouderJan 8, 2010
  5. David ReitterJan 12, 2010
  6. Avery PennarunJan 8, 2010

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.