Release of the distributed version control system Git 2.22

Introduced Release of the distributed source code management system Git 2.22.0Git is one of the most popular, reliable, and high-performance version control systems, providing flexible tools for non-linear development based on branching and merging. Implicit hashing of all previous history in each commit is used to ensure the integrity of history and resilience to retroactive changes. Digital signatures from developers can also be used to verify specific tags and commits.

Compared to the previous release, the new version includes 745 changes made with the participation of 74 developers, 18 of whom are contributing for the first time. Key innovations:

  • Available since version 1.18, the new commit transfer mode 'git rebase --rebase-merges' replaces the old option '--preserve-merges', which is now marked as deprecated. The 'git rebase' command is used to replace a series of commits with a new base commit, for instance, to shift a specific branch where a new feature is being developed to the current state of the master branch that includes fixes added after the branch was created:

    o — o — o (my-feature)

    /

    o — o — o — o — o (master)

    o — o — o (my-feature)

    /

    o — o — o — o — o (master)

    To preserve the branching structure in the rebased branch, the '--preserve-merges' option could previously be used, which, when run in interactive mode (git rebase -i --preserve-merges), allowed editing the commit history but did not guarantee complete preservation of the repository structure. The new mode '--rebase-merges' allows preserving the structure of changes in the rebased branch while providing a full set of interactive operations, including deletion, regrouping, and renaming of commits.

    For example, '--rebase-merges' , rather than taking focus. to rebase commits from a separate branch onto a newer master branch while preserving the branching structure in the rebased branch and making some on-the-fly changes to the commit messages.

  • Support has been added for creating a new branch based on the merge base of two other branches using the constructs 'git branch new A…B' and 'git checkout -b new A…B', where 'A…B' implies determining the merge base between the two specified commits, similar to how 'git checkout A…B' moves HEAD to the base commit and 'diff A…B' shows changes between commit 'B' and the common ancestor with commit 'A'.

    For example, when working on the separate branch my-feature, the proposed functionality can be used when you need to start from another branch, such as the same point in the master branch from which the my-feature branch was extracted. Previously, this required manually examining the change log, which was inconvenient with a large history of changes, then executing 'git merge-base master my-feature' to calculate the merge base hash between the master and my-feature branches and create a new branch relative to the common ancestor 'git branch my-other-feature hash'. In Git 2.22, to create a branch relative to the merge base of two other branches, you can use the syntax 'git branch my-other-feature A…B';

  • A new option 'git branch --show-current' has been added to display the name of the branch obtained after performing the checkout operation;
  • A new option 'git checkout --no-overlay -- dir' has been added, allowing the checkout operation to bring the contents of the directory dir to a state fully matching that of the master branch. For example, if the local copy of the directory dir has a file that is missing in the master branch, it will be left intact by default when executing 'git checkout master -- dir', and with the '--no-overlay' option, it will be deleted;
  • The 'git diff' command has implemented a universal API for parsing options, which unifies the handling of options with other git utilities. For example, in 'git diff', all options now have their antagonists available ('--function-context' and '--no-function-context');
  • A new ability to filter attached extended tags ('trailer' — additional informational flags such as Signed-off-by and Co-authored-by) in the output of 'git log' has been added. Tags can be filtered by both key and value, for example:
    'git log --pretty="%(trailers:key=Reviewed-by,valueonly)";
  • A new tracing mechanism Trace2 has been added, offering a more flexible and structured output format. Trace2 allows gathering telemetry about the operations performed and performance data for more detailed analysis and debugging (the handler is user-defined, no data is sent externally);
  • The 'git bisect' report has been made more readable, now more clearly highlighting problematic commits and providing summary statistics on changes for each file (in terms of the number of changed lines);
  • The heuristics for detecting directory renames have been revised to eliminate false rename tag assignments. Directories that raise doubts are now marked as conflicting.
  • A warning is now issued when attempting to assign a tag to another tag, which is usually done by mistake and may result in the tag being applied to the wrong commit (for instance, the command "git tag -f -m 'updated message' my-tag1 my-tag2" will create a tag on the old tag, while the developer expected the new tag to be set on the commit pointed to by the old tag).
  • Generation for reachability bitmaps repositories has been enabled, storing data about the sets of objects available for each commit and allowing quick verification of the existence of a base object. This structure significantly reduces the time taken for data retrieval operations (git fetch).

Source: opennet.ru

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