# [PATCH] revision walker --boundary: show boundaries again

3 messages from 2007-03-06 to 2007-03-07. Participants: Johannes Schindelin, Junio C Hamano.
Thread: https://gitlist.dev/t/7110

## Johannes Schindelin, 2007-03-06 11:54

Subject: [PATCH] revision walker --boundary: show boundaries again
Message-ID: <Pine.LNX.4.63.0703061252110.22628@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0703061252110.22628%40wbgn013.biozentrum.uni-wuerzburg.de

```

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

```

## Junio C Hamano, 2007-03-06 23:02

Subject: Re: [PATCH] revision walker --boundary: show boundaries again
Message-ID: <7v8xeanffi.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7v8xeanffi.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <Pine.LNX.4.63.0703061252110.22628@wbgn013.biozentrum.uni-wuerzburg.de>

```
Thanks.

I noticed the breakage after those 4 series and have two fixups
near the tip of 'next', namely 8839ac94.  Does it not work for
you?

Btw, the version of gitweb running on git.kernel.org seems to be
broken. Clicking on 'next' label itself or 'shortlog' link next
to it would not show what's requested for 'next', but 'log' link
seems to work.

```

## Johannes Schindelin, 2007-03-07 00:00

Subject: Re: [PATCH] revision walker --boundary: show boundaries again
Message-ID: <Pine.LNX.4.63.0703070058240.22628@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0703070058240.22628%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <7v8xeanffi.fsf@assigned-by-dhcp.cox.net>

```
Hi,

On Tue, 6 Mar 2007, Junio C Hamano wrote:

> Thanks.
> 
> I noticed the breakage after those 4 series and have two fixups
> near the tip of 'next', namely 8839ac94.  Does it not work for
> you?

Yes, but I got those commits only _after_ I sent the patch.

Anyway, I saw that it broke when I was trying to make really, really sure 
that bundles worked as expected, by writing a strict test case.

Ciao,
Dscho

```
