git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* What's cooking in git.git (Nov 2022, #04; Fri, 18)
@ 2022-11-19  2:22 Taylor Blau
  2022-11-20 11:24 ` SZEDER Gábor
                   ` (6 more replies)
  0 siblings, 7 replies; 22+ messages in thread
From: Taylor Blau @ 2022-11-19  2:22 UTC (permalink / raw)
  To: git

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.  A topic without enough support may be
discarded after a long period of no activity.

Junio appears to be back online, so I expect this will be my last
push-out as interim maintainer. Thanks, everybody, for all of their
patience while I juggled all of the merges.

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:

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

The following mirrors are currently out-of-date while the usual
maintainer is offline.

	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://gitlab.com/git-vcs/git/

With all the integration branches and topics broken out:

	https://github.com/ttaylorr/git/

Even though the preformatted documentation in HTML and man format
are not sources, they are typically 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/

...but these and the release tarballs below are similarly out-of-date:

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

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

* ab/misc-hook-submodule-run-command (2022-10-31) 3 commits
  (merged to 'next' on 2022-11-03 at 0f01b25561)
 + run-command tests: test stdout of run_command_parallel()
 + submodule tests: reset "trace.out" between "grep" invocations
 + hook tests: fix redirection logic error in 96e7225b310

 Various test updates.
 source: <cover-0.3-00000000000-20221029T025520Z-avarab@gmail.com>


* ab/sha-makefile-doc (2022-11-07) 10 commits
  (merged to 'next' on 2022-11-08 at 6d3068d7cd)
 + Makefile: discuss SHAttered in *_SHA{1,256} discussion
 + Makefile: document default SHA-1 backend on OSX
 + Makefile & test-tool: replace "DC_SHA1" variable with a "define"
 + Makefile: document SHA-1 and SHA-256 default and selection order
 + Makefile: document default SHA-256 backend
 + Makefile: rephrase the discussion of *_SHA1 knobs
 + Makefile: create and use sections for "define" flag listing
 + Makefile: correct DC_SHA1 documentation
 + INSTALL: remove discussion of SHA-1 backends
 + Makefile: always (re)set DC_SHA1 on fallback

 Makefile comments updates and reordering to clarify knobs used to
 choose SHA implementations.
 source: <cover-v5-00.10-00000000000-20221107T211736Z-avarab@gmail.com>


* en/sparse-checkout-design (2022-11-07) 1 commit
  (merged to 'next' on 2022-11-08 at 42e164b490)
 + sparse-checkout.txt: new document with sparse-checkout directions

 Design doc.
 source: <pull.1367.v4.git.1667714666810.gitgitgadget@gmail.com>


* jk/branch-delete-detached (2022-11-10) 1 commit
  (merged to 'next' on 2022-11-14 at b185797ec0)
 + branch: gracefully handle '-d' on orphan HEAD

 Fix a bug where `git branch -d` did not work on an orphaned HEAD.
 source: <Y2H/1S3G+KeeEN/l@coredump.intra.peff.net>


* mh/credential-unrecognized-attrs (2022-11-12) 1 commit
  (merged to 'next' on 2022-11-14 at 8170443d0a)
 + docs: clarify that credential discards unrecognised attributes

 Docfix.
 source: <pull.1393.git.1666598268697.gitgitgadget@gmail.com>


* mh/increase-credential-cache-timeout (2022-11-09) 1 commit
  (merged to 'next' on 2022-11-14 at afe54db0f1)
 + Documentation: increase example cache timeout to 1 hour

 Update the credential-cache documentation to provide a more realistic
 example.
 source: <pull.1412.v2.git.1668010273573.gitgitgadget@gmail.com>


* tb/repack-expire-to (2022-10-24) 4 commits
  (merged to 'next' on 2022-11-08 at 496ce3c62d)
 + builtin/repack.c: implement `--expire-to` for storing pruned objects
 + builtin/repack.c: write cruft packs to arbitrary locations
 + builtin/repack.c: pass "cruft_expiration" to `write_cruft_pack`
 + builtin/repack.c: pass "out" to `prepare_pack_objects`

 "git repack" learns to send cruft objects out of the way into
 packfiles outside the repository.
 source: <cover.1666636974.git.me@ttaylorr.com>


* vd/skip-cache-tree-update (2022-11-10) 5 commits
  (merged to 'next' on 2022-11-14 at 06b2da01ff)
 + rebase: use 'skip_cache_tree_update' option
 + read-tree: use 'skip_cache_tree_update' option
 + reset: use 'skip_cache_tree_update' option
 + unpack-trees: add 'skip_cache_tree_update' option
 + cache-tree: add perf test comparing update and prime

 Avoid calling 'cache_tree_update()' when doing so would be redundant.
 source: <pull.1411.v3.git.1668107165.gitgitgadget@gmail.com>


* vd/update-refs-delete (2022-11-07) 1 commit
  (merged to 'next' on 2022-11-08 at 2866156953)
 + rebase --update-refs: avoid unintended ref deletion

 `git rebase --update-refs` would delete references when all
 `update-ref` commands in the sequencer were removed, which has been
 corrected.
 source: <20221107174752.91186-1-vdye@github.com>

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

* ab/fewer-the-index-macros (2022-11-18) 12 commits
 - builtin/*: remove or amend "USE_THE_INDEX_COMPATIBILITY_MACROS"
 - cocci: apply "pending" index-compatibility to some "builtin/*.c"
 - cache.h & test-tool.h: add & use "USE_THE_INDEX_VARIABLE"
 - {builtin/*,repository}.c: add & use "USE_THE_INDEX_VARIABLE"
 - cocci: apply "pending" index-compatibility to "t/helper/*.c"
 - cocci & cache.h: apply variable section of "pending" index-compatibility
 - cocci & cache.h: apply a selection of "pending" index-compatibility
 - cocci: add a index-compatibility.pending.cocci
 - read-cache API & users: make discard_index() return void
 - cocci & cache.h: remove rarely used "the_index" compat macros
 - builtin/{grep,log}.: don't define "USE_THE_INDEX_COMPATIBILITY_MACROS"
 - cache.h: remove unused "the_index" compat macros

 Progress on removing 'the_index' convenience wrappers.

 Expecting a (small) reroll, then will merge to 'next'.
 source: <cover-00.12-00000000000-20221118T112205Z-avarab@gmail.com>


* ab/tag-object-type-errors (2022-11-18) 4 commits
 - tag: don't emit potentially incorrect "object is a X, not a Y"
 - tag: don't misreport type of tagged objects in errors
 - object tests: add test for unexpected objects in tags
 - object-file.c: free the "t.tag" in check_tag()
 (this branch uses jk/parse-object-type-mismatch.)

 Hardening checks around mismatched object types when one of those
 objects is a tag.

 Needs review.
 source: <Y3a3qcqNG8W3ueeb@coredump.intra.peff.net>
 source: <cover-0.4-00000000000-20221118T113442Z-avarab@gmail.com>


* ew/delta-islands-free (2022-11-18) 1 commit
  (merged to 'next' on 2022-11-18 at 7c4899e0cb)
 + delta-islands: free island-related data after use

 Free structures related to delta islands after use.

 Will merge to 'master'.
 source: <20221117230658.M516129@dcvr>


* gc/resolve-alternate-symlinks (2022-11-17) 1 commit
 - object-file: use real paths when adding alternates

 Resolve symbolic links when processing the locations of alternate
 object stores, since failing to do so can lead to confusing and buggy
 behavior.

 Expecting a reroll, then will merge to 'next'.
 source: <pull.1382.git.git.1668706274099.gitgitgadget@gmail.com>


* jk/parse-object-type-mismatch (2022-11-18) 2 commits
  (merged to 'next' on 2022-11-18 at 1ee133a089)
 + parse_object(): check on-disk type of suspected blob
 + parse_object(): drop extra "has" check before checking object type
 (this branch is used by ab/tag-object-type-errors.)

 `parse_object()` hardening when checking for the existence of a
 suspected blob object.

 Will cook in 'next'.
 source: <Y3a3qcqNG8W3ueeb@coredump.intra.peff.net>


* js/range-diff-mbox (2022-11-15) 1 commit
 - range-diff: support reading mbox files

 'git range-diff' gained support for reading either side from an .mbox
 file instead of a revision range.

 Expecting another round?
 source: <pull.1420.git.1668536405563.gitgitgadget@gmail.com>


* mg/notes-newline (2022-11-16) 1 commit
  (merged to 'next' on 2022-11-18 at b20234698d)
 + notes: avoid empty line in template

 Avoid a stray empty newline in the template when creating new notes.

 Will merge to 'master'.
 source: <347ee7ad6fea7cf96bb1e51772802102082b58cc.1668614158.git.git@grubix.eu>


* rj/branch-copy-and-rename (2022-11-17) 2 commits
 - branch: clear target branch configuration before copying or renaming
 - branch: force-copy a branch to itself via @{-1} is a no-op

 Fix a pair of bugs in 'git branch'.

 Waiting for review discussion to settle.
 source: <f0b2d46c-2e9c-2630-2870-8ed550dd1606@gmail.com>


* tl/ls-tree--pattern (2022-11-17) 6 commits
 - ls-tree: introduce '--pattern' option
 - ls-tree: introduce 'match_pattern()' function
 - ls-tree: improving cohension in the print code
 - ls-tree: optimize params of 'show_tree_common_default_long()'
 - t3104: remove shift code in 'test_ls_tree_format'
 - ls-tree: cleanup the redundant SPACE

 A synonym for "ls-tree | grep <pattern>", "ls-tree
 --pattern=<pattern>" was introduced.

 Waiting for review response, but leaning negative.
 source: <20221117113023.65865-1-tenglong.tl@alibaba-inc.com>


* tr/am--no-verify (2022-11-18) 1 commit
 - am: Allow passing --no-verify flag

 Conditionally skip the pre-applypatch and applypatch-msg hooks when
 applying patches with 'git am'.

 Expecting another round.
 source: <20221118132743.3525725-1-thierry.reding@gmail.com>

--------------------------------------------------
[Stalled]

* cw/submodule-status-in-parallel (2022-11-08) 6 commits
 - diff-lib: parallelize run_diff_files for submodules
 - diff-lib: refactor match_stat_with_submodule
 - submodule: move status parsing into function
 - submodule: strbuf variable rename
 - run-command: add duplicate_output_fn to run_processes_parallel_opts
 - Merge branch 'ab/run-hook-api-cleanup' into cw/submodule-status-in-parallel

 Allow the internal "diff-files" engine to run "how has this
 submodule changed?" in parallel to speed up "git status".

 Waiting for review.
 source: <20221020232532.1128326-1-calvinwan@google.com>


* js/bisect-in-c (2022-08-30) 17 commits
 . bisect: no longer try to clean up left-over `.git/head-name` files
 . bisect: remove Cogito-related code
 . Turn `git bisect` into a full built-in
 . bisect: move even the command-line parsing to `bisect--helper`
 . bisect--helper: make `state` optional
 . bisect--helper: calling `bisect_state()` without an argument is a bug
 . bisect: avoid double-quoting when printing the failed command
 . bisect run: fix the error message
 . bisect: verify that a bogus option won't try to start a bisection
 . bisect--helper: migrate to OPT_SUBCOMMAND()
 . bisect--helper: make the order consistently `argc, argv`
 . bisect--helper: make `terms` an explicit singleton
 . bisect--helper: simplify exit code computation
 . bisect--helper: really retire `--bisect-autostart`
 . bisect--helper: really retire --bisect-next-check
 . bisect--helper: retire the --no-log option
 . Merge branch 'sg/parse-options-subcommand' into js/bisect-in-c

 Final bits of "git bisect.sh" have been rewritten in C.

 Temporarily ejected from 'seen'. Waiting for a response on how this
 topic interacts with 'dd/git-bisect-builtin'.
 cf. <xmqqv8pr8903.fsf@gitster.g>
 source: <pull.1132.v6.git.1661885419.gitgitgadget@gmail.com>


* od/ci-use-checkout-v3-when-applicable (2022-10-10) 2 commits
 . ci(main): linux32 uses actions/checkout@v2
 . ci(main): upgrade actions/checkout to v3

 Attempt to update GitHub CI to use actions/checkout@v3

 Expecting a reroll.
 Seems to break the CI completely.
 source: <pull.1354.git.git.1665388136.gitgitgadget@gmail.com>


* ed/fsmonitor-inotify (2022-11-16) 6 commits
 - fsmonitor: update doc for Linux
 - fsmonitor: test updates
 - fsmonitor: enable fsmonitor for Linux
 - fsmonitor: implement filesystem change listener for Linux
 - fsmonitor: determine if filesystem is local or remote
 - fsmonitor: prepare to share code between Mac OS and Linux

 Bundled fsmonitor for Linux using inotify API.

 Needs review on the updated round.
 Occasional breakages of t7527.16??
 source: <pull.1352.v3.git.git.1668641019.gitgitgadget@gmail.com>


* ag/merge-strategies-in-c (2022-08-10) 14 commits
 . sequencer: use the "octopus" strategy without forking
 . sequencer: use the "resolve" strategy without forking
 . merge: use the "octopus" strategy without forking
 . merge: use the "resolve" strategy without forking
 . merge-octopus: rewrite in C
 . merge-recursive: move better_branch_name() to merge.c
 . merge-resolve: rewrite in C
 . merge-one-file: rewrite in C
 . update-index: move add_cacheinfo() to read-cache.c
 . merge-index: add a new way to invoke `git-merge-one-file'
 . merge-index: drop the index
 . merge-index: libify merge_one_path() and merge_all()
 . t6060: add tests for removed files
 . t6060: modify multiple files to expose a possible issue with merge-index

 An attempt to rewrite remaining merge strategies from shell to C.

 Needs more work.
 At the minimum, we should lose 11/14 and possibly 08/14.
 cf. <xmqq7d36vfur.fsf@gitster.g>
 source: <20220809185429.20098-1-alban.gruin@gmail.com>


* es/doc-creation-factor-fix (2022-07-28) 2 commits
 . range-diff: clarify --creation-factor=<factor>
 . format-patch: clarify --creation-factor=<factor>

 Expecting a reroll by somebody more familiar with the logic
 cf. <xmqqo7wfix7p.fsf@gitster.g>
 source: <7229p500-p2r4-on87-6802-8o90s36rr3s4@tzk.qr>


* cw/remote-object-info (2022-08-13) 7 commits
 . SQUASH???
 . cat-file: add remote-object-info to batch-command
 . transport: add client support for object-info
 . serve: advertise object-info feature
 . protocol-caps: initialization bug fix
 . fetch-pack: move fetch initialization
 . fetch-pack: refactor packet writing

 A client component to talk with the object-info endpoint.

 Expecting a reroll.
 Under SANITIZE=address, t1006-cat-file.sh finds a breakage.
 cf. <20220728230210.2952731-1-calvinwan@google.com>
 cf. <CAFySSZDvgwbbHCHfyuaqX3tKsr-GjJ9iihygg6rNNe46Ys7_EA@mail.gmail.com>
 source: <20220728230210.2952731-1-calvinwan@google.com>

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

* ab/remove--super-prefix (2022-11-14) 12 commits
 - fetch: rename "--submodule-prefix" to "--super-prefix"
 - read-tree: add "--super-prefix" option, eliminate global
 - submodule tests: test "git branch -t" output and stderr
 - submodule--helper: convert "{update,clone}" to their own "--super-prefix"
 - submodule--helper: convert "status" to its own "--super-prefix"
 - submodule--helper: convert "sync" to its own "--super-prefix"
 - submodule--helper: convert "foreach" to its own "--super-prefix"
 - submodule--helper: "deinit" has never used "--super-prefix"
 - submodule--helper: don't use global --super-prefix in "absorbgitdirs"
 - read-tree + fetch tests: test failing "--super-prefix" interaction
 - Merge branch 'ab/submodule-no-abspath' into ab/remove--super-prefix
 - Merge branch 'ab/submodule-helper-prep-only' into ab/remove--super-prefix
 (this branch uses ab/submodule-helper-prep-only and ab/submodule-no-abspath.)

 Remove the top-level `--super-prefix` option.

 Expecting a reroll?
 source: <cover-v2-00.10-00000000000-20221114T100803Z-avarab@gmail.com>


* ab/submodule-no-abspath (2022-11-09) 1 commit
  (merged to 'next' on 2022-11-18 at 34d0accc7b)
 + submodule--helper absorbgitdirs: no abspaths in "Migrating git..."
 (this branch is used by ab/remove--super-prefix.)

 Remove an absolute path in the "Migrating git directory" message.

 Will merge to 'master'.
 source: <patch-1.1-34b54fdd9bb-20221109T020347Z-avarab@gmail.com>


* ab/t7610-timeout (2022-11-15) 2 commits
  (merged to 'next' on 2022-11-15 at 9dadac032a)
 + t7610: use "file:///dev/null", not "/dev/null", fixes MinGW
  (merged to 'next' on 2022-11-14 at 82a4abdb1d)
 + t7610: fix flaky timeout issue, don't clone from example.com

 Fix a source of flakiness in CI when compiling with SANITIZE=leak.

 Will cook in 'next'.
 source: <Y3PrjMLcEGfoHifZ@nand.local>


* es/chainlint-lineno (2022-11-11) 4 commits
  (merged to 'next' on 2022-11-18 at 20c9692235)
 + chainlint: prefix annotated test definition with line numbers
 + chainlint: latch line numbers at which each token starts and ends
 + chainlint: sidestep impoverished macOS "terminfo"
 + Merge branch 'es/chainlint-output' into es/chainlint-lineno
 (this branch uses es/chainlint-output.)

 Teach chainlint.pl to show corresponding line numbers when printing
 the source of a test.

 Will merge to 'master'.
 source: <pull.1413.v2.git.1668152094.gitgitgadget@gmail.com>


* ew/format-patch-mboxrd (2022-11-14) 1 commit
 - format-patch: add --mboxrd alias for --pretty=mboxrd

 Teach `format-patch` a convenient alias for `--pretty=mboxrd`.

 Waiting for discussion to settle.
 source: <20221114094114.18986-1-e@80x24.org>


* gc/redact-h2h3-headers (2022-11-14) 2 commits
  (merged to 'next' on 2022-11-14 at 34157d24e9)
 + http: redact curl h2h3 headers in info
 + t: run t5551 tests with both HTTP and HTTP/2

 Redact headers from cURL's h2h3 module in GIT_CURL_VERBOSE and
 others.

 Will merge to 'master'.
 source: <pull.1377.v3.git.git.1668206106.gitgitgadget@gmail.com>


* js/drop-mingw-test-cmp (2022-11-14) 2 commits
 - tests(mingw): avoid very slow `mingw_test_cmp`
 - t0021: use Windows-friendly `pwd`

 Use `git diff --no-index` as a test_cmp on Windows.

 Waiting for review response.
 source: <pull.1309.v4.git.1668434812.gitgitgadget@gmail.com>


* mc/switch-advice (2022-11-09) 1 commit
 - po: use `switch` over `checkout` in error message

 Use 'switch' instead of 'checkout' in an error message.

 Waiting for review response.
 source: <pull.1308.git.git.1668018620148.gitgitgadget@gmail.com>


* mh/gitcredentials-generate (2022-11-14) 1 commit
  (merged to 'next' on 2022-11-18 at 99f2365d6b)
 + Docs: describe how a credential-generating helper works

 Doc update.

 Will cook in 'next'.
 source: <pull.1379.git.git.1668217470500.gitgitgadget@gmail.com>


* ms/sendemail-validate-headers (2022-11-11) 1 commit
 . Expose header information to git-send-email's sendemail-validate hook

 Expecting a reroll.
 Appears to break t9001 completely?
 source: <20221111194223.644845-2-michael.strawbridge@amd.com>


* pw/strict-label-lookups (2022-11-10) 2 commits
  (merged to 'next' on 2022-11-14 at 7db4398d23)
 + sequencer: tighten label lookups
 + sequencer: unify label lookup

 Correct an error where `git rebase` would mistakenly use a branch or
 tag named "refs/rewritten/xyz" when missing a rebase label.

 Will cook in 'next'.
 source: <pull.1414.git.1668098622.gitgitgadget@gmail.com>


* rs/multi-filter-args (2022-11-12) 3 commits
 - list-objects-filter: remove OPT_PARSE_LIST_OBJECTS_FILTER_INIT()
 - pack-object: simplify --filter handling
 - pack-objects: fix handling of multiple --filter options

 Fix a bug where `pack-objects` would not respect multiple `--filter`
 arguments when invoked directly.

 Expecting a reroll?
 source: <c64e4fa5-62c2-2a93-a4ef-bd84407ea570@web.de>


* ab/various-leak-fixes (2022-11-08) 18 commits
  (merged to 'next' on 2022-11-18 at 8828bb7161)
 + built-ins: use free() not UNLEAK() if trivial, rm dead code
 + revert: fix parse_options_concat() leak
 + cherry-pick: free "struct replay_opts" members
 + rebase: don't leak on "--abort"
 + connected.c: free the "struct packed_git"
 + sequencer.c: fix "opts->strategy" leak in read_strategy_opts()
 + ls-files: fix a --with-tree memory leak
 + revision API: call graph_clear() in release_revisions()
 + unpack-file: fix ancient leak in create_temp_file()
 + built-ins & libs & helpers: add/move destructors, fix leaks
 + dir.c: free "ident" and "exclude_per_dir" in "struct untracked_cache"
 + read-cache.c: clear and free "sparse_checkout_patterns"
 + commit: discard partial cache before (re-)reading it
 + {reset,merge}: call discard_index() before returning
 + tests: mark tests as passing with SANITIZE=leak
 + Merge branch 'pw/rebase-no-reflog-action' into ab/various-leak-fixes
 + rebase: stop exporting GIT_REFLOG_ACTION
 + sequencer: stop exporting GIT_REFLOG_ACTION
 (this branch is used by ab/merge-index-prep.)

 Various leak fixes.

 Will merge to 'master'.
 source: <cover-v2-00.15-00000000000-20221108T172650Z-avarab@gmail.com>


* aw/complete-case-insensitive (2022-11-07) 2 commits
 - completion: add case-insensitive match of pseudorefs
 - completion: add optional ignore-case when matching refs

 Introduce a case insensitive mode to the Bash completion helpers.

 Waiting for review.
 source: <pull.1374.git.git.1667669315.gitgitgadget@gmail.com>


* dd/bisect-helper-subcommand (2022-11-11) 3 commits
  (merged to 'next' on 2022-11-14 at 066f19c4fe)
 + bisect--helper: parse subcommand with OPT_SUBCOMMAND
 + bisect--helper: move all subcommands into their own functions
 + bisect--helper: remove unused options
 (this branch is used by dd/git-bisect-builtin.)

 Fix a regression in the bisect-helper which mistakenly treats
 arguments to the command given to 'git bisect run' as arguments to
 the helper.

 Will cook in 'next'.
 source: <cover.1668097286.git.congdanhqx@gmail.com>


* dd/git-bisect-builtin (2022-11-15) 13 commits
  (merged to 'next' on 2022-11-15 at e16e754058)
 + bisect; remove unused "git-bisect.sh" and ".gitignore" entry
  (merged to 'next' on 2022-11-14 at fc304fb52f)
 + Turn `git bisect` into a full built-in
 + bisect--helper: log: allow arbitrary number of arguments
 + bisect--helper: handle states directly
 + bisect--helper: emit usage for "git bisect"
 + bisect test: test exit codes on bad usage
 + bisect--helper: identify as bisect when report error
 + bisect-run: verify_good: account for non-negative exit status
 + bisect run: keep some of the post-v2.30.0 output
 + bisect: fix output regressions in v2.30.0
 + bisect: refactor bisect_run() to match CodingGuidelines
 + bisect tests: test for v2.30.0 "bisect run" regressions
 + Merge branch 'dd/bisect-helper-subcommand' into dd/git-bisect-builtin
 (this branch uses dd/bisect-helper-subcommand.)

 `git bisect` becomes a builtin.

 Will cook in 'next'.
 source: <cover.1668097962.git.congdanhqx@gmail.com>


* ds/packed-refs-v2 (2022-11-07) 30 commits
 - refs: skip hashing when writing packed-refs v2
 - p1401: create performance test for ref operations
 - ci: run GIT_TEST_PACKED_REFS_VERSION=2 in some builds
 - t*: skip packed-refs v2 over http tests
 - t3210: require packed-refs v1 for some tests
 - t5502: add PACKED_REFS_V1 prerequisite
 - t5312: allow packed-refs v2 format
 - t1409: test with packed-refs v2
 - packed-backend: create GIT_TEST_PACKED_REFS_VERSION
 - packed-refs: write prefix chunks
 - packed-refs: read optional prefix chunks
 - packed-refs: read file format v2
 - packed-refs: write file format version 2
 - packed-backend: create shell of v2 writes
 - config: add config values for packed-refs v2
 - packed-backend: create abstraction for writing refs
 - packed-backend: extract iterator/updates merge
 - packed-backend: extract add_write_error()
 - refs: extract packfile format to new file
 - chunk-format: parse trailing table of contents
 - chunk-format: allow trailing table of contents
 - chunk-format: store chunk offset during write
 - chunk-format: document trailing table of contents
 - chunk-format: number of chunks is optional
 - refs: allow loose files without packed-refs
 - repository: wire ref extensions to ref backends
 - config: fix multi-level bulleted list
 - extensions: add refFormat extension
 - read-cache: add index.computeHash config option
 - hashfile: allow skipping the hash function

 Waiting for review.
 source: <pull.1408.git.1667846164.gitgitgadget@gmail.com>


* es/chainlint-output (2022-11-08) 4 commits
  (merged to 'next' on 2022-11-14 at 9cd7d30183)
 + chainlint: annotate original test definition rather than token stream
 + chainlint: latch start/end position of each token
 + chainlint: tighten accuracy when consuming input stream
 + chainlint: add explanatory comments
 (this branch is used by es/chainlint-lineno.)

 Teach chainlint.pl to annotate the original test definition instead
 of the token stream.

 Will merge to 'master'.
 source: <pull.1375.git.git.1667934510.gitgitgadget@gmail.com>


* ja/worktree-orphan (2022-11-10) 2 commits
 - worktree add: add --orphan flag
 - worktree add: Include -B in usage docs

 'git worktree add' learned how to create a worktree based on an
 orphaned branch with `--orphan`.

 Expecting another round?
 source: <20221110233137.10414-1-jacobabel@nullpo.dev>


* js/remove-stale-scalar-repos (2022-11-11) 2 commits
  (merged to 'next' on 2022-11-14 at e1c86051c4)
 + tests(scalar): tighten the stale `scalar.repo` test some
  (merged to 'next' on 2022-11-08 at 6d598a3b80)
 + scalar reconfigure -a: remove stale `scalar.repo` entries

 'scalar reconfigure -a' is taught to automatically remove
 scalar.repo entires which no longer exist.

 Will cook in 'next'.
 source: <pull.1415.git.1668065327120.gitgitgadget@gmail.com>


* jt/submodule-on-demand (2022-11-14) 1 commit
  (merged to 'next' on 2022-11-18 at a89ee23abb)
 + Doc: document push.recurseSubmodules=only

 Push all submodules recursively with
 '--recurse-submodules=on-demand'.

 Will cook in 'next'.
 source: <20221114213713.2341945-1-jonathantanmy@google.com>


* pw/rebase-no-reflog-action (2022-11-09) 2 commits
  (merged to 'next' on 2022-11-14 at 790dadc8d3)
 + rebase: stop exporting GIT_REFLOG_ACTION
 + sequencer: stop exporting GIT_REFLOG_ACTION
 (this branch is used by ab/merge-index-prep.)

 Avoid setting GIT_REFLOG_ACTION to improve readability of the
 sequencer internals.

 Will cook in 'next'.
 source: <31df037eafede799c2ef27df66c6da309b719b1b.1668003719.git.gitgitgadget@gmail.com>


* rp/maintenance-qol (2022-11-15) 4 commits
  (merged to 'next' on 2022-11-15 at be4379029c)
 + builtin/gc.c: fix use-after-free in maintenance_unregister()
  (merged to 'next' on 2022-11-15 at 53dc6c8b0d)
 + maintenance --unregister: fix uninit'd data use & -Wdeclaration-after-statement
  (merged to 'next' on 2022-11-14 at 17db40bf26)
 + maintenance: add option to register in a specific config
 + for-each-repo: interpolate repo path arguments

 'git maintenance register' is taught to write configuration to an
 arbitrary path, and 'git for-each-repo' is taught to expand tilde
 characters in paths.

 Will cook in 'next'.
 source: <20221109190708.22725-1-ronan@rjp.ie>
 source: <patch-1.1-54d405f15f1-20221115T080212Z-avarab@gmail.com>


* sa/cat-file-mailmap--batch-check (2022-11-14) 3 commits
 . doc/cat-file: allow --use-mailmap for --batch options
 . cat-file: add mailmap support to --batch-check option
 . cat-file: add mailmap support to -s option

 'cat-file' gains mailmap support for its '--batch-check' and '-s'
 options.

 Expecting another round.
 Breaks t4203 when run with 'GIT_TEST_DEFAULT_HASH=sha256'.
 source: <20221113212830.92609-1-siddharthasthana31@gmail.com>


* sz/macos-fsmonitor-symlinks (2022-11-08) 1 commit
  (merged to 'next' on 2022-11-18 at ad972b3819)
 + fsmonitor--daemon: on macOS support symlink

 Fix an issue where core.fsmonitor on macOS would not notice created
 or modified symbolic links.

 Will merge to 'master'.
 source: <pull.1406.git.1667885119570.gitgitgadget@gmail.com>


* tb/ci-concurrency (2022-11-08) 1 commit
 - ci: avoid unnecessary builds

 Avoid unnecessary builds in CI, with settings configured in
 ci-config.

 Waiting for review.
 source: <ff172f1de982f6f79b598e4ac6d5b2964ca4a098.1667931937.git.me@ttaylorr.com>


* tl/notes--blankline (2022-11-09) 5 commits
 - notes.c: introduce "--no-blank-line" option
 - notes.c: provide tips when target and append note are both empty
 - notes.c: drop unreachable code in 'append_edit()'
 - notes.c: cleanup for "designated init" and "char ptr init"
 - notes.c: cleanup 'strbuf_grow' call in 'append_edit'

 'git notes append' was taught '--[no-]blank-line' to conditionally
 add a LF between a new and existing note.

 Expecting a reroll.
 source: <cover.1667980450.git.dyroneteng@gmail.com>


* ab/submodule-helper-prep-only (2022-11-08) 9 commits
  (merged to 'next' on 2022-11-08 at c0c4f4d1c3)
 + submodule--helper: use OPT_SUBCOMMAND() API
 + submodule--helper: drop "update --prefix <pfx>" for "-C <pfx> update"
 + submodule--helper: remove --prefix from "absorbgitdirs"
 + submodule API & "absorbgitdirs": remove "----recursive" option
 + submodule.c: refactor recursive block out of absorb function
 + submodule tests: test for a "foreach" blind-spot
 + submodule--helper: fix a memory leak in "status"
 + submodule tests: add tests for top-level flag output
 + submodule--helper: move "config" to a test-tool
 (this branch is used by ab/remove--super-prefix.)

 Preparation to remove git-submodule.sh and replace it with a builtin.

 Will cook in 'next'.
 source: <cover-v2-0.9-00000000000-20221108T140501Z-avarab@gmail.com>


* ds/bundle-uri-4 (2022-11-16) 9 commits
 - clone: unbundle the advertised bundles
 - bundle-uri: download bundles from an advertised list
 - bundle-uri: allow relative URLs in bundle lists
 - strbuf: introduce strbuf_strip_file_from_path()
 - bundle-uri client: add boolean transfer.bundleURI setting
 - bundle-uri: serve bundle.* keys from config
 - bundle-uri client: add helper for testing server
 - bundle-uri client: add minimal NOOP client
 - protocol v2: add server-side "bundle-uri" skeleton

 Bundle URIs part 4.

 Waiting for review.
 source: <pull.1400.v2.git.1668628302.gitgitgadget@gmail.com>


* sg/plug-line-log-leaks (2022-11-02) 3 commits
 - diff.c: use diff_free_queue()
 - line-log: free the diff queues' arrays when processing merge commits
 - line-log: free diff queue when processing non-merge commits

 A handful of leaks in the line-log machinery have been plugged.

 Expecting a reroll.
 source: <20221102220142.574890-1-szeder.dev@gmail.com>


* tb/howto-maintain-git-fixes (2022-10-31) 2 commits
  (merged to 'next' on 2022-11-18 at e631f9f305)
 + Documentation: build redo-seen.sh from jch..seen
 + Documentation: build redo-jch.sh from master..jch

 A pair of bugfixes to the Documentation/howto/maintain-git.txt guide.

 Will merge to 'master'.
 source: <cover.1667260044.git.me@ttaylorr.com>


* tl/pack-bitmap-absolute-paths (2022-11-14) 2 commits
  (merged to 'next' on 2022-11-14 at 34eb0ea05a)
 + pack-bitmap.c: avoid exposing absolute paths
 + pack-bitmap.c: remove unnecessary "open_pack_index()" calls

 The pack-bitmap machinery is taught to log the paths of redundant
 bitmap(s) to trace2 instead of stderr.

 Will merge to 'master'.
 source: <cover.1668063122.git.dyroneteng@gmail.com>


* ab/cmake-nix-and-ci (2022-11-04) 14 commits
  (merged to 'next' on 2022-11-08 at 6ef4e93b36)
 + CI: add a "linux-cmake-test" to run cmake & ctest on linux
 + cmake: copy over git-p4.py for t983[56] perforce test
 + cmake: only look for "sh" in "C:/Program Files" on Windows
 + cmake: increase test timeout on Windows only
 + cmake: support GIT_TEST_OPTS, abstract away WIN32 defaults
 + Makefile + cmake: use environment, not GIT-BUILD-DIR
 + test-lib.sh: support a "GIT_TEST_BUILD_DIR"
 + cmake: set "USE_LIBPCRE2" in "GIT-BUILD-OPTIONS" for test-lib.sh
 + cmake & test-lib.sh: add a $GIT_SOURCE_DIR variable
 + cmake: chmod +x the bin-wrappers/* & SCRIPT_{SH,PERL} & git-p4
 + cmake: don't copy chainlint.pl to build directory
 + cmake: update instructions for portable CMakeLists.txt
 + cmake: use "-S" and "-B" to specify source and build directories
 + cmake: don't invoke msgfmt with --statistics

 Fix assorted issues with CTest on *nix machines.

 Will cook in 'next'.
 source: <cover-v4-00.14-00000000000-20221103T160255Z-avarab@gmail.com>


* ab/make-bin-wrappers (2022-10-31) 4 commits
 - Makefile: simplify $(test_bindir_programs) rule by splitting it up
 - Makefile: rename "test_bindir_programs" variable, pre-declare
 - Makefile: define "TEST_{PROGRAM,OBJS}" variables earlier
 - Makefile: factor sed-powered '#!/bin/sh' munging into a variable

 Resolve issues with the bin-wrappers/% rules where "make
 bin-wrappers/git" would generate the script but not "git" itself.

 Waiting for review discussion to settle, but leaning negative.
 source: <cover-v3-0.4-00000000000-20221031T222249Z-avarab@gmail.com>


* kz/merge-tree-merge-base (2022-11-12) 2 commits
  (merged to 'next' on 2022-11-14 at 76d48ae21f)
 + merge-tree.c: allow specifying the merge-base when --stdin is passed
 + merge-tree.c: add --merge-base=<commit> option

 "merge-tree" learns a new `--merge-base` option.

 Will cook in 'next'.
 source: <pull.1397.v7.git.1668210314.gitgitgadget@gmail.com>


* po/pretty-hard-trunc (2022-11-13) 1 commit
 - pretty-formats: add hard truncation, without ellipsis, options

 Add a new pretty format which truncates without ellipsis.

 Waiting for review.
 source: <20221112143616.1429-1-philipoakley@iee.email>


* rr/long-status-advice (2022-11-15) 1 commit
 - status: long status advice adapted to recent capabilities

 The advice message emitted by a slow "status" run is amended to
 mention fsmonitor.

 Waiting for reviewer feedback on the updated round.
 source: <pull.1384.v6.git.1668547188070.gitgitgadget@gmail.com>


* ab/config-multi-and-nonbool (2022-11-02) 9 commits
 . for-each-repo: with bad config, don't conflate <path> and <cmd>
 . config API: add "string" version of *_value_multi(), fix segfaults
 . config API users: test for *_get_value_multi() segfaults
 . for-each-repo: error on bad --config
 . config API: have *_multi() return an "int" and take a "dest"
 . versioncmp.c: refactor config reading next commit
 . config tests: add "NULL" tests for *_get_value_multi()
 . config tests: cover blind spots in git_die_config() tests
 . for-each-repo tests: test bad --config keys

 A mixed bag of config API updates.

 Waiting for review.
 cf. <221026.86pmeebcj9.gmgdl@evledraar.gmail.com>
 source: <cover-v2-0.9-00000000000-20221101T225822Z-avarab@gmail.com>


* ps/receive-use-only-advertised (2022-11-17) 7 commits
  (merged to 'next' on 2022-11-18 at e4a288a7a5)
 + receive-pack: only use visible refs for connectivity check
 + rev-parse: add `--exclude-hidden=` option
 + revision: add new parameter to exclude hidden refs
 + revision: introduce struct to handle exclusions
 + revision: move together exclusion-related functions
 + refs: get rid of global list of hidden refs
 + refs: fix memory leak when parsing hideRefs config

 "git receive-pack" used to use all the local refs as the boundary for
 checking connectivity of the data "git push" sent, but now it uses
 only the refs that it advertised to the pusher. In a repository with
 the .hideRefs configuration, this reduces the resources needed to
 perform the check.

 Will cook in 'next'.
 cf. <221028.86bkpw805n.gmgdl@evledraar.gmail.com>
 cf. <xmqqr0yrizqm.fsf@gitster.g>
 source: <cover.1668663795.git.ps@pks.im>


* gc/submodule-clone-update-with-branches (2022-10-30) 8 commits
 - clone, submodule update: create and check out branches
 - submodule--helper: remove update_data.suboid
 - submodule update: refactor update targets
 - submodule: return target of submodule symref
 - t5617: drop references to remote-tracking branches
 - submodule--helper clone: create named branch
 - repo-settings: add submodule_propagate_branches
 - clone: teach --detach option

 "git clone --recurse-submodules" and "git submodule update" learns
 to honor the "propagete branches" option.

 Waiting for review on the updated round.
 source: <pull.1321.v3.git.git.1666988096.gitgitgadget@gmail.com>


* pw/config-int-parse-fixes (2022-11-09) 3 commits
 - git_parse_signed(): avoid integer overflow
 - config: require at least one digit when parsing numbers
 - git_parse_unsigned: reject negative values

 Assorted fixes of parsing end-user input as integers.

 Will merge to 'next'?
 cf. <Y1L+Qv+cs1bjqjK9@coredump.intra.peff.net>
 source: <pull.1389.v2.git.1668003388.gitgitgadget@gmail.com>


* cc/filtered-repack (2022-10-25) 2 commits
 - repack: add --filter=<filter-spec> option
 - pack-objects: allow --filter without --stdout

 "git repack" learns to discard objects that ought to be retrievable
 again from the promissor remote.

 Needs review.
 source: <20221025122856.20204-1-christian.couder@gmail.com>


* mc/credential-helper-auth-headers (2022-11-02) 11 commits
 - t5556: add HTTP authentication tests
 - test-http-server: add simple authentication
 - test-http-server: pass Git requests to http-backend
 - test-http-server: add HTTP request parsing
 - test-http-server: add HTTP error response function
 - test-http-server: add stub HTTP server test helper
 - http: set specific auth scheme depending on credential
 - http: move proactive auth to first slot creation
 - http: store all request headers on active_request_slot
 - credential: add WWW-Authenticate header to cred requests
 - http: read HTTP WWW-Authenticate response headers

 Extending credential helper protocol.

 Needs review.
 source: <pull.1352.v3.git.1667426969.gitgitgadget@gmail.com>


* hl/archive-recursive (2022-10-19) 10 commits
 . fixup! archive: add tests for git archive --recurse-submodules
 . archive: add tests for git archive --recurse-submodules
 . archive: add --recurse-submodules to git-archive command
 . archive: remove global repository from archive_args
 . archive: pass repo objects to write_archive handlers
 . tree: add repository parameter to read_tree_fn_t
 . tree: handle submodule case for read_tree_at properly
 . tree: increase test coverage for tree.c
 . tree: update cases to use repo_ tree methods
 . tree: do not use the_repository for tree traversal methods.

 "git archive" has been taught "--recurse-submodules" option to
 create a tarball that includes contents from submodules.

 Expecting a reroll.
 Seems to break win+VS test(8).
 cf. https://github.com/git/git/actions/runs/3293333066 whose only
 difference from https://github.com/git/git/actions/runs/3293553109
 is the inclusion of this topic.
 source: <pull.1359.v3.git.git.1665973401.gitgitgadget@gmail.com>


* pw/test-todo (2022-10-06) 3 commits
 . test_todo: allow [verbose] test as the command
 . test_todo: allow [!] grep as the command
 . tests: add test_todo() to mark known breakages

 RFC for test framework improvement.

 Needs review.
 source: <pull.1374.git.1665068476.gitgitgadget@gmail.com>


* ab/coccicheck-incremental (2022-11-11) 14 commits
  (merged to 'next' on 2022-11-14 at 8a70133571)
 + Makefile: don't create a ".build/.build/" for cocci, fix output
  (merged to 'next' on 2022-11-08 at 0f3c55d4c2)
 + spatchcache: add a ccache-alike for "spatch"
 + cocci: run against a generated ALL.cocci
 + cocci rules: remove <id>'s from rules that don't need them
 + Makefile: copy contrib/coccinelle/*.cocci to build/
 + cocci: optimistically use COMPUTE_HEADER_DEPENDENCIES
 + cocci: make "coccicheck" rule incremental
 + cocci: split off "--all-includes" from SPATCH_FLAGS
 + cocci: split off include-less "tests" from SPATCH_FLAGS
 + Makefile: split off SPATCH_BATCH_SIZE comment from "cocci" heading
 + Makefile: have "coccicheck" re-run if flags change
 + Makefile: add ability to TAB-complete cocci *.patch rules
 + cocci rules: remove unused "F" metavariable from pending rule
 + Makefile + shared.mak: rename and indent $(QUIET_SPATCH_T)

 "make coccicheck" is time consuming. It has been made to run more
 incrementally.

 Will cook in 'next'.
 source: <221109.86tu38p1x8.gmgdl@evledraar.gmail.com>
 source: <cover-v5-00.13-00000000000-20221101T222616Z-avarab@gmail.com>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: What's cooking in git.git (Nov 2022, #04; Fri, 18)
  2022-11-19  2:22 What's cooking in git.git (Nov 2022, #04; Fri, 18) Taylor Blau
@ 2022-11-20 11:24 ` SZEDER Gábor
  2022-11-20 17:42 ` Looking for a review (pretty-formats, hard truncation), was What's cooking in git.git (Nov 2022, #04; Fri, 18)) Philip Oakley
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 22+ messages in thread
From: SZEDER Gábor @ 2022-11-20 11:24 UTC (permalink / raw)
  To: Taylor Blau; +Cc: git

On Fri, Nov 18, 2022 at 09:22:28PM -0500, Taylor Blau wrote:
> * sg/plug-line-log-leaks (2022-11-02) 3 commits
>  - diff.c: use diff_free_queue()
>  - line-log: free the diff queues' arrays when processing merge commits
>  - line-log: free diff queue when processing non-merge commits
> 
>  A handful of leaks in the line-log machinery have been plugged.
> 
>  Expecting a reroll.
>  source: <20221102220142.574890-1-szeder.dev@gmail.com>

I thought no reroll was necessary, because in

  https://public-inbox.org/git/Y2m7gielFOvTYbvi@nand.local/

you said "Let's start merging this down."

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Looking for a review (pretty-formats, hard truncation), was What's cooking in git.git (Nov 2022, #04; Fri, 18))
  2022-11-19  2:22 What's cooking in git.git (Nov 2022, #04; Fri, 18) Taylor Blau
  2022-11-20 11:24 ` SZEDER Gábor
@ 2022-11-20 17:42 ` Philip Oakley
  2022-11-21  0:37   ` Junio C Hamano
  2022-11-20 19:46 ` What's cooking in git.git (Nov 2022, #04; Fri, 18) Phillip Wood
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 22+ messages in thread
From: Philip Oakley @ 2022-11-20 17:42 UTC (permalink / raw)
  To: git; +Cc: Taylor Blau

Ping, Hopefully an easy single patch review for someone on-list.

Patch [v4] itself:
https://lore.kernel.org/git/20221112143616.1429-1-philipoakley@iee.email/

Available at: https://github.com/ttaylorr/git/tree/po/pretty-hard-trunc

On 19/11/2022 02:22, Taylor Blau wrote:
> --------------------------------------------------
> [Cooking]
>
> * po/pretty-hard-trunc (2022-11-13) 1 commit
>  - pretty-formats: add hard truncation, without ellipsis, options
>
>  Add a new pretty format which truncates without ellipsis.
>
>  Waiting for review.
>  source: <20221112143616.1429-1-philipoakley@iee.email>

Potential review points:

Is the commit message sufficient?
Are the tests: Sufficient,  Complete, Correct ?
Is `qz_to_tab_space` conversion applied correctly?

--
Philip

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: What's cooking in git.git (Nov 2022, #04; Fri, 18)
  2022-11-19  2:22 What's cooking in git.git (Nov 2022, #04; Fri, 18) Taylor Blau
  2022-11-20 11:24 ` SZEDER Gábor
  2022-11-20 17:42 ` Looking for a review (pretty-formats, hard truncation), was What's cooking in git.git (Nov 2022, #04; Fri, 18)) Philip Oakley
@ 2022-11-20 19:46 ` Phillip Wood
  2022-11-20 21:24   ` Johannes Schindelin
  2022-11-20 21:45 ` Junio C Hamano
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 22+ messages in thread
From: Phillip Wood @ 2022-11-20 19:46 UTC (permalink / raw)
  To: Taylor Blau, git

Hi Taylor

On 19/11/2022 02:22, Taylor Blau wrote:
> * ab/various-leak-fixes (2022-11-08) 18 commits
>    (merged to 'next' on 2022-11-18 at 8828bb7161)
>   + built-ins: use free() not UNLEAK() if trivial, rm dead code
>   + revert: fix parse_options_concat() leak
>   + cherry-pick: free "struct replay_opts" members
>   + rebase: don't leak on "--abort"
>   + connected.c: free the "struct packed_git"
>   + sequencer.c: fix "opts->strategy" leak in read_strategy_opts()
>   + ls-files: fix a --with-tree memory leak
>   + revision API: call graph_clear() in release_revisions()
>   + unpack-file: fix ancient leak in create_temp_file()
>   + built-ins & libs & helpers: add/move destructors, fix leaks
>   + dir.c: free "ident" and "exclude_per_dir" in "struct untracked_cache"
>   + read-cache.c: clear and free "sparse_checkout_patterns"
>   + commit: discard partial cache before (re-)reading it
>   + {reset,merge}: call discard_index() before returning
>   + tests: mark tests as passing with SANITIZE=leak
>   + Merge branch 'pw/rebase-no-reflog-action' into ab/various-leak-fixes
>   + rebase: stop exporting GIT_REFLOG_ACTION
>   + sequencer: stop exporting GIT_REFLOG_ACTION
>   (this branch is used by ab/merge-index-prep.)
> 
>   Various leak fixes.
> 
>   Will merge to 'master'.
>   source: <cover-v2-00.15-00000000000-20221108T172650Z-avarab@gmail.com>

Below pw/rabse-no-reflog-action is marked for cooking in next but it 
will be merged to master if you merge this series to master.

Best Wishes

Phillip

> * pw/rebase-no-reflog-action (2022-11-09) 2 commits
>    (merged to 'next' on 2022-11-14 at 790dadc8d3)
>   + rebase: stop exporting GIT_REFLOG_ACTION
>   + sequencer: stop exporting GIT_REFLOG_ACTION
>   (this branch is used by ab/merge-index-prep.)
> 
>   Avoid setting GIT_REFLOG_ACTION to improve readability of the
>   sequencer internals.
> 
>   Will cook in 'next'.
>   source: <31df037eafede799c2ef27df66c6da309b719b1b.1668003719.git.gitgitgadget@gmail.com>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: What's cooking in git.git (Nov 2022, #04; Fri, 18)
  2022-11-20 19:46 ` What's cooking in git.git (Nov 2022, #04; Fri, 18) Phillip Wood
@ 2022-11-20 21:24   ` Johannes Schindelin
  2022-11-21  0:47     ` Junio C Hamano
  2022-11-22 14:58     ` Phillip Wood
  0 siblings, 2 replies; 22+ messages in thread
From: Johannes Schindelin @ 2022-11-20 21:24 UTC (permalink / raw)
  To: phillip.wood; +Cc: Taylor Blau, git

[-- Attachment #1: Type: text/plain, Size: 3692 bytes --]

Hi Phillip & Taylor,

On Sun, 20 Nov 2022, Phillip Wood wrote:

> Hi Taylor
>
> On 19/11/2022 02:22, Taylor Blau wrote:
> > * ab/various-leak-fixes (2022-11-08) 18 commits
> >   (merged to 'next' on 2022-11-18 at 8828bb7161)
> >   + built-ins: use free() not UNLEAK() if trivial, rm dead code
> >   + revert: fix parse_options_concat() leak
> >   + cherry-pick: free "struct replay_opts" members
> >   + rebase: don't leak on "--abort"
> >   + connected.c: free the "struct packed_git"
> >   + sequencer.c: fix "opts->strategy" leak in read_strategy_opts()
> >   + ls-files: fix a --with-tree memory leak
> >   + revision API: call graph_clear() in release_revisions()
> >   + unpack-file: fix ancient leak in create_temp_file()
> >   + built-ins & libs & helpers: add/move destructors, fix leaks
> >   + dir.c: free "ident" and "exclude_per_dir" in "struct untracked_cache"
> >   + read-cache.c: clear and free "sparse_checkout_patterns"
> >   + commit: discard partial cache before (re-)reading it
> >   + {reset,merge}: call discard_index() before returning
> >   + tests: mark tests as passing with SANITIZE=leak
> >   + Merge branch 'pw/rebase-no-reflog-action' into ab/various-leak-fixes
> >   + rebase: stop exporting GIT_REFLOG_ACTION
> >   + sequencer: stop exporting GIT_REFLOG_ACTION
> >   (this branch is used by ab/merge-index-prep.)
> >
> >   Various leak fixes.
> >
> >   Will merge to 'master'.
> >   source: <cover-v2-00.15-00000000000-20221108T172650Z-avarab@gmail.com>
>
> Below pw/rabse-no-reflog-action is marked for cooking in next but it will be
> merged to master if you merge this series to master.

Not only that. `ab/various-leak-fixes` still merges an older iteration:

-- snip --
$ git range-diff ttaylorr/ab/various-leak-fixes~15^2...ttaylorr/pw/rebase-no-reflog-action
1:  d6f756b0d66f ! 1:  d188a60d7228 sequencer: stop exporting GIT_REFLOG_ACTION
    @@ Commit message
         pass the reflog action around in a variable and use it to set
         GIT_REFLOG_ACTION in the child environment when running "git commit".

    +    Within the sequencer GIT_REFLOG_ACTION is no longer set and is only read
    +    by sequencer_reflog_action(). It is still set by rebase before calling
    +    the sequencer, that will be addressed in the next commit. cherry-pick
    +    and revert are unaffected as they do not set GIT_REFLOG_ACTION before
    +    calling the sequencer.
    +
         Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
    +    Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
         Signed-off-by: Taylor Blau <me@ttaylorr.com>

      ## sequencer.c ##
2:  be0a662f863c ! 2:  0e34efb31d89 rebase: stop exporting GIT_REFLOG_ACTION
    @@ Commit message
         reflog_action.

         Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
    +    Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
         Signed-off-by: Taylor Blau <me@ttaylorr.com>

      ## builtin/rebase.c ##
-- snap --

And that superseded iteration of `pw/rebase-no-reflog-action` _did_ hit
`next`.

Ciao,
Dscho

>
> Best Wishes
>
> Phillip
>
> > * pw/rebase-no-reflog-action (2022-11-09) 2 commits
> >   (merged to 'next' on 2022-11-14 at 790dadc8d3)
> >   + rebase: stop exporting GIT_REFLOG_ACTION
> >   + sequencer: stop exporting GIT_REFLOG_ACTION
> >   (this branch is used by ab/merge-index-prep.)
> >
> >   Avoid setting GIT_REFLOG_ACTION to improve readability of the
> >   sequencer internals.
> >
> >   Will cook in 'next'.
> >   source:
> >   <31df037eafede799c2ef27df66c6da309b719b1b.1668003719.git.gitgitgadget@gmail.com>
>
>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: What's cooking in git.git (Nov 2022, #04; Fri, 18)
  2022-11-19  2:22 What's cooking in git.git (Nov 2022, #04; Fri, 18) Taylor Blau
                   ` (2 preceding siblings ...)
  2022-11-20 19:46 ` What's cooking in git.git (Nov 2022, #04; Fri, 18) Phillip Wood
@ 2022-11-20 21:45 ` Junio C Hamano
  2022-11-20 23:51   ` Taylor Blau
  2022-11-20 23:24 ` Junio C Hamano
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 22+ messages in thread
From: Junio C Hamano @ 2022-11-20 21:45 UTC (permalink / raw)
  To: Taylor Blau; +Cc: git

Taylor Blau <me@ttaylorr.com> writes:

> 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.  A topic without enough support may be
> discarded after a long period of no activity.
>
> Junio appears to be back online, so I expect this will be my last
> push-out as interim maintainer. Thanks, everybody, for all of their
> patience while I juggled all of the merges.

s|appears to be|& ready to come|

My immediate goal for the coming few days before tagging -rc0 is to
catch up with topics you have collected and described here, become
familiar enough to be able to tell which ones in 'next' are for the
upcoming release.

Thanks again for taking good care of the project.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: What's cooking in git.git (Nov 2022, #04; Fri, 18)
  2022-11-19  2:22 What's cooking in git.git (Nov 2022, #04; Fri, 18) Taylor Blau
                   ` (3 preceding siblings ...)
  2022-11-20 21:45 ` Junio C Hamano
@ 2022-11-20 23:24 ` Junio C Hamano
  2022-11-20 23:52   ` Taylor Blau
  2022-11-21  0:10 ` Junio C Hamano
  2022-11-21 22:22 ` ab/submodule-no-abspath (was Re: What's cooking in git.git (Nov 2022, #04; Fri, 18)) Glen Choo
  6 siblings, 1 reply; 22+ messages in thread
From: Junio C Hamano @ 2022-11-20 23:24 UTC (permalink / raw)
  To: Taylor Blau; +Cc: git

Taylor Blau <me@ttaylorr.com> writes:

> * ab/various-leak-fixes (2022-11-08) 18 commits
>   (merged to 'next' on 2022-11-18 at 8828bb7161)
>  ...
>  (this branch is used by ab/merge-index-prep.)

> * pw/rebase-no-reflog-action (2022-11-09) 2 commits
>   (merged to 'next' on 2022-11-14 at 790dadc8d3)
>  ...
>  (this branch is used by ab/merge-index-prep.)

The other topic referred to is not described anywhere, and not part
of 'seen'.  Intended?

Thanks.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: What's cooking in git.git (Nov 2022, #04; Fri, 18)
  2022-11-20 21:45 ` Junio C Hamano
@ 2022-11-20 23:51   ` Taylor Blau
  0 siblings, 0 replies; 22+ messages in thread
From: Taylor Blau @ 2022-11-20 23:51 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Taylor Blau, git

On Sun, Nov 20, 2022 at 01:45:11PM -0800, Junio C Hamano wrote:
> My immediate goal for the coming few days before tagging -rc0 is to
> catch up with topics you have collected and described here, become
> familiar enough to be able to tell which ones in 'next' are for the
> upcoming release.

Welcome back :-). Since I am now offline-ish, hopefully the descriptions
in the latest "What's Cooking" report are sufficient to familiarize you
with the topics in-flight.

But if you need/want a clarification on any of them, don't hesitate to
ask.

> Thanks again for taking good care of the project.

It was my pleasure.

Thanks,
Taylor

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: What's cooking in git.git (Nov 2022, #04; Fri, 18)
  2022-11-20 23:24 ` Junio C Hamano
@ 2022-11-20 23:52   ` Taylor Blau
  2022-11-21  3:36     ` Junio C Hamano
  0 siblings, 1 reply; 22+ messages in thread
From: Taylor Blau @ 2022-11-20 23:52 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Taylor Blau, git

On Mon, Nov 21, 2022 at 08:24:21AM +0900, Junio C Hamano wrote:
> Taylor Blau <me@ttaylorr.com> writes:
>
> > * ab/various-leak-fixes (2022-11-08) 18 commits
> >   (merged to 'next' on 2022-11-18 at 8828bb7161)
> >  ...
> >  (this branch is used by ab/merge-index-prep.)
>
> > * pw/rebase-no-reflog-action (2022-11-09) 2 commits
> >   (merged to 'next' on 2022-11-14 at 790dadc8d3)
> >  ...
> >  (this branch is used by ab/merge-index-prep.)
>
> The other topic referred to is not described anywhere, and not part
> of 'seen'.  Intended?

It was merged intentionally via 790dadc8d3 (Merge branch
'pw/rebase-no-reflog-action' into next, 2022-11-14) as you note, though
I'm not sure why the description from 790dadc8d3 didn't make it into the
WC report.

In any case, the description I went with is:

    Avoid setting GIT_REFLOG_ACTION to improve readability of the
    sequencer internals.

Thanks,
Taylor

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: What's cooking in git.git (Nov 2022, #04; Fri, 18)
  2022-11-19  2:22 What's cooking in git.git (Nov 2022, #04; Fri, 18) Taylor Blau
                   ` (4 preceding siblings ...)
  2022-11-20 23:24 ` Junio C Hamano
@ 2022-11-21  0:10 ` Junio C Hamano
  2022-11-21  0:16   ` Taylor Blau
  2022-11-21 22:22 ` ab/submodule-no-abspath (was Re: What's cooking in git.git (Nov 2022, #04; Fri, 18)) Glen Choo
  6 siblings, 1 reply; 22+ messages in thread
From: Junio C Hamano @ 2022-11-21  0:10 UTC (permalink / raw)
  To: Taylor Blau; +Cc: git

Another question.  

Quite a many topics are marked as "Will cook in 'next'".  After we
go into the pre-release feature freeze period, most topics in 'next'
are marked as such, and are expected to stay there until the final,
but as we are yet to tag -rc0, I am a bit puzzled.

Are there concrete exit criteria for them?  Or are they, at this
very close to -rc0, already judged to be a bit premature for the
upcoming release so I can safely keep them in 'next' until the
final?

Thanks.




^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: What's cooking in git.git (Nov 2022, #04; Fri, 18)
  2022-11-21  0:10 ` Junio C Hamano
@ 2022-11-21  0:16   ` Taylor Blau
  2022-11-23  0:03     ` Junio C Hamano
  0 siblings, 1 reply; 22+ messages in thread
From: Taylor Blau @ 2022-11-21  0:16 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Taylor Blau, Ævar Arnfjörð Bjarmason, git

On Mon, Nov 21, 2022 at 09:10:53AM +0900, Junio C Hamano wrote:
> Another question.
>
> Quite a many topics are marked as "Will cook in 'next'".  After we
> go into the pre-release feature freeze period, most topics in 'next'
> are marked as such, and are expected to stay there until the final,
> but as we are yet to tag -rc0, I am a bit puzzled.
>
> Are there concrete exit criteria for them?  Or are they, at this
> very close to -rc0, already judged to be a bit premature for the
> upcoming release so I can safely keep them in 'next' until the
> final?

Anything merged on 2022-11-14 or 2022-11-15 is ready to go to 'master',
in my opinion. I held off on integrating them into 'master' on the 18th
since they hadn't been in 'next' for that long. Though I think all of
those topics are pretty low risk anyway. So I would recommend merging
down all of those into 'master' before cutting -rc0 next week.

These are the topics I'd feel comfortable merging down before the
release candidate:

 + pw/rebase-no-reflog-action                                   11-09/11-14    #2
 + pw/strict-label-lookups                                      11-10/11-14    #2
 + dd/bisect-helper-subcommand                                  11-11/11-14    #3
 + js/remove-stale-scalar-repos                                 11-11/11-14    #2
 + ab/coccicheck-incremental                                    11-11/11-14   #14
 + kz/merge-tree-merge-base                                     11-12/11-14    #2
 + ab/t7610-timeout                                             11-15/11-15    #2
 + dd/git-bisect-builtin                                        11-15/11-15   #13
 + rp/maintenance-qol                                           11-15/11-15    #4

I also feel comfortable with these (below), but they are newer topics
than above. I would like to see at least ps/receive-use-only-advertised
in this release, since it saw the most comprehensive review of any of
these.

 + mh/gitcredentials-generate                                   11-14/11-18    #1
 + jt/submodule-on-demand                                       11-14/11-18    #1
 + ps/receive-use-only-advertised                               11-17/11-18    #7
 + jk/parse-object-type-mismatch                                11-18/11-18    #2

These ones I am not as sure about, though Ævar (cc'd) will probably try
and tell you they're ready to go ;-).

 + ab/cmake-nix-and-ci                                          11-04/11-08   #14
 + ab/submodule-helper-prep-only                                11-08/11-08    #9

Thanks,
Taylor

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Looking for a review (pretty-formats, hard truncation), was What's cooking in git.git (Nov 2022, #04; Fri, 18))
  2022-11-20 17:42 ` Looking for a review (pretty-formats, hard truncation), was What's cooking in git.git (Nov 2022, #04; Fri, 18)) Philip Oakley
@ 2022-11-21  0:37   ` Junio C Hamano
  2022-11-21 18:10     ` Philip Oakley
  0 siblings, 1 reply; 22+ messages in thread
From: Junio C Hamano @ 2022-11-21  0:37 UTC (permalink / raw)
  To: Philip Oakley; +Cc: git, Taylor Blau

Philip Oakley <philipoakley@iee.email> writes:

> Ping, Hopefully an easy single patch review for someone on-list.
>
> Potential review points:
>
> Is the commit message sufficient?
> Are the tests: Sufficient, Complete, Correct ?
> Is `qz_to_tab_space` conversion applied correctly?

Is the feature and the design sensible?

Are the tests checking interesting cases?  The underlying mechanism
uses strbuf_utf8_replace() because there are character strings whose
display columns do not match their byte length (otherwise you can
just use strlen() and chomp at byte boundary), so a test whose
result would be different if strbuf_utf8_replace() were replaced
with a more naive strbuf_splice() would be valuable and meaningful.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: What's cooking in git.git (Nov 2022, #04; Fri, 18)
  2022-11-20 21:24   ` Johannes Schindelin
@ 2022-11-21  0:47     ` Junio C Hamano
  2022-11-21  1:00       ` Taylor Blau
  2022-11-22 14:58     ` Phillip Wood
  1 sibling, 1 reply; 22+ messages in thread
From: Junio C Hamano @ 2022-11-21  0:47 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: phillip.wood, Taylor Blau, git

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> Not only that. `ab/various-leak-fixes` still merges an older iteration:
>
> -- snip --
> $ git range-diff ttaylorr/ab/various-leak-fixes~15^2...ttaylorr/pw/rebase-no-reflog-action
> 1:  d6f756b0d66f ! 1:  d188a60d7228 sequencer: stop exporting GIT_REFLOG_ACTION
>     @@ Commit message
>          pass the reflog action around in a variable and use it to set
>          GIT_REFLOG_ACTION in the child environment when running "git commit".
>
>     +    Within the sequencer GIT_REFLOG_ACTION is no longer set and is only read
>     +    by sequencer_reflog_action(). It is still set by rebase before calling
>     +    the sequencer, that will be addressed in the next commit. cherry-pick
>     +    and revert are unaffected as they do not set GIT_REFLOG_ACTION before
>     +    calling the sequencer.
>     +
>          Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
>     +    Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
>          Signed-off-by: Taylor Blau <me@ttaylorr.com>
>
>       ## sequencer.c ##
> 2:  be0a662f863c ! 2:  0e34efb31d89 rebase: stop exporting GIT_REFLOG_ACTION
>     @@ Commit message
>          reflog_action.
>
>          Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
>     +    Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
>          Signed-off-by: Taylor Blau <me@ttaylorr.com>
>
>       ## builtin/rebase.c ##
> -- snap --
>
> And that superseded iteration of `pw/rebase-no-reflog-action` _did_ hit
> `next`.

Thanks, all.

So in short, we should

 * revert the merge of ab/various-leak-fixes to 'next'

 * rebuild ab/various-leak-fixes using the updated iteration of the
   other topic

 * merge rebuilt ab/various-leak-fixes to 'next'.

in this order.



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: What's cooking in git.git (Nov 2022, #04; Fri, 18)
  2022-11-21  0:47     ` Junio C Hamano
@ 2022-11-21  1:00       ` Taylor Blau
  0 siblings, 0 replies; 22+ messages in thread
From: Taylor Blau @ 2022-11-21  1:00 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Johannes Schindelin, phillip.wood, git

On Mon, Nov 21, 2022 at 09:47:23AM +0900, Junio C Hamano wrote:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
> > Not only that. `ab/various-leak-fixes` still merges an older iteration:
> >
> > -- snip --
> > $ git range-diff ttaylorr/ab/various-leak-fixes~15^2...ttaylorr/pw/rebase-no-reflog-action
> > 1:  d6f756b0d66f ! 1:  d188a60d7228 sequencer: stop exporting GIT_REFLOG_ACTION
> >     @@ Commit message
> >          pass the reflog action around in a variable and use it to set
> >          GIT_REFLOG_ACTION in the child environment when running "git commit".
> >
> >     +    Within the sequencer GIT_REFLOG_ACTION is no longer set and is only read
> >     +    by sequencer_reflog_action(). It is still set by rebase before calling
> >     +    the sequencer, that will be addressed in the next commit. cherry-pick
> >     +    and revert are unaffected as they do not set GIT_REFLOG_ACTION before
> >     +    calling the sequencer.
> >     +
> >          Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
> >     +    Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> >          Signed-off-by: Taylor Blau <me@ttaylorr.com>
> >
> >       ## sequencer.c ##
> > 2:  be0a662f863c ! 2:  0e34efb31d89 rebase: stop exporting GIT_REFLOG_ACTION
> >     @@ Commit message
> >          reflog_action.
> >
> >          Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
> >     +    Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> >          Signed-off-by: Taylor Blau <me@ttaylorr.com>
> >
> >       ## builtin/rebase.c ##
> > -- snap --
> >
> > And that superseded iteration of `pw/rebase-no-reflog-action` _did_ hit
> > `next`.

> Thanks, all.

Indeed, thanks for catching, Johannes -- I could have sworn that I
rebuilt Ævar's topic when I got a new version of
pw/rebase-no-reflog-action, but apparently not. Sorry about that.

> So in short, we should
>
>  * revert the merge of ab/various-leak-fixes to 'next'
>
>  * rebuild ab/various-leak-fixes using the updated iteration of the
>    other topic
>
>  * merge rebuilt ab/various-leak-fixes to 'next'.

Yep, that will do the trick. Sorry for the extra juggling.

Thanks,
Taylor

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: What's cooking in git.git (Nov 2022, #04; Fri, 18)
  2022-11-20 23:52   ` Taylor Blau
@ 2022-11-21  3:36     ` Junio C Hamano
  2022-11-22 22:56       ` Taylor Blau
  0 siblings, 1 reply; 22+ messages in thread
From: Junio C Hamano @ 2022-11-21  3:36 UTC (permalink / raw)
  To: Taylor Blau; +Cc: git

Taylor Blau <me@ttaylorr.com> writes:

> On Mon, Nov 21, 2022 at 08:24:21AM +0900, Junio C Hamano wrote:
>> Taylor Blau <me@ttaylorr.com> writes:
>>
>> > * ab/various-leak-fixes (2022-11-08) 18 commits
>> >   (merged to 'next' on 2022-11-18 at 8828bb7161)
>> >  ...
>> >  (this branch is used by ab/merge-index-prep.)
>>
>> > * pw/rebase-no-reflog-action (2022-11-09) 2 commits
>> >   (merged to 'next' on 2022-11-14 at 790dadc8d3)
>> >  ...
>> >  (this branch is used by ab/merge-index-prep.)
>>
>> The other topic referred to is not described anywhere, and not part
>> of 'seen'.  Intended?
>
> It was merged intentionally via 790dadc8d3 (Merge branch
> 'pw/rebase-no-reflog-action' into next, 2022-11-14) as you note, though
> I'm not sure why the description from 790dadc8d3 didn't make it into the
> WC report.
>
> In any case, the description I went with is:
>
>     Avoid setting GIT_REFLOG_ACTION to improve readability of the
>     sequencer internals.

Sorry, but the question was about ab/merge-index-prep that does not
exist in the report and not in 'seen'.

For now, I'll ignore that phantom user of these two topics.  It can
come back when dust settles ;-).

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Looking for a review (pretty-formats, hard truncation), was What's cooking in git.git (Nov 2022, #04; Fri, 18))
  2022-11-21  0:37   ` Junio C Hamano
@ 2022-11-21 18:10     ` Philip Oakley
  0 siblings, 0 replies; 22+ messages in thread
From: Philip Oakley @ 2022-11-21 18:10 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Taylor Blau

Hi Junio,

On 21/11/2022 00:37, Junio C Hamano wrote:
> Philip Oakley <philipoakley@iee.email> writes:
>
>> Ping, Hopefully an easy single patch review for someone on-list.
>>
>> Potential review points:
>>
>> Is the commit message sufficient?
>> Are the tests: Sufficient, Complete, Correct ?
>> Is `qz_to_tab_space` conversion applied correctly?
> Is the feature and the design sensible?
>
> Are the tests checking interesting cases?  The underlying mechanism
> uses strbuf_utf8_replace() because there are character strings whose
> display columns do not match their byte length (otherwise you can
> just use strlen() and chomp at byte boundary), so a test whose
> result would be different if strbuf_utf8_replace() were replaced
> with a more naive strbuf_splice() would be valuable and meaningful.

The tests do include those  utf8 cases. They are in the existing t/txxxx
tests that specifically cover the utf8 non-English characters. I did
check how they were constructed and what they were doing to confirm
expectations.

Were you thinking that an extra comment would be useful in the commit
message to confirm the completeness of the existing tests?

--
Philip

^ permalink raw reply	[flat|nested] 22+ messages in thread

* ab/submodule-no-abspath (was Re: What's cooking in git.git (Nov 2022, #04; Fri, 18))
  2022-11-19  2:22 What's cooking in git.git (Nov 2022, #04; Fri, 18) Taylor Blau
                   ` (5 preceding siblings ...)
  2022-11-21  0:10 ` Junio C Hamano
@ 2022-11-21 22:22 ` Glen Choo
  2022-11-22 22:45   ` [PATCH] submodule absorbgitdirs: use relative <from> and <to> paths Ævar Arnfjörð Bjarmason
  6 siblings, 1 reply; 22+ messages in thread
From: Glen Choo @ 2022-11-21 22:22 UTC (permalink / raw)
  To: Taylor Blau, git; +Cc: Ævar Arnfjörð Bjarmason

Taylor Blau <me@ttaylorr.com> writes:

> * ab/submodule-no-abspath (2022-11-09) 1 commit
>   (merged to 'next' on 2022-11-18 at 34d0accc7b)
>  + submodule--helper absorbgitdirs: no abspaths in "Migrating git..."
>  (this branch is used by ab/remove--super-prefix.)
>
>  Remove an absolute path in the "Migrating git directory" message.
>
>  Will merge to 'master'.
>  source: <patch-1.1-34b54fdd9bb-20221109T020347Z-avarab@gmail.com>
>

(Sorry, I should have spoken up before this got merged to 'next'.)

I have some reservations about this that I mentioned in [1], namely:

- Does this work correctly when using a worktree?
- If "absorbgitdirs" becomes consistent with other "git submodule"
  subcommands and prints relative paths to submodules, then this
  produces the wrong result.

We probably won't see any complaints about this for a while, since
submodules + worktrees are an uncommon combination, but I expect that
we'll have to revert this at some point.

[1] https://lore.kernel.org/git/kl6lmt8qv9gc.fsf@chooglen-macbookpro.roam.corp.google.com

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: What's cooking in git.git (Nov 2022, #04; Fri, 18)
  2022-11-20 21:24   ` Johannes Schindelin
  2022-11-21  0:47     ` Junio C Hamano
@ 2022-11-22 14:58     ` Phillip Wood
  1 sibling, 0 replies; 22+ messages in thread
From: Phillip Wood @ 2022-11-22 14:58 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Taylor Blau, git

On 20/11/2022 21:24, Johannes Schindelin wrote:
> Hi Phillip & Taylor,
> 
> On Sun, 20 Nov 2022, Phillip Wood wrote:
> 
>> Hi Taylor
>>
>> On 19/11/2022 02:22, Taylor Blau wrote:
>>> * ab/various-leak-fixes (2022-11-08) 18 commits
>>>    (merged to 'next' on 2022-11-18 at 8828bb7161)
>>>    + built-ins: use free() not UNLEAK() if trivial, rm dead code
>>>    + revert: fix parse_options_concat() leak
>>>    + cherry-pick: free "struct replay_opts" members
>>>    + rebase: don't leak on "--abort"
>>>    + connected.c: free the "struct packed_git"
>>>    + sequencer.c: fix "opts->strategy" leak in read_strategy_opts()
>>>    + ls-files: fix a --with-tree memory leak
>>>    + revision API: call graph_clear() in release_revisions()
>>>    + unpack-file: fix ancient leak in create_temp_file()
>>>    + built-ins & libs & helpers: add/move destructors, fix leaks
>>>    + dir.c: free "ident" and "exclude_per_dir" in "struct untracked_cache"
>>>    + read-cache.c: clear and free "sparse_checkout_patterns"
>>>    + commit: discard partial cache before (re-)reading it
>>>    + {reset,merge}: call discard_index() before returning
>>>    + tests: mark tests as passing with SANITIZE=leak
>>>    + Merge branch 'pw/rebase-no-reflog-action' into ab/various-leak-fixes
>>>    + rebase: stop exporting GIT_REFLOG_ACTION
>>>    + sequencer: stop exporting GIT_REFLOG_ACTION
>>>    (this branch is used by ab/merge-index-prep.)
>>>
>>>    Various leak fixes.
>>>
>>>    Will merge to 'master'.
>>>    source: <cover-v2-00.15-00000000000-20221108T172650Z-avarab@gmail.com>
>>
>> Below pw/rabse-no-reflog-action is marked for cooking in next but it will be
>> merged to master if you merge this series to master.
> 
> Not only that. `ab/various-leak-fixes` still merges an older iteration:

Thanks, I hadn't thought to check that

Best Wishes

Phillip

> -- snip --
> $ git range-diff ttaylorr/ab/various-leak-fixes~15^2...ttaylorr/pw/rebase-no-reflog-action
> 1:  d6f756b0d66f ! 1:  d188a60d7228 sequencer: stop exporting GIT_REFLOG_ACTION
>      @@ Commit message
>           pass the reflog action around in a variable and use it to set
>           GIT_REFLOG_ACTION in the child environment when running "git commit".
> 
>      +    Within the sequencer GIT_REFLOG_ACTION is no longer set and is only read
>      +    by sequencer_reflog_action(). It is still set by rebase before calling
>      +    the sequencer, that will be addressed in the next commit. cherry-pick
>      +    and revert are unaffected as they do not set GIT_REFLOG_ACTION before
>      +    calling the sequencer.
>      +
>           Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
>      +    Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
>           Signed-off-by: Taylor Blau <me@ttaylorr.com>
> 
>        ## sequencer.c ##
> 2:  be0a662f863c ! 2:  0e34efb31d89 rebase: stop exporting GIT_REFLOG_ACTION
>      @@ Commit message
>           reflog_action.
> 
>           Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
>      +    Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
>           Signed-off-by: Taylor Blau <me@ttaylorr.com>
> 
>        ## builtin/rebase.c ##
> -- snap --
> 
> And that superseded iteration of `pw/rebase-no-reflog-action` _did_ hit
> `next`.
> 
> Ciao,
> Dscho
> 
>>
>> Best Wishes
>>
>> Phillip
>>
>>> * pw/rebase-no-reflog-action (2022-11-09) 2 commits
>>>    (merged to 'next' on 2022-11-14 at 790dadc8d3)
>>>    + rebase: stop exporting GIT_REFLOG_ACTION
>>>    + sequencer: stop exporting GIT_REFLOG_ACTION
>>>    (this branch is used by ab/merge-index-prep.)
>>>
>>>    Avoid setting GIT_REFLOG_ACTION to improve readability of the
>>>    sequencer internals.
>>>
>>>    Will cook in 'next'.
>>>    source:
>>>    <31df037eafede799c2ef27df66c6da309b719b1b.1668003719.git.gitgitgadget@gmail.com>
>>
>>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH] submodule absorbgitdirs: use relative <from> and <to> paths
  2022-11-21 22:22 ` ab/submodule-no-abspath (was Re: What's cooking in git.git (Nov 2022, #04; Fri, 18)) Glen Choo
@ 2022-11-22 22:45   ` Ævar Arnfjörð Bjarmason
  2022-11-23  0:43     ` Glen Choo
  0 siblings, 1 reply; 22+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2022-11-22 22:45 UTC (permalink / raw)
  To: git
  Cc: Glen Choo, Taylor Blau, Junio C Hamano,
	Ævar Arnfjörð Bjarmason

When [1] changed the <from> and <to> paths to from absolute paths by
stripping away their common prefix we started displaying nonsensical
paths in cases where the "gitdir" wasn't "<worktree>/.git".

E.g. a repository at "/repos/repo.git" and a worktree at
"/worktrees/repo-main" would yield paths starting with
"worktrees/repo-main", as the only commonality was the initial "/".

It's harder to narrowly fix that problem than to just have
relocate_single_git_dir_into_superproject() display the same sorts of
paths we do for most other "submodule" commands. I.e. the "<to>"
should be relative to the "<from>" path, rather than relative to the
eventual superproject.

Let's do that, and add a test which checks that we're handling the
"git worktree" case properly. See [2] for the initial bug report.

1. a79e56cb0a6 (submodule--helper absorbgitdirs: no abspaths in
  "Migrating git...", 2022-11-09)
2. https://lore.kernel.org/git/kl6lmt8qv9gc.fsf@chooglen-macbookpro.roam.corp.google.com/

Reported-by: Glen Choo <chooglen@google.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---

On Mon, Nov 21 2022, Glen Choo wrote:

> Taylor Blau <me@ttaylorr.com> writes:
>
>> * ab/submodule-no-abspath (2022-11-09) 1 commit
>>   (merged to 'next' on 2022-11-18 at 34d0accc7b)
>>  + submodule--helper absorbgitdirs: no abspaths in "Migrating git..."
>>  (this branch is used by ab/remove--super-prefix.)
>>
>>  Remove an absolute path in the "Migrating git directory" message.
>>
>>  Will merge to 'master'.
>>  source: <patch-1.1-34b54fdd9bb-20221109T020347Z-avarab@gmail.com>
>>
>
> (Sorry, I should have spoken up before this got merged to 'next'.)
>
> I have some reservations about this that I mentioned in [1], namely:
>
> - Does this work correctly when using a worktree?
> - If "absorbgitdirs" becomes consistent with other "git submodule"
>   subcommands and prints relative paths to submodules, then this
>   produces the wrong result.
>
> We probably won't see any complaints about this for a while, since
> submodules + worktrees are an uncommon combination, but I expect that
> we'll have to revert this at some point.
>
> [1] https://lore.kernel.org/git/kl6lmt8qv9gc.fsf@chooglen-macbookpro.roam.corp.google.com

Hi, sorry about the delay in getting back to you on that. I think the
below should fix the bug you noted, and also improve the output in
general so we use the same sort of relative paths we use for other
"submodule" commands.

Branch & passing CI at:
https://github.com/avar/git/tree/avar/submodule--helper-absorbgitdirs-no-abspath-in-message-fixup

 submodule.c                        | 18 +++++++++++-------
 t/t7412-submodule-absorbgitdirs.sh | 25 ++++++++++++++++++++++---
 2 files changed, 33 insertions(+), 10 deletions(-)

diff --git a/submodule.c b/submodule.c
index c47358097fd..a464c99a27f 100644
--- a/submodule.c
+++ b/submodule.c
@@ -2271,9 +2271,12 @@ int validate_submodule_git_dir(char *git_dir, const char *submodule_name)
 static void relocate_single_git_dir_into_superproject(const char *path)
 {
 	char *old_git_dir = NULL, *real_old_git_dir = NULL, *real_new_git_dir = NULL;
+	char *rel_old_git_dir;
+	const char *rel_new_git_dir;
 	struct strbuf new_gitdir = STRBUF_INIT;
 	const struct submodule *sub;
-	size_t off = 0;
+	const char *super_prefix = get_super_prefix();
+	const char *sp = super_prefix ? super_prefix : "";
 
 	if (submodule_uses_worktrees(path))
 		die(_("relocate_gitdir for submodule '%s' with "
@@ -2285,6 +2288,7 @@ static void relocate_single_git_dir_into_superproject(const char *path)
 		return;
 
 	real_old_git_dir = real_pathdup(old_git_dir, 1);
+	rel_old_git_dir = xstrfmt("%s%s", sp, old_git_dir);
 
 	sub = submodule_from_path(the_repository, null_oid(), path);
 	if (!sub)
@@ -2293,23 +2297,23 @@ static void relocate_single_git_dir_into_superproject(const char *path)
 	submodule_name_to_gitdir(&new_gitdir, the_repository, sub->name);
 	if (validate_submodule_git_dir(new_gitdir.buf, sub->name) < 0)
 		die(_("refusing to move '%s' into an existing git dir"),
-		    real_old_git_dir);
+		    rel_old_git_dir);
 	if (safe_create_leading_directories_const(new_gitdir.buf) < 0)
 		die(_("could not create directory '%s'"), new_gitdir.buf);
+
 	real_new_git_dir = real_pathdup(new_gitdir.buf, 1);
+	rel_new_git_dir = relative_path(real_new_git_dir, real_old_git_dir,
+					&new_gitdir);
 
-	while (real_old_git_dir[off] && real_new_git_dir[off] &&
-	       real_old_git_dir[off] == real_new_git_dir[off])
-		off++;
 	fprintf(stderr, _("Migrating git directory of '%s%s' from '%s' to '%s'\n"),
-		get_super_prefix_or_empty(), path,
-		real_old_git_dir + off, real_new_git_dir + off);
+		sp, path, rel_old_git_dir, rel_new_git_dir);
 
 	relocate_gitdir(path, real_old_git_dir, real_new_git_dir);
 
 	free(old_git_dir);
 	free(real_old_git_dir);
 	free(real_new_git_dir);
+	free(rel_old_git_dir);
 	strbuf_release(&new_gitdir);
 }
 
diff --git a/t/t7412-submodule-absorbgitdirs.sh b/t/t7412-submodule-absorbgitdirs.sh
index a5cd6db7ac2..0afa0fe3a83 100755
--- a/t/t7412-submodule-absorbgitdirs.sh
+++ b/t/t7412-submodule-absorbgitdirs.sh
@@ -27,7 +27,7 @@ test_expect_success 'absorb the git dir' '
 	git status >expect.1 &&
 	git -C sub1 rev-parse HEAD >expect.2 &&
 	cat >expect <<-\EOF &&
-	Migrating git directory of '\''sub1'\'' from '\''sub1/.git'\'' to '\''.git/modules/sub1'\''
+	Migrating git directory of '\''sub1'\'' from '\''sub1/.git'\'' to '\''../../.git/modules/sub1'\''
 	EOF
 	git submodule absorbgitdirs 2>actual &&
 	test_cmp expect actual &&
@@ -64,7 +64,7 @@ test_expect_success 'absorb the git dir in a nested submodule' '
 	git status >expect.1 &&
 	git -C sub1/nested rev-parse HEAD >expect.2 &&
 	cat >expect <<-\EOF &&
-	Migrating git directory of '\''sub1/nested'\'' from '\''sub1/nested/.git'\'' to '\''.git/modules/sub1/modules/nested'\''
+	Migrating git directory of '\''sub1/nested'\'' from '\''sub1/nested/.git'\'' to '\''../../../.git/modules/sub1/modules/nested'\''
 	EOF
 	git submodule absorbgitdirs 2>actual &&
 	test_cmp expect actual &&
@@ -99,7 +99,7 @@ test_expect_success 'absorb the git dir in a nested submodule' '
 	git status >expect.1 &&
 	git -C sub1/nested rev-parse HEAD >expect.2 &&
 	cat >expect <<-\EOF &&
-	Migrating git directory of '\''sub1'\'' from '\''sub1/.git'\'' to '\''.git/modules/sub1'\''
+	Migrating git directory of '\''sub1'\'' from '\''sub1/.git'\'' to '\''../../.git/modules/sub1'\''
 	EOF
 	git submodule absorbgitdirs 2>actual &&
 	test_cmp expect actual &&
@@ -112,6 +112,25 @@ test_expect_success 'absorb the git dir in a nested submodule' '
 	test_cmp expect.2 actual.2
 '
 
+test_expect_success 'absorb the git dir outside of primary worktree' '
+	test_when_finished "rm -rf repo-bare.git" &&
+	git clone --bare . repo-bare.git &&
+	test_when_finished "rm -rf repo-wt" &&
+	git -C repo-bare.git worktree add ../repo-wt &&
+
+	test_when_finished "rm -f .gitconfig" &&
+	test_config_global protocol.file.allow always &&
+	git -C repo-wt submodule update --init &&
+	git init repo-wt/sub2 &&
+	test_commit -C repo-wt/sub2 A &&
+	git -C repo-wt submodule add ./sub2 sub2 &&
+	cat >expect <<-EOF &&
+	Migrating git directory of '\''sub2'\'' from '\''sub2/.git'\'' to '\''../../../repo-bare.git/worktrees/repo-wt/modules/sub2'\''
+	EOF
+	DO_IT=1 git -C repo-wt submodule absorbgitdirs 2>actual &&
+	test_cmp expect actual
+'
+
 test_expect_success 'setup a gitlink with missing .gitmodules entry' '
 	git init sub2 &&
 	test_commit -C sub2 first &&
-- 
2.38.0.1524.gdb7bac9ecc9


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: What's cooking in git.git (Nov 2022, #04; Fri, 18)
  2022-11-21  3:36     ` Junio C Hamano
@ 2022-11-22 22:56       ` Taylor Blau
  0 siblings, 0 replies; 22+ messages in thread
From: Taylor Blau @ 2022-11-22 22:56 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Taylor Blau, git

On Mon, Nov 21, 2022 at 12:36:36PM +0900, Junio C Hamano wrote:
> Taylor Blau <me@ttaylorr.com> writes:
>
> > On Mon, Nov 21, 2022 at 08:24:21AM +0900, Junio C Hamano wrote:
> >> Taylor Blau <me@ttaylorr.com> writes:
> >>
> >> > * ab/various-leak-fixes (2022-11-08) 18 commits
> >> >   (merged to 'next' on 2022-11-18 at 8828bb7161)
> >> >  ...
> >> >  (this branch is used by ab/merge-index-prep.)
> >>
> >> > * pw/rebase-no-reflog-action (2022-11-09) 2 commits
> >> >   (merged to 'next' on 2022-11-14 at 790dadc8d3)
> >> >  ...
> >> >  (this branch is used by ab/merge-index-prep.)
> >>
> >> The other topic referred to is not described anywhere, and not part
> >> of 'seen'.  Intended?
> >
> > It was merged intentionally via 790dadc8d3 (Merge branch
> > 'pw/rebase-no-reflog-action' into next, 2022-11-14) as you note, though
> > I'm not sure why the description from 790dadc8d3 didn't make it into the
> > WC report.
> >
> > In any case, the description I went with is:
> >
> >     Avoid setting GIT_REFLOG_ACTION to improve readability of the
> >     sequencer internals.
>
> Sorry, but the question was about ab/merge-index-prep that does not
> exist in the report and not in 'seen'.
>
> For now, I'll ignore that phantom user of these two topics.  It can
> come back when dust settles ;-).

Ah, yes, I remember this topic. It's from [1], and it does indeed use
ab/various-leak-fixes and pw/rebase-no-reflog-action (cf. [2]), which
apparently isn't quite sufficient (cf. [3]).

If I recall correctly, it had some conflicts when queuing, so I punted
on it (because at the time when [2] was written the correct base(s) were
not known).

Thanks,
Taylor

[1]: https://lore.kernel.org/git/cover-v9-00.12-00000000000-20221118T110058Z-avarab@gmail.com/
[2]: https://lore.kernel.org/git/Y3gVekgT7jLibjWo@nand.local/
[3]: https://lore.kernel.org/git/221119.86o7t3ds49.gmgdl@evledraar.gmail.com/

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: What's cooking in git.git (Nov 2022, #04; Fri, 18)
  2022-11-21  0:16   ` Taylor Blau
@ 2022-11-23  0:03     ` Junio C Hamano
  0 siblings, 0 replies; 22+ messages in thread
From: Junio C Hamano @ 2022-11-23  0:03 UTC (permalink / raw)
  To: Taylor Blau; +Cc: Ævar Arnfjörð Bjarmason, git

Taylor Blau <me@ttaylorr.com> writes:

> These are the topics I'd feel comfortable merging down before the
> release candidate:
>
>  + pw/rebase-no-reflog-action                                   11-09/11-14    #2
>  + pw/strict-label-lookups                                      11-10/11-14    #2
>  + dd/bisect-helper-subcommand                                  11-11/11-14    #3
>  + js/remove-stale-scalar-repos                                 11-11/11-14    #2
>  + ab/coccicheck-incremental                                    11-11/11-14   #14
>  + kz/merge-tree-merge-base                                     11-12/11-14    #2
>  + ab/t7610-timeout                                             11-15/11-15    #2
>  + dd/git-bisect-builtin                                        11-15/11-15   #13
>  + rp/maintenance-qol                                           11-15/11-15    #4
>
> I also feel comfortable with these (below), but they are newer topics
> than above. I would like to see at least ps/receive-use-only-advertised
> in this release, since it saw the most comprehensive review of any of
> these.
>
>  + mh/gitcredentials-generate                                   11-14/11-18    #1
>  + jt/submodule-on-demand                                       11-14/11-18    #1
>  + ps/receive-use-only-advertised                               11-17/11-18    #7
>  + jk/parse-object-type-mismatch                                11-18/11-18    #2
>
> These ones I am not as sure about, though Ævar (cc'd) will probably try
> and tell you they're ready to go ;-).
>
>  + ab/cmake-nix-and-ci                                          11-04/11-08   #14
>  + ab/submodule-helper-prep-only                                11-08/11-08    #9
>
> Thanks,
> Taylor


Thanks.  After trying to catch up with the in-flight topics, I
mostly agree with the above list.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH] submodule absorbgitdirs: use relative <from> and <to> paths
  2022-11-22 22:45   ` [PATCH] submodule absorbgitdirs: use relative <from> and <to> paths Ævar Arnfjörð Bjarmason
@ 2022-11-23  0:43     ` Glen Choo
  0 siblings, 0 replies; 22+ messages in thread
From: Glen Choo @ 2022-11-23  0:43 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason, git
  Cc: Taylor Blau, Junio C Hamano, Ævar Arnfjörð Bjarmason

I think we might be better off reverting a79e56cb0a6 than trying to fix
forward. But before getting into that, thanks for reading the report and
sending a fix :)

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

Rearranging the thread slightly,

>> - If "absorbgitdirs" becomes consistent with other "git submodule"
>>   subcommands and prints relative paths to submodules, then this
>>   produces the wrong result.
> It's harder to narrowly fix that problem than to just have
> relocate_single_git_dir_into_superproject() display the same sorts of
> paths we do for most other "submodule" commands. I.e. the "<to>"
> should be relative to the "<from>" path, rather than relative to the
> eventual superproject.

As I noted here and in the initial report [1], the relative path is from
the original CWD to the submodule, not from 'old submodule gitdir' to
'new submodule gitdir', so I wouldn't really consider this consistent
with other "submodule" commands.

Besides that, I also don't find the output intuitive..

[1] https://lore.kernel.org/git/kl6lmt8qv9gc.fsf@chooglen-macbookpro.roam.corp.google.com/

> diff --git a/submodule.c b/submodule.c
> index c47358097fd..a464c99a27f 100644
> --- a/submodule.c
> +++ b/submodule.c
> @@ -2271,9 +2271,12 @@ int validate_submodule_git_dir(char *git_dir, const char *submodule_name)
>  static void relocate_single_git_dir_into_superproject(const char *path)
>  {
>  	char *old_git_dir = NULL, *real_old_git_dir = NULL, *real_new_git_dir = NULL;
> +	char *rel_old_git_dir;
> +	const char *rel_new_git_dir;
>  	struct strbuf new_gitdir = STRBUF_INIT;
>  	const struct submodule *sub;
> -	size_t off = 0;
> +	const char *super_prefix = get_super_prefix();
> +	const char *sp = super_prefix ? super_prefix : "";
>  
>  	if (submodule_uses_worktrees(path))
>  		die(_("relocate_gitdir for submodule '%s' with "
> @@ -2285,6 +2288,7 @@ static void relocate_single_git_dir_into_superproject(const char *path)
>  		return;
>  
>  	real_old_git_dir = real_pathdup(old_git_dir, 1);
> +	rel_old_git_dir = xstrfmt("%s%s", sp, old_git_dir);

rel_old_git_dir is relative to the root of the superproject's worktree.

> @@ -2293,23 +2297,23 @@ static void relocate_single_git_dir_into_superproject(const char *path)
>  	submodule_name_to_gitdir(&new_gitdir, the_repository, sub->name);
>  	if (validate_submodule_git_dir(new_gitdir.buf, sub->name) < 0)
>  		die(_("refusing to move '%s' into an existing git dir"),
> -		    real_old_git_dir);
> +		    rel_old_git_dir);
>  	if (safe_create_leading_directories_const(new_gitdir.buf) < 0)
>  		die(_("could not create directory '%s'"), new_gitdir.buf);
> +
>  	real_new_git_dir = real_pathdup(new_gitdir.buf, 1);
> +	rel_new_git_dir = relative_path(real_new_git_dir, real_old_git_dir,
> +					&new_gitdir);

rel_new_git_dir is relative to rel_old_git_dir

>  
> -	while (real_old_git_dir[off] && real_new_git_dir[off] &&
> -	       real_old_git_dir[off] == real_new_git_dir[off])
> -		off++;
>  	fprintf(stderr, _("Migrating git directory of '%s%s' from '%s' to '%s'\n"),
> -		get_super_prefix_or_empty(), path,
> -		real_old_git_dir + off, real_new_git_dir + off);
> +		sp, path, rel_old_git_dir, rel_new_git_dir);

and the submodule is also relative to the root of the superproject's
worktree...

> diff --git a/t/t7412-submodule-absorbgitdirs.sh b/t/t7412-submodule-absorbgitdirs.sh
> index a5cd6db7ac2..0afa0fe3a83 100755
> --- a/t/t7412-submodule-absorbgitdirs.sh
> +++ b/t/t7412-submodule-absorbgitdirs.sh
> @@ -27,7 +27,7 @@ test_expect_success 'absorb the git dir' '
>  	git status >expect.1 &&
>  	git -C sub1 rev-parse HEAD >expect.2 &&
>  	cat >expect <<-\EOF &&
> -	Migrating git directory of '\''sub1'\'' from '\''sub1/.git'\'' to '\''.git/modules/sub1'\''
> +	Migrating git directory of '\''sub1'\'' from '\''sub1/.git'\'' to '\''../../.git/modules/sub1'\''
>  	EOF
>  	git submodule absorbgitdirs 2>actual &&
>  	test_cmp expect actual &&

So when we print the 3 relative paths here, they don't all share the
same base, which I find quite unintuitive to parse.

The 'obvious' solution to make this relative to the original CWD is to
plumb the relative path in --super-prefix (like the other "git
submodule" commands), but that won't give the right result in all cases
either, since we found a call site that gets --super-prefix from "git
read-tree" [2], in which case, --super-prefix is relative to the root of
the worktree and not the original CWD. I don't think we should pursue
this.

A more workable fix (and a possible future direction for removing
--super-prefix) would be to pass "--original-cwd" instead of
"--super-prefix", which would let the child process resolve the relative
path correctly. That's a big change though, and I don't think it's worth
doing right now, especially with 'remove --super-prefix' underway.

So for now, I'd strongly prefer we either eject or revert a79e56cb0a6.

[2] https://lore.kernel.org/git/cover-v3-0.9-00000000000-20221119T122853Z-avarab@gmail.com

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2022-11-23  0:43 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-19  2:22 What's cooking in git.git (Nov 2022, #04; Fri, 18) Taylor Blau
2022-11-20 11:24 ` SZEDER Gábor
2022-11-20 17:42 ` Looking for a review (pretty-formats, hard truncation), was What's cooking in git.git (Nov 2022, #04; Fri, 18)) Philip Oakley
2022-11-21  0:37   ` Junio C Hamano
2022-11-21 18:10     ` Philip Oakley
2022-11-20 19:46 ` What's cooking in git.git (Nov 2022, #04; Fri, 18) Phillip Wood
2022-11-20 21:24   ` Johannes Schindelin
2022-11-21  0:47     ` Junio C Hamano
2022-11-21  1:00       ` Taylor Blau
2022-11-22 14:58     ` Phillip Wood
2022-11-20 21:45 ` Junio C Hamano
2022-11-20 23:51   ` Taylor Blau
2022-11-20 23:24 ` Junio C Hamano
2022-11-20 23:52   ` Taylor Blau
2022-11-21  3:36     ` Junio C Hamano
2022-11-22 22:56       ` Taylor Blau
2022-11-21  0:10 ` Junio C Hamano
2022-11-21  0:16   ` Taylor Blau
2022-11-23  0:03     ` Junio C Hamano
2022-11-21 22:22 ` ab/submodule-no-abspath (was Re: What's cooking in git.git (Nov 2022, #04; Fri, 18)) Glen Choo
2022-11-22 22:45   ` [PATCH] submodule absorbgitdirs: use relative <from> and <to> paths Ævar Arnfjörð Bjarmason
2022-11-23  0:43     ` Glen Choo

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).