git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/1] Fix to bug introduced into rev-list.c by [PATCH 5/7] Move...

From
Jon Seymour <jon.seymour@gmail.com>
Date
Jun 15, 2005, 10:34 UTC
Message-ID
<20050615103438.16891.qmail@blackcubes.dyndns.org>
This fixes a problem introduced in the following patch:
	[PATCH 5/7] Move knowledge of UNINTERESTING flag into rev-list.c

I have also included a unit test that would detect this kind of error in future.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
---
Note: as of the time of writing, this patch had not yet been
merged with Linus' head.

For ease of reference, the set of pending changes still to be applied (in application orderevese order of app;lication)

[PATCH] Fix to bug introduced into rev-list.c by [PATCH 5/7] Move... [PATCH 7/7] Move traversal parts of epoch.[ch] into traversal.[ch] [PATCH 6/7] Remove DUPCHECK, UNINTERESTING flags from epoch.h [PATCH 5/7] Move knowledge of UNINTERESTING flag into rev-list.c [PATCH 4/7] Move two general purpose commit-related functions into commit.[ch] [PATCH 3/7] Rename epoch.c entry points as traverse_* methods/stuctures [PATCH 2/7] Introduce new methods into the epoch_methods structure. [PATCH 1/7] Additional --merge-order tests and general cleanup of t/t6001-rev-list-merge-order.sh [PATCH 2/2] Add support for author-oriented git-rev-list switches [rev 11] [PATCH 1/2] Changes to non-epoch.c code required for author-oriented git-rev-list changes ---

 rev-list.c                      |    2 +-
 t/t6001-rev-list-merge-order.sh |   26 ++++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 1 deletions(-)
diff --git a/rev-list.c b/rev-list.c
--- a/rev-list.c
+++ b/rev-list.c
@@ -91,7 +91,7 @@ static int process_commit(struct commit 
 	if (commit->object.flags & UNINTERESTING)
 		stop_traversal = 1;
 
-	if (action & STOP) {
+	if (action == STOP) {
 		return STOP;
 	}
 
diff --git a/t/t6001-rev-list-merge-order.sh b/t/t6001-rev-list-merge-order.sh
--- a/t/t6001-rev-list-merge-order.sh
+++ b/t/t6001-rev-list-merge-order.sh
@@ -464,6 +464,32 @@ test_output_expect_success "linear prune
 = l5
 EOF
 
+test_output_expect_success "max-count 10 - merge order" 'git-rev-list --show-breaks --max-count=10 l5' <<EOF
+= l5
+| l4
+| l3
+= a4
+| c3
+| c2
+| c1
+^ b4
+| b3
+| b2
+EOF
+
+test_output_expect_success "max-count 10 - non merge order" 'git-rev-list --max-count=10 l5 | sort' <<EOF
+a4
+b2
+b3
+b4
+c1
+c2
+c3
+l3
+l4
+l5
+EOF
+
 test_expect_failure "all heads uninteresting" 'git-rev-list --show-breaks a3 ^a3'
 #
 #
------------
Message 1 of 1 in “Fix to bug introduced into rev-list.c by [PATCH 5/7] Move...”
  1. 1/1 Fix to bug introduced into rev-list.c by [PATCH 5/7] Move...Jon Seymour, Jun 15, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.