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

Re: suggestions for generating diffs through the revision list

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 17, 2008, 22:04 UTC
Message-ID
<7v63s767mb.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080617214142.GM16941@redhat.com>
Don Zickus <dzickus@redhat.com> writes:
Show 20 quoted lines
> I am try to walk the revision history for a given path and analyze the
> diff (as compared to its parent).  What is the proper way of doing that?
>
> I noticed a bunch of 'library' calls such as
>
> init_revsion(&revs);
> setup_revisions(argc, argv, &revs, "HEAD");
> prepare_revision_walk(&revs, NULL);
> commit = get_revision(&revs);
>
> But what I can't find is the way to generate diffs.  I see lots and lots
> of code to do it, but every builtin seems to do it differently.  Not
> knowing the internals that well, I was hoping for some advice.
>
> I stumbled upon calls like
>
> run_diff_files
> run_diff_index
>
> but I haven't seen how to use them correctly.
Documentation/technical/api-*.txt
Previous: Don ZickusNext: Don Zickus
Message 2 of 3 in “suggestions for generating diffs through the revision list”
  1. Don ZickusJun 17, 2008
  2. Junio C HamanoJun 17, 2008
  3. Don ZickusJun 19, 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.