* [PATCH RFC v2 0/2] Move libgit.a sources into separate "lib/" directory
From: Patrick Steinhardt @ 2026-06-22 10:38 UTC (permalink / raw)
To: git
Cc: brian m. carlson, Junio C Hamano, Elijah Newren, Derrick Stolee,
Phillip Wood
In-Reply-To: <20260416-pks-libgit-in-subdir-v1-0-03afc731df55@pks.im>
Hi,
this small patch series follows up on a discussion we had two years ago
during the Git Contributor's Summit in Berlin.
I'm fully aware that this will likely result in some discussion, which
is why I have labelled this as RFC. I'd be fine with a result of "let's
not do it" if we cannot agree on this step, but I think that the current
layout hurts discoverability quite a bit. Not only for newcomers, but
I'm also struggling with it quite frequently.
I also intentionally decided to send this close to the upcoming release
so that the series can be merged early in the next release cycle if we
were to agree on it.
I've tested this patch series with both GitLab [1] and GitHub [2].
Changes in v2:
- Feedback on v1 was generally positive, and we're close to the next
release again. So I've decided to rebase the patch series and send
v2 out before the quiet pre-release phase kicks off. The series is
thus built on top of 8d96f09e92 (Merge branch
'js/objects-larger-than-4gb-on-windows', 2026-06-19) with
ps/odb-source-packed at 1bba3c035d (odb/source-packed: drop pointer
to "files" parent source, 2026-06-17) merged into it.
- Fix a couple of instances I missed to update in Meson.
- Link to v1: https://patch.msgid.link/20260416-pks-libgit-in-subdir-v1-0-03afc731df55@pks.im
Thanks!
Patrick
[1]: https://gitlab.com/gitlab-org/git/-/merge_requests/544
[2]: https://github.com/git/git/pull/2271
---
Patrick Steinhardt (2):
t/helper: prepare "test-example-tap.c" for introduction of "lib/"
Move libgit.a sources into separate "lib/" directory
.github/workflows/main.yml | 8 +-
.gitmodules | 2 +-
Documentation/Makefile | 4 +-
Makefile | 764 ++++++++++-----------
config.mak.uname | 52 +-
contrib/buildsystems/CMakeLists.txt | 95 +--
git.rc.in | 2 +-
abspath.c => lib/abspath.c | 0
abspath.h => lib/abspath.h | 0
add-interactive.c => lib/add-interactive.c | 0
add-interactive.h => lib/add-interactive.h | 0
add-patch.c => lib/add-patch.c | 0
add-patch.h => lib/add-patch.h | 0
advice.c => lib/advice.c | 0
advice.h => lib/advice.h | 0
alias.c => lib/alias.c | 0
alias.h => lib/alias.h | 0
alloc.c => lib/alloc.c | 0
alloc.h => lib/alloc.h | 0
apply.c => lib/apply.c | 0
apply.h => lib/apply.h | 0
archive-tar.c => lib/archive-tar.c | 0
archive-zip.c => lib/archive-zip.c | 0
archive.c => lib/archive.c | 0
archive.h => lib/archive.h | 0
attr.c => lib/attr.c | 0
attr.h => lib/attr.h | 0
banned.h => lib/banned.h | 0
base85.c => lib/base85.c | 0
base85.h => lib/base85.h | 0
bisect.c => lib/bisect.c | 0
bisect.h => lib/bisect.h | 0
blame.c => lib/blame.c | 0
blame.h => lib/blame.h | 0
blob.c => lib/blob.c | 0
blob.h => lib/blob.h | 0
{block-sha1 => lib/block-sha1}/sha1.c | 0
{block-sha1 => lib/block-sha1}/sha1.h | 0
bloom.c => lib/bloom.c | 0
bloom.h => lib/bloom.h | 0
branch.c => lib/branch.c | 0
branch.h => lib/branch.h | 0
builtin.h => lib/builtin.h | 0
bundle-uri.c => lib/bundle-uri.c | 0
bundle-uri.h => lib/bundle-uri.h | 0
bundle.c => lib/bundle.c | 0
bundle.h => lib/bundle.h | 0
cache-tree.c => lib/cache-tree.c | 0
cache-tree.h => lib/cache-tree.h | 0
cbtree.c => lib/cbtree.c | 0
cbtree.h => lib/cbtree.h | 0
chdir-notify.c => lib/chdir-notify.c | 0
chdir-notify.h => lib/chdir-notify.h | 0
checkout.c => lib/checkout.c | 0
checkout.h => lib/checkout.h | 0
chunk-format.c => lib/chunk-format.c | 0
chunk-format.h => lib/chunk-format.h | 0
color.c => lib/color.c | 0
color.h => lib/color.h | 0
column.c => lib/column.c | 0
column.h => lib/column.h | 0
combine-diff.c => lib/combine-diff.c | 0
commit-graph.c => lib/commit-graph.c | 0
commit-graph.h => lib/commit-graph.h | 0
commit-reach.c => lib/commit-reach.c | 0
commit-reach.h => lib/commit-reach.h | 0
commit-slab-decl.h => lib/commit-slab-decl.h | 0
commit-slab-impl.h => lib/commit-slab-impl.h | 0
commit-slab.h => lib/commit-slab.h | 0
commit.c => lib/commit.c | 0
commit.h => lib/commit.h | 0
common-exit.c => lib/common-exit.c | 0
common-init.c => lib/common-init.c | 0
common-init.h => lib/common-init.h | 0
{compat => lib/compat}/.gitattributes | 0
{compat => lib/compat}/access.c | 0
{compat => lib/compat}/apple-common-crypto.h | 0
{compat => lib/compat}/basename.c | 0
{compat => lib/compat}/bswap.h | 0
{compat => lib/compat}/compiler.h | 0
{compat => lib/compat}/darwin/procinfo.c | 0
{compat => lib/compat}/disk.h | 0
{compat => lib/compat}/fileno.c | 0
{compat => lib/compat}/fopen.c | 0
{compat => lib/compat}/fsmonitor/fsm-darwin-gcc.h | 0
.../compat}/fsmonitor/fsm-health-darwin.c | 0
.../compat}/fsmonitor/fsm-health-linux.c | 0
.../compat}/fsmonitor/fsm-health-win32.c | 0
{compat => lib/compat}/fsmonitor/fsm-health.h | 0
{compat => lib/compat}/fsmonitor/fsm-ipc-unix.c | 0
{compat => lib/compat}/fsmonitor/fsm-ipc-win32.c | 0
.../compat}/fsmonitor/fsm-listen-darwin.c | 0
.../compat}/fsmonitor/fsm-listen-linux.c | 0
.../compat}/fsmonitor/fsm-listen-win32.c | 0
{compat => lib/compat}/fsmonitor/fsm-listen.h | 0
.../compat}/fsmonitor/fsm-path-utils-darwin.c | 0
.../compat}/fsmonitor/fsm-path-utils-linux.c | 0
.../compat}/fsmonitor/fsm-path-utils-win32.c | 0
.../compat}/fsmonitor/fsm-settings-unix.c | 0
.../compat}/fsmonitor/fsm-settings-win32.c | 0
{compat => lib/compat}/hstrerror.c | 0
{compat => lib/compat}/inet_ntop.c | 0
{compat => lib/compat}/inet_pton.c | 0
{compat => lib/compat}/linux/procinfo.c | 0
{compat => lib/compat}/memmem.c | 0
{compat => lib/compat}/mingw-posix.h | 0
{compat => lib/compat}/mingw.c | 0
{compat => lib/compat}/mingw.h | 0
{compat => lib/compat}/mkdir.c | 0
{compat => lib/compat}/mmap.c | 0
{compat => lib/compat}/msvc-posix.h | 0
{compat => lib/compat}/msvc.c | 0
{compat => lib/compat}/msvc.h | 0
{compat => lib/compat}/nonblock.c | 0
{compat => lib/compat}/nonblock.h | 0
{compat => lib/compat}/obstack.c | 0
{compat => lib/compat}/obstack.h | 0
{compat => lib/compat}/open.c | 0
{compat => lib/compat}/poll/poll.c | 0
{compat => lib/compat}/poll/poll.h | 0
{compat => lib/compat}/posix.h | 0
{compat => lib/compat}/pread.c | 0
{compat => lib/compat}/precompose_utf8.c | 0
{compat => lib/compat}/precompose_utf8.h | 0
{compat => lib/compat}/qsort_s.c | 0
{compat => lib/compat}/regcomp_enhanced.c | 0
{compat => lib/compat}/regex/regcomp.c | 0
{compat => lib/compat}/regex/regex.c | 0
{compat => lib/compat}/regex/regex.h | 0
{compat => lib/compat}/regex/regex_internal.c | 0
{compat => lib/compat}/regex/regex_internal.h | 0
{compat => lib/compat}/regex/regexec.c | 0
{compat => lib/compat}/setenv.c | 0
{compat => lib/compat}/sha1-chunked.c | 0
{compat => lib/compat}/sha1-chunked.h | 0
{compat => lib/compat}/simple-ipc/ipc-shared.c | 0
.../compat}/simple-ipc/ipc-unix-socket.c | 0
{compat => lib/compat}/simple-ipc/ipc-win32.c | 0
{compat => lib/compat}/snprintf.c | 0
{compat => lib/compat}/stat.c | 0
{compat => lib/compat}/strcasestr.c | 0
{compat => lib/compat}/strdup.c | 0
{compat => lib/compat}/strlcpy.c | 0
{compat => lib/compat}/strtoimax.c | 0
{compat => lib/compat}/strtoumax.c | 0
{compat => lib/compat}/stub/procinfo.c | 0
{compat => lib/compat}/terminal.c | 0
{compat => lib/compat}/terminal.h | 0
{compat => lib/compat}/unsetenv.c | 0
{compat => lib/compat}/vcbuild/.gitignore | 0
{compat => lib/compat}/vcbuild/README | 10 +-
{compat => lib/compat}/vcbuild/find_vs_env.bat | 2 +-
{compat => lib/compat}/vcbuild/include/sys/param.h | 0
{compat => lib/compat}/vcbuild/include/sys/time.h | 0
{compat => lib/compat}/vcbuild/include/sys/utime.h | 0
{compat => lib/compat}/vcbuild/include/unistd.h | 0
{compat => lib/compat}/vcbuild/include/utime.h | 0
{compat => lib/compat}/vcbuild/scripts/clink.pl | 0
{compat => lib/compat}/vcbuild/scripts/lib.pl | 0
{compat => lib/compat}/vcbuild/vcpkg_copy_dlls.bat | 0
{compat => lib/compat}/vcbuild/vcpkg_install.bat | 4 +-
{compat => lib/compat}/win32.h | 0
{compat => lib/compat}/win32/alloca.h | 0
{compat => lib/compat}/win32/dirent.c | 0
{compat => lib/compat}/win32/dirent.h | 0
{compat => lib/compat}/win32/exit-process.h | 0
{compat => lib/compat}/win32/flush.c | 0
{compat => lib/compat}/win32/git.manifest | 0
{compat => lib/compat}/win32/headless.c | 0
{compat => lib/compat}/win32/lazyload.h | 0
{compat => lib/compat}/win32/path-utils.c | 0
{compat => lib/compat}/win32/path-utils.h | 0
{compat => lib/compat}/win32/pthread.c | 0
{compat => lib/compat}/win32/pthread.h | 0
{compat => lib/compat}/win32/syslog.c | 0
{compat => lib/compat}/win32/syslog.h | 0
.../compat}/win32/trace2_win32_process_info.c | 0
{compat => lib/compat}/win32mmap.c | 0
{compat => lib/compat}/winansi.c | 0
{compat => lib/compat}/zlib-compat.h | 0
.../compiler-tricks}/not-constant.c | 0
config.c => lib/config.c | 0
config.h => lib/config.h | 0
connect.c => lib/connect.c | 0
connect.h => lib/connect.h | 0
connected.c => lib/connected.c | 0
connected.h => lib/connected.h | 0
convert.c => lib/convert.c | 0
convert.h => lib/convert.h | 0
copy.c => lib/copy.c | 0
copy.h => lib/copy.h | 0
credential.c => lib/credential.c | 0
credential.h => lib/credential.h | 0
csum-file.c => lib/csum-file.c | 0
csum-file.h => lib/csum-file.h | 0
ctype.c => lib/ctype.c | 0
date.c => lib/date.c | 0
date.h => lib/date.h | 0
decorate.c => lib/decorate.c | 0
decorate.h => lib/decorate.h | 0
delta-islands.c => lib/delta-islands.c | 0
delta-islands.h => lib/delta-islands.h | 0
delta.h => lib/delta.h | 0
diagnose.c => lib/diagnose.c | 0
diagnose.h => lib/diagnose.h | 0
diff-delta.c => lib/diff-delta.c | 0
diff-lib.c => lib/diff-lib.c | 0
diff-merges.c => lib/diff-merges.c | 0
diff-merges.h => lib/diff-merges.h | 0
diff-no-index.c => lib/diff-no-index.c | 0
diff.c => lib/diff.c | 0
diff.h => lib/diff.h | 0
diffcore-break.c => lib/diffcore-break.c | 0
diffcore-delta.c => lib/diffcore-delta.c | 0
diffcore-order.c => lib/diffcore-order.c | 0
diffcore-pickaxe.c => lib/diffcore-pickaxe.c | 0
diffcore-rename.c => lib/diffcore-rename.c | 0
diffcore-rotate.c => lib/diffcore-rotate.c | 0
diffcore.h => lib/diffcore.h | 0
dir-iterator.c => lib/dir-iterator.c | 0
dir-iterator.h => lib/dir-iterator.h | 0
dir.c => lib/dir.c | 0
dir.h => lib/dir.h | 0
editor.c => lib/editor.c | 0
editor.h => lib/editor.h | 0
entry.c => lib/entry.c | 0
entry.h => lib/entry.h | 0
environment.c => lib/environment.c | 0
environment.h => lib/environment.h | 0
{ewah => lib/ewah}/bitmap.c | 0
{ewah => lib/ewah}/ewah_bitmap.c | 0
{ewah => lib/ewah}/ewah_io.c | 0
{ewah => lib/ewah}/ewah_rlw.c | 0
{ewah => lib/ewah}/ewok.h | 0
{ewah => lib/ewah}/ewok_rlw.h | 0
exec-cmd.c => lib/exec-cmd.c | 0
exec-cmd.h => lib/exec-cmd.h | 0
fetch-negotiator.c => lib/fetch-negotiator.c | 0
fetch-negotiator.h => lib/fetch-negotiator.h | 0
fetch-pack.c => lib/fetch-pack.c | 0
fetch-pack.h => lib/fetch-pack.h | 0
fmt-merge-msg.c => lib/fmt-merge-msg.c | 0
fmt-merge-msg.h => lib/fmt-merge-msg.h | 0
for-each-ref.h => lib/for-each-ref.h | 0
fsck.c => lib/fsck.c | 0
fsck.h => lib/fsck.h | 0
fsmonitor--daemon.h => lib/fsmonitor--daemon.h | 0
fsmonitor-ipc.c => lib/fsmonitor-ipc.c | 0
fsmonitor-ipc.h => lib/fsmonitor-ipc.h | 0
fsmonitor-ll.h => lib/fsmonitor-ll.h | 0
.../fsmonitor-path-utils.h | 0
fsmonitor-settings.c => lib/fsmonitor-settings.c | 0
fsmonitor-settings.h => lib/fsmonitor-settings.h | 0
fsmonitor.c => lib/fsmonitor.c | 0
fsmonitor.h => lib/fsmonitor.h | 0
gettext.c => lib/gettext.c | 0
gettext.h => lib/gettext.h | 0
git-compat-util.h => lib/git-compat-util.h | 0
git-curl-compat.h => lib/git-curl-compat.h | 0
git-zlib.c => lib/git-zlib.c | 0
git-zlib.h => lib/git-zlib.h | 0
gpg-interface.c => lib/gpg-interface.c | 0
gpg-interface.h => lib/gpg-interface.h | 0
graph.c => lib/graph.c | 0
graph.h => lib/graph.h | 0
grep.c => lib/grep.c | 0
grep.h => lib/grep.h | 0
hash-lookup.c => lib/hash-lookup.c | 0
hash-lookup.h => lib/hash-lookup.h | 0
hash.c => lib/hash.c | 0
hash.h => lib/hash.h | 0
hashmap.c => lib/hashmap.c | 0
hashmap.h => lib/hashmap.h | 0
help.c => lib/help.c | 0
help.h => lib/help.h | 0
hex-ll.c => lib/hex-ll.c | 0
hex-ll.h => lib/hex-ll.h | 0
hex.c => lib/hex.c | 0
hex.h => lib/hex.h | 0
hook.c => lib/hook.c | 0
hook.h => lib/hook.h | 0
http-walker.c => lib/http-walker.c | 0
http.c => lib/http.c | 0
http.h => lib/http.h | 0
ident.c => lib/ident.c | 0
ident.h => lib/ident.h | 0
iterator.h => lib/iterator.h | 0
json-writer.c => lib/json-writer.c | 0
json-writer.h => lib/json-writer.h | 0
khash.h => lib/khash.h | 0
kwset.c => lib/kwset.c | 0
kwset.h => lib/kwset.h | 0
levenshtein.c => lib/levenshtein.c | 0
levenshtein.h => lib/levenshtein.h | 0
line-log.c => lib/line-log.c | 0
line-log.h => lib/line-log.h | 0
line-range.c => lib/line-range.c | 0
line-range.h => lib/line-range.h | 0
linear-assignment.c => lib/linear-assignment.c | 0
linear-assignment.h => lib/linear-assignment.h | 0
.../list-objects-filter-options.c | 0
.../list-objects-filter-options.h | 0
list-objects-filter.c => lib/list-objects-filter.c | 0
list-objects-filter.h => lib/list-objects-filter.h | 0
list-objects.c => lib/list-objects.c | 0
list-objects.h => lib/list-objects.h | 0
list.h => lib/list.h | 0
lockfile.c => lib/lockfile.c | 0
lockfile.h => lib/lockfile.h | 0
log-tree.c => lib/log-tree.c | 0
log-tree.h => lib/log-tree.h | 0
loose.c => lib/loose.c | 0
loose.h => lib/loose.h | 0
ls-refs.c => lib/ls-refs.c | 0
ls-refs.h => lib/ls-refs.h | 0
mailinfo.c => lib/mailinfo.c | 0
mailinfo.h => lib/mailinfo.h | 0
mailmap.c => lib/mailmap.c | 0
mailmap.h => lib/mailmap.h | 0
match-trees.c => lib/match-trees.c | 0
match-trees.h => lib/match-trees.h | 0
mem-pool.c => lib/mem-pool.c | 0
mem-pool.h => lib/mem-pool.h | 0
merge-blobs.c => lib/merge-blobs.c | 0
merge-blobs.h => lib/merge-blobs.h | 0
merge-ll.c => lib/merge-ll.c | 0
merge-ll.h => lib/merge-ll.h | 0
merge-ort-wrappers.c => lib/merge-ort-wrappers.c | 0
merge-ort-wrappers.h => lib/merge-ort-wrappers.h | 0
merge-ort.c => lib/merge-ort.c | 0
merge-ort.h => lib/merge-ort.h | 0
merge.c => lib/merge.c | 0
merge.h => lib/merge.h | 0
mergesort.h => lib/mergesort.h | 0
midx-write.c => lib/midx-write.c | 0
midx.c => lib/midx.c | 0
midx.h => lib/midx.h | 0
name-hash.c => lib/name-hash.c | 0
name-hash.h => lib/name-hash.h | 0
{negotiator => lib/negotiator}/default.c | 0
{negotiator => lib/negotiator}/default.h | 0
{negotiator => lib/negotiator}/noop.c | 0
{negotiator => lib/negotiator}/noop.h | 0
{negotiator => lib/negotiator}/skipping.c | 0
{negotiator => lib/negotiator}/skipping.h | 0
notes-cache.c => lib/notes-cache.c | 0
notes-cache.h => lib/notes-cache.h | 0
notes-merge.c => lib/notes-merge.c | 0
notes-merge.h => lib/notes-merge.h | 0
notes-utils.c => lib/notes-utils.c | 0
notes-utils.h => lib/notes-utils.h | 0
notes.c => lib/notes.c | 0
notes.h => lib/notes.h | 0
object-file-convert.c => lib/object-file-convert.c | 0
object-file-convert.h => lib/object-file-convert.h | 0
object-file.c => lib/object-file.c | 0
object-file.h => lib/object-file.h | 0
object-name.c => lib/object-name.c | 0
object-name.h => lib/object-name.h | 0
object.c => lib/object.c | 0
object.h => lib/object.h | 0
odb.c => lib/odb.c | 0
odb.h => lib/odb.h | 0
{odb => lib/odb}/source-files.c | 0
{odb => lib/odb}/source-files.h | 0
{odb => lib/odb}/source-inmemory.c | 0
{odb => lib/odb}/source-inmemory.h | 0
{odb => lib/odb}/source-loose.c | 0
{odb => lib/odb}/source-loose.h | 0
{odb => lib/odb}/source-packed.c | 0
{odb => lib/odb}/source-packed.h | 0
{odb => lib/odb}/source.c | 0
{odb => lib/odb}/source.h | 0
{odb => lib/odb}/streaming.c | 0
{odb => lib/odb}/streaming.h | 0
{odb => lib/odb}/transaction.c | 0
{odb => lib/odb}/transaction.h | 0
oid-array.c => lib/oid-array.c | 0
oid-array.h => lib/oid-array.h | 0
oidmap.c => lib/oidmap.c | 0
oidmap.h => lib/oidmap.h | 0
oidset.c => lib/oidset.c | 0
oidset.h => lib/oidset.h | 0
oidtree.c => lib/oidtree.c | 0
oidtree.h => lib/oidtree.h | 0
pack-bitmap-write.c => lib/pack-bitmap-write.c | 0
pack-bitmap.c => lib/pack-bitmap.c | 0
pack-bitmap.h => lib/pack-bitmap.h | 0
pack-check.c => lib/pack-check.c | 0
pack-mtimes.c => lib/pack-mtimes.c | 0
pack-mtimes.h => lib/pack-mtimes.h | 0
pack-objects.c => lib/pack-objects.c | 0
pack-objects.h => lib/pack-objects.h | 0
pack-refs.c => lib/pack-refs.c | 0
pack-refs.h => lib/pack-refs.h | 0
pack-revindex.c => lib/pack-revindex.c | 0
pack-revindex.h => lib/pack-revindex.h | 0
pack-write.c => lib/pack-write.c | 0
pack.h => lib/pack.h | 0
packfile-list.c => lib/packfile-list.c | 0
packfile-list.h => lib/packfile-list.h | 0
packfile.c => lib/packfile.c | 0
packfile.h => lib/packfile.h | 0
pager.c => lib/pager.c | 0
pager.h => lib/pager.h | 0
parallel-checkout.c => lib/parallel-checkout.c | 0
parallel-checkout.h => lib/parallel-checkout.h | 0
parse-options-cb.c => lib/parse-options-cb.c | 0
parse-options.c => lib/parse-options.c | 0
parse-options.h => lib/parse-options.h | 0
parse.c => lib/parse.c | 0
parse.h => lib/parse.h | 0
patch-delta.c => lib/patch-delta.c | 0
patch-ids.c => lib/patch-ids.c | 0
patch-ids.h => lib/patch-ids.h | 0
path-walk.c => lib/path-walk.c | 0
path-walk.h => lib/path-walk.h | 0
path.c => lib/path.c | 0
path.h => lib/path.h | 0
pathspec.c => lib/pathspec.c | 0
pathspec.h => lib/pathspec.h | 0
pkt-line.c => lib/pkt-line.c | 0
pkt-line.h => lib/pkt-line.h | 0
preload-index.c => lib/preload-index.c | 0
preload-index.h => lib/preload-index.h | 0
pretty.c => lib/pretty.c | 0
pretty.h => lib/pretty.h | 0
prio-queue.c => lib/prio-queue.c | 0
prio-queue.h => lib/prio-queue.h | 0
progress.c => lib/progress.c | 0
progress.h => lib/progress.h | 0
promisor-remote.c => lib/promisor-remote.c | 0
promisor-remote.h => lib/promisor-remote.h | 0
prompt.c => lib/prompt.c | 0
prompt.h => lib/prompt.h | 0
protocol-caps.c => lib/protocol-caps.c | 0
protocol-caps.h => lib/protocol-caps.h | 0
protocol.c => lib/protocol.c | 0
protocol.h => lib/protocol.h | 0
prune-packed.c => lib/prune-packed.c | 0
prune-packed.h => lib/prune-packed.h | 0
pseudo-merge.c => lib/pseudo-merge.c | 0
pseudo-merge.h => lib/pseudo-merge.h | 0
quote.c => lib/quote.c | 0
quote.h => lib/quote.h | 0
range-diff.c => lib/range-diff.c | 0
range-diff.h => lib/range-diff.h | 0
reachable.c => lib/reachable.c | 0
reachable.h => lib/reachable.h | 0
read-cache-ll.h => lib/read-cache-ll.h | 0
read-cache.c => lib/read-cache.c | 0
read-cache.h => lib/read-cache.h | 0
rebase-interactive.c => lib/rebase-interactive.c | 0
rebase-interactive.h => lib/rebase-interactive.h | 0
rebase.c => lib/rebase.c | 0
rebase.h => lib/rebase.h | 0
ref-filter.c => lib/ref-filter.c | 0
ref-filter.h => lib/ref-filter.h | 0
reflog-walk.c => lib/reflog-walk.c | 0
reflog-walk.h => lib/reflog-walk.h | 0
reflog.c => lib/reflog.c | 0
reflog.h => lib/reflog.h | 0
refs.c => lib/refs.c | 0
refs.h => lib/refs.h | 0
{refs => lib/refs}/debug.c | 0
{refs => lib/refs}/files-backend.c | 0
{refs => lib/refs}/iterator.c | 0
{refs => lib/refs}/packed-backend.c | 0
{refs => lib/refs}/packed-backend.h | 0
{refs => lib/refs}/ref-cache.c | 0
{refs => lib/refs}/ref-cache.h | 0
{refs => lib/refs}/refs-internal.h | 0
{refs => lib/refs}/reftable-backend.c | 0
refspec.c => lib/refspec.c | 0
refspec.h => lib/refspec.h | 0
{reftable => lib/reftable}/LICENSE | 0
{reftable => lib/reftable}/basics.c | 0
{reftable => lib/reftable}/basics.h | 0
{reftable => lib/reftable}/block.c | 0
{reftable => lib/reftable}/block.h | 0
{reftable => lib/reftable}/blocksource.c | 0
{reftable => lib/reftable}/blocksource.h | 0
{reftable => lib/reftable}/constants.h | 0
{reftable => lib/reftable}/error.c | 0
{reftable => lib/reftable}/fsck.c | 0
{reftable => lib/reftable}/iter.c | 0
{reftable => lib/reftable}/iter.h | 0
{reftable => lib/reftable}/merged.c | 0
{reftable => lib/reftable}/merged.h | 0
{reftable => lib/reftable}/pq.c | 0
{reftable => lib/reftable}/pq.h | 0
{reftable => lib/reftable}/record.c | 0
{reftable => lib/reftable}/record.h | 0
{reftable => lib/reftable}/reftable-basics.h | 0
{reftable => lib/reftable}/reftable-block.h | 0
{reftable => lib/reftable}/reftable-blocksource.h | 0
{reftable => lib/reftable}/reftable-constants.h | 0
{reftable => lib/reftable}/reftable-error.h | 0
{reftable => lib/reftable}/reftable-fsck.h | 0
{reftable => lib/reftable}/reftable-iterator.h | 0
{reftable => lib/reftable}/reftable-merged.h | 0
{reftable => lib/reftable}/reftable-record.h | 0
{reftable => lib/reftable}/reftable-stack.h | 0
{reftable => lib/reftable}/reftable-system.h | 0
{reftable => lib/reftable}/reftable-table.h | 0
{reftable => lib/reftable}/reftable-writer.h | 0
{reftable => lib/reftable}/stack.c | 0
{reftable => lib/reftable}/stack.h | 0
{reftable => lib/reftable}/system.c | 0
{reftable => lib/reftable}/system.h | 0
{reftable => lib/reftable}/table.c | 0
{reftable => lib/reftable}/table.h | 0
{reftable => lib/reftable}/tree.c | 0
{reftable => lib/reftable}/tree.h | 0
{reftable => lib/reftable}/writer.c | 0
{reftable => lib/reftable}/writer.h | 0
remote.c => lib/remote.c | 0
remote.h => lib/remote.h | 0
repack-cruft.c => lib/repack-cruft.c | 0
repack-filtered.c => lib/repack-filtered.c | 0
repack-geometry.c => lib/repack-geometry.c | 0
repack-midx.c => lib/repack-midx.c | 0
repack-promisor.c => lib/repack-promisor.c | 0
repack.c => lib/repack.c | 0
repack.h => lib/repack.h | 0
replace-object.c => lib/replace-object.c | 0
replace-object.h => lib/replace-object.h | 0
replay.c => lib/replay.c | 0
replay.h => lib/replay.h | 0
repo-settings.c => lib/repo-settings.c | 0
repo-settings.h => lib/repo-settings.h | 0
repository.c => lib/repository.c | 0
repository.h => lib/repository.h | 0
rerere.c => lib/rerere.c | 0
rerere.h => lib/rerere.h | 0
reset.c => lib/reset.c | 0
reset.h => lib/reset.h | 0
resolve-undo.c => lib/resolve-undo.c | 0
resolve-undo.h => lib/resolve-undo.h | 0
revision.c => lib/revision.c | 0
revision.h => lib/revision.h | 0
run-command.c => lib/run-command.c | 0
run-command.h => lib/run-command.h | 0
sane-ctype.h => lib/sane-ctype.h | 0
send-pack.c => lib/send-pack.c | 0
send-pack.h => lib/send-pack.h | 0
sequencer.c => lib/sequencer.c | 0
sequencer.h => lib/sequencer.h | 0
serve.c => lib/serve.c | 0
serve.h => lib/serve.h | 0
server-info.c => lib/server-info.c | 0
server-info.h => lib/server-info.h | 0
setup.c => lib/setup.c | 0
setup.h => lib/setup.h | 0
{sha1 => lib/sha1}/openssl.h | 0
.../sha1collisiondetection | 0
{sha1dc => lib/sha1dc}/.gitattributes | 0
{sha1dc => lib/sha1dc}/LICENSE.txt | 0
{sha1dc => lib/sha1dc}/sha1.c | 0
{sha1dc => lib/sha1dc}/sha1.h | 0
{sha1dc => lib/sha1dc}/ubc_check.c | 0
{sha1dc => lib/sha1dc}/ubc_check.h | 0
sha1dc_git.c => lib/sha1dc_git.c | 0
sha1dc_git.h => lib/sha1dc_git.h | 0
{sha256 => lib/sha256}/block/sha256.c | 0
{sha256 => lib/sha256}/block/sha256.h | 0
{sha256 => lib/sha256}/gcrypt.h | 0
{sha256 => lib/sha256}/nettle.h | 0
{sha256 => lib/sha256}/openssl.h | 0
shallow.c => lib/shallow.c | 0
shallow.h => lib/shallow.h | 0
shortlog.h => lib/shortlog.h | 0
sideband.c => lib/sideband.c | 0
sideband.h => lib/sideband.h | 0
sigchain.c => lib/sigchain.c | 0
sigchain.h => lib/sigchain.h | 0
simple-ipc.h => lib/simple-ipc.h | 0
sparse-index.c => lib/sparse-index.c | 0
sparse-index.h => lib/sparse-index.h | 0
split-index.c => lib/split-index.c | 0
split-index.h => lib/split-index.h | 0
stable-qsort.c => lib/stable-qsort.c | 0
statinfo.c => lib/statinfo.c | 0
statinfo.h => lib/statinfo.h | 0
strbuf.c => lib/strbuf.c | 0
strbuf.h => lib/strbuf.h | 0
string-list.c => lib/string-list.c | 0
string-list.h => lib/string-list.h | 0
strmap.c => lib/strmap.c | 0
strmap.h => lib/strmap.h | 0
strvec.c => lib/strvec.c | 0
strvec.h => lib/strvec.h | 0
sub-process.c => lib/sub-process.c | 0
sub-process.h => lib/sub-process.h | 0
submodule-config.c => lib/submodule-config.c | 0
submodule-config.h => lib/submodule-config.h | 0
submodule.c => lib/submodule.c | 0
submodule.h => lib/submodule.h | 0
symlinks.c => lib/symlinks.c | 0
symlinks.h => lib/symlinks.h | 0
tag.c => lib/tag.c | 0
tag.h => lib/tag.h | 0
tar.h => lib/tar.h | 0
tempfile.c => lib/tempfile.c | 0
tempfile.h => lib/tempfile.h | 0
thread-utils.c => lib/thread-utils.c | 0
thread-utils.h => lib/thread-utils.h | 0
tmp-objdir.c => lib/tmp-objdir.c | 0
tmp-objdir.h => lib/tmp-objdir.h | 0
trace.c => lib/trace.c | 0
trace.h => lib/trace.h | 0
trace2.c => lib/trace2.c | 0
trace2.h => lib/trace2.h | 0
{trace2 => lib/trace2}/tr2_cfg.c | 0
{trace2 => lib/trace2}/tr2_cfg.h | 0
{trace2 => lib/trace2}/tr2_cmd_name.c | 0
{trace2 => lib/trace2}/tr2_cmd_name.h | 0
{trace2 => lib/trace2}/tr2_ctr.c | 0
{trace2 => lib/trace2}/tr2_ctr.h | 0
{trace2 => lib/trace2}/tr2_dst.c | 0
{trace2 => lib/trace2}/tr2_dst.h | 0
{trace2 => lib/trace2}/tr2_sid.c | 0
{trace2 => lib/trace2}/tr2_sid.h | 0
{trace2 => lib/trace2}/tr2_sysenv.c | 0
{trace2 => lib/trace2}/tr2_sysenv.h | 0
{trace2 => lib/trace2}/tr2_tbuf.c | 0
{trace2 => lib/trace2}/tr2_tbuf.h | 0
{trace2 => lib/trace2}/tr2_tgt.h | 0
{trace2 => lib/trace2}/tr2_tgt_event.c | 0
{trace2 => lib/trace2}/tr2_tgt_normal.c | 0
{trace2 => lib/trace2}/tr2_tgt_perf.c | 0
{trace2 => lib/trace2}/tr2_tls.c | 0
{trace2 => lib/trace2}/tr2_tls.h | 0
{trace2 => lib/trace2}/tr2_tmr.c | 0
{trace2 => lib/trace2}/tr2_tmr.h | 0
trailer.c => lib/trailer.c | 0
trailer.h => lib/trailer.h | 0
transport-helper.c => lib/transport-helper.c | 0
transport-internal.h => lib/transport-internal.h | 0
transport.c => lib/transport.c | 0
transport.h => lib/transport.h | 0
tree-diff.c => lib/tree-diff.c | 0
tree-walk.c => lib/tree-walk.c | 0
tree-walk.h => lib/tree-walk.h | 0
tree.c => lib/tree.c | 0
tree.h => lib/tree.h | 0
unicode-width.h => lib/unicode-width.h | 0
unix-socket.c => lib/unix-socket.c | 0
unix-socket.h => lib/unix-socket.h | 0
unix-stream-server.c => lib/unix-stream-server.c | 0
unix-stream-server.h => lib/unix-stream-server.h | 0
unpack-trees.c => lib/unpack-trees.c | 0
unpack-trees.h => lib/unpack-trees.h | 0
upload-pack.c => lib/upload-pack.c | 0
upload-pack.h => lib/upload-pack.h | 0
url.c => lib/url.c | 0
url.h => lib/url.h | 0
urlmatch.c => lib/urlmatch.c | 0
urlmatch.h => lib/urlmatch.h | 0
usage.c => lib/usage.c | 0
userdiff.c => lib/userdiff.c | 0
userdiff.h => lib/userdiff.h | 0
utf8.c => lib/utf8.c | 0
utf8.h => lib/utf8.h | 0
varint.c => lib/varint.c | 0
varint.h => lib/varint.h | 0
version-def.h.in => lib/version-def.h.in | 0
version.c => lib/version.c | 0
version.h => lib/version.h | 0
versioncmp.c => lib/versioncmp.c | 0
versioncmp.h => lib/versioncmp.h | 0
walker.c => lib/walker.c | 0
walker.h => lib/walker.h | 0
wildmatch.c => lib/wildmatch.c | 0
wildmatch.h => lib/wildmatch.h | 0
worktree.c => lib/worktree.c | 0
worktree.h => lib/worktree.h | 0
wrapper.c => lib/wrapper.c | 0
wrapper.h => lib/wrapper.h | 0
write-or-die.c => lib/write-or-die.c | 0
write-or-die.h => lib/write-or-die.h | 0
ws.c => lib/ws.c | 0
ws.h => lib/ws.h | 0
wt-status.c => lib/wt-status.c | 0
wt-status.h => lib/wt-status.h | 0
xdiff-interface.c => lib/xdiff-interface.c | 0
xdiff-interface.h => lib/xdiff-interface.h | 0
{xdiff => lib/xdiff}/xdiff.h | 0
{xdiff => lib/xdiff}/xdiffi.c | 0
{xdiff => lib/xdiff}/xdiffi.h | 0
{xdiff => lib/xdiff}/xemit.c | 0
{xdiff => lib/xdiff}/xemit.h | 0
{xdiff => lib/xdiff}/xhistogram.c | 0
{xdiff => lib/xdiff}/xinclude.h | 0
{xdiff => lib/xdiff}/xmacros.h | 0
{xdiff => lib/xdiff}/xmerge.c | 0
{xdiff => lib/xdiff}/xpatience.c | 0
{xdiff => lib/xdiff}/xprepare.c | 0
{xdiff => lib/xdiff}/xprepare.h | 0
{xdiff => lib/xdiff}/xtypes.h | 0
{xdiff => lib/xdiff}/xutils.c | 0
{xdiff => lib/xdiff}/xutils.h | 0
meson.build | 700 +++++++++----------
t/helper/test-example-tap.c | 2 +-
704 files changed, 823 insertions(+), 822 deletions(-)
Range-diff versus v1:
1: 906517b4f1 = 1: 12f6dbd779 t/helper: prepare "test-example-tap.c" for introduction of "lib/"
2: b0fd01d713 ! 2: 7aa7c50a4e Move libgit.a sources into separate "lib/" directory
@@ Commit message
## .github/workflows/main.yml ##
@@ .github/workflows/main.yml: jobs:
- uses: actions/checkout@v5
+ uses: actions/checkout@v6
with:
repository: 'microsoft/vcpkg'
- path: 'compat/vcbuild/vcpkg'
@@ .github/workflows/main.yml: jobs:
uses: git-for-windows/get-azure-pipelines-artifact@v0
with:
@@ .github/workflows/main.yml: jobs:
- uses: microsoft/setup-msbuild@v2
+ uses: microsoft/setup-msbuild@v3
- name: copy dlls to root
shell: cmd
- run: compat\vcbuild\vcpkg_copy_dlls.bat release
@@ Makefile: FOUND_SOURCE_FILES := $(filter-out $(GENERATED_H),$(shell $(SOURCES_CM
-LIB_OBJS += odb.o
-LIB_OBJS += odb/source.o
-LIB_OBJS += odb/source-files.o
+-LIB_OBJS += odb/source-inmemory.o
+-LIB_OBJS += odb/source-loose.o
+-LIB_OBJS += odb/source-packed.o
-LIB_OBJS += odb/streaming.o
+-LIB_OBJS += odb/transaction.o
-LIB_OBJS += oid-array.o
-LIB_OBJS += oidmap.o
-LIB_OBJS += oidset.o
@@ Makefile: FOUND_SOURCE_FILES := $(filter-out $(GENERATED_H),$(shell $(SOURCES_CM
-LIB_OBJS += pack-revindex.o
-LIB_OBJS += pack-write.o
-LIB_OBJS += packfile.o
+-LIB_OBJS += packfile-list.o
-LIB_OBJS += pager.o
-LIB_OBJS += parallel-checkout.o
-LIB_OBJS += parse.o
@@ Makefile: FOUND_SOURCE_FILES := $(filter-out $(GENERATED_H),$(shell $(SOURCES_CM
+LIB_OBJS += lib/odb.o
+LIB_OBJS += lib/odb/source.o
+LIB_OBJS += lib/odb/source-files.o
++LIB_OBJS += lib/odb/source-inmemory.o
++LIB_OBJS += lib/odb/source-loose.o
++LIB_OBJS += lib/odb/source-packed.o
+LIB_OBJS += lib/odb/streaming.o
++LIB_OBJS += lib/odb/transaction.o
+LIB_OBJS += lib/oid-array.o
+LIB_OBJS += lib/oidmap.o
+LIB_OBJS += lib/oidset.o
@@ Makefile: FOUND_SOURCE_FILES := $(filter-out $(GENERATED_H),$(shell $(SOURCES_CM
+LIB_OBJS += lib/pack-revindex.o
+LIB_OBJS += lib/pack-write.o
+LIB_OBJS += lib/packfile.o
++LIB_OBJS += lib/packfile-list.o
+LIB_OBJS += lib/pager.o
+LIB_OBJS += lib/parallel-checkout.o
+LIB_OBJS += lib/parse.o
@@ Makefile: FOUND_SOURCE_FILES := $(filter-out $(GENERATED_H),$(shell $(SOURCES_CM
+LIB_OBJS += lib/usage.o
+LIB_OBJS += lib/userdiff.o
+LIB_OBJS += lib/utf8.o
- ifndef WITH_RUST
+ ifdef NO_RUST
-LIB_OBJS += varint.o
-endif
-LIB_OBJS += version.o
@@ Makefile: BUILTIN_OBJS += builtin/write-tree.o
# upstream unnecessarily (making merging in future changes easier).
-THIRD_PARTY_SOURCES += compat/inet_ntop.c
-THIRD_PARTY_SOURCES += compat/inet_pton.c
--THIRD_PARTY_SOURCES += compat/nedmalloc/%
-THIRD_PARTY_SOURCES += compat/obstack.%
-THIRD_PARTY_SOURCES += compat/poll/%
-THIRD_PARTY_SOURCES += compat/regex/%
@@ Makefile: BUILTIN_OBJS += builtin/write-tree.o
-THIRD_PARTY_SOURCES += sha1dc/%
+THIRD_PARTY_SOURCES += lib/compat/inet_ntop.c
+THIRD_PARTY_SOURCES += lib/compat/inet_pton.c
-+THIRD_PARTY_SOURCES += lib/compat/nedmalloc/%
+THIRD_PARTY_SOURCES += lib/compat/obstack.%
+THIRD_PARTY_SOURCES += lib/compat/poll/%
+THIRD_PARTY_SOURCES += lib/compat/regex/%
@@ Makefile: ifdef UNRELIABLE_FSTAT
endif
endif
ifdef NATIVE_CRLF
-@@ Makefile: ifdef NATIVE_CRLF
- endif
-
- ifdef USE_NED_ALLOCATOR
-- COMPAT_CFLAGS += -Icompat/nedmalloc
-- COMPAT_OBJS += compat/nedmalloc/nedmalloc.o
-+ COMPAT_CFLAGS += -Ilib/compat/nedmalloc
-+ COMPAT_OBJS += lib/compat/nedmalloc/nedmalloc.o
- OVERRIDE_STRDUP = YesPlease
- endif
+@@ Makefile: endif
ifdef OVERRIDE_STRDUP
COMPAT_CFLAGS += -DOVERRIDE_STRDUP
@@ Makefile: endif
COMPAT_CFLAGS += -DHAVE_FSMONITOR_DAEMON_BACKEND
- COMPAT_OBJS += compat/fsmonitor/fsm-listen-$(FSMONITOR_DAEMON_BACKEND).o
- COMPAT_OBJS += compat/fsmonitor/fsm-health-$(FSMONITOR_DAEMON_BACKEND).o
-- COMPAT_OBJS += compat/fsmonitor/fsm-ipc-$(FSMONITOR_DAEMON_BACKEND).o
+ COMPAT_OBJS += lib/compat/fsmonitor/fsm-listen-$(FSMONITOR_DAEMON_BACKEND).o
+ COMPAT_OBJS += lib/compat/fsmonitor/fsm-health-$(FSMONITOR_DAEMON_BACKEND).o
-+ COMPAT_OBJS += lib/compat/fsmonitor/fsm-ipc-$(FSMONITOR_DAEMON_BACKEND).o
endif
ifdef FSMONITOR_OS_SETTINGS
COMPAT_CFLAGS += -DHAVE_FSMONITOR_OS_SETTINGS
+- COMPAT_OBJS += compat/fsmonitor/fsm-ipc-$(FSMONITOR_OS_SETTINGS).o
- COMPAT_OBJS += compat/fsmonitor/fsm-settings-$(FSMONITOR_OS_SETTINGS).o
-- COMPAT_OBJS += compat/fsmonitor/fsm-path-utils-$(FSMONITOR_OS_SETTINGS).o
+- COMPAT_OBJS += compat/fsmonitor/fsm-path-utils-$(FSMONITOR_DAEMON_BACKEND).o
++ COMPAT_OBJS += lib/compat/fsmonitor/fsm-ipc-$(FSMONITOR_OS_SETTINGS).o
+ COMPAT_OBJS += lib/compat/fsmonitor/fsm-settings-$(FSMONITOR_OS_SETTINGS).o
-+ COMPAT_OBJS += lib/compat/fsmonitor/fsm-path-utils-$(FSMONITOR_OS_SETTINGS).o
++ COMPAT_OBJS += lib/compat/fsmonitor/fsm-path-utils-$(FSMONITOR_DAEMON_BACKEND).o
endif
ifdef WITH_BREAKING_CHANGES
@@ Makefile: git$X: git.o GIT-LDFLAGS $(BUILTIN_OBJS) $(GITLIBS)
-help.sp help.s help.o: command-list.h
+lib/help.sp lib/help.s lib/help.o: command-list.h
builtin/bugreport.sp builtin/bugreport.s builtin/bugreport.o: hook-list.h
- builtin/hook.sp builtin/hook.s builtin/hook.o: hook-list.h
+-hook.sp hook.s hook.o: hook-list.h
++lib/hook.sp lib/hook.s lib/hook.o: hook-list.h
+ builtin/help.sp builtin/help.s builtin/help.o: config-list.h GIT-PREFIX
+ builtin/help.sp builtin/help.s builtin/help.o: EXTRA_CPPFLAGS = \
@@ Makefile: builtin/help.sp builtin/help.s builtin/help.o: EXTRA_CPPFLAGS = \
PAGER_ENV_SQ = $(subst ','\'',$(PAGER_ENV))
PAGER_ENV_CQ = "$(subst ",\",$(subst \,\\,$(PAGER_ENV)))"
@@ Makefile: compile_commands.json:
-DGAWK -DNO_MBSUPPORT
endif
- ifdef USE_NED_ALLOCATOR
--compat/nedmalloc/nedmalloc.sp compat/nedmalloc/nedmalloc.o: EXTRA_CPPFLAGS = \
-+lib/compat/nedmalloc/nedmalloc.sp lib/compat/nedmalloc/nedmalloc.o: EXTRA_CPPFLAGS = \
- -DNDEBUG -DREPLACE_SYSTEM_ALLOCATOR
--compat/nedmalloc/nedmalloc.sp: SP_EXTRA_FLAGS += -Wno-non-pointer-null
-+lib/compat/nedmalloc/nedmalloc.sp: SP_EXTRA_FLAGS += -Wno-non-pointer-null
- endif
-
-headless-git.o: compat/win32/headless.c GIT-CFLAGS
+headless-git.o: lib/compat/win32/headless.c GIT-CFLAGS
$(QUIET_CC)$(CC) $(ALL_CFLAGS) $(COMPAT_CFLAGS) \
@@ config.mak.uname: ifeq ($(uname_S),Linux)
HAVE_PLATFORM_PROCINFO = YesPlease
- COMPAT_OBJS += compat/linux/procinfo.o
+ COMPAT_OBJS += lib/compat/linux/procinfo.o
+ EXTLIBS += -ldl
# centos7/rhel7 provides gcc 4.8.5 and zlib 1.2.7.
ifneq ($(findstring .el7.,$(uname_R)),)
- BASIC_CFLAGS += -std=c99
@@ config.mak.uname: ifeq ($(uname_S),Darwin)
NO_MEMMEM = YesPlease
USE_ST_TIMESPEC = YesPlease
@@ contrib/buildsystems/CMakeLists.txt: endif()
add_compile_definitions(HAVE_ALLOCA_H NO_POSIX_GOODIES NATIVE_CRLF NO_UNIX_SOCKETS WIN32
_CONSOLE DETECT_MSYS_TTY STRIP_EXTENSION=".exe" NO_SYMLINK_HEAD UNRELIABLE_FSTAT
NOGDI OBJECT_CREATION_MODE=1 __USE_MINGW_ANSI_STDIO=0
- USE_NED_ALLOCATOR OVERRIDE_STRDUP MMAP_PREVENTS_DELETE USE_WIN32_MMAP
+ OVERRIDE_STRDUP MMAP_PREVENTS_DELETE USE_WIN32_MMAP
HAVE_WPGMPTR ENSURE_MSYSTEM_IS_SET HAVE_RTLGENRANDOM)
list(APPEND compat_SOURCES
- compat/mingw.c
@@ contrib/buildsystems/CMakeLists.txt: endif()
- compat/win32/syslog.c
- compat/win32/trace2_win32_process_info.c
- compat/win32/dirent.c
-- compat/nedmalloc/nedmalloc.c
- compat/strdup.c)
+ lib/compat/mingw.c
+ lib/compat/winansi.c
@@ contrib/buildsystems/CMakeLists.txt: endif()
+ lib/compat/win32/syslog.c
+ lib/compat/win32/trace2_win32_process_info.c
+ lib/compat/win32/dirent.c
-+ lib/compat/nedmalloc/nedmalloc.c
+ lib/compat/strdup.c)
set(NO_UNIX_SOCKETS 1)
@@ contrib/buildsystems/CMakeLists.txt: endif()
add_compile_definitions(SUPPORTS_SIMPLE_IPC)
set(SUPPORTS_SIMPLE_IPC 1)
endif()
-@@ contrib/buildsystems/CMakeLists.txt: endif()
- if(SUPPORTS_SIMPLE_IPC)
- if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
- add_compile_definitions(HAVE_FSMONITOR_DAEMON_BACKEND)
-- list(APPEND compat_SOURCES compat/fsmonitor/fsm-listen-win32.c)
-- list(APPEND compat_SOURCES compat/fsmonitor/fsm-health-win32.c)
-- list(APPEND compat_SOURCES compat/fsmonitor/fsm-ipc-win32.c)
-- list(APPEND compat_SOURCES compat/fsmonitor/fsm-path-utils-win32.c)
-+ list(APPEND compat_SOURCES lib/compat/fsmonitor/fsm-listen-win32.c)
-+ list(APPEND compat_SOURCES lib/compat/fsmonitor/fsm-health-win32.c)
-+ list(APPEND compat_SOURCES lib/compat/fsmonitor/fsm-ipc-win32.c)
-+ list(APPEND compat_SOURCES lib/compat/fsmonitor/fsm-path-utils-win32.c)
+@@ contrib/buildsystems/CMakeLists.txt: if(SUPPORTS_SIMPLE_IPC)
- add_compile_definitions(HAVE_FSMONITOR_OS_SETTINGS)
-- list(APPEND compat_SOURCES compat/fsmonitor/fsm-settings-win32.c)
-+ list(APPEND compat_SOURCES lib/compat/fsmonitor/fsm-settings-win32.c)
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ if(FSMONITOR_DAEMON_BACKEND)
add_compile_definitions(HAVE_FSMONITOR_DAEMON_BACKEND)
-- list(APPEND compat_SOURCES compat/fsmonitor/fsm-listen-darwin.c)
-- list(APPEND compat_SOURCES compat/fsmonitor/fsm-health-darwin.c)
-- list(APPEND compat_SOURCES compat/fsmonitor/fsm-ipc-darwin.c)
-- list(APPEND compat_SOURCES compat/fsmonitor/fsm-path-utils-darwin.c)
-+ list(APPEND compat_SOURCES lib/compat/fsmonitor/fsm-listen-darwin.c)
-+ list(APPEND compat_SOURCES lib/compat/fsmonitor/fsm-health-darwin.c)
-+ list(APPEND compat_SOURCES lib/compat/fsmonitor/fsm-ipc-darwin.c)
-+ list(APPEND compat_SOURCES lib/compat/fsmonitor/fsm-path-utils-darwin.c)
+- list(APPEND compat_SOURCES compat/fsmonitor/fsm-listen-${FSMONITOR_DAEMON_BACKEND}.c)
+- list(APPEND compat_SOURCES compat/fsmonitor/fsm-health-${FSMONITOR_DAEMON_BACKEND}.c)
+- list(APPEND compat_SOURCES compat/fsmonitor/fsm-ipc-${FSMONITOR_OS_SETTINGS}.c)
+- list(APPEND compat_SOURCES compat/fsmonitor/fsm-path-utils-${FSMONITOR_DAEMON_BACKEND}.c)
++ list(APPEND compat_SOURCES lib/compat/fsmonitor/fsm-listen-${FSMONITOR_DAEMON_BACKEND}.c)
++ list(APPEND compat_SOURCES lib/compat/fsmonitor/fsm-health-${FSMONITOR_DAEMON_BACKEND}.c)
++ list(APPEND compat_SOURCES lib/compat/fsmonitor/fsm-ipc-${FSMONITOR_OS_SETTINGS}.c)
++ list(APPEND compat_SOURCES lib/compat/fsmonitor/fsm-path-utils-${FSMONITOR_DAEMON_BACKEND}.c)
add_compile_definitions(HAVE_FSMONITOR_OS_SETTINGS)
-- list(APPEND compat_SOURCES compat/fsmonitor/fsm-settings-darwin.c)
-+ list(APPEND compat_SOURCES lib/compat/fsmonitor/fsm-settings-darwin.c)
+- list(APPEND compat_SOURCES compat/fsmonitor/fsm-settings-${FSMONITOR_OS_SETTINGS}.c)
++ list(APPEND compat_SOURCES lib/compat/fsmonitor/fsm-settings-${FSMONITOR_OS_SETTINGS}.c)
endif()
endif()
@@ compat/fsmonitor/fsm-darwin-gcc.h => lib/compat/fsmonitor/fsm-darwin-gcc.h
## compat/fsmonitor/fsm-health-darwin.c => lib/compat/fsmonitor/fsm-health-darwin.c ##
+ ## compat/fsmonitor/fsm-health-linux.c => lib/compat/fsmonitor/fsm-health-linux.c ##
+
## compat/fsmonitor/fsm-health-win32.c => lib/compat/fsmonitor/fsm-health-win32.c ##
## compat/fsmonitor/fsm-health.h => lib/compat/fsmonitor/fsm-health.h ##
- ## compat/fsmonitor/fsm-ipc-darwin.c => lib/compat/fsmonitor/fsm-ipc-darwin.c ##
+ ## compat/fsmonitor/fsm-ipc-unix.c => lib/compat/fsmonitor/fsm-ipc-unix.c ##
## compat/fsmonitor/fsm-ipc-win32.c => lib/compat/fsmonitor/fsm-ipc-win32.c ##
## compat/fsmonitor/fsm-listen-darwin.c => lib/compat/fsmonitor/fsm-listen-darwin.c ##
+ ## compat/fsmonitor/fsm-listen-linux.c => lib/compat/fsmonitor/fsm-listen-linux.c ##
+
## compat/fsmonitor/fsm-listen-win32.c => lib/compat/fsmonitor/fsm-listen-win32.c ##
## compat/fsmonitor/fsm-listen.h => lib/compat/fsmonitor/fsm-listen.h ##
## compat/fsmonitor/fsm-path-utils-darwin.c => lib/compat/fsmonitor/fsm-path-utils-darwin.c ##
+ ## compat/fsmonitor/fsm-path-utils-linux.c => lib/compat/fsmonitor/fsm-path-utils-linux.c ##
+
## compat/fsmonitor/fsm-path-utils-win32.c => lib/compat/fsmonitor/fsm-path-utils-win32.c ##
- ## compat/fsmonitor/fsm-settings-darwin.c => lib/compat/fsmonitor/fsm-settings-darwin.c ##
+ ## compat/fsmonitor/fsm-settings-unix.c => lib/compat/fsmonitor/fsm-settings-unix.c ##
## compat/fsmonitor/fsm-settings-win32.c => lib/compat/fsmonitor/fsm-settings-win32.c ##
@@ compat/msvc.c => lib/compat/msvc.c
## compat/msvc.h => lib/compat/msvc.h ##
- ## compat/nedmalloc/License.txt => lib/compat/nedmalloc/License.txt ##
-
- ## compat/nedmalloc/Readme.txt => lib/compat/nedmalloc/Readme.txt ##
-
- ## compat/nedmalloc/malloc.c.h => lib/compat/nedmalloc/malloc.c.h ##
-
- ## compat/nedmalloc/nedmalloc.c => lib/compat/nedmalloc/nedmalloc.c ##
-
- ## compat/nedmalloc/nedmalloc.h => lib/compat/nedmalloc/nedmalloc.h ##
-
## compat/nonblock.c => lib/compat/nonblock.c ##
## compat/nonblock.h => lib/compat/nonblock.h ##
@@ compat/win32/dirent.c => lib/compat/win32/dirent.c
## compat/win32/dirent.h => lib/compat/win32/dirent.h ##
+ ## compat/win32/exit-process.h => lib/compat/win32/exit-process.h ##
+
## compat/win32/flush.c => lib/compat/win32/flush.c ##
## compat/win32/git.manifest => lib/compat/win32/git.manifest ##
@@ odb/source-files.c => lib/odb/source-files.c
## odb/source-files.h => lib/odb/source-files.h ##
+ ## odb/source-inmemory.c => lib/odb/source-inmemory.c ##
+
+ ## odb/source-inmemory.h => lib/odb/source-inmemory.h ##
+
+ ## odb/source-loose.c => lib/odb/source-loose.c ##
+
+ ## odb/source-loose.h => lib/odb/source-loose.h ##
+
+ ## odb/source-packed.c => lib/odb/source-packed.c ##
+
+ ## odb/source-packed.h => lib/odb/source-packed.h ##
+
## odb/source.c => lib/odb/source.c ##
## odb/source.h => lib/odb/source.h ##
@@ odb/streaming.c => lib/odb/streaming.c
## odb/streaming.h => lib/odb/streaming.h ##
+ ## odb/transaction.c => lib/odb/transaction.c ##
+
+ ## odb/transaction.h => lib/odb/transaction.h ##
+
## oid-array.c => lib/oid-array.c ##
## oid-array.h => lib/oid-array.h ##
@@ pack-write.c => lib/pack-write.c
## pack.h => lib/pack.h ##
+ ## packfile-list.c => lib/packfile-list.c ##
+
+ ## packfile-list.h => lib/packfile-list.h ##
+
## packfile.c => lib/packfile.c ##
## packfile.h => lib/packfile.h ##
@@ meson.build: version_gen_environment.set('GIT_VERSION', get_option('version'))
- 'odb.c',
- 'odb/source.c',
- 'odb/source-files.c',
+- 'odb/source-inmemory.c',
+- 'odb/source-loose.c',
+- 'odb/source-packed.c',
- 'odb/streaming.c',
+- 'odb/transaction.c',
- 'oid-array.c',
- 'oidmap.c',
- 'oidset.c',
@@ meson.build: version_gen_environment.set('GIT_VERSION', get_option('version'))
- 'pack-revindex.c',
- 'pack-write.c',
- 'packfile.c',
+- 'packfile-list.c',
- 'pager.c',
- 'parallel-checkout.c',
- 'parse.c',
@@ meson.build: version_gen_environment.set('GIT_VERSION', get_option('version'))
+ 'lib/odb.c',
+ 'lib/odb/source.c',
+ 'lib/odb/source-files.c',
++ 'lib/odb/source-inmemory.c',
++ 'lib/odb/source-loose.c',
++ 'lib/odb/source-packed.c',
+ 'lib/odb/streaming.c',
++ 'lib/odb/transaction.c',
+ 'lib/oid-array.c',
+ 'lib/oidmap.c',
+ 'lib/oidset.c',
@@ meson.build: version_gen_environment.set('GIT_VERSION', get_option('version'))
+ 'lib/pack-revindex.c',
+ 'lib/pack-write.c',
+ 'lib/packfile.c',
++ 'lib/packfile-list.c',
+ 'lib/pager.c',
+ 'lib/parallel-checkout.c',
+ 'lib/parse.c',
@@ meson.build: version_gen_environment.set('GIT_VERSION', get_option('version'))
libgit_sources += custom_target(
@@ meson.build: builtin_sources = [
+ ]
third_party_excludes = [
- ':!contrib',
+- ':!contrib',
- ':!compat/inet_ntop.c',
- ':!compat/inet_pton.c',
-- ':!compat/nedmalloc',
- ':!compat/obstack.*',
- ':!compat/poll',
- ':!compat/regex',
- ':!sha1collisiondetection',
- ':!sha1dc',
++ ':!lib/contrib',
+ ':!lib/compat/inet_ntop.c',
+ ':!lib/compat/inet_pton.c',
-+ ':!lib/compat/nedmalloc',
+ ':!lib/compat/obstack.*',
+ ':!lib/compat/poll',
+ ':!lib/compat/regex',
+ ':!lib/sha1collisiondetection',
+ ':!lib/sha1dc',
-+ ':!lib/xdiff',
':!t/unit-tests/clar',
':!t/t[0-9][0-9][0-9][0-9]*',
- ':!xdiff',
@@ meson.build: endif
- 'compat/win32/pthread.c',
- 'compat/win32/syslog.c',
- 'compat/win32mmap.c',
-- 'compat/nedmalloc/nedmalloc.c',
+ 'lib/compat/winansi.c',
+ 'lib/compat/win32/dirent.c',
+ 'lib/compat/win32/flush.c',
@@ meson.build: endif
+ 'lib/compat/win32/pthread.c',
+ 'lib/compat/win32/syslog.c',
+ 'lib/compat/win32mmap.c',
-+ 'lib/compat/nedmalloc/nedmalloc.c',
]
libgit_c_args += [
@@ meson.build: if fsmonitor_backend != ''
compat_sources += [
- 'compat/fsmonitor/fsm-health-' + fsmonitor_backend + '.c',
-- 'compat/fsmonitor/fsm-ipc-' + fsmonitor_backend + '.c',
+- 'compat/fsmonitor/fsm-ipc-' + fsmonitor_os + '.c',
- 'compat/fsmonitor/fsm-listen-' + fsmonitor_backend + '.c',
- 'compat/fsmonitor/fsm-path-utils-' + fsmonitor_backend + '.c',
-- 'compat/fsmonitor/fsm-settings-' + fsmonitor_backend + '.c',
+- 'compat/fsmonitor/fsm-settings-' + fsmonitor_os + '.c',
+ 'lib/compat/fsmonitor/fsm-health-' + fsmonitor_backend + '.c',
-+ 'lib/compat/fsmonitor/fsm-ipc-' + fsmonitor_backend + '.c',
++ 'lib/compat/fsmonitor/fsm-ipc-' + fsmonitor_os + '.c',
+ 'lib/compat/fsmonitor/fsm-listen-' + fsmonitor_backend + '.c',
+ 'lib/compat/fsmonitor/fsm-path-utils-' + fsmonitor_backend + '.c',
-+ 'lib/compat/fsmonitor/fsm-settings-' + fsmonitor_backend + '.c',
++ 'lib/compat/fsmonitor/fsm-settings-' + fsmonitor_os + '.c',
]
endif
build_options_config.set_quoted('FSMONITOR_DAEMON_BACKEND', fsmonitor_backend)
@@ meson.build: if get_option('docs') != []
]
if sha1_backend != 'openssl'
+- exclude_from_check_headers += 'sha1/openssl.h'
++ exclude_from_check_headers += 'lib/sha1/openssl.h'
+ endif
+ if sha256_backend != 'openssl'
+- exclude_from_check_headers += 'sha256/openssl.h'
++ exclude_from_check_headers += 'lib/sha256/openssl.h'
+ endif
+ if sha256_backend != 'nettle'
+- exclude_from_check_headers += 'sha256/nettle.h'
++ exclude_from_check_headers += 'lib/sha256/nettle.h'
+ endif
+ if sha256_backend != 'gcrypt'
+- exclude_from_check_headers += 'sha256/gcrypt.h'
++ exclude_from_check_headers += 'lib/sha256/gcrypt.h'
+ endif
+
+ if headers_to_check.length() != 0 and compiler.get_argument_syntax() == 'gcc'
+@@ meson.build: if headers_to_check.length() != 0 and compiler.get_argument_syntax() == 'gcc'
+ compiler.cmd_array(),
+ libgit_c_args,
+ '-I', meson.project_source_root(),
++ '-I', meson.project_source_root() / 'lib',
+ '-I', meson.project_source_root() / 't/unit-tests',
+ '-o', '/dev/null',
+ '-c', '-xc',
---
base-commit: 0309c6da48e2f94a72c9cee6e95ac6a1d0d2c965
change-id: 20260415-pks-libgit-in-subdir-d8eec849cd48
^ permalink raw reply
* Re: [PATCH GSoC RFC v13 05/12] fetch-pack: move function to connect.c
From: Karthik Nayak @ 2026-06-22 10:30 UTC (permalink / raw)
To: Pablo Sabater, gitster
Cc: peff, eric.peijian, chriscool, git, jltobler, toon,
chandrapratap3519, Jonathan Tan, Calvin Wan
In-Reply-To: <20260619-ps-eric-work-rebase-v13-5-3d4c7315d2f8@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1829 bytes --]
Pablo Sabater <pabloosabaterr@gmail.com> writes:
> write_fetch_command_and_capabilities will be refactored in a subsequent
> commit where it will become a more general-purpose function, making it
> more accessible to additional commands in the future.
Okay.
> To move `write_fetch_command_and_capabilities()` to `connect.c`, we need
> to adjust how `advertise_sid` is managed. Previously in `fetch_pack.c`,
> `advertise_sid` was a static variable, modified using
> `repo_config_get_bool()`.
Nit: What's missing is why do we need to move it to 'connect.c', I
assume this is because it being generic means its better placed in
connect.c over 'fetch-pack.c'. Would be nice to explicitly mention that
perhaps?
>
> In `connect.c`, we now initialize `advertise_sid` at the begining by
> directly using `repo_config_get_bool()`. This change is safe because:
>
> In the original `fetch-pack.c` code, there are only two places that write
> `advertise_sid`:
>
> 1. In function `do_fetch_pack()`:
> if (!sever_supports("session_id"))
> advertise_sid = 0;
> 2. In function `fetch_pack_config()`:
> repo_config_get_bool("transfer.advertisesid", &advertise_sid);
>
> About 1, since `do_fetch_pack()` is only relevant for protocol v1, this
> assignment can be ignored, as `write_fetch_command_and_capabilities()`
> is only used in v2.
>
> About 2, `repo_config_get_bool()` is from `config.h` and it's an out-of-box
> dependency of `connect.c`, so we can reuse it directly.
>
> Move `write_fetch_command_and_capabilities()` to `connect.c`
>
Nit: Wouldn't it then make sense to split this into two?
1. Drop usage of the static `advertise_sid` within
`write_fetch_command_and_capabilities()`.
2. Move `write_fetch_command_and_capabilities()` to `connect.c`
That way the second patch is simply a move?
[snip]
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 690 bytes --]
^ permalink raw reply
* Re: [RFH] Why do osx CI jobs so unreliable?
From: Patrick Steinhardt @ 2026-06-22 10:29 UTC (permalink / raw)
To: Jeff King; +Cc: Michael Montalbo, git, Junio C Hamano
In-Reply-To: <ajkGkB2ckf3p43QR@pks.im>
On Mon, Jun 22, 2026 at 11:55:31AM +0200, Patrick Steinhardt wrote:
> On Mon, Jun 22, 2026 at 11:48:01AM +0200, Patrick Steinhardt wrote:
> > On Mon, Jun 22, 2026 at 06:42:24AM +0200, Patrick Steinhardt wrote:
> > > On Sun, Jun 21, 2026 at 05:34:07PM -0400, Jeff King wrote:
> > > > On Sat, Jun 20, 2026 at 08:33:13AM -0700, Michael Montalbo wrote:
> > [snip]
> > > > > When it is wedged the whole chain sits at 0% CPU. upload-pack is
> > > > > blocked in write() on the ls-refs advertisement, curl blocked in
> > > > > select(). So it looks like an HTTP/2 flow-control stall on the
> > > > > response side. The same stall resets itself after ~60-85s on my Linux
> > > > > box and on a bare-metal Mac, but not on the GitHub runner; I haven't
> > > > > pinned down why yet.
> > > >
> > > > We had some HTTP/2 stalls/deadlocks in the past, and they were dependent
> > > > on libcurl and apache (actually h2_mod) versions. IIRC some of the
> > > > non-TLS code paths for HTTP/2 were not well tested, which led to
> > > > 8f2146dbf1 (t5559: make SSL/TLS the default, 2023-02-23). Of course
> > > > after that commit those cleartext code paths should not be a problem, so
> > > > that is probably not exactly the issue now.
> > > >
> > > > But it might be worth checking the versions you're running locally
> > > > versus what's in the GitHub runner.
> > >
> > > I didn't observe any similar hangs in GitLab's CI systems, so I wonder
> > > whether this is because of different versions of curl. And indeed we use
> > > different versions:
> > >
> > > - On GitHub we use 8.6.0.
> > >
> > > - On GitLab we use 8.7.1.
> > >
> > > Now this of course doesn't mean that updating the curl version is the
> > > fix to this whole issue, as there's a ton of other factors that could
> > > play a role in whether or not the test hangs. So while we could just
> > > upgrade parts of the stack and cross our fingers, but that feels rather
> > > unsatisfactory. Still, one place to start could be to update our build
> > > images to macOS 15.
> > >
> > > But the big question to me is whether the hang is because of a bug in
> > > Git with how we drive curl, a bug in curl itself, or a bug in Apache.
> >
> > I noticed that a osx-clang job failed today in t5551 [1]. This time it
> > didn't hang, but produced an actual error:
> >
> > 2026-06-22T09:25:45.1984230Z ++ git -C too-many-refs fetch -q --tags
> > 2026-06-22T09:25:45.1984420Z error: RPC failed; curl 18 transfer closed with outstanding read data remaining
> > 2026-06-22T09:25:45.1984520Z fatal: expected flush after ref listing
> > 2026-06-22T09:25:45.1984610Z error: last command exited with $?=128
> > 2026-06-22T09:25:45.1984660Z ++ rm -f tags
> > 2026-06-22T09:25:45.1984710Z ++ :
> > 2026-06-22T09:25:45.1984830Z not ok 35 - http can handle enormous ref negotiation
> >
> > There was a second test failing similarly.
>
> Oh, and Linux is also failing in the same test suite [1], even though
> the job logs are truncated, so it's hard to say whether it's the same
> failure or not.
>
> There certainly seems to be a deeper issue here. We could of course just
> disable the test again, but by now I do wonder whether this would paper
> over an actual bug.
>
> Patrick
>
> [1]: https://github.com/git/git/actions/runs/27940620478/job/82672854864
Sorry for the repeated spam.
I think the issue is rather simple: we're hitting timeouts in Apache. If
you apply the following diff:
diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf
index 40a690b0bb..4054fe008f 100644
--- a/t/lib-httpd/apache.conf
+++ b/t/lib-httpd/apache.conf
@@ -302,3 +302,5 @@ RewriteRule ^/half-auth-complete/ - [E=AUTHREQUIRED:yes]
SVNPath "${LIB_HTTPD_SVNPATH}"
</Location>
</IfDefine>
+
+Timeout 1
Then you'll see the same errors locally:
$ GIT_TEST_LONG=Yes meson test t5551-http-fetch-smart --test-args=-ix -i
Failed to clone 'sub'. Retry scheduled
Cloning into '/home/pks/Development/git/build/test-output/trash directory.t5551-http-fetch-smart/sub'...
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
fatal: clone of 'http://127.0.0.1:5551/smart_headers/repo.git' into submodule path '/home/pks/Development/git/build/test-output/trash directory.t5551-http-fetch-smart/sub' failed
Failed to clone 'sub' a second time, aborting
error: last command exited with $?=1
not ok 36 - custom http headers
#
# test_must_fail git -c http.extraheader="x-magic-two: cadabra" \
# fetch "$HTTPD_URL/smart_headers/repo.git" &&
# git -c http.extraheader="x-magic-one: abra" \
# -c http.extraheader="x-magic-two: cadabra" \
# fetch "$HTTPD_URL/smart_headers/repo.git" &&
# git update-index --add --cacheinfo 160000,$(git rev-parse HEAD),sub &&
# git config -f .gitmodules submodule.sub.path sub &&
# git config -f .gitmodules submodule.sub.url \
# "$HTTPD_URL/smart_headers/repo.git" &&
# git submodule init sub &&
# test_must_fail git submodule update sub &&
# git -c http.extraheader="x-magic-one: abra" \
# -c http.extraheader="x-magic-two: cadabra" \
# submodule update sub
#
1..36
And Apache also logs this as a timeout:
[Mon Jun 22 10:26:52.115717 2026] [cgi:warn] [pid 3686957:tid 3686957] [client 127.0.0.1:55114] AH01220: Timeout waiting for output from CGI script /home/pks/Development/git/build/git-http-backend
[Mon Jun 22 10:26:52.115748 2026] [core:error] [pid 3686957:tid 3686957] (70007)The timeout specified has expired: [client 127.0.0.1:55114] AH00574: ap_content_length_filter: apr_bucket_read() failed
[Mon Jun 22 10:27:01.567533 2026] [cgi:warn] [pid 3686958:tid 3686958] [client 127.0.0.1:54384] AH01220: Timeout waiting for output from CGI script /home/pks/Development/git/build/git-http-backend
[Mon Jun 22 10:27:01.567559 2026] [core:error] [pid 3686958:tid 3686958] (70007)The timeout specified has expired: [client 127.0.0.1:54384] AH00574: ap_content_length_filter: apr_bucket_read() failed
This is because our keepalive mechanisms aren't helping:
- The TCP-level keepalives don't help with Apache.
- The application-level sideband keepalives don't apply to the
"ls-refs" endpoint.
Whether that's the same issue like we see in macOS sometimes is a
different question.
Patrick
^ permalink raw reply related
* Re: [PATCH GSoC RFC v13 03/12] cat-file: declare loop counter inside for()
From: Karthik Nayak @ 2026-06-22 10:08 UTC (permalink / raw)
To: Pablo Sabater, gitster
Cc: peff, eric.peijian, chriscool, git, jltobler, toon,
chandrapratap3519
In-Reply-To: <20260619-ps-eric-work-rebase-v13-3-3d4c7315d2f8@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1209 bytes --]
Pablo Sabater <pabloosabaterr@gmail.com> writes:
> From: Eric Ju <eric.peijian@gmail.com>
>
> Some code used in this series declares variable i and only uses it
> in a for loop, not in any other logic outside the loop.
>
> Change the declaration of i to be inside the for loop for readability.
> While at it, we also change its type from "int" to "size_t" where the
> latter makes more sense.
>
> Helped-by: Christian Couder <chriscool@tuxfamily.org>
> Signed-off-by: Eric Ju <eric.peijian@gmail.com>
> Signed-off-by: Pablo Sabater <pabloosabaterr@gmail.com>
> ---
> builtin/cat-file.c | 13 ++++---------
> fetch-pack.c | 3 +--
> 2 files changed, 5 insertions(+), 11 deletions(-)
>
> diff --git a/builtin/cat-file.c b/builtin/cat-file.c
> index 446d649904..fab55c11de 100644
> --- a/builtin/cat-file.c
> +++ b/builtin/cat-file.c
> @@ -723,14 +723,12 @@ static void dispatch_calls(struct batch_options *opt,
> struct strbuf *output,
> struct expand_data *data,
> struct queued_cmd *cmd,
> - int nr)
> + size_t nr)
>
This is fine since both the locations that dispatch_calls() are called
with, supply a size_t.
The rest seems to have been already validated by Junio.
Looks good
[snip]
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 690 bytes --]
^ permalink raw reply
* 2026–2027 Vendor Participation Notice
From: teambapco @ 2026-06-22 10:08 UTC (permalink / raw)
To: git
Dear Vendor,
Bapco Energies is reviewing suppliers for upcoming projects in 2026–2027. We are gathering information on company services and capabilities.
If your organization would like to be considered, please contact us to request the vendor questionnaire and supporting details.
For inquiries, kindly email contact@bapcoenergiess-bh.com.
Sincerely,
Mr. Firdaus Panthaki
Chief Procurement Officer,
Bapco Energies,
P.O. Box 25555, Awali,
Kingdom of Bahrain
.📧 contact@bapcoenergiess-bh.com
🌐 www.bapcoenergies.com
^ permalink raw reply
* Re: [PATCH v14 4/6] branch: add --prune-merged <branch>
From: Phillip Wood @ 2026-06-22 9:57 UTC (permalink / raw)
To: Harald Nordgren
Cc: Junio C Hamano, Harald Nordgren via GitGitGadget, git,
Kristoffer Haugsbakk, Johannes Sixt
In-Reply-To: <CAHwyqnVQwK1w9ap1-e=ii4a-BVOZ=oQtCdkTxB=TJF30kNaZoQ@mail.gmail.com>
On 22/06/2026 10:37, Harald Nordgren wrote:
> Hi! I implemented this in v17.
That seems to preserve all the upstreams, rather than preserving the
upstreams of unmerged branches and clearing the upstream setting of
merged branches. It also builds a list of upstream branches rather than
just pruning the set of to-be-deleted branches in the
refs_for_each_branch_ref() callback which seems a bit wasteful.
Thanks
Phillip
>
> Harald
>
> On Mon, Jun 22, 2026 at 11:28 AM Phillip Wood <phillip.wood123@gmail.com> wrote:
>>
>> On 22/06/2026 10:09, Phillip Wood wrote:
>>> Hi Harald
>>>
>>> On 21/06/2026 19:46, Harald Nordgren wrote:
>>>> Looking into this more and attempting to implement the logic for
>>>> re-assigning the upstream, it becomes quite a lot of code.
>>
>> Having re-read you previous message I'm coming round to the idea of
>> clearing the upstream of branches that have been merged but cannot be
>> deleted because they are the upstream of an unmerged branch. Is that
>> easier than reassigning the upstream?
>>
>> Thanks
>>
>> Phillip
>>
>>>> Maybe an easier way forward now is to avoid deleting these cases. We
>>>> can always add the re-assigning logic later on without breaking
>>>> backward compatibility.
>>>
>>> Not deleting the branch is certainly safest and should be fairly easy to
>>> implement. Adding an option to reassign the upstream later sounds fine
>>> to me.
>>>
>>> Thanks
>>>
>>> Phillip
>>>
>>
^ permalink raw reply
* Re: [RFH] Why do osx CI jobs so unreliable?
From: Patrick Steinhardt @ 2026-06-22 9:55 UTC (permalink / raw)
To: Jeff King; +Cc: Michael Montalbo, git, Junio C Hamano
In-Reply-To: <ajkEzhdqzmAePk_P@pks.im>
On Mon, Jun 22, 2026 at 11:48:01AM +0200, Patrick Steinhardt wrote:
> On Mon, Jun 22, 2026 at 06:42:24AM +0200, Patrick Steinhardt wrote:
> > On Sun, Jun 21, 2026 at 05:34:07PM -0400, Jeff King wrote:
> > > On Sat, Jun 20, 2026 at 08:33:13AM -0700, Michael Montalbo wrote:
> [snip]
> > > > When it is wedged the whole chain sits at 0% CPU. upload-pack is
> > > > blocked in write() on the ls-refs advertisement, curl blocked in
> > > > select(). So it looks like an HTTP/2 flow-control stall on the
> > > > response side. The same stall resets itself after ~60-85s on my Linux
> > > > box and on a bare-metal Mac, but not on the GitHub runner; I haven't
> > > > pinned down why yet.
> > >
> > > We had some HTTP/2 stalls/deadlocks in the past, and they were dependent
> > > on libcurl and apache (actually h2_mod) versions. IIRC some of the
> > > non-TLS code paths for HTTP/2 were not well tested, which led to
> > > 8f2146dbf1 (t5559: make SSL/TLS the default, 2023-02-23). Of course
> > > after that commit those cleartext code paths should not be a problem, so
> > > that is probably not exactly the issue now.
> > >
> > > But it might be worth checking the versions you're running locally
> > > versus what's in the GitHub runner.
> >
> > I didn't observe any similar hangs in GitLab's CI systems, so I wonder
> > whether this is because of different versions of curl. And indeed we use
> > different versions:
> >
> > - On GitHub we use 8.6.0.
> >
> > - On GitLab we use 8.7.1.
> >
> > Now this of course doesn't mean that updating the curl version is the
> > fix to this whole issue, as there's a ton of other factors that could
> > play a role in whether or not the test hangs. So while we could just
> > upgrade parts of the stack and cross our fingers, but that feels rather
> > unsatisfactory. Still, one place to start could be to update our build
> > images to macOS 15.
> >
> > But the big question to me is whether the hang is because of a bug in
> > Git with how we drive curl, a bug in curl itself, or a bug in Apache.
>
> I noticed that a osx-clang job failed today in t5551 [1]. This time it
> didn't hang, but produced an actual error:
>
> 2026-06-22T09:25:45.1984230Z ++ git -C too-many-refs fetch -q --tags
> 2026-06-22T09:25:45.1984420Z error: RPC failed; curl 18 transfer closed with outstanding read data remaining
> 2026-06-22T09:25:45.1984520Z fatal: expected flush after ref listing
> 2026-06-22T09:25:45.1984610Z error: last command exited with $?=128
> 2026-06-22T09:25:45.1984660Z ++ rm -f tags
> 2026-06-22T09:25:45.1984710Z ++ :
> 2026-06-22T09:25:45.1984830Z not ok 35 - http can handle enormous ref negotiation
>
> There was a second test failing similarly.
Oh, and Linux is also failing in the same test suite [1], even though
the job logs are truncated, so it's hard to say whether it's the same
failure or not.
There certainly seems to be a deeper issue here. We could of course just
disable the test again, but by now I do wonder whether this would paper
over an actual bug.
Patrick
[1]: https://github.com/git/git/actions/runs/27940620478/job/82672854864
^ permalink raw reply
* Re: [RFH] Why do osx CI jobs so unreliable?
From: Patrick Steinhardt @ 2026-06-22 9:47 UTC (permalink / raw)
To: Jeff King; +Cc: Michael Montalbo, git, Junio C Hamano
In-Reply-To: <aji9MOE-NTHKXYqn@pks.im>
On Mon, Jun 22, 2026 at 06:42:24AM +0200, Patrick Steinhardt wrote:
> On Sun, Jun 21, 2026 at 05:34:07PM -0400, Jeff King wrote:
> > On Sat, Jun 20, 2026 at 08:33:13AM -0700, Michael Montalbo wrote:
[snip]
> > > When it is wedged the whole chain sits at 0% CPU. upload-pack is
> > > blocked in write() on the ls-refs advertisement, curl blocked in
> > > select(). So it looks like an HTTP/2 flow-control stall on the
> > > response side. The same stall resets itself after ~60-85s on my Linux
> > > box and on a bare-metal Mac, but not on the GitHub runner; I haven't
> > > pinned down why yet.
> >
> > We had some HTTP/2 stalls/deadlocks in the past, and they were dependent
> > on libcurl and apache (actually h2_mod) versions. IIRC some of the
> > non-TLS code paths for HTTP/2 were not well tested, which led to
> > 8f2146dbf1 (t5559: make SSL/TLS the default, 2023-02-23). Of course
> > after that commit those cleartext code paths should not be a problem, so
> > that is probably not exactly the issue now.
> >
> > But it might be worth checking the versions you're running locally
> > versus what's in the GitHub runner.
>
> I didn't observe any similar hangs in GitLab's CI systems, so I wonder
> whether this is because of different versions of curl. And indeed we use
> different versions:
>
> - On GitHub we use 8.6.0.
>
> - On GitLab we use 8.7.1.
>
> Now this of course doesn't mean that updating the curl version is the
> fix to this whole issue, as there's a ton of other factors that could
> play a role in whether or not the test hangs. So while we could just
> upgrade parts of the stack and cross our fingers, but that feels rather
> unsatisfactory. Still, one place to start could be to update our build
> images to macOS 15.
>
> But the big question to me is whether the hang is because of a bug in
> Git with how we drive curl, a bug in curl itself, or a bug in Apache.
I noticed that a osx-clang job failed today in t5551 [1]. This time it
didn't hang, but produced an actual error:
2026-06-22T09:25:45.1984230Z ++ git -C too-many-refs fetch -q --tags
2026-06-22T09:25:45.1984420Z error: RPC failed; curl 18 transfer closed with outstanding read data remaining
2026-06-22T09:25:45.1984520Z fatal: expected flush after ref listing
2026-06-22T09:25:45.1984610Z error: last command exited with $?=128
2026-06-22T09:25:45.1984660Z ++ rm -f tags
2026-06-22T09:25:45.1984710Z ++ :
2026-06-22T09:25:45.1984830Z not ok 35 - http can handle enormous ref negotiation
There was a second test failing similarly.
Patrick
[1]: https://github.com/git/git/actions/runs/27940620478/job/82672854726
^ permalink raw reply
* Re: [PATCH v14 4/6] branch: add --prune-merged <branch>
From: Harald Nordgren @ 2026-06-22 9:37 UTC (permalink / raw)
To: Phillip Wood
Cc: Junio C Hamano, Harald Nordgren via GitGitGadget, git,
Kristoffer Haugsbakk, Johannes Sixt
In-Reply-To: <a3bd3514-dab4-49b6-a210-bc7b8ddd701d@gmail.com>
Hi! I implemented this in v17.
Harald
On Mon, Jun 22, 2026 at 11:28 AM Phillip Wood <phillip.wood123@gmail.com> wrote:
>
> On 22/06/2026 10:09, Phillip Wood wrote:
> > Hi Harald
> >
> > On 21/06/2026 19:46, Harald Nordgren wrote:
> >> Looking into this more and attempting to implement the logic for
> >> re-assigning the upstream, it becomes quite a lot of code.
>
> Having re-read you previous message I'm coming round to the idea of
> clearing the upstream of branches that have been merged but cannot be
> deleted because they are the upstream of an unmerged branch. Is that
> easier than reassigning the upstream?
>
> Thanks
>
> Phillip
>
> >> Maybe an easier way forward now is to avoid deleting these cases. We
> >> can always add the re-assigning logic later on without breaking
> >> backward compatibility.
> >
> > Not deleting the branch is certainly safest and should be fairly easy to
> > implement. Adding an option to reassign the upstream later sounds fine
> > to me.
> >
> > Thanks
> >
> > Phillip
> >
>
^ permalink raw reply
* Re: [PATCH v14 4/6] branch: add --prune-merged <branch>
From: Phillip Wood @ 2026-06-22 9:28 UTC (permalink / raw)
To: Harald Nordgren, Junio C Hamano
Cc: Harald Nordgren via GitGitGadget, git, Kristoffer Haugsbakk,
Johannes Sixt
In-Reply-To: <31172867-5577-4c1e-b8b6-425ef9fe44e1@gmail.com>
On 22/06/2026 10:09, Phillip Wood wrote:
> Hi Harald
>
> On 21/06/2026 19:46, Harald Nordgren wrote:
>> Looking into this more and attempting to implement the logic for
>> re-assigning the upstream, it becomes quite a lot of code.
Having re-read you previous message I'm coming round to the idea of
clearing the upstream of branches that have been merged but cannot be
deleted because they are the upstream of an unmerged branch. Is that
easier than reassigning the upstream?
Thanks
Phillip
>> Maybe an easier way forward now is to avoid deleting these cases. We
>> can always add the re-assigning logic later on without breaking
>> backward compatibility.
>
> Not deleting the branch is certainly safest and should be fairly easy to
> implement. Adding an option to reassign the upstream later sounds fine
> to me.
>
> Thanks
>
> Phillip
>
^ permalink raw reply
* Re: [PATCH v14 4/6] branch: add --prune-merged <branch>
From: Phillip Wood @ 2026-06-22 9:25 UTC (permalink / raw)
To: Harald Nordgren, Junio C Hamano
Cc: Harald Nordgren via GitGitGadget, git, Kristoffer Haugsbakk,
Johannes Sixt
In-Reply-To: <CAHwyqnWt59h2HO5EJbFswYr7QEA7oNZKdBt_vTk5axNbWFZbpA@mail.gmail.com>
Hi Harald
On 20/06/2026 10:04, Harald Nordgren wrote:
>> - Move the @{upstream} of feature2 to the branch that "merged"
>> feature1 and caused its removal. Asking feature2@{upstream}
>> would answer origin/master, which feature1 was removed after
>> getting merged.
>
> I think this is a strong option.
>
> As a side note: I was annoyed before when GitHub didn't re-assign base
> automatically when doing stacked PR's, so merging in the first branch
> caused developers to merge in the second PR into essentially a dead
> feature branch instead of master, if they forgot to manually change
> it. But I think GitHub has fixed this now so the second PR gets its
> base changed to default branch.
>
> Two caveats:
>
> - How to handle recursion: b1 has b2 as upstream and b2 has b3 as
> upstream, and both b2 and b3 have been merged? Not good if it's just
> luck which order the branches get walked, but also we don't want to
> have to do many passes, two passes is not even guaranteed to be
> enough.
I think you only need one pass. For each branch we look at it's upstream
and if it is in the set of branches we want to delete we
1 remove it from the set of branches to be deleted
2 if the upstream of the upstream is in the set of branches to be
deleted goto 1.
Note that we don't need to create a list of all upstream branches, we
can handle it within the refs_for_each_branch_ref() callback.
> - What about when b3 has itself as upstream? I guess then we can just
> remove the upstream of b2. Overall, I don't think it's a huge problem
> when a branch gets no upstream, so maybe just warn about it.
Removing the upstream config of branches that are merged shouldn't cause
too many problems - the user is unlikely to want to rebase a merged
branch and they're unlikely to have it checked out so "git rebase" and
"git log @{u}.." probably does not matter.
So maybe we should change the loop above to only keep the upstream
branch of branches that have not been merged and instead clear the
upstream config of any merged branches we keep because they are an
upstream of another branch.
Thanks
Phillip
^ permalink raw reply
* Re: [PATCH] win32: ensure that `localtime_r()` is declared even in i686 builds
From: Patrick Steinhardt @ 2026-06-22 9:11 UTC (permalink / raw)
To: Johannes Schindelin via GitGitGadget; +Cc: git, Johannes Schindelin
In-Reply-To: <pull.2157.git.1782117847057.gitgitgadget@gmail.com>
On Mon, Jun 22, 2026 at 08:44:06AM +0000, Johannes Schindelin via GitGitGadget wrote:
> From: Johannes Schindelin <johannes.schindelin@gmx.de>
>
> The `__MINGW64__` constant is defined, surprise, surprise, only when
> building for a 64-bit CPU architecture.
>
> Therefore using it as a guard to define `_POSIX_C_SOURCE` (so that
> `localtime_r()` is declared, among other functions) is not enough, we
> also need to check `__MINGW32__`.
>
> Technically, the latter constant is defined even for 64-bit builds. But
> let's make things a bit easier to understand by testing for both
> constants.
So it would suffice to use `__MINGW32__`? In any case, I agree that
making this explicit feels sane.
> Making it so fixes this compile warning (turned error in GCC v14.1):
>
> archive-zip.c: In function 'dos_time':
> archive-zip.c:612:9: error: implicit declaration of function 'localtime_r';
> did you mean 'localtime_s'? [-Wimplicit-function-declaration]
> 612 | localtime_r(&time, &tm);
> | ^~~~~~~~~~~
> | localtime_s
Makes sense. The function is available in C23, but we don't use it.
Otherwise, it's enabled with `_POSIX_C_SOURCE` according to [1].
> diff --git a/compat/posix.h b/compat/posix.h
> index 2f01564b0d..e2e794cad7 100644
> --- a/compat/posix.h
> +++ b/compat/posix.h
> @@ -56,7 +56,7 @@
> # define UNUSED
> #endif
>
> -#ifdef __MINGW64__
> +#if defined(__MINGW32__) || defined(__MINGW64__)
> #define _POSIX_C_SOURCE 1
> #elif defined(__sun__)
> /*
This looks nice and simple.
Thanks!
Patrick
[1]: https://man7.org/linux/man-pages/man3/ctime.3.html
^ permalink raw reply
* Re: [PATCH v14 4/6] branch: add --prune-merged <branch>
From: Phillip Wood @ 2026-06-22 9:09 UTC (permalink / raw)
To: Harald Nordgren, Junio C Hamano
Cc: Harald Nordgren via GitGitGadget, git, Kristoffer Haugsbakk,
Johannes Sixt
In-Reply-To: <CAHwyqnVce7NKft9AEyCUnR=S_y1ygiXjhf-qmJqmi-tuUXcw=g@mail.gmail.com>
Hi Harald
On 21/06/2026 19:46, Harald Nordgren wrote:
> Looking into this more and attempting to implement the logic for
> re-assigning the upstream, it becomes quite a lot of code.
>
> Maybe an easier way forward now is to avoid deleting these cases. We
> can always add the re-assigning logic later on without breaking
> backward compatibility.
Not deleting the branch is certainly safest and should be fairly easy to
implement. Adding an option to reassign the upstream later sounds fine
to me.
Thanks
Phillip
^ permalink raw reply
* Re: [PATCH v14 4/6] branch: add --prune-merged <branch>
From: Phillip Wood @ 2026-06-22 9:07 UTC (permalink / raw)
To: Junio C Hamano
Cc: Harald Nordgren, Harald Nordgren via GitGitGadget, git,
Kristoffer Haugsbakk, Johannes Sixt
In-Reply-To: <xmqq33yimsdp.fsf@gitster.g>
On 19/06/2026 17:01, Junio C Hamano wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
> - Notice that a branch that is deleted (because it itself is
> merged) is still depended upon by being @{upstream} of somebody
> else, and when it happens, fail the operation (i.e., do not
> delete the branch).
Not deleting is definitely the safest option. As Harald has pointed out
we then need to think about what to do with the upstream branch of the
branch we're keeping because it is an upstream of another branch that's
not being deleted. Keeping the whole chain is probably safest.
> What are the viable choices we can offer to the user in such a
> situation? I think there are a few viable choices.
>
> - Make the dependent branch no longer depend on anything. Asking
> feature2@{upstream} would fail.
>
> - Move the @{upstream} of feature2 to the branch that "merged"
> feature1 and caused its removal. Asking feature2@{upstream}
> would answer origin/master, which feature1 was removed after
> getting merged.
The second option is quite tempting. My only concern about doing it
automatically is that it would break "git rebase --fork-point" (which is
the default if you don't specify an upstream). If a user rewrites a
branch, merges it and then "git branch --delete-merged" deletes it and
reassigns the upstream of the branches descended from it, rebasing those
branches would pull in some stale commits.
> There may be others. And there may be relationship similar to
> feature1 vs feature2 that is not @{upstream} but something else that
> makes a branch still "depend on" the other branch getting deleted.
>
> Do we also need the same safety around "git branch -d feature1" by
> the way? The "-d" option with safety checks the same "is feature1
> already merged (to its upstream)?" condition, so it can protect the
> feature2 branch the same way, by saying either "oops, you cannot
> delete feature1 because you still have other branches like feature2
> that depend on it", or "ok, featur2 used to depend on feature1, but
> because we are deleting feature1 based on it being in origin/master,
> we will make feature2 depend on origin/master from now on".
I think handling branches that are the upstream for another branch the
same way for "git branch -d" and "git branch --prune-merged" is a good idea.
Thanks
Phillip
^ permalink raw reply
* Re: [PATCH 0/2] branch/push: suggest intended form when remote/branch slip given
From: Weijie Yuan @ 2026-06-22 8:59 UTC (permalink / raw)
To: Harald Nordgren; +Cc: Harald Nordgren via GitGitGadget, git
In-Reply-To: <CAHwyqnUNb-P7F3EREbTtdTmpx=M7bSw3idrKdm-tK3wTKnePZA@mail.gmail.com>
On Mon, Jun 22, 2026 at 10:41:18AM +0200, Harald Nordgren wrote:
> This is maybe not the most pressing issue, but I remember being quite
> dumbfounded when I was a new Git user; not understanding why some
> commands required one format "origin/main" and other required "origin
> main".
Can't agree more. It's quite confusing for new users like me.
^ permalink raw reply
* [PATCH 3/3] connected: search promisor objects generically
From: Patrick Steinhardt @ 2026-06-22 8:49 UTC (permalink / raw)
To: git
In-Reply-To: <20260622-pks-connected-generic-promisor-checks-v1-0-25eba2698202@pks.im>
When performing connectivity checks we have to figure out whether any of
the new objects are promisor objects, as we cannot assume full
connectivity if so.
This check is performed by iterating through all packfiles in the
repository and searching each of them for the given object. Of course,
this mechanism is quite specific to implementation details of the object
database, as we assume that it uses packfiles in the first place.
Refactor the logic so that we instead use `odb_for_each_object_ext()`
with an object prefix filter and the `ODB_FOR_EACH_OBJECT_PROMISOR_ONLY`
flag. This will yield all objects that have the exact object name and
that are part of a promisor pack in a generic way.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
connected.c | 39 +++++++++++++++++++++++++--------------
1 file changed, 25 insertions(+), 14 deletions(-)
diff --git a/connected.c b/connected.c
index 7e26976832..9a666f0cdf 100644
--- a/connected.c
+++ b/connected.c
@@ -11,6 +11,13 @@
#include "packfile.h"
#include "promisor-remote.h"
+static int promised_object_cb(const struct object_id *oid UNUSED,
+ struct object_info *oi UNUSED,
+ void *payload UNUSED)
+{
+ return 1;
+}
+
/*
* If we feed all the commits we want to verify to this command
*
@@ -46,6 +53,11 @@ int check_connected(oid_iterate_fn fn, void *cb_data,
}
if (repo_has_promisor_remote(the_repository)) {
+ struct odb_for_each_object_options opts = {
+ .flags = ODB_FOR_EACH_OBJECT_PROMISOR_ONLY,
+ .prefix_hex_len = the_repository->hash_algo->hexsz,
+ };
+
/*
* For partial clones, we don't want to have to do a regular
* connectivity check because we have to enumerate and exclude
@@ -54,31 +66,30 @@ int check_connected(oid_iterate_fn fn, void *cb_data,
* object is a promisor object. Instead, just make sure we
* received, in a promisor packfile, the objects pointed to by
* each wanted ref.
- *
- * Before checking for promisor packs, be sure we have the
- * latest pack-files loaded into memory.
*/
- odb_reprepare(the_repository->objects);
do {
- struct packed_git *p;
-
- repo_for_each_pack(the_repository, p) {
- if (!p->pack_promisor)
- continue;
- if (find_pack_entry_one(oid, p))
- goto promisor_pack_found;
+ opts.prefix = oid;
+
+ err = odb_for_each_object_ext(the_repository->objects,
+ NULL, promised_object_cb,
+ NULL, &opts);
+ if (err < 0)
+ break;
+ if (err > 0) {
+ err = 0;
+ continue;
}
+
/*
* Fallback to rev-list with oid and the rest of the
* object IDs provided by fn.
*/
goto no_promisor_pack_found;
-promisor_pack_found:
- ;
} while ((oid = fn(cb_data)) != NULL);
+
if (opt->err_fd)
close(opt->err_fd);
- return 0;
+ return err;
}
no_promisor_pack_found:
--
2.55.0.rc1.745.g43192e7977.dirty
^ permalink raw reply related
* [PATCH 2/3] odb/source-packed: support flags when iterating an object prefix
From: Patrick Steinhardt @ 2026-06-22 8:49 UTC (permalink / raw)
To: git
In-Reply-To: <20260622-pks-connected-generic-promisor-checks-v1-0-25eba2698202@pks.im>
Callers of `odb_for_each_object()` can specify an optional object name
prefix so that we only yield objects that match it. This is incompatible
though with passing flags at the same time, as we don't yet know to
handle them.
Loosen this restriction by calling `should_exclude_pack()`.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
odb/source-packed.c | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/odb/source-packed.c b/odb/source-packed.c
index 3afc4bf01f..6f31f0ff94 100644
--- a/odb/source-packed.c
+++ b/odb/source-packed.c
@@ -148,6 +148,7 @@ static int for_each_prefixed_object_in_midx(
const struct odb_for_each_object_options *opts,
struct odb_source_packed_for_each_object_wrapper_data *data)
{
+ bool pack_errors = false;
int ret;
for (; m; m = m->base_midx) {
@@ -171,6 +172,20 @@ static int for_each_prefixed_object_in_midx(
const struct object_id *current = NULL;
struct object_id oid;
+ if (opts->flags) {
+ uint32_t pack_id = nth_midxed_pack_int_id(m, i);
+ struct packed_git *pack;
+
+ if (prepare_midx_pack(m, pack_id)) {
+ pack_errors = true;
+ continue;
+ }
+
+ pack = nth_midxed_pack(m, pack_id);
+ if (should_exclude_pack(pack, opts->flags))
+ continue;
+ }
+
current = nth_midxed_object_oid(&oid, m, i);
if (!match_hash(len, opts->prefix->hash, current->hash))
@@ -198,6 +213,8 @@ static int for_each_prefixed_object_in_midx(
ret = 0;
out:
+ if (!ret && pack_errors)
+ ret = -1;
return ret;
}
@@ -260,9 +277,6 @@ static int odb_source_packed_for_each_prefixed_object(
bool pack_errors = false;
int ret;
- if (opts->flags)
- BUG("flags unsupported");
-
store->skip_mru_updates = true;
m = get_multi_pack_index(store);
@@ -275,6 +289,8 @@ static int odb_source_packed_for_each_prefixed_object(
for (e = packfile_store_get_packs(store); e; e = e->next) {
if (e->pack->multi_pack_index)
continue;
+ if (should_exclude_pack(e->pack, opts->flags))
+ continue;
if (open_pack_index(e->pack)) {
pack_errors = true;
--
2.55.0.rc1.745.g43192e7977.dirty
^ permalink raw reply related
* [PATCH 1/3] odb/source-packed: extract logic to skip certain packs
From: Patrick Steinhardt @ 2026-06-22 8:49 UTC (permalink / raw)
To: git
In-Reply-To: <20260622-pks-connected-generic-promisor-checks-v1-0-25eba2698202@pks.im>
The caller can pass flags that allow them to filter out specific kinds
of objects when iterating objects via `odb_for_each_object()`. This only
works for "normal" iteration though, as we `BUG()` when the user passes
flags and specifies an object prefix.
This limitation will be lifted in the next commit. Prepare for this by
extracting the logic that skips certain kinds of packs so that we can
easily reuse it.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
odb/source-packed.c | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/odb/source-packed.c b/odb/source-packed.c
index 42c28fba0e..3afc4bf01f 100644
--- a/odb/source-packed.c
+++ b/odb/source-packed.c
@@ -126,6 +126,22 @@ static int match_hash(unsigned len, const unsigned char *a, const unsigned char
return 1;
}
+static bool should_exclude_pack(struct packed_git *p, enum odb_for_each_object_flags flags)
+{
+ if ((flags & ODB_FOR_EACH_OBJECT_LOCAL_ONLY) && !p->pack_local)
+ return true;
+ if ((flags & ODB_FOR_EACH_OBJECT_PROMISOR_ONLY) &&
+ !p->pack_promisor)
+ return true;
+ if ((flags & ODB_FOR_EACH_OBJECT_SKIP_IN_CORE_KEPT_PACKS) &&
+ p->pack_keep_in_core)
+ return true;
+ if ((flags & ODB_FOR_EACH_OBJECT_SKIP_ON_DISK_KEPT_PACKS) &&
+ p->pack_keep)
+ return true;
+ return false;
+}
+
static int for_each_prefixed_object_in_midx(
struct odb_source_packed *store,
struct multi_pack_index *m,
@@ -306,17 +322,9 @@ static int odb_source_packed_for_each_object(struct odb_source *source,
for (e = packfile_store_get_packs(packed); e; e = e->next) {
struct packed_git *p = e->pack;
- if ((opts->flags & ODB_FOR_EACH_OBJECT_LOCAL_ONLY) && !p->pack_local)
- continue;
- if ((opts->flags & ODB_FOR_EACH_OBJECT_PROMISOR_ONLY) &&
- !p->pack_promisor)
- continue;
- if ((opts->flags & ODB_FOR_EACH_OBJECT_SKIP_IN_CORE_KEPT_PACKS) &&
- p->pack_keep_in_core)
- continue;
- if ((opts->flags & ODB_FOR_EACH_OBJECT_SKIP_ON_DISK_KEPT_PACKS) &&
- p->pack_keep)
+ if (should_exclude_pack(p, opts->flags))
continue;
+
if (open_pack_index(p)) {
pack_errors = 1;
continue;
--
2.55.0.rc1.745.g43192e7977.dirty
^ permalink raw reply related
* [PATCH 0/3] connected: search promisor objects generically
From: Patrick Steinhardt @ 2026-06-22 8:49 UTC (permalink / raw)
To: git
Hi,
this patch series refactors "connected.c" so that we search for promisor
objects in a generic way instead of reaching into internal of the object
database. As a result, the connectivity checks will work properly in
repos that don't use packfiles in the first place.
The series is built on top of 8d96f09e92 (Merge branch
'js/objects-larger-than-4gb-on-windows', 2026-06-19) with
ps/odb-source-packed at 1bba3c035d (odb/source-packed: drop pointer to
"files" parent source, 2026-06-17) merged into it.
Thanks!
Patrick
---
Patrick Steinhardt (3):
odb/source-packed: extract logic to skip certain packs
odb/source-packed: support flags when iterating an object prefix
connected: search promisor objects generically
connected.c | 39 +++++++++++++++++++++++++--------------
odb/source-packed.c | 50 +++++++++++++++++++++++++++++++++++++-------------
2 files changed, 62 insertions(+), 27 deletions(-)
---
base-commit: 4a8e7a446f41435e157131162dfe901eca9250fe
change-id: 20260612-pks-connected-generic-promisor-checks-2933bff3028d
^ permalink raw reply
* [PATCH 2/2] odb: introduce `odb_prepare()`
From: Patrick Steinhardt @ 2026-06-22 8:47 UTC (permalink / raw)
To: git
In-Reply-To: <20260622-b4-pks-odb-generalize-prepare-v1-0-d2a5c5d13144@pks.im>
Introduce `odb_prepare()` as a simple wrapper to prepare alternates and
then prepare each individual source. Adapt git-grep(1) to use it.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
builtin/grep.c | 9 ++-------
odb.c | 18 ++++++++++++------
odb.h | 8 ++++++--
3 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/builtin/grep.c b/builtin/grep.c
index 7361bf071e..a7252d56a1 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -1356,13 +1356,8 @@ int cmd_grep(int argc,
if (recurse_submodules)
repo_read_gitmodules(the_repository, 1);
- if (startup_info->have_repository) {
- struct odb_source *source;
-
- odb_prepare_alternates(the_repository->objects);
- for (source = the_repository->objects->sources; source; source = source->next)
- odb_source_prepare(source, 0);
- }
+ if (startup_info->have_repository)
+ odb_prepare(the_repository->objects, 0);
start_threads(&opt);
} else {
diff --git a/odb.c b/odb.c
index 7b45390e12..11414c49a8 100644
--- a/odb.c
+++ b/odb.c
@@ -1070,7 +1070,7 @@ void odb_free(struct object_database *o)
free(o);
}
-void odb_reprepare(struct object_database *o)
+void odb_prepare(struct object_database *o, enum odb_prepare_flags flags)
{
struct odb_source *source;
@@ -1082,13 +1082,19 @@ void odb_reprepare(struct object_database *o)
* the linked list, so existing odbs will continue to exist for
* the lifetime of the process.
*/
- o->loaded_alternates = 0;
- odb_prepare_alternates(o);
+ if (flags & ODB_PREPARE_FLUSH_CACHES) {
+ o->loaded_alternates = 0;
+ o->object_count_valid = 0;
+ }
+ odb_prepare_alternates(o);
for (source = o->sources; source; source = source->next)
- odb_source_prepare(source, ODB_PREPARE_FLUSH_CACHES);
-
- o->object_count_valid = 0;
+ odb_source_prepare(source, flags);
obj_read_unlock();
}
+
+void odb_reprepare(struct object_database *o)
+{
+ odb_prepare(o, ODB_PREPARE_FLUSH_CACHES);
+}
diff --git a/odb.h b/odb.h
index c14c9030e4..b1c0f3767b 100644
--- a/odb.h
+++ b/odb.h
@@ -133,9 +133,13 @@ enum odb_prepare_flags {
};
/*
- * Clear caches, reload alternates and then reload object sources so that new
- * objects may become accessible.
+ * Prepare the object database for use. Calling this function is generally not
+ * needed, but can be useful in case the caller wants to pre-open individual
+ * sources.
*/
+void odb_prepare(struct object_database *o, enum odb_prepare_flags flags);
+
+/* Equivalent to `odb_prepare(o, ODB_PREPARE_FLUSH_CACHES)`. */
void odb_reprepare(struct object_database *o);
/*
--
2.55.0.rc1.745.g43192e7977.dirty
^ permalink raw reply related
* [PATCH 1/2] odb/source: generalize `reprepare()` callback
From: Patrick Steinhardt @ 2026-06-22 8:47 UTC (permalink / raw)
To: git
In-Reply-To: <20260622-b4-pks-odb-generalize-prepare-v1-0-d2a5c5d13144@pks.im>
The `reprepare()` callback function can be used to flush caches of a
given object source and then prepare it anew. This is for example used
when a concurrent process may have written new objects. Ultimately, this
can be seen as doing two separate steps:
1. We drop any caches.
2. We prepare the source.
We have one callsite in git-grep(1) though that really only want to do
(2). This is done by reaching into the "files" backend directly and then
calling `odb_source_packed_prepare()`, which of course may not work with
alternate backends.
We could in theory just call `reprepare()` here, and that would likely
not have any significant downside. But this would certainly feel like a
code smell.
Instead, generalize the `reprepare()` callback to `prepare()` with a
flag that optionally instructs the backend to also flush the caches,
which allows us to drop the external `odb_source_packed_prepare()`
declaration.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
builtin/grep.c | 9 +++------
midx.c | 2 +-
odb.c | 2 +-
odb.h | 8 ++++++++
odb/source-files.c | 9 +++++----
odb/source-inmemory.c | 5 +++--
odb/source-loose.c | 8 +++++---
odb/source-packed.c | 34 ++++++++++++++++------------------
odb/source-packed.h | 9 ---------
odb/source.h | 16 +++++++++-------
packfile.c | 2 +-
11 files changed, 52 insertions(+), 52 deletions(-)
diff --git a/builtin/grep.c b/builtin/grep.c
index 8080d1bf5e..7361bf071e 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -25,12 +25,11 @@
#include "setup.h"
#include "submodule.h"
#include "submodule-config.h"
-#include "object-file.h"
#include "object-name.h"
#include "odb.h"
+#include "odb/source.h"
#include "oid-array.h"
#include "oidset.h"
-#include "packfile.h"
#include "pager.h"
#include "path.h"
#include "promisor-remote.h"
@@ -1361,10 +1360,8 @@ int cmd_grep(int argc,
struct odb_source *source;
odb_prepare_alternates(the_repository->objects);
- for (source = the_repository->objects->sources; source; source = source->next) {
- struct odb_source_files *files = odb_source_files_downcast(source);
- odb_source_packed_prepare(files->packed);
- }
+ for (source = the_repository->objects->sources; source; source = source->next)
+ odb_source_prepare(source, 0);
}
start_threads(&opt);
diff --git a/midx.c b/midx.c
index cc6b94f9dd..76c3f92cc3 100644
--- a/midx.c
+++ b/midx.c
@@ -101,7 +101,7 @@ static int midx_read_object_offsets(const unsigned char *chunk_start,
struct multi_pack_index *get_multi_pack_index(struct odb_source_packed *source)
{
- odb_source_packed_prepare(source);
+ odb_source_prepare(&source->base, 0);
return source->midx;
}
diff --git a/odb.c b/odb.c
index 965ef68e4e..7b45390e12 100644
--- a/odb.c
+++ b/odb.c
@@ -1086,7 +1086,7 @@ void odb_reprepare(struct object_database *o)
odb_prepare_alternates(o);
for (source = o->sources; source; source = source->next)
- odb_source_reprepare(source);
+ odb_source_prepare(source, ODB_PREPARE_FLUSH_CACHES);
o->object_count_valid = 0;
diff --git a/odb.h b/odb.h
index 0030467a52..c14c9030e4 100644
--- a/odb.h
+++ b/odb.h
@@ -124,6 +124,14 @@ void odb_free(struct object_database *o);
*/
void odb_close(struct object_database *o);
+enum odb_prepare_flags {
+ /*
+ * Flush caches, reload alternates and then re-prepare each object
+ * source so that new objects may become accessible.
+ */
+ ODB_PREPARE_FLUSH_CACHES = (1 << 0),
+};
+
/*
* Clear caches, reload alternates and then reload object sources so that new
* objects may become accessible.
diff --git a/odb/source-files.c b/odb/source-files.c
index 3bc6419dd7..ad9e0b52f9 100644
--- a/odb/source-files.c
+++ b/odb/source-files.c
@@ -41,11 +41,12 @@ static void odb_source_files_close(struct odb_source *source)
odb_source_close(&files->packed->base);
}
-static void odb_source_files_reprepare(struct odb_source *source)
+static void odb_source_files_prepare(struct odb_source *source,
+ enum odb_prepare_flags flags)
{
struct odb_source_files *files = odb_source_files_downcast(source);
- odb_source_reprepare(&files->loose->base);
- odb_source_reprepare(&files->packed->base);
+ odb_source_prepare(&files->loose->base, flags);
+ odb_source_prepare(&files->packed->base, flags);
}
static int odb_source_files_read_object_info(struct odb_source *source,
@@ -273,7 +274,7 @@ struct odb_source_files *odb_source_files_new(struct object_database *odb,
files->base.free = odb_source_files_free;
files->base.close = odb_source_files_close;
- files->base.reprepare = odb_source_files_reprepare;
+ files->base.prepare = odb_source_files_prepare;
files->base.read_object_info = odb_source_files_read_object_info;
files->base.read_object_stream = odb_source_files_read_object_stream;
files->base.for_each_object = odb_source_files_for_each_object;
diff --git a/odb/source-inmemory.c b/odb/source-inmemory.c
index e004566d76..cc5e9e62cb 100644
--- a/odb/source-inmemory.c
+++ b/odb/source-inmemory.c
@@ -325,7 +325,8 @@ static void odb_source_inmemory_close(struct odb_source *source UNUSED)
{
}
-static void odb_source_inmemory_reprepare(struct odb_source *source UNUSED)
+static void odb_source_inmemory_prepare(struct odb_source *source UNUSED,
+ enum odb_prepare_flags flags UNUSED)
{
}
@@ -365,7 +366,7 @@ struct odb_source_inmemory *odb_source_inmemory_new(struct object_database *odb)
source->base.free = odb_source_inmemory_free;
source->base.close = odb_source_inmemory_close;
- source->base.reprepare = odb_source_inmemory_reprepare;
+ source->base.prepare = odb_source_inmemory_prepare;
source->base.read_object_info = odb_source_inmemory_read_object_info;
source->base.read_object_stream = odb_source_inmemory_read_object_stream;
source->base.for_each_object = odb_source_inmemory_for_each_object;
diff --git a/odb/source-loose.c b/odb/source-loose.c
index 7d7ea2fb84..af46316e35 100644
--- a/odb/source-loose.c
+++ b/odb/source-loose.c
@@ -672,10 +672,12 @@ static void odb_source_loose_clear_cache(struct odb_source_loose *loose)
sizeof(loose->subdir_seen));
}
-static void odb_source_loose_reprepare(struct odb_source *source)
+static void odb_source_loose_prepare(struct odb_source *source,
+ enum odb_prepare_flags flags)
{
struct odb_source_loose *loose = odb_source_loose_downcast(source);
- odb_source_loose_clear_cache(loose);
+ if (flags & ODB_PREPARE_FLUSH_CACHES)
+ odb_source_loose_clear_cache(loose);
}
static void odb_source_loose_close(struct odb_source *source UNUSED)
@@ -716,7 +718,7 @@ struct odb_source_loose *odb_source_loose_new(struct object_database *odb,
loose->base.free = odb_source_loose_free;
loose->base.close = odb_source_loose_close;
- loose->base.reprepare = odb_source_loose_reprepare;
+ loose->base.prepare = odb_source_loose_prepare;
loose->base.read_object_info = odb_source_loose_read_object_info;
loose->base.read_object_stream = odb_source_loose_read_object_stream;
loose->base.for_each_object = odb_source_loose_for_each_object;
diff --git a/odb/source-packed.c b/odb/source-packed.c
index 42c28fba0e..fa5a072488 100644
--- a/odb/source-packed.c
+++ b/odb/source-packed.c
@@ -15,7 +15,7 @@ static int find_pack_entry(struct odb_source_packed *store,
{
struct packfile_list_entry *l;
- odb_source_packed_prepare(store);
+ odb_source_prepare(&store->base, 0);
if (store->midx && fill_midx_entry(store->midx, oid, e))
return 1;
@@ -47,7 +47,7 @@ static int odb_source_packed_read_object_info(struct odb_source *source,
* been added since the last time we have prepared the packfile store.
*/
if (flags & OBJECT_INFO_SECOND_READ)
- odb_source_reprepare(source);
+ odb_source_prepare(source, ODB_PREPARE_FLUSH_CACHES);
if (!find_pack_entry(packed, oid, &e))
return 1;
@@ -668,27 +668,25 @@ static int sort_pack(const struct packfile_list_entry *a,
return -1;
}
-void odb_source_packed_prepare(struct odb_source_packed *source)
+static void odb_source_packed_prepare(struct odb_source *source,
+ enum odb_prepare_flags flags)
{
- if (source->initialized)
+ struct odb_source_packed *packed = odb_source_packed_downcast(source);
+
+ if (flags & ODB_PREPARE_FLUSH_CACHES)
+ packed->initialized = false;
+ if (packed->initialized)
return;
- prepare_multi_pack_index_one(source);
- prepare_packed_git_one(source);
+ prepare_multi_pack_index_one(packed);
+ prepare_packed_git_one(packed);
- sort_packs(&source->packs.head, sort_pack);
- for (struct packfile_list_entry *e = source->packs.head; e; e = e->next)
+ sort_packs(&packed->packs.head, sort_pack);
+ for (struct packfile_list_entry *e = packed->packs.head; e; e = e->next)
if (!e->next)
- source->packs.tail = e;
+ packed->packs.tail = e;
- source->initialized = true;
-}
-
-static void odb_source_packed_reprepare(struct odb_source *source)
-{
- struct odb_source_packed *packed = odb_source_packed_downcast(source);
- packed->initialized = false;
- odb_source_packed_prepare(packed);
+ packed->initialized = true;
}
static void odb_source_packed_reparent(const char *name UNUSED,
@@ -744,7 +742,7 @@ struct odb_source_packed *odb_source_packed_new(struct object_database *odb,
packed->base.free = odb_source_packed_free;
packed->base.close = odb_source_packed_close;
- packed->base.reprepare = odb_source_packed_reprepare;
+ packed->base.prepare = odb_source_packed_prepare;
packed->base.read_object_info = odb_source_packed_read_object_info;
packed->base.read_object_stream = odb_source_packed_read_object_stream;
packed->base.for_each_object = odb_source_packed_for_each_object;
diff --git a/odb/source-packed.h b/odb/source-packed.h
index 88994098c1..d5230ac68c 100644
--- a/odb/source-packed.h
+++ b/odb/source-packed.h
@@ -82,13 +82,4 @@ static inline struct odb_source_packed *odb_source_packed_downcast(struct odb_so
return container_of(source, struct odb_source_packed, base);
}
-/*
- * Prepare the source by loading packfiles and multi-pack indices for
- * all alternates. This becomes a no-op if the source is already prepared.
- *
- * It shouldn't typically be necessary to call this function directly, as
- * functions that access the source know to prepare it.
- */
-void odb_source_packed_prepare(struct odb_source_packed *source);
-
#endif
diff --git a/odb/source.h b/odb/source.h
index b9a7642b2c..bbf1da3819 100644
--- a/odb/source.h
+++ b/odb/source.h
@@ -83,11 +83,12 @@ struct odb_source {
void (*close)(struct odb_source *source);
/*
- * This callback is expected to clear underlying caches of the object
- * database source. The function is called when the repository has for
- * example just been repacked so that new objects will become visible.
+ * This callback is expected to prepare the source so that it becomes
+ * ready for use. It optionally clears underlying caches of the object
+ * database source.
*/
- void (*reprepare)(struct odb_source *source);
+ void (*prepare)(struct odb_source *source,
+ enum odb_prepare_flags flags);
/*
* This callback is expected to read object information from the object
@@ -308,13 +309,14 @@ static inline void odb_source_close(struct odb_source *source)
}
/*
- * Reprepare the object database source and clear any caches. Depending on the
+ * Prepare the object database source and clear any caches. Depending on the
* backend used this may have the effect that concurrently-written objects
* become visible.
*/
-static inline void odb_source_reprepare(struct odb_source *source)
+static inline void odb_source_prepare(struct odb_source *source,
+ enum odb_prepare_flags flags)
{
- source->reprepare(source);
+ source->prepare(source, flags);
}
/*
diff --git a/packfile.c b/packfile.c
index 59cee7925d..d78fae981a 100644
--- a/packfile.c
+++ b/packfile.c
@@ -855,7 +855,7 @@ void for_each_file_in_pack_dir(const char *objdir,
struct packfile_list_entry *packfile_store_get_packs(struct odb_source_packed *store)
{
- odb_source_packed_prepare(store);
+ odb_source_prepare(&store->base, 0);
if (store->midx) {
struct multi_pack_index *m = store->midx;
--
2.55.0.rc1.745.g43192e7977.dirty
^ permalink raw reply related
* [PATCH 0/2] odb: generalize `reprepare()` callback
From: Patrick Steinhardt @ 2026-06-22 8:47 UTC (permalink / raw)
To: git
Hi,
this small patch series generalizes the `reprepare()` callback into a
`prepare()` callback that accepts an optional flag to also discard any
caches. This is required so that we can make git-grep(1) become fully
generic.
The series is built on top of 8d96f09e92 (Merge branch
'js/objects-larger-than-4gb-on-windows', 2026-06-19) with
ps/odb-source-packed at 1bba3c035d (odb/source-packed: drop pointer to
"files" parent source, 2026-06-17) merged into it.
Thanks!
Patrick
---
Patrick Steinhardt (2):
odb/source: generalize `reprepare()` callback
odb: introduce `odb_prepare()`
builtin/grep.c | 14 +++-----------
midx.c | 2 +-
odb.c | 18 ++++++++++++------
odb.h | 16 ++++++++++++++--
odb/source-files.c | 9 +++++----
odb/source-inmemory.c | 5 +++--
odb/source-loose.c | 8 +++++---
odb/source-packed.c | 34 ++++++++++++++++------------------
odb/source-packed.h | 9 ---------
odb/source.h | 16 +++++++++-------
packfile.c | 2 +-
11 files changed, 69 insertions(+), 64 deletions(-)
---
base-commit: 4a8e7a446f41435e157131162dfe901eca9250fe
change-id: 20260612-b4-pks-odb-generalize-prepare-509ffc18f502
^ permalink raw reply
* [PATCH] win32: ensure that `localtime_r()` is declared even in i686 builds
From: Johannes Schindelin via GitGitGadget @ 2026-06-22 8:44 UTC (permalink / raw)
To: git; +Cc: Johannes Schindelin, Johannes Schindelin
From: Johannes Schindelin <johannes.schindelin@gmx.de>
The `__MINGW64__` constant is defined, surprise, surprise, only when
building for a 64-bit CPU architecture.
Therefore using it as a guard to define `_POSIX_C_SOURCE` (so that
`localtime_r()` is declared, among other functions) is not enough, we
also need to check `__MINGW32__`.
Technically, the latter constant is defined even for 64-bit builds. But
let's make things a bit easier to understand by testing for both
constants.
Making it so fixes this compile warning (turned error in GCC v14.1):
archive-zip.c: In function 'dos_time':
archive-zip.c:612:9: error: implicit declaration of function 'localtime_r';
did you mean 'localtime_s'? [-Wimplicit-function-declaration]
612 | localtime_r(&time, &tm);
| ^~~~~~~~~~~
| localtime_s
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
win32: ensure that localtime_r() is declared even in i686 builds
Git for Windows plans on reducing the scope of its i686 support after
v2.55.0 even further, therefore this patch (which I had forgotten about)
needs to be in that version.
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2157%2Fdscho%2FFix-i686-build-with-GCC-v14-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2157/dscho/Fix-i686-build-with-GCC-v14-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/2157
compat/posix.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compat/posix.h b/compat/posix.h
index 2f01564b0d..e2e794cad7 100644
--- a/compat/posix.h
+++ b/compat/posix.h
@@ -56,7 +56,7 @@
# define UNUSED
#endif
-#ifdef __MINGW64__
+#if defined(__MINGW32__) || defined(__MINGW64__)
#define _POSIX_C_SOURCE 1
#elif defined(__sun__)
/*
base-commit: 8d96f09e9245ddf80c1981476fcbac8c4bb4125f
--
gitgitgadget
^ permalink raw reply related
* Re: [PATCH 0/2] branch/push: suggest intended form when remote/branch slip given
From: Harald Nordgren @ 2026-06-22 8:41 UTC (permalink / raw)
To: Harald Nordgren via GitGitGadget; +Cc: git
In-Reply-To: <pull.2331.git.git.1781262619.gitgitgadget@gmail.com>
Would be nice to get some feedback here.
This is maybe not the most pressing issue, but I remember being quite
dumbfounded when I was a new Git user; not understanding why some
commands required one format "origin/main" and other required "origin
main". It would be better if we could actually solve it, but I suspect
it's hard without breaking backward compatibility, so maybe this is a
good middle road?
Harald
^ permalink raw reply
* Re: [PATCH v2 2/2] status: improve rebase todo list parsing
From: Phillip Wood @ 2026-06-22 8:36 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Elijah Newren, Patrick Steinhardt
In-Reply-To: <xmqqqzmdoya9.fsf@gitster.g>
On 11/06/2026 17:08, Junio C Hamano wrote:
> Phillip Wood <phillip.wood123@gmail.com> writes:
>
>> Hi Junio
>>
>> On 31/05/2026 01:46, Junio C Hamano wrote:
>>> Phillip Wood <phillip.wood123@gmail.com> writes:
>>>
>>>> +static void abbrev_oid_in_line(struct repository *r,
>>>> + struct strbuf *line, char **pp)
>>>> +{
>>>> ...
>>>> + have_oid = !repo_get_oid(r, p, &oid);
>>>> + *end_of_object_name = saved;
>>>> + if (!have_oid)
>>>> + goto out; /* object name was a label */
>>>
>>> Can there be a label "deadbeef123" that is unrelated to an object whose
>>> object name happens to abbreviate to "deadbeef123"?
>>
>> In theory yes, but I had assumed it was so unlikely to happen that we
>> could ignore it. If we want to be more careful then we could add a "bool
>> maybe_label" argument for commands that accept a label or a revision and
>> check if "refs/rewritten/$object_name" exists before trying repo_get_oid().
>
> To me, how rare the possibility of such a bug happening is of
> secondary importance. What affects the decision more is when the
> "rare" failure happens, if it is immediately obvious to the user,
> and if the user may be further harmed badly if they used the wrong
> information given by the tool due to such a "rare" failure.
That's a good point - I should have been clearer that I thought the
consequences were not serious so and while we wouldn't want to
misinterpret labels on a regular basis it didn't matter we did so very
occasionally.
> It would be a huge plus if the workaround, when such a "rare"
> failure triggers, would be immediately obvious to the user.
>
> What we do not want to see is that the tool to create a wrong
> result, cascading into more problems, silently. In a sense, it is
> even worse if such a bug triggers only rarely, because it would mean
> that the users always have to be on the lookout.
>
> Having said all that.
>
> I suspect that the OID in the output generated by "status" after it
> parses rebase "todo list" is merely meant as an eye candy, and the
> users do not _use_ it to decide further actions based on them.
That's my suspicion as well
> Or do people stare at "git status" output, find an interesting
> object name and go "git show" on it or something? If not, then even
> if such a failure were not rare, it would be OK. We may however
> want to record i as a limitation of the current implementation in
> the end-user facing documentation, though.
I've updated the implementation to check for a label before trying to
abbreviate the object name.
Thanks
Phillip
>
> Thanks.
>
>
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox