Among the many improvements in the new version, Git 2.40’s git jump tool which wraps other Git commands like git grep, and feeds their results into Vim’s quickfix list now contains support for Emacs in addition to Vim.
‘git jump’ now works with ‘diff’ in which the quickfix list is populated with the beginning of each changed hunk in a repository to allow users to quickly scan changes in their editor before committing them. The tool also works with ‘git jump merge’ to open Vim to the list of merge conflicts.
In Git 2.40, git cat-file -s and ‘–batch-check’ will report the object size as if it had been written using replacement identities when invoked with’ –use-mailmap’ whereas it was ignored in previous versions.
Past versions also had limitations on ‘check-attr’ because it required an index, but now it supports a new ‘–source=’ to scan for ‘.gitattributes’.
There have also been a few highlights from GitHub’s long-running effort to rewrite old parts of Git from their original Perl or Shell implementations into more modern C equivalents.
Users can now consolidate Git commands into a single process, enabling them to run much more quickly on platforms with a high process start-up cost, such as Windows.
Also, ‘git bisect’ is now fully implemented in C as a native builtin. On the other hand, Git 2.40 retired the legacy implementation of ‘git add –interactive’, which also began as a Shell script and was re-introduced as a native builtin back in version 2.26 to support both the new and old implementation behind an experimental ‘add.interactive.useBuiltin configuration’.
Lastly, developers will have access to under-the-hood improvements to Git’s CI infrastructure that result in CI runs that can be completed more quickly and with fewer resources.
Additional details on all of the improvements in Git 2.40 are available here.