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

Re: git blame --follow

From
Jakub Narebski <jnareb@gmail.com>
Date
Mar 17, 2011, 16:47 UTC
Message-ID
<201103171747.34452.jnareb@gmail.com>
In-Reply-To
<201103171116.39411.wolfgang@rohdewald.de>
Dnia czwartek 17. marca 2011 11:16, Wolfgang Rohdewald napisał:
> On Donnerstag 17 März 2011, Jakub Narebski wrote:
> > So you probably want to run "git blame -C -C <file>", not "git
> > blame <file>".
> 
> that does the trick - I only tried "git blame -C"

Hmmm... it is described in git-blame(1) manpage, but you have to read it carefully.

"git blame" synopsis states:
 'git blame' [-c] [-b] [-l] [--root] [-t] [-f] [-n] [-s] [-e] [-p] [-w] [--incremental] [-L n,m]
             [-S <revs-file>] [-M] [-C] [-C] [-C] [--since=<date>]
             [<rev> | --contents <file> | --reverse <rev>] [--] <file>
The important thing is to notice '[-C] [-C] [-C]' here.
In the description of '-C' option we have:
  -C|<num>|::
        In addition to `-M`, detect lines moved or copied from other
        files that were modified in the same commit.  This is
        useful when you reorganize your program and move code
        around across files.  When this option is given twice,
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        the command additionally looks for copies from other
        files in the commit that creates the file. When this
        option is given three times, the command additionally
        looks for copies from other files in any commit.
I have underlined important part.
-- 
Jakub Narebski
Poland
Previous: Wolfgang Rohdewald
Message 6 of 6 in “git blame --follow”
  1. Wolfgang RohdewaldMar 15, 2011
  2. Junio C HamanoMar 15, 2011
  3. Wolfgang RohdewaldMar 15, 2011
  4. Jakub NarebskiMar 17, 2011
  5. Wolfgang RohdewaldMar 17, 2011
  6. Jakub NarebskiMar 17, 2011

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.