summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 51b1e17)
raw | patch | inline | side by side (parent: 51b1e17)
author | Jon Seymour <jon.seymour@gmail.com> | |
Mon, 20 Jun 2005 02:29:41 +0000 (12:29 +1000) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Mon, 20 Jun 2005 03:13:18 +0000 (20:13 -0700) |
This patch fixes a problem reported by Paul Mackerras regarding the interaction
of the --merge-order and --max-age switches of git-rev-list.
This patch applies to the current Linus HEAD. A cleaner fix for the same problem
in my current HEAD will follow later.
With this change, --merge-order produces the same result as no --merge-order
on the linux-2.6 git repository, to wit:
$> git-rev-list --max-age=1116330140 bcfff0b471a60df350338bcd727fc9b8a6aa54b2 | wc -l
655
$> git-rev-list --merge-order --max-age=1116330140 bcfff0b471a60df350338bcd727fc9b8a6aa54b2 | wc -l
655
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
of the --merge-order and --max-age switches of git-rev-list.
This patch applies to the current Linus HEAD. A cleaner fix for the same problem
in my current HEAD will follow later.
With this change, --merge-order produces the same result as no --merge-order
on the linux-2.6 git repository, to wit:
$> git-rev-list --max-age=1116330140 bcfff0b471a60df350338bcd727fc9b8a6aa54b2 | wc -l
655
$> git-rev-list --merge-order --max-age=1116330140 bcfff0b471a60df350338bcd727fc9b8a6aa54b2 | wc -l
655
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
rev-list.c | patch | blob | history |
diff --git a/rev-list.c b/rev-list.c
index 897a0e7ad84b8e42e498770717d9ca05cca19e63..16920ef69e844697628ca3775403f86cc1c13945 100644 (file)
--- a/rev-list.c
+++ b/rev-list.c
static enum cmit_fmt commit_format = CMIT_FMT_RAW;
static int merge_order = 0;
static int show_breaks = 0;
+static int stop_traversal = 0;
static void show_commit(struct commit *commit)
{
static int filter_commit(struct commit * commit)
{
+ if (merge_order && stop_traversal && commit->object.flags & BOUNDARY)
+ return STOP;
if (commit->object.flags & (UNINTERESTING|SHOWN))
return CONTINUE;
if (min_age != -1 && (commit->date > min_age))
return CONTINUE;
- if (max_age != -1 && (commit->date < max_age))
- return STOP;
+ if (max_age != -1 && (commit->date < max_age)) {
+ if (!merge_order)
+ return STOP;
+ else {
+ stop_traversal = 1;
+ return CONTINUE;
+ }
+ }
if (max_count != -1 && !max_count--)
return STOP;
return DO;