Skip to content

Commit d9cfb96

Browse files
author
Junio C Hamano
committed
rev-list split: minimum fixup.
This fixes "the other end has commit X but since then we tagged that commit with tag T, and he says he wants T -- what is the list of objects we need to send him?" question: git-rev-list --objects ^X T We ended up sending everything since the beginning of time X-<. Signed-off-by: Junio C Hamano <[email protected]>
1 parent ae56354 commit d9cfb96

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

rev-list.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,6 @@ static struct object_list **process_tree(struct tree *tree,
214214
return p;
215215
}
216216

217-
static struct object_list *pending_objects = NULL;
218-
219217
static void show_commit_list(struct commit_list *list)
220218
{
221219
struct object_list *objects = NULL, **p = &objects, *pending;
@@ -226,7 +224,7 @@ static void show_commit_list(struct commit_list *list)
226224
if (process_commit(commit) == STOP)
227225
break;
228226
}
229-
for (pending = pending_objects; pending; pending = pending->next) {
227+
for (pending = revs.pending_objects; pending; pending = pending->next) {
230228
struct object *obj = pending->item;
231229
const char *name = pending->name;
232230
if (obj->flags & (UNINTERESTING | SEEN))
@@ -675,7 +673,7 @@ int main(int argc, const char **argv)
675673
}
676674

677675
list = revs.commits;
678-
if (list && list->next)
676+
if (list)
679677
limited = 1;
680678

681679
if (revs.topo_order)
@@ -689,7 +687,7 @@ int main(int argc, const char **argv)
689687
limited = 1;
690688
diff_tree_setup_paths(revs.paths);
691689
}
692-
if (revs.max_age || revs.min_age)
690+
if (revs.max_age != -1 || revs.min_age != -1)
693691
limited = 1;
694692

695693
save_commit_buffer = verbose_header;

0 commit comments

Comments
 (0)