Git moves to new defaults in 2.26 release

Git moves to new defaults in 2.26 release

Version 2.26 of the version management system git is ready for downloading, making version 2 of the transport protocol the standard and improving git rebase as well as partial clones and sparse checkouts.

The new standard network fetch protocol was introduced in 2018 and is supposed to speed up the process of fetching from large repositories among other things. It does so by giving the client a way of telling the server about its interests first, for example a specific branch or everything tagged with a certain ID, preventing the server from delivering extensive lists of complex repository data which isn’t always needed.

Since partial clones are something that’s finding quite a bit of use, the git developers have now gotten rid of a connectivity check when fetching into it and improved the cooperation with the object reachability bitmap machinery in cases where both can work together. Meanwhile sparse-checkout has been fitted with an add subcommand, some fixes to work with Windows paths, and some polishes around the cone mode.

Another change concerns the backend used by git rebase. It now employs the merge backend, which was formerly known as the interactive backend, per default instead of apply (formerly known as am). The latter is still operated when the –apply option is added to the command. The switch is down to the different behaviours these modules display which seems to be a bit more confusion-prone on the apply backend. 

Apply, for example, works with a patch sequence that uses context regions to find the right region to apply a commit too, which can lead to problems if multiple areas in a codebase look alike. It also drops intentionally empty commits and doesn’t give users a chance to update their command messages after conflict resolution. Using the merge backend per default is meant to help with those issues, but since the change could affect some workflows, the Git team asks users encountering difficulties to get in touch and set the rebase.backend variable to apply for the time being.

To make working with git a little more comfortable, the tool’s command line completion learned subcommands and arguments for git worktree. Also, the handling of conflicting renames seems a bit more consistent now, and the sample credential helper for .netrc should work out of the box. 

Configurations were improved as well, letting git config show from which scope a setting comes from, and the configuration element of the credentials subsystem allows wildcards when specifying for which set of URLs an entry applies. 

A complete list of changes can be found in the announcement email. It also includes some notes on work still in progress, since the team for example is still working to move git add –interactive to C, prepares tests for when object names will use SHA-256, and refactors git bisect –helper.