git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* use of temporary refs in resolve
@ 2005-08-07 19:44 Junio C Hamano
  2005-08-07 20:02 ` Linus Torvalds
  2005-08-08  8:50 ` Catalin Marinas
  0 siblings, 2 replies; 10+ messages in thread
From: Junio C Hamano @ 2005-08-07 19:44 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: git

As promised I was looking into the fetching side today, but I
ended up trying to figure out the current operation of resolve
first.

Here is my understanding of various "temporary heads" left
directly underneath $GIT_DIR:

    HEAD      : updated only after successful auto merge.

    ORIG_HEAD : records the head value before resolve started.
                if automerge fails, this is the same as HEAD,
                but after successful automerge, this can be used
                to see what the previous head was.  This is the
                first parent of the resulting commit.

    MERGE_HEAD: present if auto merge is unsuccessful and
		records the other head being merged.

    LAST_MERGE: present if merge is unsuccessful or impossible and
		records the other head being merged.

Whenever resolve fails, LAST_MERGE would be there, while
MERGE_HEAD exists only when we attempted and failed an
automerge.  I would propose to change this to leave LAST_MERGE
only when we did not even attempt to automerge.

Also ORIG_HEAD is probably redundant.  After a successful
automerge, the same information can be had by HEAD^1, and after
a failure, it is HEAD.  We do not use the existence of that file
to detect if we are in a middle of the merge (MERGE_HEAD is used
for that purpose by git-commit).  We may want stop writing to it
in git-resolve.

What do you think?

Another thing I was thinking was to give git-resolve an ability
to take more than two commits to do octopus ;-).  Instead of
using the third argument as a merge commit message, we would say
(for backward compatibilities' sake) the last one is the
message.  When we fail halfway, things would probably become messy,
so this needs be postponed until some more thought.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-08-09 12:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-07 19:44 use of temporary refs in resolve Junio C Hamano
2005-08-07 20:02 ` Linus Torvalds
2005-08-07 20:12   ` Junio C Hamano
2005-08-07 20:18     ` Linus Torvalds
2005-08-08  8:50 ` Catalin Marinas
2005-08-08  9:06   ` Junio C Hamano
2005-08-08 10:26     ` Catalin Marinas
2005-08-09  2:48       ` Junio C Hamano
2005-08-09  9:07         ` Catalin Marinas
2005-08-09 12:51           ` Junio C Hamano

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 NNTP newsgroup(s).