Git 2.51.0 has been officially released after an accelerated 8-week development cycle, introducing significant performance improvements and security enhancements that lay the groundwork for the upcoming Git 3.0 major release.
The latest version delivers substantial speed improvements for core Git operations, implements SHA-256 as the default hash function, and introduces the reftable format as the new reference backend standard.
Key Takeaways
1. 22x faster git-fetch and 18x faster git-push through batched updates in large repositories.
2. SHA-256 replaces SHA-1 as the default hash algorithm, preventing collision attacks.
3. Reftable backend fixes Windows/macOS issues, plus stable git-switch and git-restore commands.
The most notable enhancement in Git 2.51.0 involves dramatic performance optimizations for git-push(1) and git-fetch(1) commands through the implementation of batched updates.
Previously, these commands created separate transactions for each reference update, resulting in significant overhead, particularly in repositories with extensive reference collections such as monorepos or environments with complex CI/CD pipelines.
The new batched update system consolidates multiple reference updates under a single transaction while maintaining the ability for individual updates to fail independently.
This architectural improvement eliminates the performance bottlenecks associated with multiple transaction initiation and teardown phases.
For repositories containing 10,000 references, the improvements are substantial: git-fetch(1) demonstrates a 22x performance improvement for the reftable backend and 1.25x improvement for the files backend, while git-push(1) shows an 18x performance improvement for the reftable backend and 1.21x improvement for the files backend.
SHA-256: Default Hash Algorithm
Git 2.51.0 marks SHA-256 as the default hash algorithm for Git 3.0, replacing the aging SHA-1 implementation.
This transition addresses critical security vulnerabilities, particularly the SHAttered attack that demonstrated practical SHA-1 hash collisions.
While Git has utilized a hardened SHA-1 implementation since version 2.13.0, the move to SHA-256 provides robust long-term security for Git’s content-addressable filesystem.
The SHA-256 implementation maintains all the advantages of hash-based object addressing, including fast object lookup, easy integrity verification through single-bit-flip detection, and reliable object signing capabilities.
The release introduces the reftable format as the default reference backend for Git 3.0, addressing multiple limitations of the traditional files backend.
The reftable system resolves case-sensitivity issues on Windows and macOS platforms, eliminates Unicode normalization problems, and provides atomic reference transactions.
Additionally, it uses geometric compaction for superior performance and reduced storage requirements through binary format with prefix compression.
Git 2.51.0 also removes the experimental status from git-switch(1) and git-restore(1) commands, which were introduced to simplify the confusing dual functionality of git-checkout(1).
The release includes pagination support for git-for-each-ref(1) through the new –start-after flag, enabling efficient reference listing in large repositories.
Furthermore, git-whatchanged(1) is scheduled for removal in Git 3.0, requiring users to explicitly use the –i-still-use-this flag.
Safely detonate suspicious files to uncover threats, enrich your investigations, and cut incident response time. Start with an ANYRUN sandbox trial →
Source link