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

Re: [PATCH] Add git-annotate, a tool for assigning blame.

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 24, 2006, 00:52 UTC
Message-ID
<Pine.LNX.4.63.0602240148250.32472@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<7vek1thaop.fsf@assigned-by-dhcp.cox.net>
Hi,
On Thu, 23 Feb 2006, Junio C Hamano wrote:
Show 22 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> >> > This could probably benefit a *LOT* from the libification project, I
> >> > think, though.
> >> 
> >> Yes, perhaps. Some of the git-rev-list bits might simplify a couple of
> >> things.
> >
> > The major problem is probably not solved: What Linus calls a "stream 
> > interface".
> >
> > I.e. if you pipe the output of git-rev-list to another program, you 
> > *need* to execute the two semi-simultaneously. The "alternative" would be 
> > to use buffers, which can get huge (and are sometimes not needed: think 
> > git-whatchanged, which starts outputting before it's getting no more 
> > input).
> 
> You need a limited coroutine support, something like generator
> functions in Python ;-).  In C, traditional way of doing it is
> to make your application specific function a callback of
> rev-list or whatever generator is, which is very unpleasant to
> code.

The most unpleasant aspect is that you usually need something like "this" in C++: a pointer to an object (which you have to pass around all the time). Without it you can not use the function in a nested way.

However, I can also see benefits of this when compared to the traditional UNIX approach. It should be faster, for one, since you don't need to pass data through pipes all the time. (This might be not as true for Linux as for other OSes.)

Ciao, Dscho

Previous: Junio C Hamano
Message 13 of 13 in “Add git-annotate, a tool for assigning blame.”
  1. Add git-annotate, a tool for assigning blame.Ryan Anderson, Feb 20, 2006
  2. Junio C HamanoFeb 20, 2006
  3. Fredrik KuivinenFeb 20, 2006
  4. Junio C HamanoFeb 21, 2006
  5. Fredrik KuivinenFeb 28, 2006
  6. Junio C HamanoFeb 28, 2006
  7. Ryan AndersonFeb 28, 2006
  8. Andreas EricssonFeb 28, 2006
  9. Ryan AndersonFeb 23, 2006
  10. Fredrik KuivinenFeb 23, 2006
  11. Johannes SchindelinFeb 24, 2006
  12. Junio C HamanoFeb 24, 2006
  13. Johannes SchindelinFeb 24, 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.