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

Re: Joining a fixed archive with its continuation

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Sep 1, 2006, 14:37 UTC
Message-ID
<Pine.LNX.4.63.0609011634370.28360@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<44F81FE5.1040509@arces.unibo.it>
Hi,
On Fri, 1 Sep 2006, Sergio Callegari wrote:
Show 9 quoted lines
> > P.S.: Of course, if you do not insist on a super clean history, you can fake
> > a merge. Just put <40-hex-chars-old> into .git/MERGE_HEAD and commit. This
> > will pretend that your new head and your old head were merged, and the
> > result is the new head. This _should_ even work with git-bisect, but it is
> > slightly ugly.
> 
> Before I try, can you better explain me what shall go on in this case?
> The man page of commit actually does not say much about commit behavior
> during a merge (i.e. with MERGE_HEAD set).

A merge commit is almost the same as a regulaar commit; the only difference is that you provide multiple parents to a merge commit. The first parent is always the current head. And the other parents are in .git/MERGE_HEAD (one commit SHA1 per line).

So, putting the fixed-master SHA1 into .git/MERGE_HEAD pretends that the fixed-master merged with the current master is the current master.

>From a view point of correctness, this is _wrong_. _But_ it would work 
correctly with pull/push/bisect.

Ciao, Dscho

Previous: Jakub Narebski
Message 3 of 3 in “Joining a fixed archive with its continuation”
  1. Sergio CallegariSep 1, 2006
  2. Jakub NarebskiSep 1, 2006
  3. Johannes SchindelinSep 1, 2006

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.