Release of the Git version control system 2.52

After three months of development, the release of the distributed version control system Git 2.52 has been announced. Git is distinguished by high performance and provides tools for nonlinear development based on branching and merging. To ensure the integrity of history and resilience against 'backdating', implicit hashing of the entire previous history is used in each commit, along with digital signatures certifying individual tags and commits by developers. The Git code is distributed under the GPLv2+ license.

Compared to the previous release, the new version includes 637 changes prepared by 94 developers (33 of whom contributed to Git for the first time). Key innovations (1, 2, 3):

  • A new command 'git last-modified' has been added to display a list of files in a specified revision and the commits through which the latest changes were made to each of these files. $ git last-modified HEAD b56f6dcd7b4c90192018e848d0810f091d092913 test.h 29330ae4b820147c98e723399e9438c8bee60a8a test1.c 573ad8917beb99dc643b6e7f5c117a294384a575 test2.c
  • The command 'git repo' has been added to perform actions related to extracting information from the repository. Two subcommands are proposed — 'git repo info' and 'git repo structure', which output information about repository settings and details about the repository structure (for example, you can find out the number of references and objects in the repository). $ git repo info object.format references.format object.format=sha1 references.format=reftable $ git repo structure | Repository structure | Value | | ——————— | —— | | * References | | | * Count | 1983 | | * Branches | 4 | | * Tags | 1125 | | * Remotes | 854 | | * Others | 0 | | | | | * Reachable objects | | | * Count | 518955 | | * Commits | 77469 | | * Trees | 188865 | | * Blobs | 251631 | | * Tags | 990 |
  • Three subcommands have been added to the 'git refs' command to unify disparate and overlapping low-level operations on references (git for-each-ref, git show-ref, git update-ref, and git pack-refs):
    • 'git refs optimize' - optimizing the backend for storing references (similar to 'git pack-refs').
    • 'git refs list' - outputs a list of all references (similar to 'git for-each-ref' or 'git show-ref').
    • 'git refs exists' - checks the existence of a reference (analogous to 'git show-ref --exists').
  • The format for exporting or importing commit history has been expanded to include cryptographic signatures that use both SHA-1 and SHA-256 algorithms as object identifiers. Support for processing signed tags similarly to signed commits has been implemented in the "git fast-import" command. New options "—signed-commits=" and "—signed-tags=" have been added to manage the processing of signed commits and tags during the import stage (the mode can take values verbatim, warn-verbatim, warn-stri, strip, or abort).
  • The "git maintenance" command now supports a new strategy called "geometric" ("git config set maintenance.strategy geometric"), which reduces maintenance time for large monorepositories. Compared to the previously available strategy that uses logic similar to the "git gc" command, the new strategy avoids repacking all objects and eliminates resource-intensive operations, such as merging all pack files (where possible, merging is done in parts without cleaning up remote objects).
  • A new command "git sparse-checkout clean" has been added to simplify the restoration of the working directory state by removing files that do not match the new sparse-checkout definition, which should not be present in the local copy according to the current sparse-checkout parameters.
  • Refactoring has been carried out to simplify the codebase and reduce the use of the global variable the_repository.
  • The use of Bloom filters, a probabilistic structure for set membership testing that permits false positives for non-existent elements but excludes missing existing elements, has been expanded. Bloom filters are now used to speed up history searches when specifying patterns in file paths, for example, "foo/bar/*/baz".
  • The performance of the "git describe" command has been improved by up to 30% due to the use of a priority queue. Renaming links in "git remote rename" has been accelerated. The use of indices has been expanded in "git ls-files". The performance of the "git log -L" command has been significantly sped up by eliminating unnecessary three-level comparisons during merge commit processing. Optimizations have been made in the xdiff library.
  • An optional feature has been introduced that allows the use of Rust implementations for some internal functions, such as the encoding and decoding of variable-length integer values. By default, Rust code is not used, and to enable it, the build flag WITH_RUST must be specified. In the future, a redesign of more significant internal components of Git in Rust is expected, along with adding Rust to the mandatory build dependencies in Git 3.0.
  • The list of incompatible changes that will be applied in the Git 3.0 branch has been updated. In Git 3.0, it has been decided to change the default setting of init.defaultBranch to 'main', meaning that in repositories created with the 'git init' command, the default branch will be named 'main' instead of 'master'. It is also noted that the transition to object identifiers based on the SHA-256 hashing algorithm will be the default when initializing new repositories. To simplify portability between repositories with object identifiers based on SHA-1 and SHA-256 hashes, it will be possible to perform push and pull operations from a repository using one hashing algorithm to a repository using another hashing algorithm.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster