cat-file: default to --buffer when --batch-all-objects is used
[gitweb.git] / builtin / rev-parse.c
index 02d747dcb1a318af98ec06a7ab2f4e489e7c2625..e92a782f7729f0e5522969238920be2b7e607366 100644 (file)
@@ -281,11 +281,8 @@ static int try_difference(const char *arg)
                        b = lookup_commit_reference(end);
                        exclude = get_merge_bases(a, b);
                        while (exclude) {
-                               struct commit_list *n = exclude->next;
-                               show_rev(REVERSED,
-                                        exclude->item->object.sha1,NULL);
-                               free(exclude);
-                               exclude = n;
+                               struct commit *commit = pop_commit(&exclude);
+                               show_rev(REVERSED, commit->object.sha1, NULL);
                        }
                }
                *dotdot = '.';