revision --boundary: fix uncounted case.
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>
Junio C Hamano committed
Mar 6, 2007 at 03:20 UTC
8839ac9442c9ded41bfa369a142fd2e659a44377
1 file changed
+8
-8
revision.c
+8
-8
@@ -1301,13 +1301,14 @@ struct commit *get_revision(struct rev_info *revs)
1301
/*
1302
* Now pick up what they want to give us
1303
*/
1304
- if (!(c = get_revision_1(revs)))
1305
- return NULL;
1306
- while (0 < revs->skip_count) {
1307
- revs->skip_count--;
1308
- c = get_revision_1(revs);
1309
- if (!c)
1310
- break;
1304
+ c = get_revision_1(revs);
1305
+ if (c) {
1306
+ while (0 < revs->skip_count) {
1307
+ revs->skip_count--;
1308
+ c = get_revision_1(revs);
1309
+ if (!c)
1310
+ break;
1311
+ }
1312
}
1313
1314
/*
@@ -1317,7 +1318,6 @@ struct commit *get_revision(struct rev_info *revs)
1318
case -1:
1319
break;
1320
case 0:
1320
- /* Although we grabbed it, it is not shown. */
1321
c = NULL;
1322
break;
1323
default: