Git - v2.40.0


UI, Workflows & Features

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

  • "git jump" (in contrib/) learned to present the "quickfix list" to
    its standard output (instead of letting it consumed by the editor
    it invokes), and learned to also drive emacs/emacsclient.

  • "git var UNKNOWN_VARIABLE" and "git var VARIABLE" with the variable
    given an empty value used to behave identically. Now the latter
    just gives an empty output, while the former still gives an error
    message.

  • Introduce a case insensitive mode to the Bash completion helpers.

  • The advice message given by "git status" when it takes long time to
    enumerate untracked paths has been updated.

  • Just like "git var GIT_EDITOR" abstracts the complex logic to
    choose which editor gets used behind it, "git var" now give support
    to GIT_SEQUENCE_EDITOR.

  • "git format-patch" learned to honor format.mboxrd even when sending
    patches to the standard output stream,

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

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

  • Introduce an optional configuration to allow the trailing hash that
    protects the index file from bit flipping.

  • "git check-attr" learned to take an optional tree-ish to read the
    .gitattributes file from.

  • "scalar" learned to give progress bar.

  • "grep -P" learned to use Unicode Character Property to grok
    character classes when processing \b and \w etc.

  • "git rebase" often ignored incompatible options instead of
    complaining, which has been corrected.

  • "scalar" warns but continues when its periodic maintenance
    feature cannot be enabled.

  • The bundle-URI subsystem adds support for creation-token heuristics
    to help incremental fetches.

  • Userdiff regexp update for Java language.

  • "git fetch --jobs=0" used to hit a BUG(), which has been corrected
    to use the available CPUs.

  • An invalid label or ref in the "rebase -i" todo file used to
    trigger an runtime error. SUch an error is now diagnosed while the
    todo file is parsed.

  • The "diff" drivers specified by the "diff" attribute attached to
    paths can now specify which algorithm (e.g. histogram) to use.

  • "git range-diff" learned --abbrev= option.

  • "git archive HEAD^{tree}" records the paths with the current
    timestamp in the archive, making it harder to obtain a stable
    output. The command learned the --mtime option to specify an
    arbitrary timestamp (e.g. --mtime="@0 +0000" for the epoch).

  • The credential subsystem learned that a password may have an
    explicit expiration.

  • The format.attach configuration variable lacked a way to override a
    value defined in a lower-priority configuration file (e.g. the
    system one) by redefining it in a higher-priority configuration
    file. Now, setting format.attach to an empty string means show the
    patch inline in the e-mail message, without using MIME attachment.

This is a backward incompatible change.

Performance, Internal Implementation, Development Support etc.

  • git bisect becomes a builtin.

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

  • Use the SHA1DC implementation on macOS, just like other platforms,
    by default.

  • Even in a repository with promisor remote, it is useless to
    attempt to lazily attempt fetching an object that is expected to be
    commit, because no "filter" mode omits commit objects. Take
    advantage of this assumption to fail fast on errors.

  • Stop using "git --super-prefix" and narrow the scope of its use to
    the submodule--helper.

  • Stop running win+VS build by default.

  • CI updates. We probably want a clean-up to move the long shell
    script embedded in yaml file into a separate file, but that can
    come later.

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

We'd probably need to revisit "do we really want to, and have to,
lose CRLF vs LF?" later, at which time we may be able to further
clean this up by replacing "git diff --no-index" with "diff -u".

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

  • Plug leaks in sequencer subsystem and its users.

  • In-tree .gitattributes update to match the way we recommend our
    users to mark a file as text.
    (merge 1f34e0cd3d po/attributes-text later to maint).

  • Finally retire the scripted "git add -p/-i" implementation and have
    everybody use the one reimplemented in C.

Fixes since v2.39

  • Various leak fixes.

  • Fix a bug where pack-objects would not respect multiple --filter
    arguments when invoked directly.
    (merge d4f7036887 rs/multi-filter-args later to maint).

  • Make fsmonitor more robust to avoid the flakiness seen in t7527.
    (merge 6692d45477 jh/t7527-unflake-by-forcing-cookie later to maint).

  • Stop using deprecated macOS API in fsmonitor.
    (merge b0226007f0 jh/fsmonitor-darwin-modernize later to maint).

  • Redefining system functions for a few functions did not follow our
    usual "implement git_foo() and #define foo(args) git_foo(args)"
    pattern, which has broken build for some folks.

  • The way the diff machinery prepares the options array for the
    parse_options API has been refactored to avoid resource leaks.
    (merge 189e97bc4b rs/diff-parseopts later to maint).

  • Correct pthread API usage.
    (merge 786e67611d sx/pthread-error-check-fix later to maint).

  • The code to auto-correct a misspelt subcommand unnecessarily called
    into git_default_config() from the early config codepath, which was
    a no-no. This has bee corrected.
    (merge 0918d08887 sg/help-autocorrect-config-fix later to maint).

  • "git http-fetch" (which is rarely used) forgot to identify itself
    in the trace2 output.
    (merge 7abb43cbc8 jt/http-fetch-trace2-report-name later to maint).

  • The output from "git diff --stat" on an unmerged path lost the
    terminating LF in Git 2.39, which has been corrected.
    (merge 209d9cb011 pg/diff-stat-unmerged-regression-fix later to maint).

  • "git pull -v --recurse-submodules" attempted to pass "-v" down to
    underlying "git submodule update", which did not understand the
    request and barfed, which has been corrected.
    (merge 6f65f84766 ss/pull-v-recurse-fix later to maint).

  • When given a pattern that matches an empty string at the end of a
    line, the code to parse the "git diff" line-ranges fell into an
    infinite loop, which has been corrected.

  • Fix the sequence to fsync $GIT_DIR/packed-refs file that forgot to
    flush its output to the disk..

  • Fix to a small regression in 2.38 days.

  • "git diff --relative" did not mix well with "git diff --ext-diff",
    which has been corrected.

  • The logic to see if we are using the "cone" mode by checking the
    sparsity patterns has been tightened to avoid mistaking a pattern
    that names a single file as specifying a cone.

  • Deal with a few deprecation warning from cURL library.

  • Doc update for environment variables set when hooks are invoked.

  • Document ORIG_HEAD a bit more.

  • "git ls-tree --format='%(path) %(path)' $tree $path" showed the
    path three times, which has been corrected.

  • Remove "git env--helper" and demote it to a test-tool subcommand.
    (merge 4a1baacd46 ab/test-env-helper later to maint).

  • Newer regex library macOS stopped enabling GNU-like enhanced BRE,
    where '(A\|B)' works as alternation, unless explicitly asked with
    the REG_ENHANCED flag. "git grep" now can be compiled to do so, to
    retain the old behaviour.

  • Pthread emulation on Win32 leaked thread handle when a thread is
    joined.
    (merge 238a9dfe86 sk/win32-close-handle-upon-pthread-join later to maint).

  • "git send-email -v 3" used to be expanded to "git send-email
    --validate 3" when the user meant to pass them down to
    "format-patch", which has been corrected.
    (merge 8774aa56ad km/send-email-with-v-reroll-count later to maint).

  • Document that "branch -f " disables only the safety to
    avoid recreating an existing branch.

  • "git fetch ", when "" of remotes lists the same
    remote twice, unnecessarily failed when parallel fetching was
    enabled, which has been corrected.
    (merge 06a668cb90 cw/fetch-remote-group-with-duplication later to maint).

  • Clarify how "checkout -b/-B" and "git branch [-f]" are similar but
    different in the documentation.

  • "git hash-object" now checks that the resulting object is well
    formed with the same code as "git fsck".
    (merge 8e4309038f jk/hash-object-fsck later to maint).

  • Improve the error message given when private key is not loaded in
    the ssh agent in the codepath to sign with an ssh key.
    (merge dce7b31126 as/ssh-signing-improve-key-missing-error later to maint).

  • Adjust "git request-pull" to strip embedded signature from signed
    tags to notice non-PGP signatures.
    (merge a9cad02538 gm/request-pull-with-non-pgp-signed-tags later to maint).

  • Remove support for MSys, which now lags way behind MSys2.
    (merge 2987407f3c hj/remove-msys-support later to maint).

  • Fix use of CreateThread() API call made early in the windows
    start-up code.
    (merge 592bcab61b sk/winansi-createthread-fix later to maint).

  • "git pack-objects" learned to release delta-island bitmap data when
    it is done using it, saving peak heap memory usage.
    (merge 647982bb71 ew/free-island-marks later to maint).

  • In an environment where dynamically generated code is prohibited to
    run (e.g. SELinux), failure to JIT pcre patterns is expected. Fall
    back to interpreted execution in such a case.
    (merge 50b6ad55b0 cb/grep-fallback-failing-jit later to maint).

  • "git name-rev" heuristics update.
    (merge b2182a8730 en/name-rev-make-taggerdate-much-less-important later to maint).

  • Remove more remaining uses of macros that relies on the_index
    singleton instance without explicitly spelling it out.

  • Remove unnecessary explicit sizing of strbuf.
    (merge 93ea118bed rs/cache-tree-strbuf-growth-fix later to maint).

  • Doc update.
    (merge d9ec3b0dc0 jk/doc-ls-remote-matching later to maint).

  • Error messages given upon a signature verification failure used to
    discard the errors from underlying gpg program, which has been
    corrected.
    (merge ad6b320756 js/gpg-errors later to maint).

  • Update --date=default documentation.
    (merge 9deef088ae rd/doc-default-date-format later to maint).

  • A test helper had a single write(2) of 256kB, which was too big for
    some platforms (e.g. NonStop), which has been corrected by using
    xwrite() wrapper appropriately.
    (merge 58eab6ff13 jc/genzeros-avoid-raw-write later to maint).

  • sscanf(3) used in "git symbolic-ref --short" implementation found
    to be not working reliably on macOS in UTF-8 locales. Rewrite the
    code to avoid sscanf() altogether to work it around.
    (merge 613bef56b8 jk/shorten-unambiguous-ref-wo-sscanf later to maint).

  • Various fix-ups on HTTP tests.
    (merge 8f2146dbf1 jk/http-test-fixes later to maint).

  • Fixes to code that parses the todo file used in "rebase -i".
    (merge 666b6e1135 pw/rebase-i-parse-fix later to maint).

  • Test library clean-up.
    (merge c600a91c94 ar/test-lib-remove-stale-comment later to maint).

  • Other code cleanup, docfix, build fix, etc.
    (merge 4eb1ccecd4 dh/mingw-ownership-check-typofix later to maint).
    (merge f95526419b ar/typofix-gitattributes-doc later to maint).
    (merge 27875aeec9 km/doc-branch-start-point later to maint).
    (merge 35c194dc57 es/t1509-root-fixes later to maint).
    (merge 7b341645e3 pw/ci-print-failure-name-fix later to maint).
    (merge bcb71d45bf jx/t1301-updates later to maint).
    (merge ebdc46c242 jc/doc-diff-patch.txt later to maint).
    (merge a87a20cbb4 ar/test-cleanup later to maint).
    (merge f5156f1885 ar/bisect-doc-update later to maint).
    (merge fca2d86c97 jk/interop-error later to maint).
    (merge cf4936ed74 tl/ls-tree-code-clean-up later to maint).
    (merge dcb47e52b0 en/t6426-todo-cleanup later to maint).
    (merge 5b8db44bdd jc/format-patch-v-unleak later to maint).
    (merge 590b636737 jk/hash-object-literally-fd-leak later to maint).
    (merge 5458ba0a4d tb/t0003-invoke-dd-more-portably later to maint).
    (merge 70661d288b ar/markup-em-dash later to maint).
    (merge e750951e74 en/ls-files-doc-update later to maint).
    (merge 4f542975d1 mh/doc-credential-cache-only-in-core later to maint).
    (merge 3a2ebaebc7 gc/index-format-doc later to maint).
    (merge b08edf709d jk/httpd-test-updates later to maint).
    (merge d85e9448dd wl/new-command-doc later to maint).
    (merge d912a603ed kf/t5000-modernise later to maint).
    (merge e65b868d07 rs/size-t-fixes later to maint).
    (merge 3eb1e1ca9a ab/config-h-remove-unused later to maint).
    (merge d390e08076 cw/doc-pushurl-vs-url later to maint).
    (merge 567342fc77 rs/ctype-test later to maint).
    (merge d35d8f2e7a ap/t2015-style-update later to maint).


Details

date
March 12, 2023, 9:34 p.m.
type
Minor
👇
Register or login to:
  • 🔍View and search all Git releases.
  • 🛠️Create and share lists to track your tools.
  • 🚨Setup notifications for major, security, feature or patch updates.
  • 🚀Much more coming soon!
Continue with GitHub
Continue with Google
or