]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ds/commit-graph-set-size-mult'
authorJunio C Hamano <gitster@pobox.com>
Mon, 6 Jan 2020 22:17:51 +0000 (14:17 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Jan 2020 22:17:51 +0000 (14:17 -0800)
The code to write split commit-graph file(s) upon fetching computed
bogus value for the parameter used in splitting the resulting
files, which has been corrected.

* ds/commit-graph-set-size-mult:
  commit-graph: prefer default size_mult when given zero

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

diff --cc builtin/fetch.c
index f8765b385b60f175844682df9ea7c1fcc7ac105e,0c15f347af2b9fce453e16aa88f0e4fb0195a994..b4c6d921d063734313f6d9c4746bfe7835885555
@@@ -1862,12 -1865,8 +1862,10 @@@ int cmd_fetch(int argc, const char **ar
        string_list_clear(&list, 0);
  
        prepare_repo_settings(the_repository);
 -      if (the_repository->settings.fetch_write_commit_graph) {
 +      if (fetch_write_commit_graph > 0 ||
 +          (fetch_write_commit_graph < 0 &&
 +           the_repository->settings.fetch_write_commit_graph)) {
                int commit_graph_flags = COMMIT_GRAPH_WRITE_SPLIT;
-               struct split_commit_graph_opts split_opts;
-               memset(&split_opts, 0, sizeof(struct split_commit_graph_opts));
  
                if (progress)
                        commit_graph_flags |= COMMIT_GRAPH_WRITE_PROGRESS;
diff --cc commit-graph.c
Simple merge