From: Linus Torvalds Date: Sat, 01 Jul 2006 16:25:43 GMT Subject: Re: A note on merging conflicts.. Message-ID: In-Reply-To: <20060701150926.GA25800@lsrfire.ath.cx> On Sat, 1 Jul 2006, Rene Scharfe wrote: > > You mean something like the following patch on top of the 'next' branch? > It also documents the --not switch because I needed it for the example. Yes. However, I think that 90% of the code for the ".." and "..." case are the same, as is largely the finding of it. So why not just do this all inside the already existing dotdot = strstr(arg, ".."); if (dotdot) { unsigned char other_sha1[20]; const char *one = arg; const char *two = arg + 2; int symmetric = *two == '.'; *dotdot = '\0'; two += symmetric; if (one == arg) one = "HEAD"; if (!*two) two = "HEAD"; ... because the only difference is really at the very end. Did you test that it looks correct too? Linus