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

Re: BUG:git-log --follow <path> should never trim output WRT equivalent git-log <path>

From
Jeff King <peff@peff.net>
Date
Mar 25, 2008, 01:45 UTC
Message-ID
<20080325014504.GA15864@coredump.intra.peff.net>
In-Reply-To
<loom.20080324T161602-184@post.gmane.org>
On Mon, Mar 24, 2008 at 04:19:01PM +0000, Santiago Gala wrote:
Show 10 quoted lines
> $ git log  -M -C -C --color --stat --follow -- gitk-git/po/de.po | wc -l
> 0
> sgala@marlow ~/newcode/git/git (master)$ git log  -M -C -C --color --stat --
> gitk-git/po/de.po | wc -l
> 31
> $ git --version
> git version 1.5.4.4
> 
> I find very strange that --follow makes git log to stop outputting the first
> entries.

I think the tricky thing here is that every one of those commits is a merge, which doesn't actually "introduce" any content, and that probably confuses the "--follow" code.

The thing is that getting the history of gitk-git specifically is a bit tricky. All of the commits actually happen to, e.g., the file 'gitk' in the main gitk repository, and then Junio merges it into git using a special "subtree" merge as 'gitk-git/gitk'. So looking at a path in 'gitk-git' will always just turn up merge commits; the actual commits took place on a different path.

But I haven't looked too closely at what's going on, so I may be way off base. My two cents.

-Peff
Previous: Santiago Gala
Message 2 of 2 in “BUG:git-log --follow <path> should never trim output WRT equivalent git-log <path>”
  1. Santiago GalaMar 24, 2008
  2. Jeff KingMar 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.