Release of the Git source code management system 2.37

The release of the distributed version control system Git 2.37 has been announced. Git is one of the most popular, reliable, and high-performance version control systems, offering flexible tools for non-linear development based on branching and merging. To ensure the integrity of the history and resistance to 'back-dating' changes, implicit hashing of the entire previous history in each commit is used, along with the possibility of authenticating individual tags and commits with developers' digital signatures.

Compared to the previous release, the new version includes 395 changes prepared with the participation of 75 developers, of whom 20 contributed for the first time. Key innovations include:

  • The mechanism for sparse indexes, covering only part of the repository, has been brought to readiness for widespread use. Sparse indexes can improve performance and save space in repositories where partial cloning (sparse-checkout) is performed or work is done with an incomplete copy of the repository. In this new release, work has been completed on integrating sparse indexes into the 'git show', 'git sparse-checkout', and 'git stash' commands. The most noticeable performance gain from using sparse indexes is observed in the 'git stash' command, where execution speed has increased by 80% in certain situations.
  • A new mechanism called "cruft packs" has been implemented for packaging unreachable objects that have no references in the repository (no branches or tags pointing to them). Unreachable objects are deleted by the garbage collector, but they remain in the repository for a certain period before deletion to prevent race conditions. To track the duration of unreachable objects, it is necessary to bind them to timestamps indicating their modification, which prevents them from being stored in the same pack file where all objects share a common timestamp. The previous method of saving each object in a separate file led to issues when there were many new unreachable objects that had not yet been marked for deletion. The proposed "cruft packs" mechanism allows all unreachable objects to be stored in a single pack file, while the modification timestamps for each object are maintained in a separate table stored in a file with the extension ".mtimes."
  • For Windows and macOS, a built-in mechanism for tracking changes in the file system has been implemented, allowing for the execution of commands like "git status" without the need to traverse the entire working directory. Previously, external utilities such as Watchman could be connected through hooks for change tracking, but this required the installation of additional software and configuration. Now, this functionality is built-in and can be enabled with the command "git config core.fsmonitor true."
  • In the command "git sparse-checkout," support for the alternative mode "—cone" for pattern definition in partial cloning has been deprecated. This method allowed enumerating individual files for the cloning operation using the syntax from ".gitignore," which did not enable the optimization of partial indexes.
  • The flexibility of configuring the fsync() call for writing changes to disk has been enhanced. The parameter "core.fsyncMethod" now includes support for the "batch" synchronization strategy, which speeds up operations when writing a large number of individual files by accumulating changes in the write-back cache, flushed with a single fsync() call. A test was conducted where 500 files were added using the "git add" command, which completed in 0.15 seconds with the new mode enabled, compared to 1.88 seconds when calling fsync() for each file, and 0.06 seconds without using fsync.
  • Branch traversal commands, like "git log" and "git rev-list", now include the option "--since-as-filter=X", allowing filtering out commit information for commits older than "X". Unlike the "--since" option, the new command is implemented as a filter that does not stop after the first commit older than the specified time.
  • In the "git remote" command, when specifying the "-v" flag, information about partial clones of the repository is now displayed.
  • A new setting "transfer.credentialsInUrl" has been added, which can take values "warn", "die", and "allow". If credentials are provided in plain text within the "remote..url" parameter, attempts to perform "fetch" or "push" operations will result in an error if the "transfer.credentialsInUrl" setting is set to "die", or a warning if it is set to "warn."
  • By default, a new implementation of the interactive mode for the "git add -i" command has been introduced, rewritten from Perl to C.

Source: opennet.ru

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