{"thread":{"id":"62109","subject":"What's cooking in git.git (Sep 2024, #05; Fri, 13)","startedAt":"2024-09-14T19:12:54Z","lastAt":"2024-09-17T09:31:07Z","messageCount":6,"participants":["Junio C Hamano","Taylor Blau","Patrick Steinhardt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"502794","messageId":"xmqqwmjerqvl.fsf@gitster.g","threadId":"62109","inReplyTo":null,"subject":"What's cooking in git.git (Sep 2024, #05; Fri, 13)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-09-14T19:12:46Z","receivedAt":"2024-09-14T19:12:54Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Here are the topics that have been cooking in my tree.  Commits\nprefixed with '+' are in 'next' (being in 'next' is a sign that a\ntopic is stable enough to be used and are candidate to be in a\nfuture release).  Commits prefixed with '-' are only in 'seen', and\naren't considered \"accepted\" at all and may be annotated with an URL\nto a message that raises issues but they are no means exhaustive.  A\ntopic without enough support may be discarded after a long period of\nno activity (of course they can be resubmit when new interests\narise).\n\nAs we have been accumulating many small fixes on the 'master' front,\nI merged them to 'maint' and tagged the result as Git 2.46.1.  I\nexpect Git 2.46.2, primarily with CI fixes and not much more, to\nfollow shortly.\n\nCopies of the source code to Git live in many repositories, and the\nfollowing is a list of the ones I push into or their mirrors.  Some\nrepositories have only a subset of branches.\n\nWith maint, master, next, seen, todo:\n\n\tgit://git.kernel.org/pub/scm/git/git.git/\n\tgit://repo.or.cz/alt-git.git/\n\thttps://kernel.googlesource.com/pub/scm/git/git/\n\thttps://github.com/git/git/\n\thttps://gitlab.com/git-scm/git/\n\nWith all the integration branches and topics broken out:\n\n\thttps://github.com/gitster/git/\n\nEven though the preformatted documentation in HTML and man format\nare not sources, they are published in these repositories for\nconvenience (replace \"htmldocs\" with \"manpages\" for the manual\npages):\n\n\tgit://git.kernel.org/pub/scm/git/git-htmldocs.git/\n\thttps://github.com/gitster/git-htmldocs.git/\n\nRelease tarballs are available at:\n\n\thttps://www.kernel.org/pub/software/scm/git/\n\n--------------------------------------------------\n[Graduated to 'master']\n\n* bl/trailers-and-incomplete-last-line-fix (2024-09-06) 1 commit\n  (merged to 'next' on 2024-09-09 at a09f0889bb)\n + interpret-trailers: handle message without trailing newline\n\n The interpret-trailers command failed to recognise the end of the\n message when the commit log ends in an incomplete line.\n \n source: <20240906145743.2059405-1-brianmlyles@gmail.com>\n\n\n* ds/doc-wholesale-disabling-advice-messages (2024-09-06) 1 commit\n  (merged to 'next' on 2024-09-07 at a52a31f161)\n + advice: recommend GIT_ADVICE=0 for tools\n\n The environment GIT_ADVICE has been intentionally kept undocumented\n to discourage its use by interactive users.  Add documentation to\n help tool writers.\n \n source: <pull.1781.v2.git.1725654155162.gitgitgadget@gmail.com>\n\n\n* ds/scalar-no-tags (2024-09-06) 1 commit\n  (merged to 'next' on 2024-09-07 at fc06d19cfb)\n + scalar: add --no-tags option to 'scalar clone'\n\n The \"scalar clone\" command learned the \"--no-tags\" option.\n \n source: <pull.1780.v2.git.1725654102035.gitgitgadget@gmail.com>\n\n\n* jc/doc-skip-fetch-all-and-prefetch (2024-09-09) 1 commit\n  (merged to 'next' on 2024-09-09 at a2bf302636)\n + doc: remote.*.skip{DefaultUpdate,FetchAll} stops prefetch\n\n Doc updates.\n \n source: <xmqqseu8u8m0.fsf@gitster.g>\n\n\n* jk/sparse-fdleak-fix (2024-09-06) 3 commits\n  (merged to 'next' on 2024-09-07 at 2551aeee9e)\n + sparse-checkout: use fdopen_lock_file() instead of xfdopen()\n + sparse-checkout: check commit_lock_file when writing patterns\n + sparse-checkout: consolidate cleanup when writing patterns\n\n A file descriptor left open is now properly closed when \"git\n sparse-checkout\" updates the sparse patterns.\n \n source: <20240906034557.GA3693911@coredump.intra.peff.net>\n\n\n* rj/cygwin-has-dev-tty (2024-09-08) 1 commit\n  (merged to 'next' on 2024-09-09 at 5c5726050f)\n + config.mak.uname: add HAVE_DEV_TTY to cygwin config section\n\n Cygwin does have /dev/tty support that is needed by things like\n single-key input mode.\n \n source: <e3339b4d-dab1-4247-b70e-d3224bab1b6b@ramsayjones.plus.com>\n\n\n* rs/diff-exit-code-fix (2024-09-08) 2 commits\n  (merged to 'next' on 2024-09-09 at f52bb4afb2)\n + diff: report dirty submodules as changes in builtin_diff()\n + diff: report copies and renames as changes in run_diff_cmd()\n\n In a few corner cases \"git diff --exit-code\" failed to report\n \"changes\" (e.g., renamed without any content change), which has\n been corrected.\n \n source: <0864c86a-5562-4780-92c5-59d6c1a35aad@web.de>\n\n--------------------------------------------------\n[New Topics]\n\n* bb/unicode-width-table-16 (2024-09-12) 1 commit\n  (merged to 'next' on 2024-09-13 at 87dc391469)\n + unicode: update the width tables to Unicode 16\n\n Update the character width table for Unicode 16.\n\n Will merge to 'master'.\n source: <20240912204047.1020213-1-dev+git@drbeat.li>\n\n\n* jc/strbuf-commented-something (2024-09-12) 2 commits\n - strbuf: retire strbuf_commented_lines()\n - strbuf: retire strbuf_commented_addf()\n\n Update two functions whose callers always pass the same global\n variable to omit the redundant parameter and use the global in the\n callee themselves.\n\n On hold.\n source: <20240912205301.1809355-1-gitster@pobox.com>\n\n\n* jk/git-pm-bare-repo-fix (2024-09-13) 2 commits\n  (merged to 'next' on 2024-09-13 at 7f9bb8501c)\n + Git.pm: use \"rev-parse --absolute-git-dir\" rather than perl code\n + Git.pm: fix bare repository search with Directory option\n\n In Git 2.39, Git.pm stopped working in a bare repository, which has\n been corrected.\n\n Will merge to 'master'.\n source: <20240912223413.GA649897@coredump.intra.peff.net>\n\n\n* jc/t5512-sigpipe-fix (2024-09-13) 1 commit\n - t5512.40 sometimes dies by SIGPIPE\n\n Test fix.\n\n Will merge to 'next'.\n source: <xmqqmskbwe1a.fsf@gitster.g>\n\n--------------------------------------------------\n[Cooking]\n\n* jc/ci-upload-artifact-and-linux32 (2024-09-09) 1 commit\n  (merged to 'next' on 2024-09-11 at 62991bef5b)\n + ci: remove 'Upload failed tests' directories' step from linux32 jobs\n (this branch is used by jk/ci-linux32-update.)\n\n CI started failing completely for linux32 jobs, as the step to\n upload failed test directory uses GitHub actions that is deprecated\n and is now disabled.  Remove the step so at least we will know if\n the tests are passing.\n\n Will merge to 'master'.\n source: <xmqqy140o2kb.fsf@gitster.g>\n\n\n* jk/ref-filter-trailer-fixes (2024-09-10) 10 commits\n  (merged to 'next' on 2024-09-10 at ce7299fe2e)\n + ref-filter: fix leak with unterminated %(if) atoms\n + ref-filter: add ref_format_clear() function\n + ref-filter: fix leak when formatting %(push:remoteref)\n + ref-filter: fix leak with %(describe) arguments\n + ref-filter: fix leak of %(trailers) \"argbuf\"\n + ref-filter: store ref_trailer_buf data per-atom\n + ref-filter: drop useless cast in trailers_atom_parser()\n + ref-filter: strip signature when parsing tag trailers\n + ref-filter: avoid extra copies of payload/signature\n + t6300: drop newline from wrapped test title\n\n Bugfixes and leak plugging in \"git for-each-ref --format=...\" code\n paths.\n\n Will merge to 'master'.\n source: <20240909230758.GA921697@coredump.intra.peff.net>\n\n\n* jk/ci-linux32-update (2024-09-13) 5 commits\n  (merged to 'next' on 2024-09-13 at e937339388)\n + ci: add Ubuntu 16.04 job to GitLab CI\n + ci: use regular action versions for linux32 job\n + ci: use more recent linux32 image\n + ci: unify ubuntu and ubuntu32 dependencies\n + ci: drop run-docker scripts\n (this branch uses jc/ci-upload-artifact-and-linux32.)\n\n CI updates\n\n Will merge to 'master'.\n source: <20240912094238.GA589050@coredump.intra.peff.net>\n\n\n* jk/interop-test-build-options (2024-09-12) 1 commit\n  (merged to 'next' on 2024-09-13 at 0ab66e77a1)\n + t/interop: allow per-version make options\n\n The support to customize build options to adjust for older versions\n and/or older systems for the interop tests has been improved.\n\n Will merge to 'master'.\n source: <20240911061009.GA1538383@coredump.intra.peff.net>\n\n\n* jk/no-openssl-with-openssl-sha1 (2024-09-12) 1 commit\n  (merged to 'next' on 2024-09-13 at 07f5e4856d)\n + imap-send: handle NO_OPENSSL even when openssl exists\n\n The \"imap-send\" now allows to be compiled with NO_OPENSSL and\n OPENSSL_SHA1 defined together.\n\n Will merge to 'master'.\n source: <20240911061257.GA1538490@coredump.intra.peff.net>\n\n\n* ma/test-libcurl-prereq (2024-09-11) 2 commits\n  (merged to 'next' on 2024-09-13 at 6d4ad6b054)\n + t0211: add missing LIBCURL prereq\n + t1517: add missing LIBCURL prereq\n\n Test portability fix.\n\n Will merge to 'master'.\n source: <cover.1726049108.git.martin.agren@gmail.com>\n\n\n* cc/promisor-remote-capability (2024-09-10) 4 commits\n - promisor-remote: check advertised name or URL\n - Add 'promisor-remote' capability to protocol v2\n - strbuf: refactor strbuf_trim_trailing_ch()\n - version: refactor strbuf_sanitize()\n\n The v2 protocol learned to allow the server to advertise possible\n promisor remotes, and the client to respond with what promissor\n remotes it uses, so that the server side can omit objects that the\n client can lazily obtain from these other promissor remotes.\n\n Comments?\n source: <20240910163000.1985723-1-christian.couder@gmail.com>\n\n\n* ah/apply-3way-ours (2024-09-09) 1 commit\n  (merged to 'next' on 2024-09-10 at 989ba9708b)\n + apply: support --ours, --theirs, and --union for three-way merges\n\n \"git apply --3way\" learned to take \"--ours\" and other options.\n\n Will merge to 'master'.\n source: <20240909141109.3102-2-alexhenrie24@gmail.com>\n\n\n* ds/pack-name-hash-tweak (2024-09-09) 4 commits\n - p5313: add size comparison test\n - p5314: add a size test for name-hash collisions\n - git-repack: update usage to match docs\n - pack-objects: add --full-name-hash option\n\n In a repository with too many (more than --window size) similarly\n named files, \"git repack\" would not find good delta-base candidate\n and worse, it may not use a blob from exactly the same path as a\n good delta-base candidate.  Optionally replace the name hash so\n that only blobs at the same path and nothing else are used as\n delta-base candidate.\n\n Needs review.\n source: <pull.1785.git.1725890210.gitgitgadget@gmail.com>\n\n\n* ps/reftable-exclude (2024-09-09) 7 commits\n - refs/reftable: wire up support for exclude patterns\n - reftable/reader: make table iterator reseekable\n - t/unit-tests: introduce reftable library\n - Makefile: stop listing test library objects twice\n - builtin/receive-pack: fix exclude patterns when announcing refs\n - refs: properly apply exclude patterns to namespaced refs\n - Merge branch 'cp/unit-test-reftable-stack' into ps/reftable-exclude\n (this branch uses cp/unit-test-reftable-stack.)\n\n The reftable backend learned to more efficiently handle exclude\n patterns while enumerating the refs.\n\n Needs review.\n source: <cover.1725881266.git.ps@pks.im>\n\n\n* pw/rebase-autostash-fix (2024-09-03) 1 commit\n  (merged to 'next' on 2024-09-13 at 6b41d66efd)\n + rebase: apply and cleanup autostash when rebase fails to start\n\n \"git rebase --autostash\" failed to resurrect the autostashed\n changes when the command gets aborted after giving back control\n asking for hlep in conflict resolution.\n\n Will merge to 'master'.\n source: <pull.1772.v2.git.1725289979450.gitgitgadget@gmail.com>\n\n\n* cp/unit-test-reftable-stack (2024-09-09) 6 commits\n  (merged to 'next' on 2024-09-09 at 0dddbbb60d)\n + t-reftable-stack: add test for stack iterators\n + t-reftable-stack: add test for non-default compaction factor\n + t-reftable-stack: use reftable_ref_record_equal() to compare ref records\n + t-reftable-stack: use Git's tempfile API instead of mkstemp()\n + t: harmonize t-reftable-stack.c with coding guidelines\n + t: move reftable/stack_test.c to the unit testing framework\n (this branch is used by ps/reftable-exclude.)\n\n Another reftable test migrated to the unit-test framework.\n\n Will merge to 'master'.\n source: <20240908041632.4948-1-chandrapratap3519@gmail.com>\n\n\n* jc/pass-repo-to-builtins (2024-09-13) 4 commits\n - add: pass in repo variable instead of global the_repository\n - builtin: remove USE_THE_REPOSITORY for those without the_repository\n - builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h\n - builtin: add a repository parameter for builtin functions\n\n The convention to calling into built-in command implementation has\n been updated to pass the repository, if known, together with the\n prefix value.\n\n Will merge to 'next'?\n source: <pull.1778.v3.git.git.1726262177.gitgitgadget@gmail.com>\n\n\n* tb/weak-sha1-for-tail-sum (2024-09-06) 9 commits\n - csum-file.c: use fast SHA-1 implementation when available\n - Makefile: allow specifying a SHA-1 for non-cryptographic uses\n - hash.h: scaffolding for _fast hashing variants\n - sha1: do not redefine `platform_SHA_CTX` and friends\n - i5500-git-daemon.sh: use compile-able version of Git without OpenSSL\n - pack-objects: use finalize_object_file() to rename pack/idx/etc\n - finalize_object_file(): implement collision check\n - finalize_object_file(): refactor unlink_or_warn() placement\n - finalize_object_file(): check for name collision before renaming\n\n The checksum at the tail of files are now computed without\n collision detection protection.\n\n Will merge to 'next'?\n source: <cover.1725651952.git.me@ttaylorr.com>\n\n\n* es/chainlint-message-updates (2024-09-10) 3 commits\n  (merged to 'next' on 2024-09-11 at a3fd02a009)\n + chainlint: reduce annotation noise-factor\n + chainlint: make error messages self-explanatory\n + chainlint: don't be fooled by \"?!...?!\" in test body\n\n The error messages from the test script checker have been improved.\n\n Will merge to 'master'.\n source: <20240910041013.68948-1-ericsunshine@charter.net>\n\n\n* ps/environ-wo-the-repository (2024-09-12) 21 commits\n - environment: stop storing \"core.notesRef\" globally\n - environment: stop storing \"core.warnAmbiguousRefs\" globally\n - environment: stop storing \"core.preferSymlinkRefs\" globally\n - environment: stop storing \"core.logAllRefUpdates\" globally\n - refs: stop modifying global `log_all_ref_updates` variable\n - branch: stop modifying `log_all_ref_updates` variable\n - repo-settings: track defaults close to `struct repo_settings`\n - repo-settings: split out declarations into a standalone header\n - environment: guard state depending on a repository\n - environment: reorder header to split out `the_repository`-free section\n - environment: move `set_git_dir()` and related into setup layer\n - environment: make `get_git_namespace()` self-contained\n - environment: move object database functions into object layer\n - config: make dependency on repo in `read_early_config()` explicit\n - config: document `read_early_config()` and `read_very_early_config()`\n - environment: make `get_git_work_tree()` accept a repository\n - environment: make `get_graft_file()` accept a repository\n - environment: make `get_index_file()` accept a repository\n - environment: make `get_object_directory()` accept a repository\n - environment: make `get_git_common_dir()` accept a repository\n - environment: make `get_git_dir()` accept a repository\n\n Code clean-up.\n\n Will merge to 'next'.\n source: <cover.1726139990.git.ps@pks.im>\n\n\n* gt/unit-test-oidset (2024-08-25) 1 commit\n - unit-tests: add tests for oidset.h\n\n Another unit-test.\n\n Expecting a reroll.\n source: <20240824172028.39419-1-shyamthakkar001@gmail.com>\n\n\n* ps/leakfixes-part-6 (2024-09-05) 22 commits\n  (merged to 'next' on 2024-09-13 at 9be3125b10)\n + builtin/repack: fix leaking keep-pack list\n + merge-ort: fix two leaks when handling directory rename modifications\n + match-trees: fix leaking prefixes in `shift_tree()`\n + builtin/fmt-merge-msg: fix leaking buffers\n + builtin/grep: fix leaking object context\n + builtin/pack-objects: plug leaking list of keep-packs\n + builtin/repack: fix leaking line buffer when packing promisors\n + negotiator/skipping: fix leaking commit entries\n + shallow: fix leaking members of `struct shallow_info`\n + shallow: free grafts when unregistering them\n + object: clear grafts when clearing parsed object pool\n + gpg-interface: fix misdesigned signing key interfaces\n + send-pack: fix leaking push cert nonce\n + remote: fix leak in reachability check of a remote-tracking ref\n + remote: fix leaking tracking refs\n + builtin/submodule--helper: fix leaking refs on push-check\n + submodule: fix leaking fetch task data\n + upload-pack: fix leaking child process data on reachability checks\n + builtin/push: fix leaking refspec query result\n + send-pack: fix leaking common object IDs\n + fetch-pack: fix memory leaks on fetch negotiation\n + t/test-lib: allow skipping leak checks for passing tests\n\n More leakfixes.\n\n Will merge to 'master'.\n source: <cover.1725530720.git.ps@pks.im>\n\n\n* sj/ref-contents-check (2024-09-13) 5 commits\n - ref: add symlink ref content check for files backend\n - ref: add symref content check for files backend\n - ref: add more strict checks for regular refs\n - ref: port git-fsck(1) regular refs check for files backend\n - ref: initialize \"fsck_ref_report\" with zero\n\n \"git fsck\" learned to issue warnings on \"curiously formatted\" ref\n contents that have always been taken valid but something Git\n wouldn't have written itself (e.g., missing terminating end-of-line\n after the full object name).\n source: <ZuRzCyjQFilGhj8j@ArchLinux>\n\n\n* tb/incremental-midx-part-2 (2024-08-28) 16 commits\n - fixup! midx: implement writing incremental MIDX bitmaps\n - midx: implement writing incremental MIDX bitmaps\n - pack-bitmap.c: use `ewah_or_iterator` for type bitmap iterators\n - pack-bitmap.c: keep track of each layer's type bitmaps\n - ewah: implement `struct ewah_or_iterator`\n - pack-bitmap.c: apply pseudo-merge commits with incremental MIDXs\n - pack-bitmap.c: compute disk-usage with incremental MIDXs\n - pack-bitmap.c: teach `rev-list --test-bitmap` about incremental MIDXs\n - pack-bitmap.c: support bitmap pack-reuse with incremental MIDXs\n - pack-bitmap.c: teach `show_objects_for_type()` about incremental MIDXs\n - pack-bitmap.c: teach `bitmap_for_commit()` about incremental MIDXs\n - pack-bitmap.c: open and store incremental bitmap layers\n - pack-revindex: prepare for incremental MIDX bitmaps\n - Documentation: describe incremental MIDX bitmaps\n - Merge branch 'tb/pseudo-merge-bitmap-fixes' into tb/incremental-midx-part-2\n - Merge branch 'tb/incremental-midx-part-1' into tb/incremental-midx-part-2\n\n Incremental updates of multi-pack index files.\n\n Needs review.\n source: <cover.1723760847.git.me@ttaylorr.com>\n\n\n* ps/clar-unit-test (2024-09-10) 15 commits\n  (merged to 'next' on 2024-09-11 at ccc0289490)\n + Makefile: rename clar-related variables to avoid confusion\n  (merged to 'next' on 2024-09-05 at 87fb0a399a)\n + clar: add CMake support\n + t/unit-tests: convert ctype tests to use clar\n + t/unit-tests: convert strvec tests to use clar\n + t/unit-tests: implement test driver\n + Makefile: wire up the clar unit testing framework\n + Makefile: do not use sparse on third-party sources\n + Makefile: make hdr-check depend on generated headers\n + Makefile: fix sparse dependency on GENERATED_H\n + clar: stop including `shellapi.h` unnecessarily\n + clar(win32): avoid compile error due to unused `fs_copy()`\n + clar: avoid compile error with mingw-w64\n + t/clar: fix compatibility with NonStop\n + t: import the clar unit testing framework\n + t: do not pass GIT_TEST_OPTS to unit tests with prove\n\n Import clar unit tests framework libgit2 folks invented for our\n use.\n\n Will merge to 'master'.\n cf. <d5b1c95b-cbdc-4711-849e-c2cfc67787ee@gmail.com>\n source: <cover.1725459142.git.ps@pks.im>\n\n\n* js/libgit-rust (2024-09-09) 7 commits\n . SQUASH???\n . Makefile: add option to build and test libgit-rs and libgit-rs-sys\n . libgit: add higher-level libgit crate\n . config: add git_configset_alloc() and git_configset_clear_and_free()\n . libgit-sys: add repo initialization and config access\n . libgit-sys: introduce Rust wrapper for libgit.a\n . common-main: split init and exit code into new files\n\n An rust binding to libgit.a functions has been introduced.\n\n Expecting a reroll.\n cf. <xmqqv7z8tjd7.fsf@gitster.g>\n source: <20240906221853.257984-1-calvinwan@google.com>\n\n\n* jc/range-diff-lazy-setup (2024-08-09) 2 commits\n  (merged to 'next' on 2024-09-10 at 2e04a06b22)\n + remerge-diff: clean up temporary objdir at a central place\n + remerge-diff: lazily prepare temporary objdir on demand\n\n Code clean-up.\n\n Will merge to 'master'.\n source: <xmqqr0ax9vlk.fsf@gitster.g>\n\n\n* jc/too-many-arguments (2024-08-06) 4 commits\n - miscellaneous: avoid \"too many arguments\"\n - notes: avoid \"too many arguments\"\n - cat-file: avoid \"too many arguments\"\n - refs: avoid \"too many arguments\"\n\n Error message clarification.\n\n On hold.\n source: <20240806003539.3292562-1-gitster@pobox.com>\n\n\n* ja/doc-synopsis-markup (2024-09-05) 3 commits\n - doc: apply synopsis simplification on git-clone and git-init\n - doc: update the guidelines to reflect the current formatting rules\n - doc: introduce a synopsis typesetting\n\n The way AsciiDoc is used for SYNOPSIS part of the manual pages has\n been revamped.  The sources, at least for the simple cases, got\n vastly pleasant to work with.\n\n Will merge to 'next'.\n source: <pull.1766.v4.git.1725573126.gitgitgadget@gmail.com>\n\n\n* ew/cat-file-optim (2024-08-25) 10 commits\n - cat-file: use writev(2) if available\n - cat-file: batch_write: use size_t for length\n - cat-file: batch-command uses content_limit\n - object_info: content_limit only applies to blobs\n - packfile: packed_object_info avoids packed_to_object_type\n - cat-file: use delta_base_cache entries directly\n - packfile: inline cache_or_unpack_entry\n - packfile: fix off-by-one in content_limit comparison\n - packfile: allow content-limit for cat-file\n - packfile: move sizep computation\n\n \"git cat-file --batch\" has been optimized.\n\n Waiting for review responses.\n source: <20240823224630.1180772-1-e@80x24.org>\n"},{"id":"502905","messageId":"ZuiJjQCZ23DznwJo@nand.local","threadId":"62109","inReplyTo":"xmqqwmjerqvl.fsf@gitster.g","subject":"Re: What's cooking in git.git (Sep 2024, #05; Fri, 13)","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2024-09-16T19:39:57Z","receivedAt":"2024-09-16T19:40:00Z","isPatch":false,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Sat, Sep 14, 2024 at 12:12:46PM -0700, Junio C Hamano wrote:\n> * tb/weak-sha1-for-tail-sum (2024-09-06) 9 commits\n>  - csum-file.c: use fast SHA-1 implementation when available\n>  - Makefile: allow specifying a SHA-1 for non-cryptographic uses\n>  - hash.h: scaffolding for _fast hashing variants\n>  - sha1: do not redefine `platform_SHA_CTX` and friends\n>  - i5500-git-daemon.sh: use compile-able version of Git without OpenSSL\n>  - pack-objects: use finalize_object_file() to rename pack/idx/etc\n>  - finalize_object_file(): implement collision check\n>  - finalize_object_file(): refactor unlink_or_warn() placement\n>  - finalize_object_file(): check for name collision before renaming\n>\n>  The checksum at the tail of files are now computed without\n>  collision detection protection.\n>\n>  Will merge to 'next'?\n>  source: <cover.1725651952.git.me@ttaylorr.com>\n\nLet's hold off on this one. Patrick raised a good point in [1] that I\nthink I have a fix for, but want to hear some further discussion before\nI convince myself that's the case.\n\nThanks,\nTaylor\n\n[1]: https://lore.kernel.org/git/ZugMUv1xbnjYH-el@pks.im/\n"},{"id":"502914","messageId":"ZukiD4-GP-rcUWnS@pks.im","threadId":"62109","inReplyTo":"ZuiJjQCZ23DznwJo@nand.local","subject":"Re: What's cooking in git.git (Sep 2024, #05; Fri, 13)","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-09-17T06:30:45Z","receivedAt":"2024-09-17T06:30:50Z","isPatch":false,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Mon, Sep 16, 2024 at 03:39:57PM -0400, Taylor Blau wrote:\n> On Sat, Sep 14, 2024 at 12:12:46PM -0700, Junio C Hamano wrote:\n> > * tb/weak-sha1-for-tail-sum (2024-09-06) 9 commits\n> >  - csum-file.c: use fast SHA-1 implementation when available\n> >  - Makefile: allow specifying a SHA-1 for non-cryptographic uses\n> >  - hash.h: scaffolding for _fast hashing variants\n> >  - sha1: do not redefine `platform_SHA_CTX` and friends\n> >  - i5500-git-daemon.sh: use compile-able version of Git without OpenSSL\n> >  - pack-objects: use finalize_object_file() to rename pack/idx/etc\n> >  - finalize_object_file(): implement collision check\n> >  - finalize_object_file(): refactor unlink_or_warn() placement\n> >  - finalize_object_file(): check for name collision before renaming\n> >\n> >  The checksum at the tail of files are now computed without\n> >  collision detection protection.\n> >\n> >  Will merge to 'next'?\n> >  source: <cover.1725651952.git.me@ttaylorr.com>\n> \n> Let's hold off on this one. Patrick raised a good point in [1] that I\n> think I have a fix for, but want to hear some further discussion before\n> I convince myself that's the case.\n\nThere was also the open question of whether we want to rename the new\n`_fast` hash functions to `_unsafe` to make it stand out more that they\nare indeed not safe for cryptographic uses.\n\nPatrick\n"},{"id":"502920","messageId":"Zuk7Fvo+a/e6UObo@nand.local","threadId":"62109","inReplyTo":"ZukiD4-GP-rcUWnS@pks.im","subject":"Re: What's cooking in git.git (Sep 2024, #05; Fri, 13)","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2024-09-17T08:17:26Z","receivedAt":"2024-09-17T08:17:31Z","isPatch":false,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Tue, Sep 17, 2024 at 08:30:45AM +0200, Patrick Steinhardt wrote:\n> There was also the open question of whether we want to rename the new\n> `_fast` hash functions to `_unsafe` to make it stand out more that they\n> are indeed not safe for cryptographic uses.\n\nI am fine to rename it to unsafe_, etc. But the more that I think about\nthis collision in loose object files, the less I think that it matters\nin practice.\n\nWe would only hit it when trying to write a loose object and racing with\nanother writer which is trying to write that same object as loose using\ndifferent compression settings, which seems awfully rare.\n\nPerhaps there is some use-case or scenario that I am missing, but this\nseems like a very rare case to disable a check that is otherwise useful.\n\nThanks,\nTaylor\n"},{"id":"502925","messageId":"ZulLfjtfuyDkeQJg@pks.im","threadId":"62109","inReplyTo":"Zuk7Fvo+a/e6UObo@nand.local","subject":"Re: What's cooking in git.git (Sep 2024, #05; Fri, 13)","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-09-17T09:27:26Z","receivedAt":"2024-09-17T09:27:33Z","isPatch":false,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Tue, Sep 17, 2024 at 04:17:26AM -0400, Taylor Blau wrote:\n> On Tue, Sep 17, 2024 at 08:30:45AM +0200, Patrick Steinhardt wrote:\n> > There was also the open question of whether we want to rename the new\n> > `_fast` hash functions to `_unsafe` to make it stand out more that they\n> > are indeed not safe for cryptographic uses.\n> \n> I am fine to rename it to unsafe_, etc. But the more that I think about\n> this collision in loose object files, the less I think that it matters\n> in practice.\n> \n> We would only hit it when trying to write a loose object and racing with\n> another writer which is trying to write that same object as loose using\n> different compression settings, which seems awfully rare.\n> \n> Perhaps there is some use-case or scenario that I am missing, but this\n> seems like a very rare case to disable a check that is otherwise useful.\n\nWhat I don't understand: why don't we just decompress the objects to\ncompare their contents? It shouldn't be a huge hit on performance as we\nbasically don't expect the code to ever trigger. And it shouldn't be a\nlot of code either, so I don't see much of a reason to not do this the\ncorrect way.\n\nPatrick\n"},{"id":"502926","messageId":"ZulMVv4ZEVtVxTG9@nand.local","threadId":"62109","inReplyTo":"ZulLfjtfuyDkeQJg@pks.im","subject":"Re: What's cooking in git.git (Sep 2024, #05; Fri, 13)","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2024-09-17T09:31:02Z","receivedAt":"2024-09-17T09:31:07Z","isPatch":false,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Tue, Sep 17, 2024 at 11:27:26AM +0200, Patrick Steinhardt wrote:\n> On Tue, Sep 17, 2024 at 04:17:26AM -0400, Taylor Blau wrote:\n> > On Tue, Sep 17, 2024 at 08:30:45AM +0200, Patrick Steinhardt wrote:\n> > > There was also the open question of whether we want to rename the new\n> > > `_fast` hash functions to `_unsafe` to make it stand out more that they\n> > > are indeed not safe for cryptographic uses.\n> >\n> > I am fine to rename it to unsafe_, etc. But the more that I think about\n> > this collision in loose object files, the less I think that it matters\n> > in practice.\n> >\n> > We would only hit it when trying to write a loose object and racing with\n> > another writer which is trying to write that same object as loose using\n> > different compression settings, which seems awfully rare.\n> >\n> > Perhaps there is some use-case or scenario that I am missing, but this\n> > seems like a very rare case to disable a check that is otherwise useful.\n>\n> What I don't understand: why don't we just decompress the objects to\n> compare their contents? It shouldn't be a huge hit on performance as we\n> basically don't expect the code to ever trigger. And it shouldn't be a\n> lot of code either, so I don't see much of a reason to not do this the\n> correct way.\n\nAlternatively we could avoid use of the _unsafe SHA-1 implementation in\nthe hashfile API only when writing loose objects, and skip the collision\ncheck entirely.\n\nThanks,\nTaylor\n"}]}