git/Documentation/RelNotes/2.41.0.txt

Git v2.41 Release Notes
=======================

UI, Workflows & Features

 * Allow information carried on the WWW-Authenticate header to be
   passed to the credential helpers.

 * A new "fetch.hideRefs" option can be used to exclude specified refs
   from "rev-list --objects --stdin --not --all" traversal for
   checking object connectivity, most useful when there are many
   unrelated histories in a single repository.

 * "git push" has been taught to allow deletion of refs with one-level
   names to help repairing a repository who acquired such a ref by
   mistake.  In general, we don't encourage use of such a ref, and
   creation or update to such a ref is rejected as before.

 * Allow "git bisect reset" to check out the original branch when the
   branch is already checked out in a different worktree linked to the
   same repository.

 * A few subcommands have been taught to stop users from working on a
   branch that is being used in another worktree linked to the same
   repository.

 * "git format-patch" learned to write a log-message only output file
   for empty commits.

 * "git format-patch" honors the src/dst prefixes set to nonstandard
   values with configuration variables like "diff.noprefix", causing
   receiving end of the patch that expects the standard -p1 format to
   break.  "format-patch" has been taught to ignore end-user configuration
   and always use the standard prefixes.

   This is a backward compatibility breaking change.

 * Lift the limitation that colored prompts can only be used with
   PROMPT_COMMAND mode.

 * "git blame --contents=<file> <rev> -- <path>" used to be forbidden,
   but now it finds the origins of lines starting at <file> contents
   through the history that leads to <rev>.

 * "git pack-redundant" gave a warning when run, as the command has
   outlived its usefulness long ago and is nominated for future
   removal.  Now we escalate to give an error.

 * "git clone" from an empty repository learned to propagate the
   choice of the hash algorithm from the source repository to the
   newly created repository over any one of the v0/v1/v2 protocol.

 * "git mergetool" and "git difftool" learns a new configuration
   guiDefault to optionally favor configured guitool over non-gui-tool
   automatically when $DISPLAY is set.

 * "git branch -d origin/master" would say "no such branch", but it is
   likely a missed "-r" if refs/remotes/origin/master exists.  The
   command has been taught to give such a hint in its error message.

 * Clean-up of the code path that deals with merge strategy option
   handling in "git rebase".

 * "git clone --local" stops copying from an original repository that
   has symbolic links inside its $GIT_DIR; an error message when that
   happens has been updated.

 * The "--format=..." option of "git for-each-ref", "git branch", and
   "git tag" commands learn "--omit-empty" to hide refs whose
   formatting results in an empty string from the output.

 * The sendemail-validate validate hook learned to pass the total
   number of input files and where in the sequence each invocation is
   via environment variables.

 * When "gc" needs to retain unreachable objects, packing them into
   cruft packs (instead of exploding them into loose object files) has
   been offered as a more efficient option for some time.  Now the use
   of cruft packs has been made the default and no longer considered
   an experimental feature.

 * The output given by "git blame" that attributes a line to contents
   taken from the file specified by the "--contents" option shows it
   differently from a line attributed to the working tree file.

 * "git send-email" learned to give the e-mail headers to the validate
   hook by passing an extra argument from the command line.

 * The credential subsystem learns to help OAuth framework.

 * The titles of manual pages used to be chomped at an unreasonably
   short limit, which has been removed.

 * Error messages given when working on an unborn branch that is
   checked out in another worktree have been improved.

 * The documentation was misleading about the interaction between
   GIT_DEFAULT_HASH and "git clone", which has been clarified to
   stress that the variable is to be ignored by the command.

 * "git send-email" learned "--header-cmd=<cmd>" that can inject
   arbitrary e-mail header lines to the outgoing messages.

 * "git fsck" learned to detect bit-flip breakages in the reachability
   bitmap files.

 * The "--stdin" option of "git name-rev" has been replaced with
   the "--annotate-stdin" option more than a year ago.  We stop
   advertising it in the "git name-rev -h" output.

 * "git push --all" gained an alias "git push --branches".

 * "git fetch" learned the "--porcelain" option that emits what it did
   in a machine-parseable format.

 * "git --attr-source=<tree> cmd $args" is a new way to have any
   command to read attributes not from the working tree but from the
   given tree object.


Performance, Internal Implementation, Development Support etc.

 * Code clean-up to clarify directory traversal API.

 * Code clean-up to clarify the rule that "git-compat-util.h" must be
   the first to be included.

 * More work towards -Wunused.

 * Instead of forcing each command to choose to honor GPG related
   configuration variables, make the subsystem lazily initialize
   itself.

 * Remove workaround for ancient versions of DocBook to make it work
   correctly with groff, which has not been necessary since docbook
   1.76 from 2010.

 * Code clean-up to include and/or uninclude parse-options.h file as
   needed.

 * The code path that reports what "git fetch" did to each ref has
   been cleaned up.

 * Assorted config API updates.

 * A few configuration variables to tell the cURL library that
   different types of ssl-cert and ssl-key are in use have been added.

 * Split key function and data structure definitions out of cache.h to
   new header files and adjust the users.

 * "git fetch --all" does not have to download and handle the same
   bundleURI over and over, which has been corrected.

 * "git sparse-checkout" command learns a debugging aid for the sparse
   rule definitions.

 * "git write-tree" learns to work better with sparse-index.

 * The on-disk reverse index that allows mapping from the pack offset
   to the object name for the object stored at the offset has been
   enabled by default.

 * "git fsck" learned to validate the on-disk pack reverse index files.

 * strtok() and strtok_r() are banned in this codebase.

 * The detect-compilers script to help auto-tweaking the build system
   had trouble working with compilers whose version number has extra
   suffixes.  The script has been taught that certain suffixes (like
   "-win32" in "gcc 10-win32") can be safely stripped as they share
   the same features and bugs with the version without the suffix.

 * ctype tests have been taught to test EOF, too.

 * The implementation of credential helpers used fgets() over fixed
   size buffers to read protocol messages, causing the remainder of
   the folded long line to trigger unexpected behaviour, which has
   been corrected.

 * The implementation of the default "negotiator", used to find common
   ancestor over the network for object tranfer, used to be recursive;
   it was updated to be iterative to conserve stackspace usage.

 * Our custom callout formatter is no longer used in the documentation
   formatting toolchain, as the upstream default ones give better
   output these days.

 * The tracing mechanism learned to notice and report when
   auto-discovered bare repositories are being used, as allowing so
   without explicitly stating the user intends to do so (with setting
   GIT_DIR for example) can be used with social engineering as an
   attack vector.

 * "git diff-files" learned not to expand sparse-index unless needed.


Fixes since v2.40
-----------------

 * "git fsck" learned to check the index files in other worktrees,
   just like "git gc" honors them as anchoring points.
   (merge 8d3e7eac52 jk/fsck-indices-in-worktrees later to maint).

 * Fix a segfaulting loop.  The function and its caller may need
   further clean-up.
   (merge c5773dc078 ew/commit-reach-clean-up-flags-fix later to maint).

 * "git restore" supports options like "--ours" that are only
   meaningful during a conflicted merge, but these options are only
   meaningful when updating the working tree files.  These options are
   marked to be incompatible when both "--staged" and "--worktree" are
   in effect.
   (merge ee8a88826a ak/restore-both-incompatible-with-conflicts later to maint).

 * Simplify UI to control progress meter given by "git bundle" command.
   (merge 8b95521edb jk/bundle-progress later to maint).

 * "git bundle" learned that "-" is a common way to say that the input
   comes from the standard input and/or the output goes to the
   standard output.  It used to work only for output and only from the
   root level of the working tree.
   (merge 0bbe10313e jk/bundle-use-dash-for-stdfiles later to maint).

 * Once we start running, we assumed that the list of alternate object
   databases would never change.  Hook into the machinery used to
   update the list of packfiles during runtime to update this list as
   well.
   (merge e2d003dbed ds/reprepare-alternates-when-repreparing-packfiles later to maint).

 * The code to parse "git rebase -X<opt>" was not prepared to see an
   unparsable option string, which has been corrected.
   (merge 15a4cc912e ab/fix-strategy-opts-parsing later to maint).

 * "git add -p" while the index is unmerged sometimes failed to parse
   the diff output it internally produces and died, which has been
   corrected.
   (merge 28d1122f9c jk/add-p-unmerged-fix later to maint).

 * Fix for a "ls-files --format="%(path)" that produced nonsense
   output, which was a bug in 2.38.
   (merge cfb62dd006 aj/ls-files-format-fix later to maint).

 * "git receive-pack" that responds to "git push" requests failed to
   clean a stale lockfile when killed in the middle, which has been
   corrected.
   (merge c55c30669c ps/receive-pack-unlock-before-die later to maint).

 * "git rev-parse --quiet foo@{u}", or anything that asks @{u} to be
   parsed with GET_OID_QUIETLY option, did not quietly fail, which has
   been corrected.
   (merge dfbfdc521d fc/oid-quietly-parse-upstream later to maint).

 * Transports that do not support protocol v2 did not correctly fall
   back to protocol v0 under certain conditions, which has been
   corrected.
   (merge eaa0fd6584 jk/fix-proto-downgrade-to-v0 later to maint).

 * time(2) on glib 2.31+, especially on Linux, goes out of sync with
   higher resolution timers used for gettimeofday(2) and by the
   filesystem.  Replace all calls to it with a git_time() wrapper and
   (merge 370ddcbc89 pe/time-use-gettimeofday later to maint).

 * Code clean-up to use designated initializers in parse-options API.
   (merge 353e6d4554 sg/parse-options-h-initializers later to maint).

 * A recent-ish change to allow unicode character classes to be used
   with "grep -P" triggered a JIT bug in older pcre2 libraries.
   The problematic change in Git built with these older libraries has
   been disabled to work around the bug.
   (merge 14b9a04479 mk/workaround-pcre-jit-ucp-bug later to maint).

 * The wildmatch library code unlearns exponential behaviour it
   acquired some time ago since it was borrowed from rsync.
   (merge 3dc0b7f0dc pw/wildmatch-fixes later to maint).

 * The index files can become corrupt under certain conditions when
   the split-index feature is in use, especially together with
   fsmonitor, which have been corrected.
   (merge 061dd722dc js/split-index-fixes later to maint).

 * Document what the pathname-looking strings in "rev-list --object"
   output are for and what they mean.
   (merge 15364d2a3c jk/document-rev-list-object-name later to maint).

 * Fix unnecessary truncation of generation numbers used in-core.
   (merge d3af1c193d ps/ahead-behind-truncation-fix later to maint).

 * Code clean-up around the use of the_repository.
   (merge 4a93b899c1 ab/remove-implicit-use-of-the-repository later to maint).

 * Consistently spell "Message-ID" as such, not "Message-Id".
   (merge ba4324c4e1 jc/spell-id-in-both-caps-in-message-id later to maint).

 * Correct use of an uninitialized structure member.
   (merge dc12ee77ab jx/cap-object-info-uninitialized-fix later to maint).

 * Tests had a few places where we ignored PERL_PATH and blindly used
   /usr/bin/perl, which have been corrected.
   (merge c1917156a0 jk/use-perl-path-consistently later to maint).

 * Documentation mark-up fix.
   (merge 78b6369e67 la/mfc-markup-fix later to maint).

 * Doc toolchain update to remove old workaround for AsciiDoc.
   (merge 8806120de6 fc/remove-header-workarounds-for-asciidoc later to maint).

 * The userdiff regexp patterns for various filetypes that are built
   into the system have been updated to avoid triggering regexp errors
   from UTF-8 aware regex engines.
   (merge be39144954 rs/userdiff-multibyte-regex later to maint).

 * The approxidate() API has been simplified by losing an extra
   function that did the same thing as another one.
   (merge 8a7f0b666f rs/remove-approxidate-relative later to maint).

 * Code clean-up to replace a hardcoded constant with a CPP macro.
   (merge c870de6502 rs/get-tar-commit-id-use-defined-const later to maint).

 * Doc build simplification.
   (merge 9a09ed3229 fc/doc-stop-using-manversion later to maint).

 * "git archive" run from a subdirectory mishandled attributes and
   paths outside the current directory.
   (merge 92b1dd1b9e rs/archive-from-subdirectory-fixes later to maint).

 * The code to parse capability list for v0 on-wire protocol fell into
   an infinite loop when a capability appears multiple times, which
   has been corrected.

 * Geometric repacking ("git repack --geometric=<n>") in a repository
   that borrows from an alternate object database had various corner
   case bugs, which have been corrected.
   (merge d85cd18777 ps/fix-geom-repack-with-alternates later to maint).

 * The "%GT" placeholder for the "--format" option of "git log" and
   friends caused BUG() to trigger on a commit signed with an unknown
   key, which has been corrected.
   (merge 7891e46585 jk/gpg-trust-level-fix later to maint).

 * The completion script used to use bare "read" without the "-r"
   option to read the contents of various state files, which risked
   getting confused with backslashes in them.  This has been
   corrected.
   (merge 197152098a ek/completion-use-read-r-to-read-literally later to maint).

 * A small API fix to the ort merge strategy backend.
   (merge 000c4ceca7 en/ort-finalize-after-0-merges-fix later to maint).

 * The commit object parser has been taught to be a bit more lenient
   to parse timestamps on the author/committer line with a malformed
   author/committer ident.
   (merge 90ef0f14eb jk/parse-commit-with-malformed-ident later to maint).

 * Retitle a test script with an overly narrow name.
   (merge 8bb19c14fb ob/t3501-retitle later to maint).

 * Doc update to clarify how text and eol attributes interact to
   specify the end-of-line conversion.
   (merge 6696077ace ah/doc-attributes-text later to maint).

 * Gitk updates from GfW project.
   (merge 99e70f3077 js/gitk-fixes-from-gfw later to maint).

 * "git diff --dirstat" leaked memory, which has been plugged.
   (merge 83973981eb jc/dirstat-plug-leaks later to maint).

 * "git merge-tree" reads the basic configuration, which can be used
    by git forges to disable replace-refs feature.
   (merge b6551feadf ds/merge-tree-use-config later to maint).

 * A few bugs in the sequencer machinery that results in miscounting
   the steps have been corrected.
   (merge 170eea9750 js/rebase-count-fixes later to maint).

 * Other code cleanup, docfix, build fix, etc.
   (merge f7111175df as/doc-markup-fix later to maint).
   (merge 90ff7c9898 fc/test-aggregation-clean-up later to maint).
   (merge 9b0c7f308a jc/am-doc-refer-to-format-patch later to maint).
   (merge b10cbdac4c bb/unicode-width-table-15 later to maint).
   (merge 3457b50e8c ab/retire-scripted-add-p later to maint).
   (merge d52fcf493b ds/p2000-fix-grep-sparse later to maint).
   (merge ec063d2591 ss/hashmap-typofix later to maint).
   (merge 1aaed69d11 rs/archive-mtime later to maint).
   (merge 2da2cc9b28 ob/rollback-after-commit-lock-failure later to maint).
   (merge 54dbd0933b ob/sequencer-save-head-simplify later to maint).
   (merge a93cbe8d78 ar/test-cleanup-unused-file-creation later to maint).
   (merge cc48ddd937 jk/chainlint-fixes later to maint).
   (merge 4833b08426 ow/ref-format-remove-unused-member later to maint).
   (merge d0ea2ca1cf dw/doc-submittingpatches-grammofix later to maint).
   (merge fd72637423 ar/t2024-checkout-output-fix later to maint).
   (merge d45cbe3fe0 ob/sequencer-i18n-fix later to maint).
   (merge b734fe49fd ob/messages-capitalize-exception later to maint).
   (merge ad353d7e77 ma/gittutorial-fixes later to maint).
   (merge a5855fd8d4 ar/test-cleanup-unused-file-creation-part2 later to maint).
   (merge 0c5308af30 sd/doc-gitignore-and-rm-cached later to maint).
   (merge cbb83daeaf kh/doc-interpret-trailers-updates later to maint).
   (merge 3d77fbb664 ar/config-count-tests-updates later to maint).
   (merge b7cf25c8f4 jc/t9800-fix-use-of-show-s-raw later to maint).