git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] revision walker --boundary: show boundaries again
@ 2007-03-06 11:54 Johannes Schindelin
  2007-03-06 23:02 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Schindelin @ 2007-03-06 11:54 UTC (permalink / raw)
  To: git, junkio


Without this patch, "git rev-list --boundary master^..master" shows
only master's object name, and nothing else.

It is mainly an indentation patch, because it delays exit in 
get_revision() until after revs->boundary was checked.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---

	Sorry, I don't have time to write a test case, as I have to run.

 revision.c |   46 +++++++++++++++++++++++-----------------------
 1 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/revision.c b/revision.c
index 35a1711..b6b9fc0 100644
--- a/revision.c
+++ b/revision.c
@@ -1301,31 +1301,31 @@ struct commit *get_revision(struct rev_info *revs)
 	/*
 	 * Now pick up what they want to give us
 	 */
-	if (!(c = get_revision_1(revs)))
-		return NULL;
-	while (0 < revs->skip_count) {
-		revs->skip_count--;
-		c = get_revision_1(revs);
-		if (!c)
-			break;
-	}
+	if ((c = get_revision_1(revs))) {
+		while (0 < revs->skip_count) {
+			revs->skip_count--;
+			c = get_revision_1(revs);
+			if (!c)
+				break;
+		}
 
-	/*
-	 * Check the max_count.
-	 */
-	switch (revs->max_count) {
-	case -1:
-		break;
-	case 0:
-		/* Although we grabbed it, it is not shown. */
-		c = NULL;
-		break;
-	default:
-		revs->max_count--;
-	}
+		/*
+		 * Check the max_count.
+		 */
+		switch (revs->max_count) {
+			case -1:
+				break;
+			case 0:
+				/* Although we grabbed it, it is not shown. */
+				c = NULL;
+				break;
+			default:
+				revs->max_count--;
+		}
 
-	if (c)
-		c->object.flags |= SHOWN;
+		if (c)
+			c->object.flags |= SHOWN;
+	}
 
 	if (!revs->boundary) {
 		return c;
-- 
1.5.0.3.2551.gf95a-dirty

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-03-07  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-06 11:54 [PATCH] revision walker --boundary: show boundaries again Johannes Schindelin
2007-03-06 23:02 ` Junio C Hamano
2007-03-07  0:00   ` Johannes Schindelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).