{"thread":{"id":"2614","subject":"[PATCH] max-count in terms of intersection","startedAt":"2005-11-20T15:53:57Z","lastAt":"2005-11-20T15:53:57Z","messageCount":1,"participants":["Luben Tuikov"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"12375","messageId":"20051120155357.833.qmail@web31807.mail.mud.yahoo.com","threadId":"2614","inReplyTo":null,"subject":"[PATCH] max-count in terms of intersection","fromName":"Luben Tuikov","fromEmail":"ltuikov@yahoo.com","sentAt":"2005-11-20T15:53:57Z","receivedAt":"2005-11-20T15:53:57Z","isPatch":true,"sender":{"key":"ltuikov@yahoo.com","avatar":null},"body":"When a path designation is given, max-count counts the number\nof commits therein (intersection), not globally.\n\nThis avoids the case where in case path has been inactive\nfor the last N commits, --max-count=N and path designation\nat git-rev-list is given, would give no commits.\n\nSigned-off-by: Luben Tuikov <ltuikov@yahoo.com>\n\n---\n\n rev-list.c |    5 +++--\n 1 files changed, 3 insertions(+), 2 deletions(-)\n\napplies-to: 5b820842ce0afb836ddbeded3a3f9e8d0ba223f9\n768b79de9eadc38a839332df0fcce021f7174d6d\ndiff --git a/rev-list.c b/rev-list.c\nindex 6e6ffde..e17f928 100644\n--- a/rev-list.c\n+++ b/rev-list.c\n@@ -124,8 +124,6 @@ static int filter_commit(struct commit *\n                stop_traversal=1;\n                return CONTINUE;\n        }\n-       if (max_count != -1 && !max_count--)\n-               return STOP;\n        if (no_merges && (commit->parents && commit->parents->next))\n                return CONTINUE;\n        if (paths && dense) {\n@@ -148,6 +146,9 @@ static int process_commit(struct commit \n                return CONTINUE;\n        }\n \n+       if (max_count != -1 && !max_count--)\n+               return STOP;\n+\n        show_commit(commit);\n \n        return CONTINUE;\n---\n0.99.9.GIT\n"}]}