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

Re: [PATCH] Bug: failed octopus merge does not create MERGE_HEAD

From
Michal Sojka <sojkam1@fel.cvut.cz>
Date
Mar 14, 2010, 19:24 UTC
Message-ID
<87r5nmzoyf.fsf@steelpick.localdomain>
In-Reply-To
<7vr5no7xlo.fsf@alter.siamese.dyndns.org>
On Sat, 13 Mar 2010, Junio C Hamano wrote:
Show 5 quoted lines
> Hmm.
> 
> When it detects conflicts, and refuses to make a merge, the octopus
> backend says "should not be doing an octopus".  As far as I can tell,
> MERGE_HEAD is useful only when resolving conflicts, and the octopus
There is also another use - see below.
> strongly discourages recording anything but the simplest conflict-free
> merges.

How can I know in advance that the merge will be conflict free? I have a script which merges a bunch of (simple) topic branches which usually merge without conflict, but from time to time some branch evolves and conflicts.

> That makes me think that not writing the file out would be the more
> correct thing to do.
Show 8 quoted lines
> 
> One possibility I can think of is that we try to prevent user mistakes by
> checking the existence of MERGE_HEAD (i.e. "can't do this, you are still
> during a merge"), and not writing MERGE_HEAD in this case, but still
> potentially leaving the index unmerged, may allow some operations that we
> should prevent from being invoked to proceed.  Is that the issue you are
> trying to address?  Or is there something else?  Why do you want to have
> MERGE_HEAD?

I'm using zsh and vcs_info which shows me git repo status in my prompt (see e.g. http://www.jukie.net/~bart/blog/pimping-out-zsh-prompt). vcs_info tests for existence of MERGE_HEAD to signalize that you are in the middle of merge. If MERGE_HEAD is not created I do not see a big red waning in my prompt and I expect the merge to be successful.

In my experiments I found that octopus creates MERGE_HEAD in several situations but not in the one when a branch modifies the file and another deletes it. Therefore I think it is a bug.

-Michal
Previous: Junio C Hamano
Message 3 of 3 in “Bug: failed octopus merge does not create MERGE_HEAD”
  1. Bug: failed octopus merge does not create MERGE_HEADMichal Sojka, Mar 12, 2010
  2. Junio C HamanoMar 13, 2010
  3. Michal SojkaMar 14, 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.