Skip to content

Commit

Permalink
revision --boundary: fix uncounted case.
Browse files Browse the repository at this point in the history
When the list is truly limited and get_revision_1() returned NULL,
the code incorrectly returned it without switching to boundary emiting
mode.  Silly.

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Mar 6, 2007
1 parent 892ae6b commit 8839ac9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions revision.c
Original file line number Diff line number Diff line change
Expand Up @@ -1301,13 +1301,14 @@ 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;
c = get_revision_1(revs);
if (c) {
while (0 < revs->skip_count) {
revs->skip_count--;
c = get_revision_1(revs);
if (!c)
break;
}
}

/*
Expand All @@ -1317,7 +1318,6 @@ struct commit *get_revision(struct rev_info *revs)
case -1:
break;
case 0:
/* Although we grabbed it, it is not shown. */
c = NULL;
break;
default:
Expand Down

0 comments on commit 8839ac9

Please sign in to comment.