X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-rev-list.c;h=9dbfae416c2ed563960e69cc6286891d37d576e0;hb=a6214fe06eefded4f71012043f35ad805e7dd19c;hp=ebf53f5944f1a53c5336f69e2ef3105ce50d0823;hpb=9aae177a4adff326421e55c7c0f3138de15ce2c1;p=git.git diff --git a/builtin-rev-list.c b/builtin-rev-list.c index ebf53f594..9dbfae416 100644 --- a/builtin-rev-list.c +++ b/builtin-rev-list.c @@ -70,21 +70,9 @@ static void show_commit(struct commit *commit) if (revs.parents) { struct commit_list *parents = commit->parents; while (parents) { - struct object *o = &(parents->item->object); + printf(" %s", sha1_to_hex(parents->item->object.sha1)); parents = parents->next; - if (o->flags & TMP_MARK) - continue; - printf(" %s", sha1_to_hex(o->sha1)); - o->flags |= TMP_MARK; } - /* TMP_MARK is a general purpose flag that can - * be used locally, but the user should clean - * things up after it is done with them. - */ - for (parents = commit->parents; - parents; - parents = parents->next) - parents->item->object.flags &= ~TMP_MARK; } if (revs.commit_format == CMIT_FMT_ONELINE) putchar(' '); @@ -92,13 +80,15 @@ static void show_commit(struct commit *commit) putchar('\n'); if (revs.verbose_header) { - static char pretty_header[16384]; + char *buf = NULL; + unsigned long buflen = 0; pretty_print_commit(revs.commit_format, commit, ~0, - pretty_header, sizeof(pretty_header), - revs.abbrev, NULL, NULL, revs.date_mode); - printf("%s%c", pretty_header, hdr_termination); + &buf, &buflen, + revs.abbrev, NULL, NULL, revs.date_mode, 0); + printf("%s%c", buf, hdr_termination); + free(buf); } - fflush(stdout); + maybe_flush_or_die(stdout, "stdout"); if (commit->parents) { free_commit_list(commit->parents); commit->parents = NULL; @@ -310,7 +300,7 @@ static struct commit_list *find_bisection(struct commit_list *list, show_list("bisection 2 sorted", 0, nr, list); *all = nr; - weights = xcalloc(on_list, sizeof(int*)); + weights = xcalloc(on_list, sizeof(*weights)); counted = 0; for (n = 0, p = list; p; p = p->next) {