Bits, bobs, and better work tree support: Git 2.35 is now available

Git

The developers behind version control system Git have bundled 494 non-merge commits into a neat little update, which looks to provide users with more insight and flexibility for day-to-day work.

Amongst other things Git 2.35 squashes a respectable list of bugs from fetch misbehaviours and matching issues in sparse-checkout, to a number of grep peculiarities. It also provides an option to only stash currently staged changes, meaning everything that has already been added to the index, by using a new --staged parameter with git-stash. 

The change is meant to offer some additional control over what goes into the stash and currently works in combination with the push and save commands. To get a better idea of the stash’s content, git status --porcelain=v2 now includes the number of entries if --show-stash is used. 

Another area of improvement is git log. In the 2.35 release the component to show commit logs has been altered so that selected command-line options can be passed on via the git log --format=%(describe) placeholder, which is hoped to be a cleaner alternative to combining log and describe commands with pipes. 

The git team also corrected the behaviour of the --invert-grep option, which should now incorporate the results of the matches with --grep<pattern>, and taught git log to take --decorate-refs into account. To make the tool easier to use, the git completion script was extended as well and now knows that human and auto are indeed valid values when it comes to log commands with --date option.

Once they have updated their installation, Git users will notice a slightly different colour palette when working with git grep. They should also run into less issues when utilising working trees, as most commands will keep an empty directory instead of removing it on change, while git fetch has started to look into the given options of branches checked out in other worktrees as well as in the current one before updating the repo head. 

Other interesting changes include that git apply learned to ignore messages without a patch when the –allow-empty parameter has been set, and a key:: prefix mechanism to specify literal keys not using the ssh-prefix for the SSH cryptographic signing function that was introduced in the 2.34 release. Details are available via the release notes.

There the git team also shared a quick word of warning with developers building git from source: some internal changes mean that the process will fail, if the compiler used can’t work with C99 and the NO_UNCOMPRESS2 Makefile macro isn’t defined if zlib 1.2.9 or older is used.