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

Re: how to rewalk the commit list after rename detection

From
Jakub Narebski <jnareb@gmail.com>
Date
Jun 25, 2008, 20:50 UTC
Message-ID
<m3tzfhi6iz.fsf@localhost.localdomain>
In-Reply-To
<20080625190404.GE4039@steel.home>
Alex Riesen <raa.lkml@gmail.com> writes:
Show 13 quoted lines
> Don Zickus, Mon, Jun 23, 2008 17:38:14 +0200:
> >
> > I am trying to find a way to handle a situation where I am looking for a
> > change in a particular file, but the filename is old and has since been
> > renamed.
> > 
> > Processing the commit list internally (using init_revisions,
> > setup_revisions, get_revision), I can easily find the rename of the file,
> > but that is usually the start of the walk for that file (as it was just
> > deleted for the rename).  I do not know how to re-walk the commits list
> > armed with the new file name.
> 
> Try looking at git log --follow <name>
Unfortunately it _almost_ works, see:
  "git log --follow <filename> doesn't follow across 'subtree strategy' merge"
  Message-ID: <200806221451.50624.jnareb@gmail.com>
  http://permalink.gmane.org/gmane.comp.version-control.git/85766

("git log --follow gitweb/gitweb.perl follows rename from gitweb/gitweb.cgi, but not rename (moving) from gitweb.cgi in a merge commit).

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Alex Riesen
Message 3 of 3 in “how to rewalk the commit list after rename detection”
  1. Don ZickusJun 23, 2008
  2. Alex RiesenJun 25, 2008
  3. Jakub NarebskiJun 25, 2008

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.