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

Re: What's in git.git

From
Junio C Hamano <junkio@cox.net>
Date
Mar 13, 2006, 05:01 UTC
Message-ID
<7vlkvfszu5.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060310104443.GA4491@c165.ib.student.liu.se>
Fredrik Kuivinen <freku045@student.liu.se> writes:
Show 8 quoted lines
> On Mon, Mar 06, 2006 at 10:05:41PM +1300, Martin Langhoff wrote:
>> 
>> Add fuel to the fire  ;-) Can git-blame take cached git-rev-list
>> output like annotate does with -S?
>
> Currently it cannot do that. How is that option used? If you want to
> make annotate/blame faster for certain files you might as well cache
> the output of annotate/blame instead of the git-rev-list output, no?

There are two reasons Martin's git-cvsserver uses -S to feed you the revision list. One is that he already has that ancestry chain information, and there is no point for him to have the git-annotate command to recompute it.

But there is another, more important reason. He is giving his clients a modified world view where the branch he is exposing to have _no_ merges -- just a single strand of pearls. So what is fed to git-annotate using -S from git-cvsserver has either one object name (single root commit) or two (the commit and its sole parent). IOW, he does not want you to look at other parents when dealing with a merge commit.

What this means is that in cases where your algorithm looked at second and subsequent parents to pass remaining blame on after looking at the first parent for a merge, the algorithm now needs to assign the blame to the merge commit itself. Your process_commit() currently reads the commit object and loops over its true parents, but the -S flag wants to supply its own notion of who are the parents of whom (and in the case of git-cvsserver, it always supplies at most one parent) so you would need to honor that instead of looking at the real ancestry.

Previous: Martin LanghoffNext: Johannes Schindelin
Message 7 of 9 in “What's in git.git”
  1. Junio C HamanoMar 6, 2006
  2. blame: unbreak "diff -U 0".Junio C Hamano, Mar 6, 2006
  3. Martin LanghoffMar 6, 2006
  4. Fredrik KuivinenMar 10, 2006
  5. Johannes SchindelinMar 10, 2006
  6. Martin LanghoffMar 10, 2006
  7. Junio C HamanoMar 13, 2006
  8. Johannes SchindelinMar 6, 2006
  9. Lukas SandströmMar 6, 2006

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.