Subject: Re: What's cooking in git.git (Apr 2021, #05; Mon, 19)

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Tue, 20 Apr 2021 15:52:33 +0200

On Tue, Apr 20 2021, Junio C Hamano wrote:

Comments on my outstanding serieses and related (you've indicated that
this summary was helpful, so I'll keep doing it).

> * ab/unexpected-object-type (2021-04-14) 11 commits
>  - fixup! object.c: stop supporting len == -1 in type_from_string_gently()
>  - tag: don't misreport type of tagged objects in errors
>  - object tests: add test for unexpected objects in tags
>  - object.c: add and use oid_is_type_or_die_msg() function
>  - object.c: add a utility function for "expected type X, got Y"
>  - tree.c: fix misindentation in parse_tree_gently()
>  - object-name.c: make dependency on object_type order more obvious
>  - object-file.c: make oid_object_info() return "enum object_type"
>  - object.c: make type_from_string() return "enum object_type"
>  - object.c: refactor type_from_string_gently()
>  - object.c: stop supporting len == -1 in type_from_string_gently()
>
>  Error reporting upon object type mismatch has been improved

For the v1 of this I see you picked up the middle of 3 serieses I
submitted one on top of each other, and of course the need for the
"fixup!" commit on top.

I've just re-rolled these three at:

 * https://lore.kernel.org/git/[email-masked]
 * https://lore.kernel.org/git/[email-masked]
 * https://lore.kernel.org/git/[email-masked]

Hopefully you'll see fit to pick up all 3x this time. As noted before
these are all prep changes for some larger fsck changes where we
misreport object types in various cases.

> * bc/hash-transition-interop-part-1 (2021-04-19) 17 commits
>  - http-push: set algorithm when reading object ID
>  - fixup! hash: provide per-algorithm null OIDs
>  - hex: print objects using the hash algorithm member
>  - hex: default to the_hash_algo on zero algorithm value
>  - builtin/pack-objects: avoid using struct object_id for pack hash
>  - commit-graph: don't store file hashes as struct object_id
>  - builtin/show-index: set the algorithm for object IDs
>  - hash: provide per-algorithm null OIDs
>  - hash: set and copy algo field in struct object_id
>  - cache: compare the entire buffer for struct object_id
>  - builtin/pack-redundant: avoid casting buffers to struct object_id
>  - Use the final_oid_fn to finalize hashing of object IDs
>  - hash: add a function to finalize object IDs
>  - Always use oidread to read into struct object_id
>  - cache: add an algo member to struct object_id
>  - builtin/hash-object: allow literally hashing with a given algorithm
>  - sha1-file: allow hashing objects literally with any algorithm
>
>  SHA-256 transition.
>
>  Expecting a reroll.
>  cf. <[email-masked]>

This has a textual conflict (no longer a semantic one) with the above
ab/unexpected-object-type etc.

As noted in
https://lore.kernel.org/git/[email-masked]/ I had
questions about the approach in hash-object.c, in particular I have
POC/WIP patches that make one of brian's TODO tests pass, by doing the
"we are in SHA256 mode" earlier, which is also less code as we won't
need to add special handling to a large part of hash-object.c (or, in
the future, other such commands).

> * ab/describe-tests-fix (2021-04-12) 5 commits
>  - describe tests: support -C in "check_describe"
>  - describe tests: fix nested "test_expect_success" call
>  - describe tests: don't rely on err.actual from "check_describe"
>  - describe tests: refactor away from glob matching
>  - describe tests: improve test for --work-tree & --dirty
>  (this branch uses ab/test-lib-updates.)
>
>  Various updates to tests around "git describe"

As noted in my reply to the last "What's Cooking" at
https://lore.kernel.org/git/[email-masked]/ this
depends on ab/test-lib-updates.

I've re-rolled that today at at
https://lore.kernel.org/git/[email-masked]/

But AFAICT this topic is ready & needs no further changes.

> * ab/pickaxe-pcre2 (2021-04-12) 22 commits
>  - xdiff-interface: replace discard_hunk_line() with a flag
>  - xdiff users: use designated initializers for out_line
>  - pickaxe -G: don't special-case create/delete
>  - pickaxe -G: terminate early on matching lines
>  - xdiff-interface: allow early return from xdiff_emit_line_fn
>  - xdiff-interface: prepare for allowing early return
>  - pickaxe -S: slightly optimize contains()
>  - pickaxe: rename variables in has_changes() for brevity
>  - pickaxe -S: support content with NULs under --pickaxe-regex
>  - pickaxe: assert that we must have a needle under -G or -S
>  - pickaxe: refactor function selection in diffcore-pickaxe()
>  - perf: add performance test for pickaxe
>  - pickaxe/style: consolidate declarations and assignments
>  - diff.h: move pickaxe fields together again
>  - pickaxe: die when --find-object and --pickaxe-all are combined
>  - pickaxe: die when -G and --pickaxe-regex are combined
>  - pickaxe tests: add missing test for --no-pickaxe-regex being an error
>  - pickaxe tests: test for -G, -S and --find-object incompatibility
>  - pickaxe tests: add test for "log -S" not being a regex
>  - pickaxe tests: add test for diffgrep_consume() internals
>  - pickaxe tests: refactor to use test_commit --append --printf
>  - grep/pcre2 tests: reword comments referring to kwset
>  (this branch uses ab/test-lib-updates.)
>
>  Rewrite the backend for "diff -G/-S" to use pcre2 engine when
>  available.

>From my last reply to WC above:

    Ditto for this series, i.e. it needed ab/test-lib-updates. There's
    no outstanding comments on it, but of course that could just mean
    "not enough review".

    If anyone here cares about "git log -G" performance review this,
    because it doesn't make it better, but is needed for a series of
    mine that does improve it.

> * ab/detox-gettext-tests (2021-04-13) 1 commit
>   (merged to 'next' on 2021-04-15 at db0da2903a)
>  + tests: remove all uses of test_i18cmp
>
>  Test clean-up.
>
>  Will merge to 'master'.

Thanks.

> * ab/fsck-unexpected-type (2021-04-13) 6 commits
>  - fsck: report invalid object type-path combinations
>  - fsck: report invalid types recorded in objects
>  - object-store.h: move read_loose_object() below 'struct object_info'
>  - fsck: don't hard die on invalid object types
>  - fsck tests: refactor one test to use a sub-repo
>  - cache.h: move object functions to object-store.h
>
>  "git fsck" has been taught to report mismatch between expected and
>  actual types of an object better.

Jeff King: *re-poke* per the mention the last WC: I.e. did you review
this?

> * ab/usage-error-docs (2021-04-13) 3 commits
>   (merged to 'next' on 2021-04-15 at dbbbaa5eea)
>  + api docs: document that BUG() emits a trace2 error event
>  + api docs: document BUG() in api-error-handling.txt
>  + usage.c: don't copy/paste the same comment three times
>
>  Documentation updates, with unrelated comment updates, too.
>
>  Will merge to 'master'.

Thanks.

> * ab/doc-lint (2021-04-10) 7 commits
>  - docs: fix linting issues due to incorrect relative section order
>  - doc lint: lint relative section order
>  - doc lint: lint and fix missing "GIT" end sections
>  - doc lint: fix bugs in, simplify and improve lint script
>  - doc lint: Perl "strict" and "warnings" in lint-gitlink.perl
>  - Documentation/Makefile: make doc.dep dependencies a variable again
>  - Documentation/Makefile: make $(wildcard howto/*.txt) a var
>
>  Dev support.
>
>  Waiting for reviews to conclude.

>From my last reply to WC above:

    FWIW I think the earlier version of this got thorough reviews, this
    version is the same with trivial changes, plus two patches at the
    end to add another lint check for doc section order:
    https://lore.kernel.org/git/[email-masked]/

> * ab/rebase-no-reschedule-failed-exec (2021-04-10) 2 commits
>  - rebase: don't override --no-reschedule-failed-exec with config
>  - rebase tests: camel-case rebase.rescheduleFailedExec consistently
>
>  "git rebase --[no-]reschedule-failed-exec" did not work well with
>  its configuration variable, which has been corrected.
>
>  Waiting for reviews to conclude.

>From my last reply to WC above:

    Phillip Wood helped this along, and it looks good to him now:
    https://lore.kernel.org/git/[email-masked]/

> * ab/svn-tests-set-e-fix (2021-04-12) 2 commits
>  - svn tests: refactor away a "set -e" in test body
>  - svn tests: remove legacy re-setup from init-clone test
>
>  Test clean-up.
>
>  Waiting for reviews.
>  cf. <[email-masked]>

>From my last reply to WC above:

    Eric Wong looked the pre-split v1 of this over and it looked good to
    him: https://lore.kernel.org/git/20210228211407.GA3214@dcvr/

    The v1 has no changes except the specific s/touch /> / pointed out
    to him, and a commit message update:
    https://lore.kernel.org/git/[email-masked]/

> * ab/test-lib-updates (2021-04-12) 16 commits
>  - test-lib-functions: remove last two parameter count assertions
>  - Revert and amend "test-lib-functions: assert correct parameter count"
>  - test-lib-functions: use "return 1" instead of "false"
>  - test-lib-functions: normalize test_path_is_missing() debugging
>  - test-lib: modernize test_create_repo() function
>  - test-lib: do not show advice about init.defaultBranch under --verbose
>  - test-lib: reformat argument list in test_create_repo()
>  - submodule tests: use symbolic-ref --short to discover branch name
>  - test-lib functions: add --printf option to test_commit
>  - describe tests: convert setup to use test_commit
>  - test-lib functions: add an --annotated-tag option to "test_commit"
>  - test-lib-functions: document test_commit --no-tag
>  - test-lib-functions: reword "test_commit --append" docs
>  - test-lib tests: remove dead GIT_TEST_FRAMEWORK_SELFTEST variable
>  - test-lib: bring $remove_trash out of retirement
>  - check-non-portable-shell: complain about "test" a/-o instead of &&/||
>  (this branch is used by ab/describe-tests-fix and ab/pickaxe-pcre2.)
>
>  Test clean-up.
>
>  Waiting for review discussion to conclude.

I think with my re-roll today at
https://lore.kernel.org/git/[email-masked]/
there's no further outstanding issues.

> * ab/userdiff-tests (2021-04-08) 9 commits
>   (merged to 'next' on 2021-04-13 at 35fb0e853d)
>  + blame tests: simplify userdiff driver test
>  + blame tests: don't rely on t/t4018/ directory
>  + userdiff: remove support for "broken" tests
>  + userdiff tests: list builtin drivers via test-tool
>  + userdiff tests: explicitly test "default" pattern
>  + userdiff: add and use for_each_userdiff_driver()
>  + userdiff style: normalize pascal regex declaration
>  + userdiff style: declare patterns with consistent style
>  + userdiff style: re-order drivers in alphabetical order
>
>  A bit of code clean-up and a lot of test clean-up around userdiff
>  area.
>
>  Will merge to 'master'.

Thanks.