]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ps/odb-source-loose' into seen
authorJunio C Hamano <gitster@pobox.com>
Fri, 29 May 2026 04:01:38 +0000 (13:01 +0900)
committerJunio C Hamano <gitster@pobox.com>
Fri, 29 May 2026 04:01:38 +0000 (13:01 +0900)
The loose object source has been refactored into a proper `struct
odb_source`.

* ps/odb-source-loose:
  odb/source-loose: drop pointer to the "files" source
  odb/source-loose: stub out remaining callbacks
  odb/source-loose: wire up `write_object_stream()` callback
  object-file: refactor writing objects to use loose source
  odb/source-loose: wire up `write_object()` callback
  loose: refactor object map to operate on `struct odb_source_loose`
  odb/source-loose: wire up `freshen_object()` callback
  odb/source-loose: drop `odb_source_loose_has_object()`
  odb/source-loose: wire up `count_objects()` callback
  odb/source-loose: wire up `find_abbrev_len()` callback
  odb/source-loose: wire up `for_each_object()` callback
  odb/source-loose: wire up `read_object_stream()` callback
  odb/source-loose: wire up `read_object_info()` callback
  odb/source-loose: wire up `close()` callback
  odb/source-loose: wire up `reprepare()` callback
  odb/source-loose: start converting to a proper `struct odb_source`
  odb/source-loose: store pointer to "files" instead of generic source
  odb/source-loose: move loose source into "odb/" subsystem

1  2 
Makefile
builtin/cat-file.c
builtin/pack-objects.c
http-walker.c
meson.build
object-file.c

diff --cc Makefile
Simple merge
Simple merge
Simple merge
diff --cc http-walker.c
Simple merge
diff --cc meson.build
Simple merge
diff --cc object-file.c
index 60c4719fe19fbdfdbcfc4f34c805076b83b0d211,bce941874eb994c8dbaf391ede6c84a09fa96f56..9afa842da2dc8e002011c4e99955348df7839112
@@@ -904,12 -659,11 +659,12 @@@ static int start_loose_object_common(st
                                     struct git_hash_ctx *c, struct git_hash_ctx *compat_c,
                                     char *hdr, int hdrlen)
  {
-       const struct git_hash_algo *algo = source->odb->repo->hash_algo;
-       const struct git_hash_algo *compat = source->odb->repo->compat_hash_algo;
+       const struct git_hash_algo *algo = loose->base.odb->repo->hash_algo;
+       const struct git_hash_algo *compat = loose->base.odb->repo->compat_hash_algo;
        int fd;
 +      struct repo_config_values *cfg = repo_config_values(the_repository);
  
-       fd = create_tmpfile(source->odb->repo, tmp_file, filename);
+       fd = create_tmpfile(loose->base.odb->repo, tmp_file, filename);
        if (fd < 0) {
                if (flags & ODB_WRITE_OBJECT_SILENT)
                        return -1;