]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ps/cat-file-remote-object-info' into ps/cat-file-remote-object-info...
authorJunio C Hamano <gitster@pobox.com>
Sat, 25 Jul 2026 21:06:10 +0000 (14:06 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sat, 25 Jul 2026 21:06:10 +0000 (14:06 -0700)
* ps/cat-file-remote-object-info:
  cat-file: make remote-object-info allow-list adapt to the server
  cat-file: add remote-object-info to batch-command
  transport: add client support for object-info
  serve: advertise object-info feature
  protocol-caps: check object existence regardless of the attributes requested
  fetch-pack: move fetch initialization
  connect: make write_fetch_command_and_capabilities() more generic
  fetch-pack: move write_fetch_command_and_capabilities() to connect.c
  fetch-pack: use unsigned int for hash_algo variable
  fetch-pack: drop the static advertise_sid variable
  t1006: extract helper functions into new 'lib-cat-file.sh'
  cat-file: declare loop counter inside for()
  transport-helper: fix memory leak of helper on disconnect

1  2 
Makefile
builtin/cat-file.c
connect.c
meson.build
object-file.c
odb.h
t/t1006-cat-file.sh
t/t5701-git-serve.sh

diff --cc Makefile
Simple merge
Simple merge
diff --cc connect.c
Simple merge
diff --cc meson.build
Simple merge
diff --cc object-file.c
index 7ff2b730ac0eadac9f77ce85060fa4c422aef39d,121416c37c6709d36d85d08888d162e05d4adf46..c5809db598703d3c9f50a1559c6ee18ac002731d
@@@ -1714,29 -1695,16 +1714,39 @@@ int odb_transaction_files_begin(struct 
        transaction->base.source = source;
        transaction->base.commit = odb_transaction_files_commit;
        transaction->base.write_object_stream = odb_transaction_files_write_object_stream;
 +      transaction->base.env = odb_transaction_files_env;
 +
 +      transaction->prefix = "bulk-fsync";
 +      if (flags & ODB_TRANSACTION_RECEIVE) {
 +              /*
 +               * ODB transactions for git-receive-pack(1) eagerly create a
 +               * temporary directory and use a different temporary directory
 +               * prefix.
 +               *
 +               * NEEDSWORK: This transaction flag is only used by the "files"
 +               * backend to special case temporary directory set up and
 +               * handling. Ideally transaction users should not have to care
 +               * though. To avoid this, we could eagerly create the temporary
 +               * directory and use the same prefix name for all transactions.
 +               */
 +              transaction->prefix = "incoming";
 +              if (odb_transaction_files_prepare(&transaction->base)) {
 +                      free(transaction);
 +                      return -1;
 +              }
 +      }
 +
 +      *out = &transaction->base;
  
 -      return &transaction->base;
 +      return 0;
  }
+ void free_object_info_contents(struct object_info *object_info)
+ {
+       if (!object_info)
+               return;
+       free(object_info->typep);
+       free(object_info->sizep);
+       free(object_info->disk_sizep);
+       free(object_info->delta_base_oid);
+ }
diff --cc odb.h
Simple merge
Simple merge
Simple merge