Re: [PATCH] rerere should not repeat the earlier hunks in later ones
- From
Junio C Hamano <junkio@cox.net>
- Date
- Apr 4, 2007, 18:28 UTC
- Message-ID
- <7v8xd83sfn.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.63.0704041746580.4045@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 18 quoted lines
> I wonder if we should also do
>
> diff --git a/builtin-rerere.c b/builtin-rerere.c
> index b8867ab..4eae27b 100644
> --- a/builtin-rerere.c
> +++ b/builtin-rerere.c
> @@ -112,7 +112,8 @@ static int handle_file(const char *path,
> else if (!prefixcmp(buf, ">>>>>>> ")) {
> hunk_no++;
> hunk = 0;
> - if (memcmp(one->ptr, two->ptr, one->nr < two->nr ?
> + if (one->nr > two->nr || memcmp(one->ptr, two->ptr,
> + one->nr < two->nr ?
> one->nr : two->nr) > 0) {
> struct buffer *swap = one;
> one = two;
>
> in case that one conflicting region is prefix of the other one.If one is not a prefix of two but simply longer what does that code do?