]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ds/commit-graph-leakfix'
authorJunio C Hamano <gitster@pobox.com>
Fri, 19 Oct 2018 04:34:07 +0000 (13:34 +0900)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Oct 2018 04:34:07 +0000 (13:34 +0900)
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

1  2 
builtin/commit-graph.c
commit-graph.c

Simple merge
diff --cc commit-graph.c
index a6867586039b507e7802a469a1a3bed82e44bddb,e773703e1ddd6116abcd910caeb3cd72b862658c..40c855f1855595fbf5b285008d3c829e6a2f41eb
@@@ -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;