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

Re: Rename detection at git log

From
Junio C Hamano <junkio@cox.net>
Date
Nov 20, 2006, 10:07 UTC
Message-ID
<7vejry5t4g.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<200611200951.05529.andyparkins@gmail.com>
Andy Parkins <andyparkins@gmail.com> writes:
Show 6 quoted lines
> On Monday 2006 November 20 05:57, Alexander Litvinov wrote:
>
>> > PAGER=cat git log -M -C --pretty=oneline b/a
>
> I've come across this too.  Personally I'm not sure what use "-C" is.  From 
> the manpage, man git-diff-files (no, this isn't the place I'd look either).

The real issue here is because the b/a on the command line applies on the input-side, and does not act as the output filter. This comes from _very_ early design decision and if you dig the list archive you will see Linus and I arguing about diffcore-pathspec (which later died off).

What it means is that "git log" will look at path that matches b/a (that means b/a/c and b/a/d are looked at, if b/a were a directory). Since path "a" which is what the file was originally at is not something the pattern b/a matches, there is no way b/a is noticed as a rename from a.

I've been meaning to resurrect Fredrik's --single-follow=path patch but haven't had time to recently, with all the other interesting discussion happening on the list.

Previous: Andy ParkinsNext: Jakub Narebski
Message 3 of 17 in “Rename detection at git log”
  1. Alexander LitvinovNov 20, 2006
  2. Andy ParkinsNov 20, 2006
  3. Junio C HamanoNov 20, 2006
  4. Jakub NarebskiNov 20, 2006
  5. Andy ParkinsNov 20, 2006
  6. Junio C HamanoNov 20, 2006
  7. Andy ParkinsNov 20, 2006
  8. Jakub NarebskiNov 20, 2006
  9. Junio C HamanoNov 20, 2006
  10. Andy ParkinsNov 20, 2006
  11. Junio C HamanoNov 20, 2006
  12. Andy ParkinsNov 20, 2006
  13. Alexander LitvinovNov 20, 2006
  14. Alex RiesenNov 20, 2006
  15. Andy ParkinsNov 20, 2006
  16. Junio C HamanoNov 20, 2006
  17. Andy ParkinsNov 20, 2006

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.