Skip to contentSkip to conversation

What's cooking in git.git (Oct 2022, #03; Mon, 10)

DISCUSSION Junio C Hamano 4 participants 8 messages Oct 10, 2022 – Dec 22, 2022

lore
Share & tools
lore
#0 lore raw

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.

Some topics have been expecting updates for too long. Before, or soon after, rewinding the 'next' branch and opening the floodgates for this cycle, we may want to discard them, unless they see some activities.

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

With maint, master, next, seen, todo:

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

With all the integration branches and topics broken out:

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

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

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

Release tarballs are available at:

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

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

* ab/test-malloc-with-sanitize-leak (2022-09-29) 1 commit (merged to 'next' on 2022-09-29 at b6fef2dd1f)
+ test-lib: have SANITIZE=leak imply TEST_NO_MALLOC_CHECK

Test fix.
source: <[email protected]>

* ac/fuzzers (2022-09-19) 1 commit
(merged to 'next' on 2022-09-29 at 600f45a53b)
+ fuzz: reorganise the path for existing oss-fuzz fuzzers

Source file shuffling.
source: <[email protected]>

* ah/branch-autosetupmerge-grammofix (2022-09-28) 1 commit (merged to 'next' on 2022-09-29 at 622b75f0da)
+ push: improve grammar of branch.autoSetupMerge advice

Fix grammar of a message introduced in previous round.
source: <[email protected]>

* ah/fsmonitor-daemon-usage-non-l10n (2022-09-21) 1 commit (merged to 'next' on 2022-09-21 at bc69a73c6c)
+ fsmonitor--daemon: don't translate literal commands

Fix messages incorrectly marked for translation.
source: <[email protected]>

* dd/retire-efgrep (2022-09-21) 4 commits
(merged to 'next' on 2022-09-21 at 22bc339be1)
+ t: convert fgrep usage to "grep -F"
+ t: convert egrep usage to "grep -E"
+ t: remove \{m,n\} from BRE grep usage
+ CodingGuidelines: allow grep -E
(this branch is used by es/retire-efgrep.)

Prepare for GNU [ef]grep that throw warning of their uses.
source: <[email protected]>

* ds/scalar-unregister-idempotent (2022-09-27) 4 commits (merged to 'next' on 2022-09-28 at a09a78d861)
+ string-list: document iterator behavior on NULL input
+ gc: replace config subprocesses with API calls
+ scalar: make 'unregister' idempotent
+ maintenance: add 'unregister --force'

"scalar unregister" in a repository that is already been unregistered reported an error.
source: <[email protected]>

* ds/use-platform-regex-on-macos (2022-08-26) 1 commit (merged to 'next' on 2022-09-14 at 80905596d8)
+ grep: fix multibyte regex handling under macOS

With a bit of header twiddling, use the native regexp library on macOS instead of the compat/ one.
source: <[email protected]>

* es/retire-efgrep (2022-09-23) 2 commits
(merged to 'next' on 2022-09-27 at 344fdd138e)
+ check-non-portable-shell: detect obsolescent egrep/fgrep
+ Merge branch 'dd/retire-efgrep' into es/retire-efgrep (this branch uses dd/retire-efgrep.)

Prepare for GNU [ef]grep that throw warning of their uses.
source: <[email protected]>

* hn/parse-worktree-ref (2022-09-19) 1 commit (merged to 'next' on 2022-09-29 at 1f4453eb83)
+ refs: unify parse_worktree_ref() and ref_type()

Code and semantics cleaning.
source: <[email protected]>

* ja/rebase-i-avoid-amending-self (2022-09-26) 1 commit (merged to 'next' on 2022-09-29 at 2635f37dae)
+ sequencer: avoid dropping fixup commit that targets self via commit-ish

"git rebase -i" can mistakenly attempt to apply a fixup to a commit itself, which has been corrected.
source: <[email protected]>

* jc/environ-docs (2022-09-16) 5 commits
(merged to 'next' on 2022-09-29 at a0a43b8de5)
+ environ: GIT_INDEX_VERSION affects not just a new repository
+ environ: simplify description of GIT_INDEX_FILE
+ environ: GIT_FLUSH should be made a usual Boolean
+ environ: explain Boolean environment variables
+ environ: document GIT_SSL_NO_VERIFY

Documentation on various Boolean GIT_* environment variables have been clarified.
source: <[email protected]>

* jk/clone-allow-bare-and-o-together (2022-09-22) 1 commit (merged to 'next' on 2022-09-27 at 1feca721ac)
+ clone: allow "--bare" with "-o"

"git clone" did not like to see the "--bare" and the "--origin" options used together without a good reason.
source: <[email protected]>

* jk/fsck-on-diet (2022-09-22) 3 commits
(merged to 'next' on 2022-09-27 at c2e93082a1)
+ parse_object_buffer(): respect save_commit_buffer
+ fsck: turn off save_commit_buffer
+ fsck: free tree buffers after walking unreachable objects

"git fsck" failed to release contents of tree objects already used from the memory, which has been fixed.
source: <[email protected]>

* jk/remote-rename-without-fetch-refspec (2022-09-22) 1 commit (merged to 'next' on 2022-09-27 at 165fe0a832)
+ remote: handle rename of remote without fetch refspec

"git remote rename" failed to rename a remote without fetch refspec, which has been corrected.
source: <[email protected]>

* js/merge-ort-in-read-only-repo (2022-09-28) 2 commits (merged to 'next' on 2022-09-29 at 84df46c1b4)
+ merge-ort: return early when failing to write a blob
+ merge-ort: fix segmentation fault in read-only repositories

In read-only repositories, "git merge-tree" tried to come up with a merge result tree object, which it failed (which is not wrong) and led to a segfault (which is bad), which has been corrected.
source: <[email protected]>

* mc/cred-helper-ignore-unknown (2022-09-22) 3 commits (merged to 'next' on 2022-09-27 at ce6e3616aa)
+ osxkeychain: clarify that we ignore unknown lines
+ netrc: ignore unknown lines (do not die)
+ wincred: ignore unknown lines (do not die)

Most credential helpers ignored unknown entries in a credential description, but a few died upon seeing them. The latter were taught to ignore them, too
source: <[email protected]>

* rj/ref-filter-get-head-description-leakfix (2022-09-26) 1 commit (merged to 'next' on 2022-09-29 at d05d052eb1)
+ ref-filter.c: fix a leak in get_head_description

Leakfix.
source: <[email protected]>

* so/diff-merges-cleanup (2022-09-16) 3 commits (merged to 'next' on 2022-09-22 at 57694bbed7)
+ diff-merges: clarify log.diffMerges documentation
+ diff-merges: cleanup set_diff_merges()
+ diff-merges: cleanup func_by_opt()

Code clean-up.
source: <[email protected]>

* sy/sparse-grep (2022-09-23) 1 commit
(merged to 'next' on 2022-09-29 at a5bc34b9c5)
+ builtin/grep.c: integrate with sparse index

"git grep" learned to expand the sparse-index more lazily and on demand in a sparse checkout.
source: <[email protected]>

* tb/midx-repack-ignore-cruft-packs (2022-09-21) 7 commits (merged to 'next' on 2022-09-29 at 55474c6ecc)
+ midx.c: avoid cruft packs with non-zero repack --batch-size
+ midx.c: remove unnecessary loop condition
+ midx.c: replace xcalloc() with CALLOC_ARRAY()
+ midx.c: avoid cruft packs with repack --batch-size=0
+ midx.c: prevent expire from removing the cruft pack
+ Documentation/git-multi-pack-index.txt: clarify expire behavior
+ Documentation/git-multi-pack-index.txt: fix typo

"git multi-pack-index repack/expire" used to repack unreachable cruft into a new pack, which have been corrected.
cf. <[email protected]>
source: <[email protected]>

* vd/fix-unaligned-read-index-v4 (2022-09-28) 1 commit (merged to 'next' on 2022-09-28 at 5b3425fd58)
+ read-cache: avoid misaligned reads in index v4

The codepath that reads from the index v4 had unaligned memory accesses, which has been corrected.
source: <[email protected]>

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

* ab/coding-guidelines-c99 (2022-10-10) 5 commits
- CodingGuidelines: recommend against unportable C99 struct syntax
- CodingGuidelines: mention C99 features we can't use
- CodingGuidelines: allow declaring variables in for loops
- CodingGuidelines: mention dynamic C99 initializer elements
- CodingGuidelines: update for C99

Update CodingGuidelines to clarify what features to use and avoid in C99.

Will merge to 'next'?
source: <[email protected]>

* ds/bundle-uri-docfix (2022-10-07) 1 commit
(merged to 'next' on 2022-10-07 at 9ebc1e497a)
+ bundle-uri: fix technical doc issues

Doc formatting fix.

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

* jc/symbolic-ref-no-recurse (2022-10-09) 1 commit
- symbolic-ref: teach "--[no-]recurse" option

After checking out a "branch" that is a symbolic-ref that points at another branch, "git symbolic-ref HEAD" reports the underlying branch, not the symbolic-ref the user gave checkout as argument. The command learned the "--no-recurse" option to stop after dereferencing a symbolic-ref only once.

Will merge to 'next'?
source: <[email protected]>

* jc/use-of-uc-in-log-messages (2022-10-07) 1 commit
- SubmittingPatches: use usual capitalization in the log message body

Clarify that "the sentence after <area>: prefix does not begin with a capital letter" rule applies only to the commit title.

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

* ds/cmd-main-reorder (2022-10-08) 1 commit
- git.c: improve code readability in cmd_main()

Code clean-up.

Will merge to 'next'?
source: <[email protected]>

* ed/fsmonitor-inotify (2022-10-09) 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 (this branch uses ed/fsmonitor-on-networked-macos.)

Bundled fsmonitor for Linux using inotify API.

Needs review.
source: <[email protected]>
source: <[email protected]>

* en/sparse-checkout-design (2022-10-08) 1 commit
- sparse-checkout.txt: new document with sparse-checkout directions

source: <[email protected]>

* jc/more-sanitizer-at-ci (2022-10-09) 1 commit
- ci: add address and undefined sanitizer tasks

* rs/use-fspathncmp (2022-10-08) 1 commit
- dir: use fspathncmp() in pl_hashmap_cmp()

Code clean-up.

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

* jh/struct-zero-init-with-older-clang (2022-10-10) 1 commit
- config.mak.dev: disable suggest braces error on old clang versions

source: <[email protected]>

* 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

source: <[email protected]>

* pw/remove-rebase-p-test (2022-10-10) 1 commit
- t3435: remove redundant test case

source: <[email protected]>

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

* 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. <[email protected]>
source: <[email protected]>

* po/glossary-around-traversal (2022-07-09) 3 commits
- glossary: add reachability bitmap description
- glossary: add commit graph description
- glossary: add Object DataBase (ODB) abbreviation

The glossary entries for "commit-graph file" and "reachability bitmap" have been added.

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

* pw/rebase-keep-base-fixes (2022-09-07) 7 commits
- rebase --keep-base: imply --no-fork-point
- rebase --keep-base: imply --reapply-cherry-picks
- rebase: factor out branch_base calculation
- rebase: rename merge_base to branch_base
- rebase: store orig_head as a commit
- t3416: set $EDITOR in subshell
- t3416: tighten two tests

"git rebase --keep-base" used to discard the commits that are already cherry-picked to the upstream, even when "keep-base" meant that the base, on top of which the history is being rebuilt, does not yet include these cherry-picked commits. The --keep-base option now implies --reapply-cherry-picks and --no-fork-point options.

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

* js/cmake-updates (2022-08-24) 5 commits
- cmake: increase time-out for a long-running test
- cmake: avoid editing t/test-lib.sh
- add -p: avoid ambiguous signed/unsigned comparison
- cmake: copy the merge tools for testing
- cmake: make it easier to diagnose regressions in CTest runs

Update to build procedure with VS using CMake/CTest.

Expecting a reroll.
cf. <[email protected]> cf. <[email protected]> and others
source: <[email protected]>

* gc/submodule-clone-update-with-branches (2022-08-29) 6 commits
- clone, submodule update: check out branches
- submodule--helper: refactor up-to-date criterion
- submodule: return target of submodule symref
- t5617: drop references to remote-tracking branches
- 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.

Expecting a reroll.
cf. <[email protected]> and others
source: <[email protected]>

* tb/diffstat-with-utf8-strwidth (2022-09-14) 1 commit
- diff.c: use utf8_strwidth() to count display width

"git diff --stat" etc. were invented back when everything was ASCII and strlen() was a way to measure the display width of a string; adjust them to compute the display width assuming UTF-8 pathnames.

Expecting a reroll.
source: <[email protected]>

* mj/credential-helper-auth-headers (2022-09-13) 8 commits
- 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
- osxkeychain: clarify that we ignore unknown lines
- netrc: ignore unknown lines (do not die)
- wincred: ignore unknown lines (do not die)

Extending credential helper protocol.

Expecting a reroll.
A separate non-RFC submission of the first three is expected.
cf. <AS8PR03MB86897FAC3E1E4F03D4420644C04F9@AS8PR03MB8689.eurprd03.prod.outlook.com>
source: <[email protected]>

* cw/submodule-status-in-parallel (2022-09-23) 4 commits . diff-lib: parallelize run_diff_files for submodules . diff-lib: refactor functions
. submodule: move status parsing into function . run-command: add pipe_output to run_processes_parallel

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

Breaks its self check.
cf. https://github.com/git/git/actions/runs/3115673002/jobs/5052804463
source: <[email protected]>

* es/mark-gc-cruft-as-experimental (2022-08-03) 2 commits
- config: let feature.experimental imply gc.cruftPacks=true
- gc: add tests for --cruft and friends

Enable gc.cruftpacks by default for those who opt into feature.experimental setting.

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

* 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. <[email protected]>
source: <[email protected]>

* 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. <[email protected]>
cf. <CAFySSZDvgwbbHCHfyuaqX3tKsr-GjJ9iihygg6rNNe46Ys7_EA@mail.gmail.com>
source: <[email protected]>

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

* jk/sequencer-missing-author-name-check (2022-10-03) 1 commit (merged to 'next' on 2022-10-07 at 6a9f7e8b80)
+ sequencer: detect author name errors in read_author_script()

Typofix in code.

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

* pw/mailinfo-b-fix (2022-10-03) 1 commit
(merged to 'next' on 2022-10-07 at 5c5d79daef)
+ mailinfo -b: fix an out of bounds access

Fix a logic in "mailinfo -b" that miscomputed the length of a substring, which lead to an out-of-bounds access.

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

* pw/ssh-sign-report-errors (2022-10-05) 1 commit (merged to 'next' on 2022-10-07 at 4df1d2379a)
+ ssh signing: return an error when signature cannot be read

The codepath to sign learned to report errors when it fails to read from "ssh-keygen".

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

* ab/run-hook-api-cleanup (2022-10-05) 15 commits
- run-command.c: don't copy "ungroup" to "struct parallel_processes"
- run-command.c: don't copy *_fn to "struct parallel_processes"
- run-command API: move *_tr2() users to "run_processes_parallel()"
- run-command API: have run_process_parallel() take an "opts" struct
- run-command API: make run_process_parallel{,_tr2}() thin wrappers
- run-command API: add nascent "struct run_process_parallel_opts"
- run-command.c: add an initializer for "struct parallel_processes"
- run-command API: don't fall back on online_cpus()
- run-command API: make "jobs" parameter an "unsigned int"
- run-command API: have "run_processes_parallel{,_tr2}()" return void
- run-command tests: use "return", not "exit"
- run-command test helper: use "else if" pattern
- 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

Move a global variable added as a hack during regression fixes to its proper place in the API.

Needs review.
source: <[email protected]>

* nb/doc-mergetool-typofix (2022-10-05) 1 commit (merged to 'next' on 2022-10-07 at d309a9a130)
+ mergetool.txt: typofix 'overwriten' -> 'overwritten'

Typofix.

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

* rs/bisect-start-leakfix (2022-10-07) 1 commit
- bisect--helper: plug strvec leak

Code clean-up that results in plugging a leak.

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

* rs/gc-pack-refs-simplify (2022-10-05) 1 commit
(merged to 'next' on 2022-10-07 at ef7d12408d)
+ gc: simplify maintenance_task_pack_refs()

Code clean-up.

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

* rs/test-httpd-in-C-locale (2022-10-06) 1 commit
(merged to 'next' on 2022-10-07 at 832c1e856a)
+ t/lib-httpd: pass LANG and LC_ALL to Apache

Force C locale while running tests around httpd to make sure we can find expected error messages in the log.

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

* ab/unused-annotation (2022-10-05) 1 commit
- git-compat-util.h: GCC deprecated message arg only in GCC 4.5+

Compilation fix for ancient compilers.

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

* dd/document-runtime-prefix-better (2022-10-05) 1 commit
- Makefile: clarify runtime relative gitexecdir

Doc updates.

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

* jk/cleanup-callback-parameters (2022-10-06) 4 commits
- attr: drop DEBUG_ATTR code
- commit: avoid writing to global in option callback
- multi-pack-index: avoid writing to global in option callback
- test-submodule: inline resolve_relative_url() function

Code clean-up.

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

* 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: <[email protected]>

* jc/tmp-objdir (2022-09-30) 1 commit
- tmp-objdir: skip clean up when handling a signal

The code to clean temporary object directories (used for quarantine) tried to remove them inside its signal handler, which was a no-no.

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

* jc/branch-description-unset (2022-09-30) 1 commit
- branch: do not fail a no-op --edit-desc

"GIT_EDITOR=: git branch --edit-description" resulted in failure, which has been corrected.

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

* rj/branch-edit-desc-unborn (2022-10-07) 1 commit
- branch: description for non-existent branch errors

"git branch --edit-description" on an unborh branch misleadingly said that no such branch exists, which has been corrected.

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

* jt/promisor-remote-fetch-tweak (2022-10-05) 2 commits
- promisor-remote: die upon failing fetch
- promisor-remote: remove a return value

Remove error detection from a function that fetches from promisor remotes, and make it die when such a fetch fails to bring all the requested objects, to give an early failure to various operations.

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

* ed/fsmonitor-on-networked-macos (2022-10-05) 6 commits (merged to 'next' on 2022-10-07 at fe9f182bde)
+ fsmonitor: add documentation for allowRemote and socketDir options
+ fsmonitor: check for compatability before communicating with fsmonitor
+ fsmonitor: deal with synthetic firmlinks on macOS
+ fsmonitor: avoid socket location check if using hook
+ fsmonitor: relocate socket file if .git directory is remote
+ fsmonitor: refactor filesystem checks to common interface (this branch is used by ed/fsmonitor-inotify.)

By default, use of fsmonitor on a repository on networked filesystem is disabled. Add knobs to make it workable on macOS.

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

* rj/branch-edit-description-with-nth-checkout (2022-10-09) 2 commits
- SQUASH???
- branch: support for shortcuts like @{-1}, completed

"git branch --edit-description @{-1}" is now a way to edit branch description of the branch you were on before switching to the current branch.

Expecting a reroll.
source: <[email protected]>

* rs/diff-caret-bang-with-parents (2022-10-01) 3 commits
- diff: support ^! for merges
- revisions.txt: unspecify order of resolved parts of ^!
- revision: use strtol_i() for exclude_parent

"git diff rev^!" did not show combined diff to go to the rev from its parents.

Needs review.
source: <[email protected]>

* ab/doc-synopsis-and-cmd-usage (2022-10-05) 34 commits
- tests: assert consistent whitespace in -h output
- tests: start asserting that *.txt SYNOPSIS matches -h output
- doc txt & -h consistency: make "worktree" consistent
- worktree: define subcommand -h in terms of command -h
- reflog doc: list real subcommands up-front
- doc txt & -h consistency: make "commit" consistent
- doc txt & -h consistency: make "diff-tree" consistent
- doc txt & -h consistency: use "[<label>...]" for "zero or more"
- doc txt & -h consistency: make "annotate" consistent
- doc txt & -h consistency: make "stash" consistent
- doc txt & -h consistency: add missing options
- doc txt & -h consistency: use "git foo" form, not "git-foo"
- doc txt & -h consistency: make "bundle" consistent
- doc txt & -h consistency: make "read-tree" consistent
- doc txt & -h consistency: make "rerere" consistent
- doc txt & -h consistency: add missing options and labels
- doc txt & -h consistency: make output order consistent
- doc txt & -h consistency: add or fix optional "--" syntax
- doc txt & -h consistency: fix mismatching labels
- doc SYNOPSIS & -h: use "-" to separate words in labels, not "_"
- doc txt & -h consistency: use "<options>", not "<options>..."
- stash doc SYNOPSIS & -h: correct padding around "[]()"
- doc txt & -h consistency: correct padding around "[]()"
- doc txt & -h consistency: balance unbalanced "[" and "]"
- doc txt & -h consistency: add "-z" to cat-file "-h"
- doc txt & -h consistency: fix incorrect alternates syntax
- doc txt & -h consistency: word-wrap
- built-ins: consistently add "\n" between "usage" and options
- doc SYNOPSIS: consistently use ' for commands
- doc SYNOPSIS: don't use ' for subcommands
- bundle: define subcommand -h in terms of command -h
- builtin/bundle.c: indent with tabs
- CodingGuidelines: update and clarify command-line conventions
- tests: assert *.txt SYNOPSIS and -h output

The short-help text shown by "git cmd -h" and the synopsis text shown at the beginning of "git help cmd" have been made more consistent.

Needs review.
source: <[email protected]>

* ab/coccicheck-incremental (2022-08-31) 9 commits
- spatchcache: add a ccache-alike for "spatch"
- 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

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

Needs review.
source: <[email protected]>

* ds/bundle-uri-3 (2022-10-10) 12 commits
- bundle-uri: suppress stderr from remote-https
- bundle-uri: quiet failed unbundlings
- bundle-uri: fetch a list of bundles
- bundle: add flags to verify_bundle(), skip walk
- bundle-uri: limit recursion depth for bundle lists
- bundle-uri: parse bundle list in config format
- bundle-uri: unit test "key=value" parsing
- bundle-uri: create "key=value" line parsing
- bundle-uri: create base key-value pair parsing
- bundle-uri: create bundle_list struct and helpers
- bundle-uri: use plain string in find_temp_filename()
- Merge branch 'ds/bundle-uri-clone' into ds/bundle-uri-3

Define the logical elements of a "bundle list", data structure to store them in-core, format to transfer them, and code to parse them.

Needs review.
source: <[email protected]>

* 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.

Needs review.
cf. <[email protected]>
source: <[email protected]>

#1 lore raw
Quoted 10 lines · Junio C Hamano

* ed/fsmonitor-on-networked-macos (2022-10-05) 6 commits (merged to 'next' on 2022-10-07 at fe9f182bde)
+ fsmonitor: add documentation for allowRemote and socketDir options
+ fsmonitor: check for compatability before communicating with fsmonitor
+ fsmonitor: deal with synthetic firmlinks on macOS
+ fsmonitor: avoid socket location check if using hook
+ fsmonitor: relocate socket file if .git directory is remote
+ fsmonitor: refactor filesystem checks to common interface (this branch is used by ed/fsmonitor-inotify.)

Quoted 5 lines

By default, use of fsmonitor on a repository on networked filesystem is disabled. Add knobs to make it workable on macOS.

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

There's a tiny leak in this one. Here's a fix that can go on top.

-- >8 --
Subject: [PATCH] fsmonitor: fix leak of warning message

The fsm_settings__get_incompatible_msg() function returns an allocated string. So we can't pass its result directly to warning(); we must hold on to the pointer and free it to avoid a leak.

The leak here is small and fixed size, but Coverity complained, and presumably SANITIZE=leaks would eventually.

---
 fsmonitor.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
fsmonitor.c +3 -1
index 540736b39f..08af00c738 100644
@@ -309,8 +309,10 @@ void refresh_fsmonitor(struct index_state *istate)
 	enum fsmonitor_reason reason = fsm_settings__get_reason(r);
 
 	if (!warn_once && reason > FSMONITOR_REASON_OK) {
+		char *msg = fsm_settings__get_incompatible_msg(r, reason);
 		warn_once = 1;
-		warning("%s", fsm_settings__get_incompatible_msg(r, reason));
+		warning("%s", msg);
+		free(msg);
 	}
 
 	if (fsm_mode <= FSMONITOR_MODE_DISABLED ||
Signature · 1 line
2.38.0.705.gfa933d7c31
#2 lore raw
Quoted 9 lines · Jeff King

There's a tiny leak in this one. Here's a fix that can go on top.

-- >8 --
Subject: [PATCH] fsmonitor: fix leak of warning message

The fsm_settings__get_incompatible_msg() function returns an allocated string. So we can't pass its result directly to warning(); we must hold on to the pointer and free it to avoid a leak.

Quoted 7 lines

The leak here is small and fixed size, but Coverity complained, and presumably SANITIZE=leaks would eventually.

---
 fsmonitor.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Is there anybody else who is reading Coverity reports, I wonder. This one is a clear positive.

Thanks.

Quoted 16 lines
fsmonitor.c +3 -1
index 540736b39f..08af00c738 100644
@@ -309,8 +309,10 @@ void refresh_fsmonitor(struct index_state *istate)
 	enum fsmonitor_reason reason = fsm_settings__get_reason(r);
 
 	if (!warn_once && reason > FSMONITOR_REASON_OK) {
+		char *msg = fsm_settings__get_incompatible_msg(r, reason);
 		warn_once = 1;
-		warning("%s", fsm_settings__get_incompatible_msg(r, reason));
+		warning("%s", msg);
+		free(msg);
 	}
 
 	if (fsm_mode <= FSMONITOR_MODE_DISABLED ||
#3 lore raw
Quoted 14 lines · Junio C Hamano
Quoted 12 lines · Jeff King

There's a tiny leak in this one. Here's a fix that can go on top.

-- >8 --
Subject: [PATCH] fsmonitor: fix leak of warning message

The fsm_settings__get_incompatible_msg() function returns an allocated string. So we can't pass its result directly to warning(); we must hold on to the pointer and free it to avoid a leak.

The leak here is small and fixed size, but Coverity complained, and presumably SANITIZE=leaks would eventually.

Quoted 7 lines
Quoted 4 lines
---
 fsmonitor.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Is there anybody else who is reading Coverity reports, I wonder. This one is a clear positive.

I doubt it. My personal fork still has the coverity github-action which I showed last year[1]. We could merge that, but giving access to the project is a minor pain. And of course the full list is full of false positives. One nice thing about coverity is that it marks each defect by date, and tells you how many new ones there are. So when I push up my next+personal branches build, I usually just skim over any new ones it reports. I'd say about 10% of them are actionable.

-Peff

[1] https://lore.kernel.org/git/[email protected]/

#4 lore raw

Hi Peff,

Quoted 21 lines · Jeff King
Quoted 19 lines · Junio C Hamano
Quoted 16 lines · Jeff King

There's a tiny leak in this one. Here's a fix that can go on top.

-- >8 --
Subject: [PATCH] fsmonitor: fix leak of warning message

The fsm_settings__get_incompatible_msg() function returns an allocated string. So we can't pass its result directly to warning(); we must hold on to the pointer and free it to avoid a leak.

The leak here is small and fixed size, but Coverity complained, and presumably SANITIZE=leaks would eventually.

---
 fsmonitor.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 4 lines
Quoted 2 lines

Is there anybody else who is reading Coverity reports, I wonder. This one is a clear positive.

I doubt it.

As I mentioned to you previously (e.g. in
https://lore.kernel.org/git/[email protected]/),
I do have a look at them, usually a closer look during the -rc phases.

Quoted 7 lines

My personal fork still has the coverity github-action which I showed last year[1]. We could merge that, but giving access to the project is a minor pain. And of course the full list is full of false positives. One nice thing about coverity is that it marks each defect by date, and tells you how many new ones there are. So when I push up my next+personal branches build, I usually just skim over any new ones it reports. I'd say about 10% of them are actionable.

That 10% number does not match up with my experience.

In the v2.39.0-rc period, I looked through over a hundred new issues. Pretty much all of them were strvec/strbuf false positives, and even the remaining ones were not actionable. (I typically glance over leaks such as the one you reported, in favor of focusing on bugs that may cause crashes or other serious problems.)

I also recall that
https://lore.kernel.org/git/[email protected]/
was the result of more than 150 new alerts that I sifted through, with 11 actionable ones, some of which were later decided to be false positives after all.

Ciao,
Johannes

#5 lore raw
Quoted 8 lines · Johannes Schindelin
Quoted 4 lines
Quoted 2 lines

Is there anybody else who is reading Coverity reports, I wonder. This one is a clear positive.

I doubt it.

As I mentioned to you previously (e.g. in
https://lore.kernel.org/git/[email protected]/),
I do have a look at them, usually a closer look during the -rc phases.

Thanks for the reminder. I had a vague recollection that you were pretty negative on Coverity's quality, but you do say pretty clearly there that you'll continue with builds.

That said, I stand by the sentiment that hardly anybody is looking at them. It sounds like it's mostly just you and me.

Quoted 8 lines
Quoted 7 lines

My personal fork still has the coverity github-action which I showed last year[1]. We could merge that, but giving access to the project is a minor pain. And of course the full list is full of false positives. One nice thing about coverity is that it marks each defect by date, and tells you how many new ones there are. So when I push up my next+personal branches build, I usually just skim over any new ones it reports. I'd say about 10% of them are actionable.

Quoted 7 lines

That 10% number does not match up with my experience.

In the v2.39.0-rc period, I looked through over a hundred new issues. Pretty much all of them were strvec/strbuf false positives, and even the remaining ones were not actionable. (I typically glance over leaks such as the one you reported, in favor of focusing on bugs that may cause crashes or other serious problems.)

My counting method may be a bit more generous to Coverity. I build 'next' (plus my local topics) every day or three, and get an email from Coverity if there's anything new. If so, I look at it. So I'm counting "times I got an email and looked" as the denominator, and the numerator is "there was at least one useful warning". So that skips some useless ones that appear along side useful ones.

I'm not sure how you saw a hundred new issues, though. My dashboard has 10 unresolved issues total since the beginning of September, which is before 2.38 was released, and I think I sent 2 fixes since then (which are not counted, since they're now resolved, so 2/12).

I do think it would be less noisy if we could somehow convince Coverity that yes, strbuf really does NUL-terminate the result. But I haven't wanted to sink time into figuring out how to annotate it.

-Peff

#6 lore raw
Quoted 8 lines · Jeff King

I'm not sure how you saw a hundred new issues, though. My dashboard has 10 unresolved issues total since the beginning of September, which is before 2.38 was released, and I think I sent 2 fixes since then (which are not counted, since they're now resolved, so 2/12).

I do think it would be less noisy if we could somehow convince Coverity that yes, strbuf really does NUL-terminate the result. But I haven't wanted to sink time into figuring out how to annotate it.

I don't have Coverity set up, but perhaps it's satisfied by the same thing that placeted GCC's -fanalyzers in strbuf.c:

	https://lore.kernel.org/git/[email protected]/

I run my local build with a version of that branch, I'd still like to follow-up on it (and as that RFC thread shows others had some alternate suggestions, e.g. for this strbuf case).

I don't think it's true that a strbuf "really does NUL-terminate the result" the way an analyzer like -fanalyzer sees it. I.e. if you do:

	struct strbuf sb = { .alloc = 123 };
	strbuf_addstr(&sb, "blah");

You'll segfault because the sb->buf isn't the slopbuf, nor '\0'-terminated, it's just NULL.

Now, we know we always init it with STRBUF_INIT or equivalent, but I think it's correct to flag that if you're analyzing strbuf.c in isolation, as -fanalyze (and presumably Coverity) is doing.

#7 lore raw
Quoted 4 lines · Ævar Arnfjörð Bjarmason
Quoted 3 lines

I do think it would be less noisy if we could somehow convince Coverity that yes, strbuf really does NUL-terminate the result. But I haven't wanted to sink time into figuring out how to annotate it.

Quoted 8 lines

I don't have Coverity set up, but perhaps it's satisfied by the same thing that placeted GCC's -fanalyzers in strbuf.c:

	https://lore.kernel.org/git/[email protected]/

I run my local build with a version of that branch, I'd still like to follow-up on it (and as that RFC thread shows others had some alternate suggestions, e.g. for this strbuf case).

I don't think that will help. The most common strbuf problem in Coverity is "this string isn't NUL terminated". And having walked through their step-by-step analysis, I think what is going on is that it sees that:

  strbuf_addstr(&sb, "foo");

is doing:

  memcpy(sb->buf, "foo", strlen(foo));

under the hood, and it says "aha, this is an anti-pattern where you forgot to copy the NUL byte!" and creates a warning. And it ignores completely the fact that the next line is calling strbuf_setlen() and adding the NUL byte.

Now there may be other false positives around strbufs (like not realizing the buffer grows), but this is the one I feel like I've seen the most.

Quoted 8 lines

I don't think it's true that a strbuf "really does NUL-terminate the result" the way an analyzer like -fanalyzer sees it. I.e. if you do:

	struct strbuf sb = { .alloc = 123 };
	strbuf_addstr(&sb, "blah");

You'll segfault because the sb->buf isn't the slopbuf, nor '\0'-terminated, it's just NULL.

Yeah, I didn't mean to say that there can't be real problems with strbufs. I just meant that there are many false positives where the code is correct, but the tool doesn't realize it.

-Peff