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

Re: Is there a "--follow" equvalent argument to git-rev-list?

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 28, 2011, 19:53 UTC
Message-ID
<7vaa7guiph.fsf@alter.siamese.dyndns.org>
In-Reply-To
<87vcq4zg6p.fsf@dod.no>
[administrivia: do not use Mail-Followup-To here]
Steinar Bang <sb@dod.no> writes:
> Is there an argument to "git rev-list" that will make it track across
> renames?
There isn't, and it is more or less deliberate.

The "log --follow" is not meant as anything more than a checkbox hack. The intended audience of "rev-list" is scripts that reads plumbing output and it is expected to be capable of doing all of what "follow" does and more. It can notice that the path you were following has disappeared at a particular commit, see what other paths (notice the plural, which is not what --follow does) in the older tree may have contributed the contents of the newly added path by running "diff-tree -M" (or -C), etc. That way the scripts can even notice a case where a file you were following originally were two separate files that the commit merged into one, which "follow" would never do.

Previous: Steinar Bang
Message 2 of 2 in “Is there a "--follow" equvalent argument to git-rev-list?”
  1. Steinar BangNov 28, 2011
  2. Junio C HamanoNov 28, 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.