Release of the distributed source control system Git 2.25

Available release of the distributed source control system Go to 2.25.0. Git is one of the most popular, reliable, and high-performance version control systems that provides flexible non-linear development tools based on branching and merging branches. To ensure the integrity of the history and resistance to retroactive changes, implicit hashing of the entire previous history in each commit is used, it is also possible to verify individual tags and commits with digital signatures from the developers.

Compared to the previous release, 583 changes were accepted into the new version, prepared with the participation of 84 developers, of which 32 took part in the development for the first time. All innovations:

  • Approaching stabilization and full readiness is the possibility of partial cloning (partial clones), which allows you to transfer only part of the data and work with an incomplete copy of the repository. Normal cloning copies all data from the repository, including every version of every file in the change history. For very large repositories, copying data results in a significant increase in traffic and disk space, even if the developer is only interested in a subset of the files. To make it easier to obtain only a portion of the working source tree, the new release introduces an experimental "sparse-checkout" command and a new "--sparse" option for the "clone" command.

    Previously, the selective cloning process was done through the job filters to filter out redundant content and the "--no-checkout" option to disable the completion of missing files. After that, before performing the checkout operation, it was necessary to enable the core.sparseCheckout setting and define a list of exclusion path patterns in the .git/info/sparse-checkout file. For example, to clone without blobs and prevent extraction of files from nested directories 2 or more deep, you could run:

    git clone --filter=blob:none --no-checkout /your/repository/here repo
    $cd repo
    $ cat >.git/info/sparse-checkout
    /*
    !/*
    EOF
    $ git config core.sparseCheckout 1
    $ git checkout .

    The new command "git sparse-checkout" greatly simplifies the work and reduces the process of organizing work with an incomplete repository to commands:

    git clone --filter=blob:none --sparse /your/repository/here repo
    git sparse-checkout set /path/to/check/out

    The sparse-checkout command allows you to set a list of checkout paths (set) without manually setting .git/info/sparse-checkout, as well as display the current list of paths (list) and enable or disable partial checkouts (enable/disable).

    To optimize work with very large repositories and lists of templates, the setting "git config core.sparseCheckoutConeβ€œ, which restricts allowed patterns (instead of arbitrary .gitignore patterns, you can specify whether all paths and whether all files in a given subdirectory should be checked out). For example, if a large repository has a directory "A/B/C" and all the work is concentrated in the subdirectory "C", then when the sparseCheckoutCone mode is enabled, the command "git sparse-checkout set A/B/C" will extract the contents of "C" completely, but from "A" and "B" will extract only the parts necessary to work with "C".

  • Removed all references to the "--preserve-merges" option from the documentation ("git rebase -h"), which has been deprecated and should be used instead to rebase a set of commits.git rebase --rebase-mergesΒ«.
  • To improve the readability of patch messages sent to mailing lists, the "git format-patch --cover-from-description subject" option has been added, which uses the first paragraph of the branch description text as the cover letter subject for a patch set.
  • Implemented support for the combined use of the "git apply -3way" command and the "merge.conflictStyle" setting ("git apply" now takes into account the conflict description style from merge.conflictStyle when it is necessary to resolve the conflict after trying to apply the patch file to the repository).
  • The function definition code used in operations such as "git diff/grep --show-function/ --function-context" has been extended to support defining function boundaries in programs written in Elixir.
  • A new option "--pathspec-from-file" has been added to "git add", "git commit", "git reset" and other commands, allowing you to load a list of paths from a file or input stream instead of listing them on the command line.
  • Fixed an issue with detecting directory-level renames when writing commits. The definition did not work in case of moving the contents of the subdirectory to the root of the repository.
  • An initial implementation of the revised "git add -i" command, which allows you to add modified content interactively, has been proposed, rewritten from Perl to C. A similar reworking of the "git add -p" command is underway.
  • The "git log --graph" command has been refactored, which forms an ASCII image of a graph with a history of changes in the repository. The revision made it possible to significantly improve and simplify the output without distorting the structure of the history, which, for example, solved the problem with the picture crawling out of the terminal line width.
  • The "git log --format=.." option, which allows you to change the output format,
    extended with support for "l/L" flags to display only the part of the email address specified before the "@" symbol (for example, it is useful when all developers have all emails in the same domain).

  • Added "set-url" subcommand to "git submodule" command.
  • Test suites have been updated in preparation for the transition to
    hashing algorithm SHA-2 instead of SHA-1.

Source: opennet.ru

Add a comment