Re: [PATCH] rerere.txt: Document forget subcommand

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Junio C Hamano
Date: Wednesday, June 16, 2010 - 10:33 am

Michael J Gruber <git@drmicha.warpmail.net> writes:


The latter.  You can have more than one rerere database entries for the
same path (i.e. merge conflict resolutions for unrelated branches, each of
which changes unrelated things that happen to be in the same path).  The
entries in the rerere database are "when we see a conflict of this shape
(anywhere), the user wants to resolve it this way", indexed by the shape
of the conflict.  There is no "path" recorded in the database.

When "rerere forget" is run, it needs to be told which entry to forget,
and this is done by regenerating the conflict you just had (and possibly
have already resolved, if you are using recent enough git that knows
"resolve undo") using the information in the index, and <pathspec> is used
to limit this set (i.e. when you have more than one path conflicted in the
current merge).


Once you write the result of a merge out to a tree, the tree does not even
know if there was a conflict.  It does not know how you arrived to that
state in general.  You simply don't have enough information after reading
a tree into your index in order to "amend" it.  When reading a tree that
belongs to a merge commit into the index, we _could_ try to regenerate the
conflicted state and immediately resolve them to the tree's state but I
don't think it is worth the cost and complexity.  Besides, at that point
you do not even know what merge strategy (and which version of that
strategy) was originally used.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] rerere.txt: Document forget subcommand, Michael J Gruber, (Mon Jun 14, 11:21 pm)
Re: [PATCH] rerere.txt: Document forget subcommand, Junio C Hamano, (Tue Jun 15, 9:37 am)
Re: [PATCH] rerere.txt: Document forget subcommand, Jay Soffian, (Tue Jun 15, 9:45 am)
Re: [PATCH] rerere.txt: Document forget subcommand, Michael J Gruber, (Wed Jun 16, 12:42 am)
Re: [PATCH] rerere.txt: Document forget subcommand, Junio C Hamano, (Wed Jun 16, 10:33 am)
[PATCHv2] rerere.txt: Document forget subcommand, Michael J Gruber, (Mon Jul 5, 6:15 am)