{"thread":{"id":"29033","subject":"Is there a \"--follow\" equvalent argument to git-rev-list?","startedAt":"2011-11-28T10:37:02Z","lastAt":"2011-11-28T19:53:46Z","messageCount":2,"participants":["Steinar Bang","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"180040","messageId":"87vcq4zg6p.fsf@dod.no","threadId":"29033","inReplyTo":null,"subject":"Is there a \"--follow\" equvalent argument to git-rev-list?","fromName":"Steinar Bang","fromEmail":"sb@dod.no","sentAt":"2011-11-28T10:37:02Z","receivedAt":"2011-11-28T10:37:02Z","isPatch":false,"sender":{"key":"sb@dod.no","avatar":null},"body":"I'm trying to make emacs vc log (`C-x v l') show the full history of git\nversioned files.\n\nIn my first attempt, I tried adding a \"--follow\" argument to \"git log\"\nin the vc-git-print-log message.  This made `C-x v l' show the full log.\n\nBut the problem with this solution was that commands done from the log,\nsuch as diffing (a very convenient way to do diffs, when the \"version\nnumbers\" are sha1 hashes...), showing a particular revision, or\nannotating from that revision and back, didn't work.  See the comment at\nthe end of this bug:\n http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8756\n\nToday I decided to take another peek at this, but vc-git.el in the emacs\n23.1 version of the file, now uses \"git rev-list\" instead of \"git log\"\nto get the revision list.\n\nAnd \"git rev-list\" doesn't seem to have anything similar to\n\"--follow\"...?  At least I haven't found it.\n\nThe man page doesn't contain the text \"renam\".\n\nGuessing at what the man page has meant, I've tried adding the \"--all\"\nand \"--full-history\" arguments, but `C-x v l' still only shows history\nback to the last move.\n\nIs there an argument to \"git rev-list\" that will make it track across\nrenames?  Or is this only possible with \"git log --follow\"?\n\nThanks!\n\n\n- Steinar\n"},{"id":"180063","messageId":"7vaa7guiph.fsf@alter.siamese.dyndns.org","threadId":"29033","inReplyTo":"87vcq4zg6p.fsf@dod.no","subject":"Re: Is there a \"--follow\" equvalent argument to git-rev-list?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-28T19:53:46Z","receivedAt":"2011-11-28T19:53:46Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"[administrivia: do not use Mail-Followup-To here]\n\nSteinar Bang <sb@dod.no> writes:\n\n> Is there an argument to \"git rev-list\" that will make it track across\n> renames?\n\nThere isn't, and it is more or less deliberate.\n\nThe \"log --follow\" is not meant as anything more than a checkbox hack. The\nintended audience of \"rev-list\" is scripts that reads plumbing output and\nit is expected to be capable of doing all of what \"follow\" does and more.\nIt can notice that the path you were following has disappeared at a\nparticular commit, see what other paths (notice the plural, which is not\nwhat --follow does) in the older tree may have contributed the contents of\nthe newly added path by running \"diff-tree -M\" (or -C), etc. That way the\nscripts can even notice a case where a file you were following originally\nwere two separate files that the commit merged into one, which \"follow\"\nwould never do.\n"}]}