{"thread":{"id":"14101","subject":"how to rewalk the commit list after rename detection","startedAt":"2008-06-23T15:38:14Z","lastAt":"2008-06-25T20:50:01Z","messageCount":3,"participants":["Don Zickus","Alex Riesen","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"80713","messageId":"20080623153814.GD15773@redhat.com","threadId":"14101","inReplyTo":null,"subject":"how to rewalk the commit list after rename detection","fromName":"Don Zickus","fromEmail":"dzickus@redhat.com","sentAt":"2008-06-23T15:38:14Z","receivedAt":"2008-06-23T15:38:14Z","isPatch":false,"sender":{"key":"dzickus@redhat.com","avatar":null},"body":"I am trying to find a way to handle a situation where I am looking for a\nchange in a particular file, but the filename is old and has since been\nrenamed.\n\nProcessing the commit list internally (using init_revisions,\nsetup_revisions, get_revision), I can easily find the rename of the file,\nbut that is usually the start of the walk for that file (as it was just\ndeleted for the rename).  I do not know how to re-walk the commits list\narmed with the new file name.\n\nI tried rerunning the same commands as above (init_revisions,\nsetup_revisions, get_revision) but that commit list is empty for some\nreason (I assume the UNINTERESTING flag is never un-set??).\n\nFor example, if I have a backported patch for the upstream kernel in say\nthe arch/i386 directory.  I want to check to see if it is upstream.  I\nwouldn't be able to do that because arch/i386 was renamed to arch/x86.\nUnless of course the patch matches identically upstream (in which case\ngit-cherry works fine), but that isn't always the case (usually it is a\ncombination of a couple of patches).\n\nAnyone have some thoughts if this is possible?\n\nCheers,\nDon\n"},{"id":"81161","messageId":"20080625190404.GE4039@steel.home","threadId":"14101","inReplyTo":"20080623153814.GD15773@redhat.com","subject":"Re: how to rewalk the commit list after rename detection","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2008-06-25T19:04:04Z","receivedAt":"2008-06-25T19:04:04Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Don Zickus, Mon, Jun 23, 2008 17:38:14 +0200:\n> I am trying to find a way to handle a situation where I am looking for a\n> change in a particular file, but the filename is old and has since been\n> renamed.\n> \n> Processing the commit list internally (using init_revisions,\n> setup_revisions, get_revision), I can easily find the rename of the file,\n> but that is usually the start of the walk for that file (as it was just\n> deleted for the rename).  I do not know how to re-walk the commits list\n> armed with the new file name.\n\nTry looking at git log --follow <name>\n"},{"id":"81184","messageId":"m3tzfhi6iz.fsf@localhost.localdomain","threadId":"14101","inReplyTo":"20080625190404.GE4039@steel.home","subject":"Re: how to rewalk the commit list after rename detection","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-06-25T20:50:01Z","receivedAt":"2008-06-25T20:50:01Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Alex Riesen <raa.lkml@gmail.com> writes:\n> Don Zickus, Mon, Jun 23, 2008 17:38:14 +0200:\n> >\n> > I am trying to find a way to handle a situation where I am looking for a\n> > change in a particular file, but the filename is old and has since been\n> > renamed.\n> > \n> > Processing the commit list internally (using init_revisions,\n> > setup_revisions, get_revision), I can easily find the rename of the file,\n> > but that is usually the start of the walk for that file (as it was just\n> > deleted for the rename).  I do not know how to re-walk the commits list\n> > armed with the new file name.\n> \n> Try looking at git log --follow <name>\n\nUnfortunately it _almost_ works, see:\n  \"git log --follow <filename> doesn't follow across 'subtree strategy' merge\"\n  Message-ID: <200806221451.50624.jnareb@gmail.com>\n  http://permalink.gmane.org/gmane.comp.version-control.git/85766\n\n(\"git log --follow gitweb/gitweb.perl follows rename from gitweb/gitweb.cgi,\nbut not rename (moving) from gitweb.cgi in a merge commit).\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"}]}