]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ds/commit-graph-generation-config'
authorJunio C Hamano <gitster@pobox.com>
Mon, 22 Mar 2021 21:00:23 +0000 (14:00 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 22 Mar 2021 21:00:23 +0000 (14:00 -0700)
A new configuration variable has been introduced to allow choosing
which version of the generation number gets used in the
commit-graph file.

* ds/commit-graph-generation-config:
  commit-graph: use config to specify generation type
  commit-graph: create local repository pointer

1  2 
commit-graph.c
t/README
t/t5318-commit-graph.sh

diff --cc commit-graph.c
index e21eeea42b96d5cd20b62b031def7aebe2a96272,1e9b88c003d773cfccc98d2de82abaaaf1ad95df..f18380b922c12208cbceae92fce98e2e6b42e6ed
@@@ -2235,11 -2176,11 +2244,11 @@@ int write_commit_graph(struct object_di
                warning(_("attempting to write a commit-graph, but 'core.commitGraph' is disabled"));
                return 0;
        }
-       if (!commit_graph_compatible(the_repository))
+       if (!commit_graph_compatible(r))
                return 0;
  
 -      ctx = xcalloc(1, sizeof(struct write_commit_graph_context));
 +      CALLOC_ARRAY(ctx, 1);
-       ctx->r = the_repository;
+       ctx->r = r;
        ctx->odb = odb;
        ctx->append = flags & COMMIT_GRAPH_WRITE_APPEND ? 1 : 0;
        ctx->report_progress = flags & COMMIT_GRAPH_WRITE_PROGRESS ? 1 : 0;
diff --cc t/README
Simple merge
Simple merge