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

Re: [RFC] diff: support custom callbacks for output

From
Junio C Hamano <junkio@cox.net>
Date
Aug 7, 2006, 10:16 UTC
Message-ID
<7vhd0o4zrf.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060807091953.GA31137@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> I'm starting by writing run_status in C. Once that is working (which
> should be soon), I believe it should suffice as a vanilla git-status
> (do people actually do things like git-status with flags? It's not
> documented, but it does work).

Well, "git-status" is by definition (see list discussion when it was made into its current shape) a preview of "git-commit", so all the options are supported and needs to work with options. I just noticed that its documentation has not been updated, though.

So I'd suggest, mildly, against naming your "run_status() equivalent" git-status. And if you follow through your plan, you would most likely have git-status _and_ git-commit both in C at about the same time when you finish.

Show 11 quoted lines
> I'm definitely in favor.
>
>>         Will commit
>>                 modified: Makefile (warning: further changed)
>
> I like it (the double-mention of files which were changed, updated, then
> changed has always bothered me). However, I'm not sure how we can get
> the diff machinery to figure this out easily. Getting the knowledge for
> the line above requires diffing tree to cache and cache to working
> directory. Is there a better way than saving the queue from one diff and
> cross-referencing it with the other?

I do not think so. I was initially planning to write a new traversal function that walks working tree, index _and_ a tree in parallel, but that would not work well with -M and -C, so I dropped it.

Previous: Jeff King
Message 4 of 4 in “[RFC] diff: support custom callbacks for output”
  1. Jeff KingAug 7, 2006
  2. Junio C HamanoAug 7, 2006
  3. Jeff KingAug 7, 2006
  4. Junio C HamanoAug 7, 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.