Git 2.41 has already been released and these are its news

Go to 2.41

Git 2.41 implements improvements in repository handling

After three months of development, the new version release distributed source control system Git 2.41. Compared to the previous version, 542 changes were accepted in the new version, prepared with the participation of 95 developers, of which 29 participated in the development for the first time.

For those who don't know about Git, you should know that is one of the most popular version control systems, reliable, and high-performance software that provides flexible nonlinear development tools based on forks and mergers of forks.

Git 2.41 Key New Features

In this new version it stands out that handling of "unreachable" objects has been improved to those not referenced in the repository (no reference to branches or tags). The garbage collector removes the objects, but they remain in the repository for a certain amount of time before being removed to avoid race conditions.

To keep track of the period of objects, tags need to be attached to them with the change time of similar objects, which does not allow to store them in a package file, in which all objects have a common change time.

Previously, each object was stored in a separate file, which caused problems if there were a large number of new objects that were not yet subject to deletion. In the new version, Cruft Packs are used by default to pack objects «unreachable", which allows to store all objects in a package file and reflect the data about the modification time of each object in a separate table stored in a file with the extension ".mtimes" and linked by an index file with the extension ".idx".

Another change that stands out in this new version is that on-disk revindex maintenance is enabled for package files. When tested on the Torvalds/Linux repositories, using a reverse index is mentioned to be allowed to speed up git push operations which consume a lot of resources in 1,49 times, and simple operations, like calculating the size of a single object using "git cat-file –batch='%(objectsize:disk) '" 77 times.

The reverse index included in the new version aims to streamline the process of determining the identification of the object from information about the location of the object in the package file. The operation of building an index boils down to building an array of "object position" pairs and sorting them by position, which can be time consuming for large package files.

For example, the operation to display the content of objects, which uses a direct index, was 62 times faster than the operation to display the size of objects, for which the object mate data was not indexed. After using the reverse index, these operations started taking roughly the same time. Reverse indexes also allow you to speed up the object dispatch operation by executing fetch and dispatch commands by directly transferring prepared data from disk.

It is also highlighted that in Git 2.41 added support for passing WWW-Authenticate headers between the credentials handler and the authentication service to the "credential helper" protocol that is used to pass credentials when accessing restricted repositories. Compatibility with the WWW-Authenticate header allows OAuth scope parameters to be passed to a separate user access in a more granular way to the repositories and delimit the scopes available for the requests.

Of the other changes that stand out of the new version:

  • Added format option “%(ahead-behind: )» at command for-each-ref, that allows you to get immediate information about the number of commits present or missing on a certain branch, relative to another branch.
  • Added option «–porcelain» at command "git fetch", which generates output in the format « », less readable, but more convenient to parse in scripts.
  • Configuration added "fetch.hideRefs" to speed up operationsgit fetch» hiding part of the references in the local repository at the check stage that the server sent the full set of objects, which saves time by limiting the check to only the servers from which the data is directly retrieved.
    The command "git fsck» implements the ability to check for corruption, checksum matching, and value validation on accessibility bitmaps and reverse indices.
  • The command "git clone --local" now shows an error when trying to copy from a repository that contains symlinks inside $GIT_DIR.

Finally, if you are interested in knowing more about it, you can consult the details In the following link.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.