Release of the distributed source control system Git 2.24

Available Release of the distributed source code management system Git 2.24.0Git is one of the most popular, reliable, and high-performance version control systems, providing flexible means of nonlinear development based on branching and merging. Implicit hashing of the entire previous history in every commit ensures the integrity of history and resilience to changes made 'in retrospect.' It is also possible to validate with digital signatures from developers for individual tags and commits.

Compared to the previous release, the new version includes 544 changes prepared with the participation of 78 developers, of which 21 participated in the development for the first time. Key innovations:

  • Support for configuration macros has been added, allowing for quick switching between different settings without delving into the specific options associated with them. With macros, there is no need to remember which settings need to be changed to activate certain functionalities. For example, in the case of slow operations with a large repository, switching to a new indexing mechanism, enabling path prefix compression, and utilizing the untracked files cache may be required by setting the index.version parameter to 4 and activating core.untrackedCache. Macros save time on finding the right solution in the documentation and allow immediate activation of settings optimized for repositories with a large number of files:

    git config feature.manyFiles true

  • By default, object storage in the form of a commit graph (commit-graph) is enabled, where indexing uses a graph structure instead of a linear list of object hashes with references to other objects. Previously, to identify releases containing a specific fix, it was necessary to load each object from disk to find references, but with graph storage, all necessary relationships can be immediately determined. Transitioning to commit graph storage in the Linux kernel and Git repositories has led to nearly a twofold increase in branch operation performance. To enable the new storage method after upgrading to Git 2.24, run the command "git gc."

    Among the changes related to commit-graph, there is also the unification of the progress indicator implementation across other commands (such as "git commit-graph write", "git commit-graph verify", etc.). The progress indicator is now displayed by default only for the terminal (to change this behavior, the "-[no-]progress" option should be used). Additionally, a new configuration parameter fetch.writeCommitGraph has been added, which enables automatic updates to the commit graph file during "git fetch" operations (all commits retrieved from external repositories will immediately be added to the commit-graph without the need to separately run auto-gc);

  • A command for rewriting history has been added — "git filter-repo", which serves as a simpler alternative to the command "git filter-branch" for performing operations on the history of changes in the repository (for example, deleting a file from the repository or extracting the change history of a specific directory). For efficiency, operations in "git filter-repo" are carried out on a continuous stream representation of history instead of a sequential commit-based analysis.

    History filtering is performed using the "-path-{glob,regex}" option, allowing for both simple masks and regular expressions. There are also options for performing a "search and replace" operation or cleaning binary objects that exceed a specified size. Each rewritten commit is assigned a new SHA-1 hash identifier, and all references to the replaced commit are updated according to the new identifier.

    To output a summary with statistics about the repository (number of objects by type, largest files and directories, which extensions take up more disk space, etc.), the "-analyze" option is provided. To extend functionality, there is an option to connect arbitrary callback handlers in Python, through which new subcommands can be created and various events can be processed (for example, new file types);

  • The option "--end-of-options" has been added, allowing separation of options from reference names that might start with the "-" character and be interpreted as options (e.g., "git log --end-of-options --super-dangerous-option"). While such names can be escaped in practice as "git log 'refs/heads/--super-dangerous-option'", scripts may encounter issues determining the namespace. The commonly used separator "--" is not applicable here, as it is already used to separate reference names from files (e.g., "git log --end-of-options --super-dangerous-option ^master -- path/to/file");
  • Options "--strategy" and "--strategy-option" have been added to "git rebase --rebase-merges" for selecting the merge strategy,;
  • A new handler " .git/hooks/pre-merge-commit" has been introduced, invoked after the merge, but before the resulting commit is written;
  • The command auto-completion engine has been enhanced to support the addition of configuration variables based on specific command settings.
    For instance, if you need to type "git -c core.autocrlf=false add path/to/my/file", but don't remember the exact name of the variable "core.autocrlf", you can press Tab for a suggestion.

Additionally, Git developers added establish a project participant code of conduct, defining the core principles for resolving conflicts. This document is based on the recommendations of theContributor Covenant, applied in many open projects, including the Linux kernel, Eclipse, Freedesktop, GitLab, Ruby, and Kubernetes. The document outlines equal opportunities for all participants, regardless of their beliefs, age, gender, religious preferences, educational level, social status, or nationality. The community encourages friendly communication, understanding, empathy towards the problems of other participants, the acceptance of constructive criticism, and the adoption of solutions that are best for the entire community. Trolling, offensive communication, attempts to demean, harassment, invasion of privacy, disclosure of personal information, or any other actions considered inappropriate in professional communication are strictly prohibited.

Source: opennet.ru

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