git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Morten Welinder" <mwelinder@gmail.com>
To: "GIT Mailing List" <git@vger.kernel.org>
Subject: Re: git-annotate efficiency
Date: Fri, 24 Feb 2006 13:00:24 -0500	[thread overview]
Message-ID: <118833cc0602241000p4e4c8017u3e3afe76fbbd75a4@mail.gmail.com> (raw)
In-Reply-To: <118833cc0602240737i42acdc90sb8f93dde1a1bc035@mail.gmail.com>

It looks like handle_rev is seeing the same revisions over and over again.
I don't know why that would be, but the following patch just skips dups.
I have no idea if it is right, though.

Morten


diff --git a/git-annotate.perl b/git-annotate.perl
index 3800c46..a5e2d86 100755
--- a/git-annotate.perl
+++ b/git-annotate.perl
@@ -117,7 +117,10 @@ sub init_claim {

 sub handle_rev {
        my $i = 0;
+       my %seen = ();
        while (my $rev = shift @revqueue) {
+               next if $seen{$rev};
+               $seen{$rev} = 1;

                my %revinfo = git_commit_info($rev);

  reply	other threads:[~2006-02-24 18:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-24 15:37 git-annotate efficiency Morten Welinder
2006-02-24 18:00 ` Morten Welinder [this message]
2006-02-24 19:06   ` Randal L. Schwartz
2006-02-24 19:42   ` Ryan Anderson

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=118833cc0602241000p4e4c8017u3e3afe76fbbd75a4@mail.gmail.com \
    --to=mwelinder@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).