Git 2.47 is here, delivering a range of enhancements, including performance boosts, new features, and bug fixes. Key improvements focus on handling large repositories, simplifying branch identification, and strengthening the project's overall stability.
Table of Contents
for-each-ref
: Easily determine the base branch of a commit.%(is-base:)
atom.Faster Large Repositories with Incremental Multi-Pack Indexes
Git 2.47 introduces experimental incremental multi-pack indexes (MIDXs) to tackle performance issues in large repositories with numerous packfiles.
Git stores data in loose files or packed files. While packed files are efficient, searching across many of them slows down object lookups. Repacking helps, but it's resource-intensive. MIDXs, introduced earlier, improve lookups, but updating them can also be slow.
Incremental MIDXs optimize updates by layering indexes. Each layer adds only new objects, making updates much faster. While still experimental, this promises significant scalability improvements.
To use this feature (experimentally):
git multi-pack-index write --incremental
This command adds new packs to the existing MIDX.
Streamlined Base Branch Identification with for-each-ref
Finding a commit's base branch is simplified with a new for-each-ref
atom.
Determining the base branch often requires complex analysis of commit history.
%(is-base:)
The new %(is-base:)
atom in for-each-ref --format
directly identifies potential base branches.
git multi-pack-index write --incremental
This shows branch names, commit hashes, and upstream remote references, aiding base branch identification.
Formalized Platform Support Policy
Git 2.47 establishes a formal platform support policy, outlining supported platforms and their maintenance.
Supported platforms must meet specific criteria, including C99/C11 compliance and stable dependencies.
This policy ensures consistent compatibility and maintainability.
Expanded Unit Test Coverage
Git 2.47 includes significantly more unit tests, enhancing code reliability.
Testing improvements include migrating tests to Git's standard framework and using the Clar framework.
Other Key Updates
git fsck
improvements, including git refs verify
.git mergetool
.Summary
Git 2.47 offers substantial improvements in performance, usability, and maintainability. Incremental MIDXs, enhanced for-each-ref
, a formal support policy, and increased unit test coverage highlight its value.
Resources:
The above is the detailed content of Git 2.47 Released: Incremental Multi-Pack Indexes, Base Branch Detection, and More. For more information, please follow other related articles on the PHP Chinese website!