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

git-log --follow?

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 12, 2007, 08:31 UTC
Message-ID
<7vsl7uvx8v.fsf_-_@assigned-by-dhcp.cox.net>
In-Reply-To
<7vzm22vyin.fsf@assigned-by-dhcp.cox.net>

The message I am following up is a patch to unpack-trees.c, whose basic code structure is Daniel's work, so I wanted to CC him and the easiest way to look his address up was to run git-log on it.

Not so.

The "blame -C unpack-trees.c" output consists of this distribution of origin:

    464 read-tree.c
    337 unpack-trees.c
     74 builtin-read-tree.c
     11 tree.c
      8 tree.h

and most of the work by Daniel was done when the bulk of code was still in read-tree.c. Naturally the log output of unpack-trees.c does not have a single commit by him. "git log -- unpack-trees.c" would not follow into read-tree.c, but I thought "git log --follow -- unpack-trees.c" is supposed to; I tried it for the first time, but it does not seem to work as well as I hoped.

I think this is just a testament that "following renames" is not as useful in a real project as people seem to believe, not a real complaint.

When 16da134 created unpack-trees.c, it initially moved only very small part of builtin-read-tree.c to it. Later 076b0adc made further code movements from builtin-read-tree.c to unpack-trees.c.

An interesting thing is that builtin-read-tree.c immediately before 16da134 is much similar to unpack-trees.c in 076b0adc than unpack-trees.c in 16da134, exactly because of this stepwise code movements. I do not think people can argue that "human user knows he is renaming the file so recording the human intention would have helped git a lot better" in this case, as the human user who made 16da134 did not even intend to do a rename.

Previous: Junio C HamanoNext: Johannes Schindelin
Message 6 of 11 in “[BUG (or misfeature?)] git checkout and symlinks”
  1. Pierre HabouzitJul 4, 2007
  2. Junio C HamanoJul 4, 2007
  3. Pierre HabouzitJul 4, 2007
  4. Pierre HabouzitJul 4, 2007
  5. Teach read-tree 2-way merge to ignore intermediate symlinksJunio C Hamano, Jul 12, 2007
  6. git-log --follow?Junio C Hamano, Jul 12, 2007
  7. Johannes SchindelinJul 12, 2007
  8. Linus TorvaldsJul 12, 2007
  9. Junio C HamanoJul 12, 2007
  10. Linus TorvaldsJul 12, 2007
  11. Pierre HabouzitJul 12, 2007

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.