Git v2.54.0

v2.54.0
Added 9
  • Add "git history" history rewriting (experimental) command
  • Add "--maximal-only" option to "git rev-list" and friends to show only commits not reachable by other commits
  • Add "--keys" action to "git repo info" to list known keys
  • Add "split" subcommand to "git history"
  • Add "--trailer" option to "git rebase" to drive the interpret-trailers machinery
  • Add "--commit-list-format" option and format.commitListFormat configuration variable to "git format-patch --cover-letter"
Changed 11
  • "git add -p" and friends now note the current status of the hunk being shown
  • "git add -p" learned a new mode that allows the user to revisit a file that was already dealt with
  • "git add <submodule>" now honors submodule.<name>.ignore set to "all"
  • "git apply --directory=./un/../normalized/path" now normalizes the given path before using it
  • "git apply" now reports the name of the input file along with the line number when it encounters a corrupt patch
  • "git config list" now shows values interpreted for specific type with "--type=<X>" option

From Git

Git v2.54 Release Notes

UI, Workflows & Features
  • "git add -p" and friends note what the current status of the hunk being shown is.

  • "git history" history rewriting (experimental) command has been added.

  • "git replay" is taught to drop commits that become empty (not the ones that are empty in the original).

  • The help text and the documentation for the "--expire" option of "git worktree [list|prune]" have been improved.

  • When "git show-index" is run outside a repository, it silently defaults to SHA-1; the tool now warns when this happens.

  • "git merge-file" can be run outside a repository, but it ignored all configuration, even the per-user ones. The command now uses available configuration files to find its customization.

  • "auto filter" logic for large-object promisor remote.

  • "git rev-list" and friends learn "--maximal-only" to show only the commits that are not reachable by other commits.

  • Command line completion (in contrib/) update for "stash import/export".

  • "git repo info" learns "--keys" action to list known keys.

  • Extend the alias configuration syntax to allow aliases using characters outside ASCII alphanumeric (plus '-').

  • A signature on a commit that was GPG signed a long time ago ought to be still valid after the key that was used to sign it has expired, but we showed them in alarming red.

  • "git subtree split --prefix=P " now checks the prefix P against the tree of the (potentially quite different from the current working tree) given commit.

  • "git add -p" learned a new mode that allows the user to revisit a file that was already dealt with.

  • Allow the directory in which reference backends store their data to be specified.

  • "gitweb" has been taught to be mobile friendly.

  • "git apply --directory=./un/../normalized/path" now normalizes the given path before using it.

  • "git maintenance" starts using the "geometric" strategy by default.

  • "git config list" is taught to show the values interpreted for specific type with "--type=" option.

  • "git add " has been taught to honor submodule..ignore that is set to "all" (and requires "git add -f" to override it).

  • Hook commands are now allowed to be defined (possibly centrally) in the configuration files, and run multiple of them for the same hook event.

  • The way end-users can add their own "git " subcommand by storing "git-" in a directory on their $PATH has not been documented clearly, which has been corrected.

  • "git send-email" learns to pass hostname/port to Authen::SASL module.

  • "git send-email" learns to support use of client-side certificates.

  • "git send-email" has learned to be a bit more careful when it accepts charset to use from the end-user, to avoid 'y' (mistaken 'yes' when expecting a charset like 'UTF-8') and other nonsense.

  • "git status" learned to show comparison between the current branch and various other branches listed on status.compareBranches configuration.

  • "git repo structure" command learns to report maximum values on various aspects of objects it inspects.

  • "git rebase" learns "--trailer" option to drive the interpret-trailers machinery.

  • "git fast-import" learned to optionally replace signature on commits whose signatures get invalidated due to replaying by signing afresh.

  • "git history" learned the "split" subcommand.

  • The reference-transaction hook was taught to be triggered before taking locks on references in the "preparing" phase.

  • "git apply" now reports the name of the input file along with the line number when it encounters a corrupt patch, and correctly resets the line counter when processing multiple patch files.

  • The HTTP transport learned to react to "429 Too Many Requests".

  • "git repo info -h" and "git repo structure -h" limit their help output to the part that is specific to the subcommand.

  • "git format-patch --cover-letter" learns to use a simpler format instead of the traditional shortlog format to list its commits with a new --commit-list-format option and format.commitListFormat configuration variable.

  • git backfill learned to accept revision and pathspec arguments.

  • "git replay" (experimental) learns, in addition to "pick" and "replay", a new operating mode "revert".

  • "git replay" now supports replaying down to the root commit.

  • Handling of signed commits and tags in fast-import has been made more configurable.

  • "git config list" is the official way to spell "git config -l" and "git config --list". Use it to update the documentation.

Performance, Internal Implementation, Development Support etc.
  • Avoid local submodule repository directory paths overlapping with each other by encoding submodule names before using them as path components.

  • The string_list API gains a new helper, string_list_sort_u(), and new unit tests to extend coverage.

  • Improve set-up time of a perf test.

  • ISO C23 redefines strchr and friends that traditionally took a const pointer and returned a non-const pointer derived from it to preserve constness (i.e., if you ask for a substring in a const string, you get a const pointer to the substring). Update code paths that used non-const pointer to receive their results that did not have to be non-const to adjust.

  • Rename three functions around the commit_list data structure.

  • Transaction to create objects (or not) is currently tied to the repository, but in the future a repository can have multiple object sources, which may have different transaction mechanisms. Make the odb transaction API per object source.

  • "git merge-ours" is taught to work better in a sparse checkout.

  • Allow recording process ID of the process that holds the lock next to a lockfile for diagnosis.

  • Reduce dependency on the_repository of xdiff-interface layer.

  • Code clean-up to use the commit_stack API.

  • "git diff --anchored=" has been optimized.

  • A CodingGuidelines update.

  • Add process ancestry data to trace2 on macOS to match what we already do on Linux and Windows. Also adjust the way Windows implementation reports this information to match the other two.

  • A handful of places used refs_for_each_ref_in() API incorrectly, which has been corrected.

  • Some tests assumed "iconv" is available without honoring ICONV prerequisite, which has been corrected.

  • Revamp object enumeration API around odb.

  • Additional tests were introduced to see the interaction with netrc auth with auth failure on the http transport.

  • A couple of bugs in use of flag bits around odb API has been corrected, and the flag bits reordered.

  • Plumb gitk/git-gui build and install procedure in meson based builds.

  • The code to accept shallow "git push" has been optimized.

  • Simplify build procedure for oxskeychain (in contrib/).

  • Fix dependency screw-up in meson-based builds.

  • Wean the mailmap code off of the_repository dependency.

  • API clean-up for the worktree subsystem.

  • The last uses of the_repository in "tree-diff.c" have been eradicated.

  • Clean-up the code around "git repo info" command.

  • Mark the merge-ort codebase to prevent more uses of the_repository from getting added.

  • The core.attributesfile is intended to be set per repository, but was kept track of by a single global variable in-core, which has been corrected by moving it to per-repository data structure.

  • Use the hook API to replace ad-hoc invocation of hook scripts via the run_command() API.

  • Code refactoring around refs-for-each-* API functions.

  • The parse-options API learned to notice an options[] array with duplicated long options. (merge 237e520d81 rs/parse-options-duplicated-long-options later to maint).

  • The code to maintain mapping between object names in multiple hash functions is being added, written in Rust.

  • A bit of OIDmap API enhancement and cleanup.

  • Move gitlab CI from macOS 14 images that are being deprecated.

  • The object source API is getting restructured to allow plugging new backends.

  • Reduce dependence on the global the_hash_algo and the_repository variables of wt-status code path.

  • The way combined list-object filter options are parsed has been revamped.

  • Editorconfig filename patterns were specified incorrectly, making many source files inside subdirectories unaffected, which has been corrected.

  • The run_command() API lost its implicit dependency on the singleton the_repository instance.

  • The unit test helper function was taught to use backslash + mnemonic notation for certain control characters like "\t", instead of octal notation like "\011".

  • Adjust test-lint to allow "sed -E" to use ERE in the patterns.

  • Clar (unit testing framework) update from the upstream.

  • Reduce system overhead "git upload-pack" spends on relaying "git pack-objects" output to the "git fetch" running on the other end of the connection.

  • Add a coccinelle rule to break the build when "struct strbuf" gets passed by value.

  • Further work on incremental repacking using MIDX/bitmap

  • The logic to count objects has been cleaned up.

  • Tweak the build infrastructure by moving tools around.

  • Uses of prio_queue as a LIFO stack of commits have been written with commit_stack.

  • The cleanup of remaining bitmaps in "ahead_behind()" has been simplified.

  • split-index.c has been updated to not use the global the_repository and the_hash_algo variables.

  • The unsigned integer that is used as a bitset to specify the kind of branches interpret_branch_name() function has been changed to use a dedicated enum type.

  • Various updates to contrib/diff-highlight, including documentation updates, test improvements, and color configuration handling.

  • Code paths that loop over another array to push each element into a strvec have been rewritten to use strvec_pushv() instead.

  • In case homebrew breaks REG_ENHANCED again, leave an in-code comment to suggest use of our replacement regex as a workaround.

  • MinGW build updates.

  • The way dash 0.5.13 handles non-ASCII contents in here-doc is buggy and breaks our existing tests, which unfortunately have been rewritten to avoid triggering the bug.

  • Object name handling (disambiguation and abbreviation) has been refactored to be backend-generic, moving logic into the respective object database backends.

  • pack-objects's --stdin-packs=follow mode learns to handle excluded-but-open packs.

  • A few code paths that spawned child processes for network connection weren't wait(2)ing for their children and letting "init" reap them instead; they have been tightened.

  • Adjust the codebase for C23 that changes functions like strchr() that discarded constness when they return a pointer into a const string to preserve constness.

  • A handful of inappropriate uses of the_repository have been rewritten to use the right repository structure instance in the read-cache.c codepath.

  • Internals of "git fsck" have been refactored to not depend on the global the_repository variable.

  • Reduce dependency on the_repository in add-patch.c file.

  • The way the "git log -L:" feature is bolted onto the log/diff machinery is being reworked a bit to make the feature compatible with more diff options, like -S/G.

  • Further work to adjust the codebase for C23 that changes functions like strchr() that discarded constness when they return a pointer into a const string to preserve constness.

  • "git rev-list --maximal-only" has been optimized by borrowing the …

View original

Upgraded? How did it go?

Discussion