Release of Git 2.36 Version Control System

After three months of development, the release of the distributed version control system Git 2.36 has been published. Git is one of the most popular, reliable, and high-performance version control systems, offering flexible means for non-linear development based on branching and merging. To ensure the integrity of history and resilience to 'rewriting' changes, implicit hashing of the entire previous history is used in each commit, and digital signatures from developers can authenticate individual tags and commits.

Compared to the previous release, the new version incorporates 717 changes, contributed by 96 developers, of whom 26 participated in the development for the first time. Key innovations include:

  • The commands 'git log' and 'git show' have been enhanced with the '--remerge-diff' option, enabling users to display the differences between the common merge result and the actual data reflected in the commit after executing the 'merge' command, allowing for a clearer assessment of the changes made during conflict resolution. The standard 'git show' command separates different conflict resolutions with indentation, making it harder to understand the changes. For example, in the screenshot below, the lines '+/-' without indentation display the latest resolution of the conflict related to renaming in the first branch, while '+/-' with indentation shows the initial conflict resolution caused by an additional argument appearing in the second branch of the dwim_ref() function.
    Release of Git 2.36 Version Control System

    When using the '--remerge-diff' option, the differences between conflict resolutions are not separated for each parent branch, but rather the overall differences between the file with merge conflicts and the file where conflicts are resolved are displayed.

    Release of Git 2.36 Version Control System
  • The flexibility of resetting disk caches through the fsync() function has been enhanced. The previously available core.fsyncObjectFiles parameter is divided into two configuration variables: core.fsync and core.fsyncMethod, allowing 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.

    The core.fsync variable allows you to specify a list of internal Git structures for which fsync will be additionally invoked after the write operation. The core.fsyncMethod variable enables you to choose the method for flushing the cache, for example, you can select fsync to apply the corresponding system call or specify writeout-only to use deferred writing (pagecache writeback).

  • To protect against vulnerabilities that manipulate substitutions by other users of .git directories in shared partitions, the owner verification of the repository has been strengthened. Executing any git commands is now only permitted in your own '.git' directories. If the directory containing the repository belongs to another user, an error will be displayed by default. This behavior can be disabled using the safe.directory setting.
  • The 'git cat-file' command, intended for outputting the raw contents of Git objects, has been enhanced with the '--batch-command' option, complementing the previously available '--batch' and '--batch-check' commands with the adaptive selection of output type by specifying 'contents ' for content output or 'info ' for object information output. An additional 'flush' command is supported for flushing the output buffer.
  • The 'git ls-tree' command, which is used to generate a list of object tree contents, has added the '--oid-only' ('--object-only') option, similar to '--name-only', which outputs only object IDs to simplify calls from scripts. The '--format' option has also been implemented, allowing you to define your own output format by combining information about mode, type, name, and size.
  • In the 'git bisect run' command, the definition of the absence of an executable file flag for the script has been implemented, with errors displayed in this case with codes 126 or 127 (earlier, if the script could not be executed, all revisions were marked as having issues).
  • In the 'git fetch' command, the '--refetch' option has been added to retrieve all objects without informing the other party of the content already present on the local system. This behavior can be useful for restoring state after failures when there is uncertainty about the integrity of local data.
  • The commands "git update-index", "git checkout-index", "git read-tree", and "git clean" now support partial indexes (sparse index), which enhance performance and save space in repositories where sparse-checkout operations are performed.
  • The behavior of the command "git clone --filter=... --recurse-submodules" has been changed; it now results in the partial cloning of submodules (previously, when executing such commands, the filter only applied to the main content, while submodules were cloned completely without consideration of the filter).
  • The command "git bundle" has been enhanced to allow specifying filters for selective content inclusion, similar to partial cloning operations.
  • The command "git branch" now includes the option "--recurse-submodules" for recursive traversal of submodules.
  • A new handler for the Kotlin language has been proposed in userdiff.
  • Source: opennet.ru

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