The open source Git project has released its latest version 2.40, which offers some new features and bug fixes, Infoq reports. The new version includes updates to the git jump tool, improvements to the cat-file tool, and faster response times in Windows.

Taylor Blau, a software engineer at GitHub, provided a detailed overview of the updates in Git 2.40. The additional tool in the Git contrib directory, git jumpnow supports Emacs and Vim. The git jump tool works by wrapping Git commands, such as git grep, and passing their results to the Vim quick fix list.

If you’re using Emacs, you can use git jump to generate a list of locations using the M-x grepgit jump --stdout grep foo command. The command will then display all matches to “foo” in your project, allowing easy navigation. Git jump also works with diff and merge.

However, there was also an issue in previous versions of Git that led to incorrect results when using the --use-mailmap option with the cat-file tool in combination with the --batch-check and -s options. In Git 2.40, this has been corrected and the --batch-check and -s options will now report the size of the object correctly.

The git check-attr command is used to determine which gitattributes are set for a given path. These attributes are defined and set by one or more .gitattributes files in the repository.

Git 2.40 also includes enhancements for rewriting old parts of Git from Perl or Shell to modern C equivalents. This allows Git commands to run faster on platforms like Windows. The git bisect is now implemented in C as a native builtin, and the old git add --interactive implementation has been deprecated.

Tags: , , , , , , , , , , , , , , , , , , , , , , ,
Editor @ DevStyleR