Subject: Re: feature suggestion: improve rerere

From: Johannes Sixt <[email-masked]>
Date: Wed, 06 Mar 2013 14:24:18 +0100

Am 3/6/2013 11:16, schrieb Uwe Kleine-König:
> 	++<<<<<<< ours
> 	 +ssize_t xread(int fd, void *buf, size_t count)
> 	 +{
> 	 +	ssize_t ret, done = 0;
> 	 +
> 	 +retry:
> 	 +	ret = read(fd, buf + done, count - done);
> 	 +	if (ret < 0)
> 	 +		return ret;
> 	 +
> 	 +	done += ret;
> 	 +
> 	 +	if (ret == 0 /* EOF */ || done == count)
> 	 +		return done;
> 	 +	else
> 	 +		goto retry;
> 	 +}
> 	 +
> 	++||||||| base
> 	++=======
> 	+ #include "common.h"
> 	+ 
> 	++>>>>>>> theirs
> 	  int main(int argc,char *argv[])
> 	  {
> 		int fd, val, ret, size, wrote, len;
> 
> This is the same conflict as the first one, just with ours and theirs
> exchanged. So my suggestion is to make rerere use the resolution
> recorded for the first conflict here.
> 
> Sounds sensible?

Of course, and rerere already does it. But only when you use git's default
conflict markers rather than diff3 style markers that have this extra
||||| line.

-- Hannes