Git 2.51 source control release

After two months of development, the distributed source control system Git 2.51 is released. Git is highly productive and provides non-linear development tools based on branching and merging branches. To ensure the integrity of history and resistance to retroactive changes, implicit hashing of the entire previous history in each commit is used, as well as digital signatures of individual tags and commits by developers. The Git code is distributed under the GPLv2+ license.

Compared to the previous release, the new version includes 506 changes prepared with the participation of 91 developers (21 were new to Git development). The main innovations (1, 2, 3):

  • The performance of the "git push" and "git fetch" commands in repositories with a large number of links has been improved. The acceleration is achieved by updating links in batch mode, in which several links are processed in one transaction at once, instead of creating a separate transaction for updating each link. Optimization has significantly increased the speed of the "reftable" backend, which is now ahead of the "files" backend in performance. For example, in a test repository with 10 thousand links, the performance of "git fetch" increased by 22 times when using the "reftable" backend, and by 1.25 times when using the "files" backend. For "git push", the increase was 18 and 1.21 times, respectively.
  • A new method for packing parts of a repository that are not related to tracking unreachable objects that are not referenced by branches or tags in the repository is proposed. Information about unreachable objects is stored in separate pack files ("cruft packs"), which led to the need to reflect them in multi-pack indexes (MIDX) to cover objects that were initially unreachable and stored only in the cruft pack, but then became reachable after a commit referencing them.

    In the new version, additional copies of reachable objects stored only in cruft files are saved when repacking pack files. This change ensures that the set of pack files used to store reachable objects does not contain objects that reference other objects stored outside this set. To exclude unreachable content of cruft files from multipack indexes (MIDX), the "repack.MIDXMustContainCruft" setting is proposed, which allows to significantly reduce the size of such indexes. Enabling the setting in the GitHub repository reduced the size of MIDX indexes by 38%, accelerated writing to MIDX indexes by 35%, and increased read performance by 5%.

  • The "--path-walk" option has been added to the "git pack-objects" command, enabling a new method for collecting information about objects when repacking pack files. Instead of traversing objects in revision order, the "--path-walk" mode traverses objects by file paths, allowing all objects with the same file path to be packed at once. This approach eliminates the heuristic that uses hashing to determine the relationship of an object to its file path, and eliminates the need to sort objects before packing. The "--path-walk" mode produces significantly smaller pack files than when grouping objects using hashes.
  • A format for exchanging stashed working tree and index states in a repository created with the git stash command is defined. The new format encodes stashed changes as a sequence of commits. The git stash import and export subcommands are provided, which can be used to transfer stashed states from one system to another and push or pull them as if they were regular branches or tags. git stash export --to-ref refs/stashes/my-stash git push origin refs/stashes/my-stash … git fetch origin '+refs/stashes/*:refs/stashes/*' git stash import refs/stashes/my-stash
  • The "git cat-file" command, which outputs the contents of specified objects, now displays information about missing objects (e.g. due to repository corruption) and submodules when using the "--batch" and "--batch-check" options. Previously, when specifying a path to a submodule, the "git cat-file --batch-check" command would output "missing", but now it will display the object identifier.
  • The "git log" command uses Bloom filter optimizations to speed up history searches when specifying filters with multiple file paths, such as "git log - path/to/a path/to/b".
  • The 'git switch' and 'git restore' commands, which had been considered experimental since 2019, have been stabilized. The commands are presented as modern equivalents of 'git checkout', separating the loosely related capabilities of that command, such as manipulating branches (switching and creating) and restoring files in the working directory.
  • The "git whatchanged" command, equivalent to "git log --raw", has been deprecated and scheduled for removal in the Git 3.0 branch.
  • The git for-each-ref command now has a "--start-after" option that can be used in conjunction with the "--count" option to provide paginated output.
  • The 'git merge' and 'git pull' commands now have a '--compact-summary' option to use the compact summary format instead of the diffstat format.
  • The Git codebase allows the "bool" keyword, introduced in the C99 standard, and documents some experimental C99 features used in Git (for example, "(struct foo){ .member = value };" is planned to be allowed in mid-2026). A C99-capable compiler is mandatory for Git as of 2021, but C99 features are being implemented very carefully to maintain compatibility with compilers that only partially support the standard.
  • The patch submission rules have been updated to allow patch submissions under a pseudonym, rather than just the developer's real name. This change is consistent with the kernel patch submission rules. Linux.
  • The list of breaking changes that will be applied in the Git 3.0 branch has been updated. Notable changes in the upcoming Git 3.0 release include the default use of SHA-256-based object identifiers when initializing new repositories, and the use of the "reftable" format for storing branch and tag references in a repository (using block storage from the JGit project, optimized for storing very large numbers of references).

Source: opennet.ru

Buy reliable hosting for sites with DDoS protection, VPS VDS servers πŸ”₯ Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster