* [PATCH rev-list.c] max-count in terms of intersection
@ 2005-11-18 21:47 Luben Tuikov
2005-11-18 22:18 ` Junio C Hamano
0 siblings, 1 reply; 4+ messages in thread
From: Luben Tuikov @ 2005-11-18 21:47 UTC (permalink / raw)
To: git
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;
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH rev-list.c] max-count in terms of intersection
2005-11-18 21:47 [PATCH rev-list.c] max-count in terms of intersection Luben Tuikov
@ 2005-11-18 22:18 ` Junio C Hamano
2005-11-18 22:42 ` Luben Tuikov
0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2005-11-18 22:18 UTC (permalink / raw)
To: Luben Tuikov; +Cc: git
Luben Tuikov <ltuikov@yahoo.com> writes:
> 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
>
Documentation/SubmittingPatches, perhaps?
> When a path designation is given, max-count counts the number
> of commits therein (intersection), not globally.
This makes sense, but I wonder if the same logic applies to
max_age as well. If we have clock-skewed commits that are
skipped by the DENSE processing, we probably do not want them to
be affecting what to do on the commits that matter.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH rev-list.c] max-count in terms of intersection
2005-11-18 22:18 ` Junio C Hamano
@ 2005-11-18 22:42 ` Luben Tuikov
2005-11-18 23:42 ` Junio C Hamano
0 siblings, 1 reply; 4+ messages in thread
From: Luben Tuikov @ 2005-11-18 22:42 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
--- Junio C Hamano <junkio@cox.net> wrote:
> Luben Tuikov <ltuikov@yahoo.com> writes:
>
> > 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
> >
>
> Documentation/SubmittingPatches, perhaps?
Sorry, I just saw this document existed for GIT too.
Would you like me to resubmit?
> > When a path designation is given, max-count counts the number
> > of commits therein (intersection), not globally.
>
> This makes sense, but I wonder if the same logic applies to
> max_age as well. If we have clock-skewed commits that are
> skipped by the DENSE processing, we probably do not want them to
> be affecting what to do on the commits that matter.
As far as I understand it, I think max-age is fine the way
it is. After all, max-age depends on date/time which is
absolute (i.e. applies to commits in the whole set and in
the intersection just the same).
Luben
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH rev-list.c] max-count in terms of intersection
2005-11-18 22:42 ` Luben Tuikov
@ 2005-11-18 23:42 ` Junio C Hamano
0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2005-11-18 23:42 UTC (permalink / raw)
To: ltuikov; +Cc: git
Luben Tuikov <ltuikov@yahoo.com> writes:
>> This makes sense, but I wonder if the same logic applies to
>> max_age as well. If we have clock-skewed commits that are
>> skipped by the DENSE processing, we probably do not want them to
>> be affecting what to do on the commits that matter.
>
> As far as I understand it, I think max-age is fine the way
> it is. After all, max-age depends on date/time which is
> absolute (i.e. applies to commits in the whole set and in
> the intersection just the same).
It is recorded absolutely but what if committer's clock is
broken on one commit but not others, and if you are not using
the default sort_by_date() (e.g. --topo-order)?
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-11-18 23:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-18 21:47 [PATCH rev-list.c] max-count in terms of intersection Luben Tuikov
2005-11-18 22:18 ` Junio C Hamano
2005-11-18 22:42 ` Luben Tuikov
2005-11-18 23:42 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox