summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2007-03-06 03:20:55 -0800
committerLibravatar Junio C Hamano <junkio@cox.net>2007-03-06 03:20:55 -0800
commit8839ac9442c9ded41bfa369a142fd2e659a44377 (patch)
tree6c4ed94b94e4d60427e1b3808f24bd618c2cf5ff
parentrevision --boundary: fix stupid typo (diff)
downloadtgif-8839ac9442c9ded41bfa369a142fd2e659a44377.tar.xz
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>
-rw-r--r--revision.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/revision.c b/revision.c
index f48d7f788a..3c2eb125e6 100644
--- a/revision.c
+++ b/revision.c
@@ -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;
+ }
}
/*
@@ -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: