Merge branch 'ps/use-the-repository'
commit7b472da91541d672ee220896a3a7fd4508c378f3
authorJunio C Hamano <gitster@pobox.com>
Tue, 2 Jul 2024 16:59:00 +0000 (2 09:59 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 2 Jul 2024 16:59:00 +0000 (2 09:59 -0700)
tree2687a29530b4a8b50c7f99a394cc5b69f06d7adb
parentae447ed130ca5d78da68b9aa7943adc53bed3dad
parentdc89b7d5220d94a3d6555e4df6b7c458a82dc771
Merge branch 'ps/use-the-repository'

A CPP macro USE_THE_REPOSITORY_VARIABLE is introduced to help
transition the codebase to rely less on the availability of the
singleton the_repository instance.

* ps/use-the-repository:
  hex: guard declarations with `USE_THE_REPOSITORY_VARIABLE`
  t/helper: remove dependency on `the_repository` in "proc-receive"
  t/helper: fix segfault in "oid-array" command without repository
  t/helper: use correct object hash in partial-clone helper
  compat/fsmonitor: fix socket path in networked SHA256 repos
  replace-object: use hash algorithm from passed-in repository
  protocol-caps: use hash algorithm from passed-in repository
  oidset: pass hash algorithm when parsing file
  http-fetch: don't crash when parsing packfile without a repo
  hash-ll: merge with "hash.h"
  refs: avoid include cycle with "repository.h"
  global: introduce `USE_THE_REPOSITORY_VARIABLE` macro
  hash: require hash algorithm in `empty_tree_oid_hex()`
  hash: require hash algorithm in `is_empty_{blob,tree}_oid()`
  hash: make `is_null_oid()` independent of `the_repository`
  hash: convert `oidcmp()` and `oideq()` to compare whole hash
  global: ensure that object IDs are always padded
  hash: require hash algorithm in `oidread()` and `oidclr()`
  hash: require hash algorithm in `hasheq()`, `hashcmp()` and `hashclr()`
  hash: drop (mostly) unused `is_empty_{blob,tree}_sha1()` functions
51 files changed:
add-patch.c
attr.c
builtin/am.c
builtin/blame.c
builtin/log.c
builtin/merge.c
builtin/pack-objects.c
builtin/pull.c
builtin/receive-pack.c
builtin/update-ref.c
commit-graph.c
commit.c
config.c
diff.c
diffcore-rename.c
entry.c
fetch-pack.c
fmt-merge-msg.c
fsck.c
http-backend.c
http.c
log-tree.c
mailmap.c
midx-write.c
object-file.c
object-name.c
object.h
pack-bitmap-write.c
pack-bitmap.c
pack-revindex.c
parse-options-cb.c
pretty.c
pseudo-merge.c
rebase-interactive.c
refs.c
refs.h
refs/files-backend.c
refs/reftable-backend.c
refspec.c
remote-curl.c
remote.h
revision.c
run-command.c
scalar.c
send-pack.c
sequencer.c
server-info.c
setup.c
t/helper/test-bitmap.c
t/test-lib-functions.sh
wt-status.c