All of lore.kernel.org
 help / color / mirror / Atom feed
From: Don Zickus <dzickus@redhat.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: suggestions for generating diffs through the revision list
Date: Thu, 19 Jun 2008 17:20:49 -0400	[thread overview]
Message-ID: <20080619212049.GO16941@redhat.com> (raw)
In-Reply-To: <7v63s767mb.fsf@gitster.siamese.dyndns.org>

On Tue, Jun 17, 2008 at 03:04:28PM -0700, Junio C Hamano wrote:
> Don Zickus <dzickus@redhat.com> writes:
> 
> > 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

Hmm. Thanks.  I was trying to keep the diffs in memory and I couldn't find
anything in the api-*.txt that did anything but dump the output the stdout
or a file.

Anyway I just copied a bunch of code from builtin-blame.c and got my tool
to do what I wanted it to do, for now.

Cheers,
Don

      reply	other threads:[~2008-06-19 21:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-17 21:41 suggestions for generating diffs through the revision list Don Zickus
2008-06-17 22:04 ` Junio C Hamano
2008-06-19 21:20   ` Don Zickus [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080619212049.GO16941@redhat.com \
    --to=dzickus@redhat.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.