All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Hommey <mh@glandium.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: Question about the revision walking API
Date: Tue, 6 Jan 2015 19:51:22 +0900	[thread overview]
Message-ID: <20150106105122.GA32170@glandium.org> (raw)
In-Reply-To: <xmqq4ms4qk91.fsf@gitster.dls.corp.google.com>

On Tue, Jan 06, 2015 at 02:24:58AM -0800, Junio C Hamano wrote:
> Mike Hommey <mh@glandium.org> writes:
> 
> > I would like to know if the revision walking API works as one would
> > expect with a calling sequence like the following:
> >
> > - init_revisions
> > - add_pending_object/setup_revisions
> > - prepare_revision_walk
> > - get_revision (repeated)
> > - reset_revision_walk (I guess)
> 
> Around here you would need to clear flag bits left on the objects by
> your previous traversal.  After "git log A..B", commits in that
> range would have various combinations of SEEN, ADDED and SHOWN

afaics, that's what reset_revision_walk does.

> flags, and also some commits reachable from A would be marked as
> UNINTERESTING.

Do you mean the ancestry of A? That wouldn't matter in my case.

> You do not want these to interfere with your next
> traversal which may not have anything to do with what you computed
> with the previous round.

Okay, so aiui, doing a revision walk doesn't impact anything other
than the object flags, so I can safely use add_pending_object to add
to what I already had in the rev_info?

Cheers,

Mike

  reply	other threads:[~2015-01-06 10:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-06  2:02 Question about the revision walking API Mike Hommey
2015-01-06 10:24 ` Junio C Hamano
2015-01-06 10:51   ` Mike Hommey [this message]
2015-01-06 13:37 ` Christian Couder
2015-01-06 18:30   ` Junio C Hamano

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=20150106105122.GA32170@glandium.org \
    --to=mh@glandium.org \
    --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.