Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [RFC] use typechange as rename source

From: Jeff King <hidden>
Date: 2016-06-15 22:43:55

On Fri, Nov 30, 2007 at 10:08:41PM -0800, Junio C Hamano wrote:
I think it does make a difference, if you have a cross rename that
swaps:

	$ ls -F foo bar
        bar	foo@
        $ mv foo tmp; mv bar foo; mv tmp bar
        $ ls -F foo bar
        bar@	foo
OK, I see now what you were saying before. Yes, we do want them actually
broken, and my initial patch is not right in that sense.
quoted
-	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.
OK, good. I was sitting there puzzling over what in the world this
change meant.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help