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

* Re: [PATCH] revision walker --boundary: show boundaries again
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2007-03-06 23:02 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git, junkio

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.

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

* Re: [PATCH] revision walker --boundary: show boundaries again
  2007-03-06 23:02 ` Junio C Hamano
@ 2007-03-07  0:00   ` Johannes Schindelin
  0 siblings, 0 replies; 3+ messages in thread
From: Johannes Schindelin @ 2007-03-07  0:00 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

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

^ permalink raw reply	[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).