The release of the distributed version control system Git 2.38 has been announced. Git is one of the most popular, reliable, and high-performance version control systems, providing flexible tools for nonlinear development based on branching and merging. To ensure the integrity of history and resilience to changes made 'retroactively', implicit hashing of the entire previous history is used in each commit; it is also possible to verify digital signatures of developers for individual tags and commits.
Compared to the previous release, this new version includes 699 changes, prepared with the participation of 92 developers, of which 24 participated in the development for the first time. Key innovations include:
- The main package includes the 'scalar' utility developed by Microsoft for managing large repositories. The utility was originally written in C#, but a rewritten version in C has been included in Git. The new utility differs from the Git command by including additional features and settings that enhance performance when working with very large repositories. For example, when using scalar, the following features are applied:
- Partial cloning for working with an incomplete copy of the repository.
- A built-in change tracking mechanism for the file system (FSMonitor) that allows avoiding a scan of the entire working directory.
- Indexes covering objects in different pack files (multi-pack).
- Commit-graph files with a commit graph index applied to optimize access to commit information.
- Periodic background tasks to maintain optimal repository structure in the background without blocking the interactive session (once an hour, a task is executed to preemptively load fresh objects from the remote repository and update the commit graph file, and a packing process for the repository is launched every night).
- The 'sparseCheckoutCone' mode, which limits acceptable patterns during partial cloning.
- An option '—update-refs' has been added to the 'git rebase' command to update dependent branches that intersect with moved branches, so that checkout operations to each dependent branch to switch to the required commit do not have to be performed manually.
- The compatibility of the 'git rm' command with partial indexes has been ensured.
- Improved behavior of the 'git mv A B' command when moving a file from the working tree with partial indexes to an external area where this mode does not apply.
- Optimized the bitmap file format for working with large repositories—optional index table added with a list of selected commits and their offsets.
- A new mode has been implemented in the 'git merge-tree' command, which computes a merge result tree based on the two specified commits as if the histories of those commits were combined.
- A 'safe.barerepository' setting has been added to control the ability to place bare repositories (repositories without a working tree) inside other git repositories. When set to 'explicit', only bare repositories in the top-level directory will be allowed. To enable bare repositories in subdirectories, the value 'all' should be used.
- The 'git grep' command now includes the '-m' ('--max-count') option, similar to the corresponding option in GNU grep, allowing the number of output matches to be limited.
- The 'ls-files' command has a '--format' option implemented for configuring the output fields (e.g., allowing the display of object names, modes, etc.).
- In 'git cat-file', when displaying object content, the ability to account for author bindings to emails specified in the mailmap file has been implemented.
Source: opennet.ru
