Git development
 help / color / mirror / Atom feed
From: Luben Tuikov <ltuikov@yahoo.com>
To: git@vger.kernel.org
Subject: [PATCH rev-list.c] max-count in terms of intersection
Date: Fri, 18 Nov 2005 13:47:22 -0800 (PST)	[thread overview]
Message-ID: <20051118214722.4449.qmail@web31813.mail.mud.yahoo.com> (raw)

diff-tree 768b79de9eadc38a839332df0fcce021f7174d6d (from 2e67a5f449f4026097494569f871d79bf263ab28)
tree 6403fc730f8d5843043788f4c2f466727ba94bc0
parent 2e67a5f449f4026097494569f871d79bf263ab28
author Luben Tuikov <ltuikov@yahoo.com> 1132349344 -0500
committer Luben Tuikov <ltuikov@yahoo.com> 1132349344 -0500

    [PATCH rev-list.c] max-count in terms of intersection
    
    When a path designation is given, max-count counts the number
    of commits therein (intersection), not globally.
    
    This avoids the case where in case path has been inactive
    for the last N commits, --max-count=N and path designation
    at git-rev-list is given, would give no commits.
    
    Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>

diff --git a/rev-list.c b/rev-list.c
index 6e6ffde..e17f928 100644
--- a/rev-list.c
+++ b/rev-list.c
@@ -124,8 +124,6 @@ static int filter_commit(struct commit *
                stop_traversal=1;
                return CONTINUE;
        }
-       if (max_count != -1 && !max_count--)
-               return STOP;
        if (no_merges && (commit->parents && commit->parents->next))
                return CONTINUE;
        if (paths && dense) {
@@ -148,6 +146,9 @@ static int process_commit(struct commit 
                return CONTINUE;
        }
 
+       if (max_count != -1 && !max_count--)
+               return STOP;
+
        show_commit(commit);
 
        return CONTINUE;

             reply	other threads:[~2005-11-18 21:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-18 21:47 Luben Tuikov [this message]
2005-11-18 22:18 ` [PATCH rev-list.c] max-count in terms of intersection Junio C Hamano
2005-11-18 22:42   ` Luben Tuikov
2005-11-18 23:42     ` 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=20051118214722.4449.qmail@web31813.mail.mud.yahoo.com \
    --to=ltuikov@yahoo.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