]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'sg/commit-graph-cleanups' into master
authorJunio C Hamano <gitster@pobox.com>
Thu, 30 Jul 2020 20:20:30 +0000 (13:20 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Jul 2020 20:20:30 +0000 (13:20 -0700)
The changed-path Bloom filter is improved using ideas from an
independent implementation.

* sg/commit-graph-cleanups:
  commit-graph: simplify write_commit_graph_file() #2
  commit-graph: simplify write_commit_graph_file() #1
  commit-graph: simplify parse_commit_graph() #2
  commit-graph: simplify parse_commit_graph() #1
  commit-graph: clean up #includes
  diff.h: drop diff_tree_oid() & friends' return value
  commit-slab: add a function to deep free entries on the slab
  commit-graph-format.txt: all multi-byte numbers are in network byte order
  commit-graph: fix parsing the Chunk Lookup table
  tree-walk.c: don't match submodule entries for 'submod/anything'

1  2 
commit-graph.c
commit-graph.h
commit-slab-decl.h
revision.c
shallow.c
t/t5318-commit-graph.sh

diff --cc commit-graph.c
index 1af68c297d2e267b45fc5a1e820b11936dff906f,887837e88261b9ba54eb1a1728c05bf4cb80992e..1f37097dfff0033b50a68b0eaafc1dee9cfc1816
@@@ -415,17 -366,9 +417,8 @@@ struct commit_graph *parse_commit_graph
  
                if (chunk_repeated) {
                        error(_("commit-graph chunk id %08x appears multiple times"), chunk_id);
 -                      free(graph);
 -                      return NULL;
 +                      goto free_and_return;
                }
-               if (last_chunk_id == GRAPH_CHUNKID_OIDLOOKUP)
-               {
-                       graph->num_commits = (chunk_offset - last_chunk_offset)
-                                            / graph->hash_len;
-               }
-               last_chunk_id = chunk_id;
-               last_chunk_offset = chunk_offset;
        }
  
        if (graph->chunk_bloom_indexes && graph->chunk_bloom_data) {
diff --cc commit-graph.h
index 28f89cdf3e577582261c2261698bdd051b530edb,881c9b46e57f0eff83e9eb86f26abdc6702b661a..cf8d3c9647be341c5ab33f177cc5bcade878ffdd
@@@ -2,11 -2,7 +2,8 @@@
  #define COMMIT_GRAPH_H
  
  #include "git-compat-util.h"
- #include "repository.h"
- #include "string-list.h"
- #include "cache.h"
  #include "object-store.h"
 +#include "oidset.h"
  
  #define GIT_TEST_COMMIT_GRAPH "GIT_TEST_COMMIT_GRAPH"
  #define GIT_TEST_COMMIT_GRAPH_DIE_ON_LOAD "GIT_TEST_COMMIT_GRAPH_DIE_ON_LOAD"
Simple merge
diff --cc revision.c
Simple merge
diff --cc shallow.c
Simple merge
Simple merge