From: Junio C Hamano <junkio@cox.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, junkio@cox.net
Subject: Re: [PATCH] rev-list --max-age, --max-count: support --boundary
Date: Mon, 19 Feb 2007 15:40:16 -0800 [thread overview]
Message-ID: <7v8xet67j3.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.63.0702190312120.22628@wbgn013.biozentrum.uni-wuerzburg.de> (Johannes Schindelin's message of "Mon, 19 Feb 2007 03:14:59 +0100 (CET)")
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> Now, when saying --max-age=<timestamp>, or --max-count=<n>, together
> with --boundary, rev-list prints the boundary commits, i.e. the
> commits which are _just_ not shown without --boundary, i.e. their
> children are, but they aren't.
>
> Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
> ---
>
> Of course, this is meant to speed up an otherwise expensive
> operation in git-bundle.
>
> However, this touches a very sensitive point in core git:
> the revision walking machinery. It passes all tests, but
> some eyeballing is much appreciated.
I think this looks fine.
Initially I thought setting BOUNDARY_SHOW unconditionally would
be wrong (the "limited" case takes pains to avoid showing
redundant boundary commits), and that was exactly why I said it
would be a bit more involved change, but I do not think of a
topology that needs redundancy removal outside of "limited" case.
> @@ -1336,7 +1342,17 @@ struct commit *get_revision(struct rev_info *revs)
> case -1:
> break;
> case 0:
> - return NULL;
> + if (revs->boundary) {
> + struct commit_list *list = revs->commits;
> + while (list) {
> + list->item->object.flags |=
> + BOUNDARY_SHOW | BOUNDARY;
> + list = list->next;
> + }
> + revs->max_count = -1;
> + revs->limited = 1;
> + } else
> + return NULL;
The resetting of max_count and limited probably needs some
commenting.
next prev parent reply other threads:[~2007-02-19 23:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-19 2:14 [PATCH] rev-list --max-age, --max-count: support --boundary Johannes Schindelin
2007-02-19 23:40 ` Junio C Hamano [this message]
2007-02-20 0:27 ` Johannes Schindelin
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=7v8xet67j3.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox