From: Junio C Hamano Date: Sat, 01 Dec 2007 06:13:13 GMT Subject: Re: [RFC] use typechange as rename source Message-ID: <7v8x4f6iyu.fsf@gitster.siamese.dyndns.org> In-Reply-To: <7vhcj36j6e.fsf@gitster.siamese.dyndns.org> Junio C Hamano writes: > diff --git a/diffcore-break.c b/diffcore-break.c > index c71a226..69afc07 100644 > --- a/diffcore-break.c > +++ b/diffcore-break.c > @@ -52,8 +52,8 @@ static int should_break(struct diff_filespec *src, > * is the default. > */ > > - if (!S_ISREG(src->mode) || !S_ISREG(dst->mode)) > - return 0; /* leave symlink rename alone */ > + if (object_type(src->mode) != object_type(dst->mode)) > + return 1; /* even their types are different */ Oops, this part is wrong. It should be checking ISREG and stuff.