Git 2.36 source control release

After three months of development, the release of the distributed source control system Git 2.36 has been published. 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, 717 changes were accepted into the new version, prepared with the participation of 96 developers, of which 26 took part in the development for the first time. Main innovations:

  • The "-remerge-diff" option has been added to the "git log" and "git show" commands, which allows you to show the differences between the overall result of the merge and the actual data reflected in the commit after processing the "merge" command, which allows you to visually evaluate the changes made as a result merge conflict resolution. The usual "git show" command separates different conflict resolutions with indentation, making it difficult to understand the changes. For example, in the screenshot below, the line β€œ+/-” without indentation shows the last conflict resolution associated with the renaming in the first branch of sha1 to oid in the comment, and β€œ+/-” with indentation shows the initial conflict resolution caused by the appearance of an additional argument in the second branch in the dwim_ref() function.
    Git 2.36 source control release

    When using the "--remerge-diff" option, the differences between conflict resolutions are not separated for each parent branch, but the overall differences between a file that has merge conflicts and a file that has conflicts resolved are shown.

    Git 2.36 source control release

  • Improved flexibility in customizing the behavior of flushing disk caches via the fsync() function call. The previously available core.fsyncObjectFiles parameter has been split into two config variables core.fsync and core.fsyncMethod to allow fsync to be applied not only to object files (.git/objects) but also to other git structures such as references (.git /refs), reflog and pack files.

    Through the core.fsync variable, you can specify a list of internal Git structures, after the write operation, fsync will be additionally called for them. The core.fsyncMethod variable allows you to select a method for flushing the cache, for example, you can select fsync to use the system call of the same name, or specify writeout-only to use pending writeback (pagecache writeback).

  • To protect against vulnerabilities that manipulate other users' substitution of .git directories into shared partitions, verification of the repository owner has been strengthened. Running any git commands is now only allowed in their own ".git" directories. If the repository directory is owned by another user, an error will be thrown by default. This behavior can be disabled using the safe.directory setting.
  • Added the --batch-command option to the "git cat-file" command, which is intended for displaying the original contents of Git objects, supplementing the previously available "--batch" and "--batch-check" commands with the ability to adaptively select the type of output through the indication " contents <object>" to display the contents, or "info <object>" to display information about the object. Additionally, the "flush" command is supported to flush the output buffer.
  • The "-oid-only" ("--object-only") option has been added to the "git ls-tree" command, which is intended for listing the contents of an object tree, which, by analogy with "--name-only", displays only object identifiers to simplify the call from scripts. The "--format" option has also been implemented, allowing you to define your own output format by combining mode, type, name, and size information.
  • In the "git bisect run" command, the definition of not setting the sign of an executable file for the script and outputting errors with codes 126 or 127 in this case is implemented (previously, if the script could not be run, all revisions were marked as having problems).
  • Added "--refetch" option to "git fetch" command to fetch all objects without informing the other side of the content already on the local system. This behavior can be useful for restoring state after failures when there is no certainty about the integrity of local data.
  • Added support for sparse indexes to git update-index, git checkout-index, git read-tree, and git clean commands to improve performance and save space in repositories that perform sparse indexes. cloning (sparse-checkout).
  • The behavior of the "git clone --filter=... --recurse-submodules" command has been changed, which now leads to partial cloning of submodules (previously, when executing such commands, the filter was applied only to the main content, and submodules were cloned completely without taking into account the filter).
  • Support for specifying filters for selective placement of content, similar to partial clone operations, has been added to the "git bundle" command.
  • Added "--recurse-submodules" option to "git branch" command to traverse submodules recursively.
  • Userdiff has proposed a new handler for the Kotlin language.

Source: opennet.ru

Add a comment