Subject: What's cooking in git.git (Oct 2024, #02; Wed, 2)

From: Junio C Hamano <[email-masked]>
Date: Wed, 02 Oct 2024 10:34:50 -0700

Here are the topics that have been cooking in my tree.  Commits
prefixed with '+' are in 'next' (being in 'next' is a sign that a
topic is stable enough to be used and are candidate to be in a
future release).  Commits prefixed with '-' are only in 'seen', and
aren't considered "accepted" at all and may be annotated with an URL
to a message that raises issues but they are no means exhaustive.  A
topic without enough support may be discarded after a long period of
no activity (of course they can be resubmit when new interests
arise).

Git 2.47-rc1 has been tagged.  From here on, we expect the flow of
new topics to slow down and contributors are encouraged to focus
more on finding and fixing possible regressions relative to Git
2.46, the last feature release.

Unfortunately our CI jobs seem to be failing due to
https://lore.kernel.org/git/[email-masked]/

The regression in libCurl 8.10.0 has been identified and corrected
in the upstream, but apparently it takes time for the fix to
percolate down.

Copies of the source code to Git live in many repositories, and the
following is a list of the ones I push into or their mirrors.  Some
repositories have only a subset of branches.

With maint, master, next, seen, todo:

	git://git.kernel.org/pub/scm/git/git.git/
	git://repo.or.cz/alt-git.git/
	https://kernel.googlesource.com/pub/scm/git/git/
	https://github.com/git/git/
	https://gitlab.com/git-scm/git/

With all the integration branches and topics broken out:

	https://github.com/gitster/git/

Even though the preformatted documentation in HTML and man format
are not sources, they are published in these repositories for
convenience (replace "htmldocs" with "manpages" for the manual
pages):

	git://git.kernel.org/pub/scm/git/git-htmldocs.git/
	https://github.com/gitster/git-htmldocs.git/

Release tarballs are available at:

	https://www.kernel.org/pub/software/scm/git/

--------------------------------------------------
[Graduated to 'master']

* ds/sparse-checkout-expansion-advice (2024-09-23) 1 commit
  (merged to 'next' on 2024-09-27 at e670bccf7e)
 + sparse-checkout: disable advice in 'disable'

 When "git sparse-checkout disable" turns a sparse checkout into a
 regular checkout, the index is fully expanded.  This totally
 expected behaviour however had an "oops, we are expanding the
 index" advice message, which has been corrected.
 source: <[email-masked]>

* jk/http-leakfixes (2024-09-25) 28 commits
  (merged to 'next' on 2024-09-27 at c52b418c92)
 + http-push: clean up local_refs at exit
 + http-push: clean up loose request when falling back to packed
 + http-push: clean up objects list
 + http-push: free xml_ctx.cdata after use
 + http-push: free remote_ls_ctx.dentry_name
 + http-push: free transfer_request strbuf
 + http-push: free transfer_request dest field
 + http-push: free curl header lists
 + http-push: free repo->url string
 + http-push: clear refspecs before exiting
 + http-walker: free fake packed_git list
 + remote-curl: free HEAD ref with free_one_ref()
 + http: stop leaking buffer in http_get_info_packs()
 + http: call git_inflate_end() when releasing http_object_request
 + http: fix leak of http_object_request struct
 + http: fix leak when redacting cookies from curl trace
 + transport-helper: fix leak of dummy refs_list
 + fetch-pack: clear pack lockfiles list
 + fetch: free "raw" string when shrinking refspec
 + transport-helper: fix strbuf leak in push_refs_with_push()
 + send-pack: free cas options before exit
 + commit: avoid leaking already-saved buffer
 + fetch-pack, send-pack: clean up shallow oid array
 + fetch-pack: free object filter before exiting
 + connect: clear child process before freeing in diagnostic mode
 + fetch-pack: fix leaking sought refs
 + shallow: fix leak when unregistering last shallow root
 + http-fetch: clear leaking git-index-pack(1) arguments
 (this branch is used by ps/leakfixes-part-8.)

 Leakfixes.
 source: <[email-masked]>

* ps/leakfixes-part-7 (2024-09-27) 24 commits
  (merged to 'next' on 2024-09-27 at 8c1aa7e558)
 + diffcore-break: fix leaking filespecs when merging broken pairs
 + revision: fix leaking parents when simplifying commits
 + builtin/maintenance: fix leak in `get_schedule_cmd()`
 + builtin/maintenance: fix leaking config string
 + promisor-remote: fix leaking partial clone filter
 + grep: fix leaking grep pattern
 + submodule: fix leaking submodule ODB paths
 + trace2: destroy context stored in thread-local storage
 + builtin/difftool: plug several trivial memory leaks
 + builtin/repack: fix leaking configuration
 + diffcore-order: fix leaking buffer when parsing orderfiles
 + parse-options: free previous value of `OPTION_FILENAME`
 + diff: fix leaking orderfile option
 + builtin/pull: fix leaking "ff" option
 + dir: fix off by one errors for ignored and untracked entries
 + builtin/submodule--helper: fix leaking remote ref on errors
 + t/helper: fix leaking subrepo in nested submodule config helper
 + builtin/submodule--helper: fix leaking error buffer
 + builtin/submodule--helper: clear child process when not running it
 + submodule: fix leaking update strategy
 + git: fix leaking argv when handling builtins
 + builtin/help: fix leaking `html_path` when reading config multiple times
 + builtin/help: fix dangling reference to `html_path`
 + Merge branch 'ps/leakfixes-part-6' into ps/leakfixes-part-7
 (this branch is used by ps/leakfixes-part-8.)

 More leak-fixes.
 cf. <[email-masked]>
 source: <[email-masked]>

* tb/weak-sha1-for-tail-sum (2024-09-27) 8 commits
  (merged to 'next' on 2024-09-30 at 1b4caadd94)
 + csum-file.c: use unsafe SHA-1 implementation when available
 + Makefile: allow specifying a SHA-1 for non-cryptographic uses
 + hash.h: scaffolding for _unsafe hashing variants
 + sha1: do not redefine `platform_SHA_CTX` and friends
 + pack-objects: use finalize_object_file() to rename pack/idx/etc
 + finalize_object_file(): implement collision check
 + finalize_object_file(): refactor unlink_or_warn() placement
 + finalize_object_file(): check for name collision before renaming

 The checksum at the tail of files are now computed without
 collision detection protection.  This is safe as the consumer of
 the information to protect itself from replay attacks checks for
 hash collisions independently.
 cf. <[email-masked]>
 cf. <[email-masked]>
 source: <[email-masked]>

--------------------------------------------------
[New Topics]

* ds/read-cache-mempool-leakfix (2024-10-01) 1 commit
  (merged to 'next' on 2024-10-02 at c0eac890ac)
 + read-cache: free threaded memory pool

 Leakfix.

 Will merge to 'master'.
 source: <[email-masked]>

* kn/fsmonitor-event-listener-fix (2024-10-02) 1 commit
 - fsmonitor: fix hangs by delayed fs event listening

 Under high load, fsmonitor process can hang at start-up, which has
 been corrected.

 Comments?
 source: <[email-masked]>

--------------------------------------------------
[Cooking]

* jc/a-commands-without-the-repo (2024-09-30) 4 commits
 - archive: remove the_repository global variable
 - apply: remove the_repository global variable
 - annotate: remove usage of the_repository global
 - git: pass in repo for RUN_SETUP_GENTLY

 Commands that can also work outside Git have learned to take the
 repository instance "repo" when we know we are in a repository, and
 NULL when we are not, in a parameter.  The uses of the_repository
 variable in a few of them have been removed using the new calling
 convention.

 Comments?
 source: <[email-masked]>

* kn/osx-fsmonitor-with-submodules-fix (2024-10-01) 1 commit
 - fsmonitor OSX: fix hangs for submodules

 macOS with fsmonitor daemon can hang forever when a submodule is
 involved, which has been corrected.

 Expecting a reroll.
 cf. <[email-masked]>
 source: <[email-masked]>

* ps/leakfixes-part-8 (2024-09-30) 25 commits
 - builtin/send-pack: fix leaking list of push options
 - remote: fix leaking push reports
 - t/helper: fix leaks in proc-receive helper
 - pack-write: fix return parameter of `write_rev_file_order()`
 - revision: fix leaking saved parents
 - revision: fix memory leaks when rewriting parents
 - midx-write: fix leaking buffer
 - pack-bitmap-write: fix leaking OID array
 - pseudo-merge: fix leaking strmap keys
 - pseudo-merge: fix various memory leaks
 - line-log: fix several memory leaks
 - diff: improve lifecycle management of diff queues
 - builtin/revert: fix leaking `gpg_sign` and `strategy` config
 - t/helper: fix leaking repository in partial-clone helper
 - builtin/clone: fix leaking repo state when cloning with bundle URIs
 - builtin/pack-redundant: fix various memory leaks
 - builtin/stash: fix leaking `pathspec_from_file`
 - submodule: fix leaking submodule entry list
 - wt-status: fix leaking buffer with sparse directories
 - shell: fix leaking strings
 - scalar: fix leaking repositories
 - read-cache: fix leaking hash context in `do_write_index()`
 - builtin/annotate: fix leaking args vector
 - Merge branch 'jk/http-leakfixes' into ps/leakfixes-part-8
 - Merge branch 'ps/leakfixes-part-7' into ps/leakfixes-part-8

 More leakfixes.

 Will merge to 'next'.
 source: <[email-masked]>

* tb/notes-amlog-doc (2024-09-30) 2 commits
 - Documentation: mention the amlog in howto/maintain-git.txt
 - howto-maintain: mention notes/amlog policy

 Document "amlog" notes.

 Comments?
 source: <[email-masked]>

* ej/cat-file-remote-object-info (2024-09-27) 6 commits
 - cat-file: add remote-object-info to batch-command
 - cat-file: add declaration of variable i inside its for loop
 - transport: add client support for object-info
 - serve: advertise object-info feature
 - fetch-pack: move fetch initialization
 - fetch-pack: refactor packet writing

 "git cat-file --batch" and friends can optionally ask a remote
 server about objects it does not have.

 Comments?
 source: <[email-masked]>

* jc/doc-discarding-stalled-topics (2024-09-26) 1 commit
  (merged to 'next' on 2024-10-02 at adb0d84fd4)
 + howto-maintain-git: discarding inactive topics

 Document that inactive topics are subject to be discarded.

 Will merge to 'master'.
 source: <[email-masked]>

* jk/test-lsan-improvements (2024-09-25) 3 commits
  (merged to 'next' on 2024-10-02 at 3d8303fcfe)
 + test-lib: check for leak logs after every test
 + test-lib: show leak-sanitizer logs on --immediate failure
 + test-lib: stop showing old leak logs

 Usability improvements for running tests in leak-checking mode.

 Will merge to 'master'.
 source: <[email-masked]>

* es/worktree-repair-copied (2024-09-23) 1 commit
 - worktree: repair copied repository and linked worktrees

 The heuristics in "git worktree repair" can be confused when a
 worktree and its repository are copied and break correctly
 configured worktree and repository that point at each other, which
 has been corrected.

 Needs review.
 source: <[email-masked]>

* cw/fix-reachable-in-repo-with-promisor (2024-09-19) 2 commits
 - fetch-pack.c: do not declare local commits as "have" in partial repos
 - packfile: split promisor objects oidset into two

 "git gc" in a partial clone (i.e. lacking objects that can be
 lazily fetched from promisor remotes) collected more than objects
 that promisor-remote can give.

 Needs review.
 source: <[email-masked]>

* jc/breaking-changes-early-adopter-option (2024-09-19) 1 commit
 - BreakingChanges: early adopter option

 Describe the policy to introduce breaking changes.

 Comments?
 source: <[email-masked]>

* ps/reftable-alloc-failures (2024-10-02) 27 commits
  (merged to 'next' on 2024-10-02 at a6d42d51d4)
 + reftable/basics: ban standard allocator functions
 + reftable: introduce `REFTABLE_FREE_AND_NULL()`
 + reftable: fix calls to free(3P)
 + reftable: handle trivial allocation failures
 + reftable/tree: handle allocation failures
 + reftable/pq: handle allocation failures when adding entries
 + reftable/block: handle allocation failures
 + reftable/blocksource: handle allocation failures
 + reftable/iter: handle allocation failures when creating indexed table iter
 + reftable/stack: handle allocation failures in auto compaction
 + reftable/stack: handle allocation failures in `stack_compact_range()`
 + reftable/stack: handle allocation failures in `reftable_new_stack()`
 + reftable/stack: handle allocation failures on reload
 + reftable/reader: handle allocation failures in `reader_init_iter()`
 + reftable/reader: handle allocation failures for unindexed reader
 + reftable/merged: handle allocation failures in `merged_table_init_iter()`
 + reftable/writer: handle allocation failures in `reftable_new_writer()`
 + reftable/writer: handle allocation failures in `writer_index_hash()`
 + reftable/record: handle allocation failures when decoding records
 + reftable/record: handle allocation failures on copy
 + reftable/basics: handle allocation failures in `parse_names()`
 + reftable/basics: handle allocation failures in `reftable_calloc()`
 + reftable: introduce `reftable_strdup()`
 + reftable/basics: merge "publicbasics" into "basics"
 + reftable/error: introduce out-of-memory error code
 + Merge branch 'ps/reftable-exclude' into ps/reftable-alloc-failures
 + Merge branch 'cp/unit-test-reftable-stack' into ps/reftable-alloc-failures

 The reftable library is now prepared to expect that the memory
 allocation function given to it may fail to allocate and to deal
 with such an error.

 Will cook in 'next'.
 source: <[email-masked]>

* jc/strbuf-commented-something (2024-09-12) 2 commits
 - strbuf: retire strbuf_commented_lines()
 - strbuf: retire strbuf_commented_addf()

 Update two functions whose callers always pass the same global
 variable to omit the redundant parameter and use the global in the
 callee themselves.

 On hold.
 source: <[email-masked]>

* cc/promisor-remote-capability (2024-09-10) 4 commits
 - promisor-remote: check advertised name or URL
 - Add 'promisor-remote' capability to protocol v2
 - strbuf: refactor strbuf_trim_trailing_ch()
 - version: refactor strbuf_sanitize()

 The v2 protocol learned to allow the server to advertise possible
 promisor remotes, and the client to respond with what promissor
 remotes it uses, so that the server side can omit objects that the
 client can lazily obtain from these other promissor remotes.

 Comments?
 source: <[email-masked]>

* ds/pack-name-hash-tweak (2024-09-19) 6 commits
 - test-tool: add helper for name-hash values
 - p5313: add size comparison test
 - git-repack: update usage to match docs
 - pack-objects: add GIT_TEST_FULL_NAME_HASH
 - repack: test --full-name-hash option
 - pack-objects: add --full-name-hash option

 In a repository with too many (more than --window size) similarly
 named files, "git repack" would not find good delta-base candidate
 and worse, it may not use a blob from exactly the same path as a
 good delta-base candidate.  Optionally replace the name hash so
 that only blobs at the same path and nothing else are used as
 delta-base candidate.

 On hold.
 cf. <[email-masked]>
 source: <[email-masked]>

* sj/ref-contents-check (2024-09-30) 9 commits
 - ref: add symlink ref content check for files backend
 - t0602: add ref content checks for worktrees
 - ref: enhance escape situation for worktrees
 - ref: add escape check for the referent of symref
 - ref: add basic symref content check for files backend
 - ref: add more strict checks for regular refs
 - ref: port git-fsck(1) regular refs check for files backend
 - builtin/refs: support multiple worktrees check for refs.
 - ref: initialize "fsck_ref_report" with zero

 "git fsck" learned to issue warnings on "curiously formatted" ref
 contents that have always been taken valid but something Git
 wouldn't have written itself (e.g., missing terminating end-of-line
 after the full object name).

 Needs review.
 cf. <[email-masked]>
 source: <Zvj-DgHqtC30KjJe@ArchLinux>

* tb/incremental-midx-part-2 (2024-08-28) 16 commits
 - fixup! midx: implement writing incremental MIDX bitmaps
 - midx: implement writing incremental MIDX bitmaps
 - pack-bitmap.c: use `ewah_or_iterator` for type bitmap iterators
 - pack-bitmap.c: keep track of each layer's type bitmaps
 - ewah: implement `struct ewah_or_iterator`
 - pack-bitmap.c: apply pseudo-merge commits with incremental MIDXs
 - pack-bitmap.c: compute disk-usage with incremental MIDXs
 - pack-bitmap.c: teach `rev-list --test-bitmap` about incremental MIDXs
 - pack-bitmap.c: support bitmap pack-reuse with incremental MIDXs
 - pack-bitmap.c: teach `show_objects_for_type()` about incremental MIDXs
 - pack-bitmap.c: teach `bitmap_for_commit()` about incremental MIDXs
 - pack-bitmap.c: open and store incremental bitmap layers
 - pack-revindex: prepare for incremental MIDX bitmaps
 - Documentation: describe incremental MIDX bitmaps
 - Merge branch 'tb/pseudo-merge-bitmap-fixes' into tb/incremental-midx-part-2
 - Merge branch 'tb/incremental-midx-part-1' into tb/incremental-midx-part-2

 Incremental updates of multi-pack index files.

 Needs review.
 source: <[email-masked]>

* js/libgit-rust (2024-09-09) 7 commits
 . SQUASH???
 . Makefile: add option to build and test libgit-rs and libgit-rs-sys
 . libgit: add higher-level libgit crate
 . config: add git_configset_alloc() and git_configset_clear_and_free()
 . libgit-sys: add repo initialization and config access
 . libgit-sys: introduce Rust wrapper for libgit.a
 . common-main: split init and exit code into new files

 An rust binding to libgit.a functions has been introduced.

 Expecting a reroll.
 cf. <[email-masked]>
 source: <[email-masked]>

* jc/too-many-arguments (2024-08-06) 4 commits
 - miscellaneous: avoid "too many arguments"
 - notes: avoid "too many arguments"
 - cat-file: avoid "too many arguments"
 - refs: avoid "too many arguments"

 Error message clarification.

 On hold.
 source: <[email-masked]>

* ja/doc-synopsis-markup (2024-09-24) 3 commits
  (merged to 'next' on 2024-09-30 at 15ec13edec)
 + doc: apply synopsis simplification on git-clone and git-init
 + doc: update the guidelines to reflect the current formatting rules
 + doc: introduce a synopsis typesetting

 The way AsciiDoc is used for SYNOPSIS part of the manual pages has
 been revamped.  The sources, at least for the simple cases, got
 vastly pleasant to work with.

 Will cook in 'next'.
 source: <[email-masked]>

* ew/cat-file-optim (2024-08-25) 10 commits
 - cat-file: use writev(2) if available
 - cat-file: batch_write: use size_t for length
 - cat-file: batch-command uses content_limit
 - object_info: content_limit only applies to blobs
 - packfile: packed_object_info avoids packed_to_object_type
 - cat-file: use delta_base_cache entries directly
 - packfile: inline cache_or_unpack_entry
 - packfile: fix off-by-one in content_limit comparison
 - packfile: allow content-limit for cat-file
 - packfile: move sizep computation

 "git cat-file --batch" has been optimized.

 Waiting for review responses.
 source: <[email-masked]>

--------------------------------------------------
[Discarded]

* gt/unit-test-oidset (2024-08-25) 1 commit
 . unit-tests: add tests for oidset.h

 Another unit-test.

 Has been expecting a reroll for too long.
 source: <[email-masked]>