Re: [PATCH 9/9] rerere forget path: forget recorded resolution
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Jan 5, 2010, 21:25 UTC
- Message-ID
- <4B43AE38.9070800@kdbg.org>
- In-Reply-To
- <1262122958-9378-10-git-send-email-gitster@pobox.com>
Junio C Hamano schrieb:
Show 16 quoted lines
> After you find out an earlier resolution you told rerere to use was a
> mismerge, there is no easy way to clear it. A new subcommand "forget" can
> be used to tell git to forget a recorded resolution, so that you can redo
> the merge from scratch.
> ...
> diff --git a/rerere.c b/rerere.c
> index f013ae7..c1da6f6 100644
> --- a/rerere.c
> +++ b/rerere.c
> ...
> +static int handle_cache(const char *path, unsigned char *sha1)
> +{
> +...
> + ll_merge(&result, path, &mmfile[0],
> + &mmfile[1], "ours",
> + &mmfile[2], "theirs", 0);When you simply call ll_merge(), will it obey any merge drivers that are defined in .gitattributes? Do we care about them?
I already had an implementation of "rerere forget" before you presented this solution, but it relies on that the user calls "checkout --conflict=merge" first. One reason (besides its simplicity) was that it does not have to care how the merge is computed.
[I haven't submitted my solution, yet, because I haven't had the time to do this large merge where I expect to make use "rerere forget", testing its usefulness.]
-- Hannes