{"thread":{"id":"2595","subject":"[PATCH rev-list.c] max-count in terms of intersection","startedAt":"2005-11-18T21:47:22Z","lastAt":"2005-11-18T23:42:12Z","messageCount":4,"participants":["Luben Tuikov","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"12257","messageId":"20051118214722.4449.qmail@web31813.mail.mud.yahoo.com","threadId":"2595","inReplyTo":null,"subject":"[PATCH rev-list.c] max-count in terms of intersection","fromName":"Luben Tuikov","fromEmail":"ltuikov@yahoo.com","sentAt":"2005-11-18T21:47:22Z","receivedAt":"2005-11-18T21:47:22Z","isPatch":true,"sender":{"key":"ltuikov@yahoo.com","avatar":null},"body":"diff-tree 768b79de9eadc38a839332df0fcce021f7174d6d (from 2e67a5f449f4026097494569f871d79bf263ab28)\ntree 6403fc730f8d5843043788f4c2f466727ba94bc0\nparent 2e67a5f449f4026097494569f871d79bf263ab28\nauthor Luben Tuikov <ltuikov@yahoo.com> 1132349344 -0500\ncommitter Luben Tuikov <ltuikov@yahoo.com> 1132349344 -0500\n\n    [PATCH rev-list.c] max-count in terms of intersection\n    \n    When a path designation is given, max-count counts the number\n    of commits therein (intersection), not globally.\n    \n    This avoids the case where in case path has been inactive\n    for the last N commits, --max-count=N and path designation\n    at git-rev-list is given, would give no commits.\n    \n    Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>\n\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"},{"id":"12273","messageId":"7v1x1dha6x.fsf@assigned-by-dhcp.cox.net","threadId":"2595","inReplyTo":"20051118214722.4449.qmail@web31813.mail.mud.yahoo.com","subject":"Re: [PATCH rev-list.c] max-count in terms of intersection","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-18T22:18:14Z","receivedAt":"2005-11-18T22:18:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Luben Tuikov <ltuikov@yahoo.com> writes:\n\n> diff-tree 768b79de9eadc38a839332df0fcce021f7174d6d (from 2e67a5f449f4026097494569f871d79bf263ab28)\n> tree 6403fc730f8d5843043788f4c2f466727ba94bc0\n> parent 2e67a5f449f4026097494569f871d79bf263ab28\n> author Luben Tuikov <ltuikov@yahoo.com> 1132349344 -0500\n> committer Luben Tuikov <ltuikov@yahoo.com> 1132349344 -0500\n>\n>     [PATCH rev-list.c] max-count in terms of intersection\n>     \n\nDocumentation/SubmittingPatches, perhaps?\n\n>     When a path designation is given, max-count counts the number\n>     of commits therein (intersection), not globally.\n\nThis makes sense, but I wonder if the same logic applies to\nmax_age as well.  If we have clock-skewed commits that are\nskipped by the DENSE processing, we probably do not want them to\nbe affecting what to do on the commits that matter.\n"},{"id":"12283","messageId":"20051118224233.50766.qmail@web31805.mail.mud.yahoo.com","threadId":"2595","inReplyTo":"7v1x1dha6x.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH rev-list.c] max-count in terms of intersection","fromName":"Luben Tuikov","fromEmail":"ltuikov@yahoo.com","sentAt":"2005-11-18T22:42:33Z","receivedAt":"2005-11-18T22:42:33Z","isPatch":true,"sender":{"key":"ltuikov@yahoo.com","avatar":null},"body":"\n--- Junio C Hamano <junkio@cox.net> wrote:\n\n> Luben Tuikov <ltuikov@yahoo.com> writes:\n> \n> > diff-tree 768b79de9eadc38a839332df0fcce021f7174d6d (from\n> 2e67a5f449f4026097494569f871d79bf263ab28)\n> > tree 6403fc730f8d5843043788f4c2f466727ba94bc0\n> > parent 2e67a5f449f4026097494569f871d79bf263ab28\n> > author Luben Tuikov <ltuikov@yahoo.com> 1132349344 -0500\n> > committer Luben Tuikov <ltuikov@yahoo.com> 1132349344 -0500\n> >\n> >     [PATCH rev-list.c] max-count in terms of intersection\n> >     \n> \n> Documentation/SubmittingPatches, perhaps?\n\nSorry, I just saw this document existed for GIT too.\nWould you like me to resubmit?\n\n> >     When a path designation is given, max-count counts the number\n> >     of commits therein (intersection), not globally.\n> \n> This makes sense, but I wonder if the same logic applies to\n> max_age as well.  If we have clock-skewed commits that are\n> skipped by the DENSE processing, we probably do not want them to\n> be affecting what to do on the commits that matter.\n\nAs far as I understand it, I think max-age is fine the way\nit is.  After all, max-age depends on date/time which is\nabsolute (i.e. applies to commits in the whole set and in\nthe intersection just the same).\n\n    Luben\n"},{"id":"12288","messageId":"7vfyptfrqj.fsf@assigned-by-dhcp.cox.net","threadId":"2595","inReplyTo":"20051118224233.50766.qmail@web31805.mail.mud.yahoo.com","subject":"Re: [PATCH rev-list.c] max-count in terms of intersection","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-18T23:42:12Z","receivedAt":"2005-11-18T23:42:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Luben Tuikov <ltuikov@yahoo.com> writes:\n\n>> This makes sense, but I wonder if the same logic applies to\n>> max_age as well.  If we have clock-skewed commits that are\n>> skipped by the DENSE processing, we probably do not want them to\n>> be affecting what to do on the commits that matter.\n>\n> As far as I understand it, I think max-age is fine the way\n> it is.  After all, max-age depends on date/time which is\n> absolute (i.e. applies to commits in the whole set and in\n> the intersection just the same).\n\nIt is recorded absolutely but what if committer's clock is\nbroken on one commit but not others, and if you are not using\nthe default sort_by_date() (e.g. --topo-order)?\n"}]}