git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC] use typechange as rename source

From
Jeff King <peff@peff.net>
Date
Dec 1, 2007, 06:17 UTC
Message-ID
<20071201061748.GA2606@coredump.intra.peff.net>
In-Reply-To
<7v8x4f6iyu.fsf@gitster.siamese.dyndns.org>
On Fri, Nov 30, 2007 at 10:08:41PM -0800, Junio C Hamano wrote:
Show 8 quoted lines
> 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.

Show 6 quoted lines
> > -	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
Previous: Junio C HamanoNext: Junio C Hamano
Message 10 of 14 in “[RFC] use typechange as rename source”
  1. Jeff KingNov 21, 2007
  2. Junio C HamanoNov 29, 2007
  3. Jeff KingNov 29, 2007
  4. Junio C HamanoNov 30, 2007
  5. Jeff KingNov 30, 2007
  6. Junio C HamanoDec 1, 2007
  7. Jeff KingDec 1, 2007
  8. Junio C HamanoDec 1, 2007
  9. Junio C HamanoDec 1, 2007
  10. Jeff KingDec 1, 2007
  11. Junio C HamanoDec 1, 2007
  12. Jeff KingDec 1, 2007
  13. Junio C HamanoDec 2, 2007
  14. Jeff KingDec 3, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.