From: Junio C Hamano Date: Fri, 19 Oct 2018 04:34:07 +0000 (+0900) Subject: Merge branch 'ds/commit-graph-leakfix' X-Git-Tag: v2.20.0-rc0~151 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d4cd2dd214c9800c8ccf45cf413acc727f4abcc2;p=git Merge branch 'ds/commit-graph-leakfix' Code clean-up. * ds/commit-graph-leakfix: commit-graph: reduce initial oid allocation builtin/commit-graph.c: UNLEAK variables commit-graph: clean up leaked memory during write --- d4cd2dd214c9800c8ccf45cf413acc727f4abcc2 diff --cc commit-graph.c index a686758603,e773703e1d..40c855f185 --- a/commit-graph.c +++ b/commit-graph.c @@@ -764,11 -719,8 +765,11 @@@ void write_commit_graph(const char *obj struct commit_list *parent; struct progress *progress = NULL; + if (!commit_graph_compatible(the_repository)) + return; + oids.nr = 0; - oids.alloc = approximate_object_count() / 4; + oids.alloc = approximate_object_count() / 32; oids.progress = NULL; oids.progress_done = 0;