De ontwikkelaars achter Git hebben versies 2.27.0 van hun software uitgebracht. Met Git kunnen onder andere software- en projectontwikkelaars beheer en versiecontrole over data en broncode uitvoeren. Het heeft onder andere complete branching- en merging-functies, en wordt onder de gpl versie 2 uitgegeven. Voor een overzicht van vergelijkingen tussen Git en andere versiebeheersystemen verwijzen we naar deze pagina. De veranderingen zien er als volgt uit:
Updates since v2.26
Backward compatibility notesUI, Workflows & Features
- When "git describe C" finds that commit C is pointed by a signed or annotated tag, which records T as its tagname in the object, the command gives T as its answer. Even if the user renames or moves such a tag from its natural location in the "refs/tags/" hierarchy, "git describe C" would still give T as the answer, but in such a case "git show T^0" would no longer work as expected. There may be nothing at "refs/tags/T" or even worse there may be a different tag instead. Starting from this version, "git describe" will always use the "long" version, as if the "--long" option were given, when giving its output based on such a misplaced tag to work around the problem.
- "git pull" issues a warning message until the pull.rebase configuration variable is explicitly given, which some existing users may find annoying---those who prefer not to rebase need to set the variable to false to squelch the warning.
- The transport protocol version 2, which was promoted to the default in Git 2.26 release, turned out to have some remaining rough edges, so it has been demoted from the default.
Performance, Internal Implementation, Development Support etc.
- A handful of options to configure SSL when talking to proxies have been added.
- Smudge/clean conversion filters are now given more information (e.g. the object of the tree-ish in which the blob being converted appears, in addition to its path, which has already been given).
- When "git describe C" finds an annotated tag with tagname A to be the best name to explain commit C, and the tag is stored in a "wrong" place in the refs/tags hierarchy, e.g. refs/tags/B, the command gave a warning message but used A (not B) to describe C. If C is exactly at the tag, the describe output would be "A", but "git rev-parse A^0" would not be equal as "git rev-parse C^0". The behavior of the command has been changed to use the "long" form i.e. A-0-gOBJECTNAME, which is correctly interpreted by rev-parse.
- "git pull" learned to warn when no pull.rebase configuration exists, and neither --[no-]rebase nor --ff-only is given (which would result a merge).
- "git p4" learned four new hooks and also "--no-verify" option to bypass them (and the existing "p4-pre-submit" hook).
- "git pull" shares many options with underlying "git fetch", but some of them were not documented and some of those that would make sense to pass down were not passed down.
- "git rebase" learned the "--no-gpg-sign" option to countermand commit.gpgSign the user may have.
- The output from "git format-patch" uses RFC 2047 encoding for non-ASCII letters on From: and Subject: headers, so that it can directly be fed to e-mail programs. A new option has been added to produce these headers in raw.
- "git log" learned "--show-pulls" that helps pathspec limited history views; a merge commit that takes the whole change from a side branch, which is normally omitted from the output, is shown in addition to the commits that introduce real changes.
- The interactive input from various codepaths are consolidated and any prompt possibly issued earlier are fflush()ed before we read.
- Allow "git rebase" to reapply all local commits, even if the may be already in the upstream, without checking first.
- The 'pack.useSparse' configuration variable now defaults to 'true', enabling an optimization that has been experimental since Git 2.21.
- "git rebase" happens to call some hooks meant for "checkout" and "commit" by this was not a designed behaviour than historical accident. This has been documented.
- "git merge" learns the "--autostash" option.
- "sparse-checkout" UI improvements.
- "git update-ref --stdin" learned a handful of new verbs to let the user control ref update transactions more explicitly, which helps as an ingredient to implement two-phase commit-style atomic ref-updates across multiple repositories.
- "git commit-graph write" learned different ways to write out split files.
- Introduce an extension to the commit-graph to make it efficient to check for the paths that were modified at each commit using Bloom filters.
- The approxidate parser learns to parse seconds with fraction and ignore fractional part.
- The userdiff patterns for Markdown documents have been added.
- The sparse-checkout patterns have been forbidden from excluding all paths, leaving an empty working tree, for a long time. This limitation has been lifted.
- "git restore --staged --worktree" now defaults to take the contents out of "HEAD", instead of erring out.
- "git p4" learned to recover from a (broken) state where a directory and a file are recorded at the same path in the Perforce repository the same way as their clients do.
- "git multi-pack-index repack" has been taught to honor some repack.* configuration variables.
Fixes since v2.26
- The advise API has been revamped to allow more systematic enumeration of advice knobs in the future.
- SHA-256 transition continues.
- The code to interface with GnuPG has been refactored.
- "git stash" has kept an escape hatch to use the scripted version for a few releases, which got stale. It has been removed.
- Enable tests that require GnuPG on Windows.
- Minor test usability improvement.
- Trace2 enhancement to allow logging of the environment variables.
- Test clean-up continues.
- Perf-test update.
- A Windows-specific test element has been made more robust against misuse from both user's environment and programmer's errors.
- Various tests have been updated to work around issues found with shell utilities that come with busybox etc.
- The config API made mixed uses of int and size_t types to represent length of various pieces of text it parsed, which has been updated to use the correct type (i.e. size_t) throughout.
- The "--decorate-refs" and "--decorate-refs-exclude" options "git log" takes have learned a companion configuration variable log.excludeDecoration that sits at the lowest priority in the family.
- A new CI job to build and run test suite on linux with musl libc has been added.
- Update the CI configuration to use GitHub Actions, retiring the one based on Azure Pipelines.
- The directory traversal code had redundant recursive calls which made its performance characteristics exponential with respect to the depth of the tree, which was corrected.
- "git blame" learns to take advantage of the "changed-paths" Bloom filter stored in the commit-graph file.
- The "bugreport" tool has been added.
- The object walk with object filter "--filter=tree:0" can now take advantage of the pack bitmap when available.
- Instead of always building all branches at GitHub via Actions, users can specify which branches to build.
- Codepaths that show progress meter have been taught to also use the start_progress() and the stop_progress() calls as a "region" to be traced.
- Instead of downloading Windows SDK for CI jobs for windows builds from an external site (wingit.blob.core.windows.net), use the one created in the windows-build job, to work around quota issues at the external site.
- The real_path() convenience function can easily be misused; with a bit of code refactoring in the callers' side, its use has been eliminated.
- Update "git p4" to work with Python 3.
- The mechanism to prevent "git commit" from making an empty commit or amending during an interrupted cherry-pick was broken during the rewrite of "git rebase" in C, which has been corrected.
- Fix "git checkout --recurse-submodules" of a nested submodule hierarchy.
- The "--fork-point" mode of "git rebase" regressed when the command was rewritten in C back in 2.20 era, which has been corrected.
- The import-tars importer (in contrib/fast-import/) used to create phony files at the top-level of the repository when the archive contains global PAX headers, which made its own logic to detect and omit the common leading directory ineffective, which has been corrected.
- Simplify the commit ancestry connectedness check in a partial clone repository in which "promised" objects are assumed to be obtainable lazily on-demand from promisor remote repositories.
- The server-end of the v2 protocol to serve "git clone" and "git fetch" was not prepared to see a delim packets at unexpected places, which led to a crash.
- When fed a midx that records no objects, some codepaths tried to loop from 0 through (num_objects-1), which, due to integer arithmetic wrapping around, made it nonsense operation with out of bounds array accesses. The code has been corrected to reject such an midx file.
- Utitiles run via the run_command() API were not spawned correctly on Cygwin, when the paths to them are given as a full path with backslashes.
- "git pull --rebase" tried to run a rebase even after noticing that the pull results in a fast-forward and no rebase is needed nor sensible, for the past few years due to a mistake nobody noticed.
- "git rebase" with the merge backend did not work well when the rebase.abbreviateCommands configuration was set.
- The logic to auto-follow tags by "git clone --single-branch" was not careful to avoid lazy-fetching unnecessary tags, which has been corrected.
- "git rebase -i" did not leave the reflog entries correctly.
- The more aggressive updates to remote-tracking branches we had for the past 7 years or so were not reflected in the documentation, which has been corrected.
- We've left the command line parsing of "git log :/a/b/" broken for about a full year without anybody noticing, which has been corrected.
- Misc fixes for Windows.
- "git rebase" (again) learns to honor "--no-keep-empty", which lets the user to discard commits that are empty from the beginning (as opposed to the ones that become empty because of rebasing). The interactive rebase also marks commits that are empty in the todo.
- Parsing the host part out of URL for the credential helper has been corrected.
- Document the recommended way to abort a failing test early (e.g. by exiting a loop), which is to say "return 1".
- The code that refreshes the last access and modified time of on-disk packfiles and loose object files have been updated.
- Validation of push certificate has been made more robust against timing attacks.
- The custom hash function used by "git fast-import" has been replaced with the one from hashmap.c, which gave us a nice performance boost.
- The "git submodule" command did not initialize a few variables it internally uses and was affected by variable settings leaked from the environment.
- Raise the minimum required version of docbook-xsl package to 1.74, as 1.74.0 was from late 2008, which is more than 10 years old, and drop compatibility cruft from our documentation suite.
- "git log" learns "--[no-]mailmap" as a synonym to "--[no-]use-mailmap"
- "git commit-graph write --expire-time=<timestamp>" did not use the given timestamp correctly, which has been corrected.
- Tests update to use "test-chmtime" instead of "touch -t".
- "git diff" in a partial clone learned to avoid lazy loading blob objects in more casese when they are not needed.
- "git push --atomic" used to show failures for refs that weren't even pushed, which has been corrected.
- Code in builtin/*, i.e. those can only be called from within built-in subcommands, that implements bulk of a couple of subcommands have been moved to libgit.a so that they could be used by others.
- Allowing the user to split a patch hunk while "git stash -p" does not work well; a band-aid has been added to make this (partially) work better.
- "git diff-tree --pretty --notes" used to hit an assertion failure, as it forgot to initialize the notes subsystem.
- "git range-diff" fixes.
- "git grep" did not quote a path with unusual character like other commands (like "git diff", "git status") do, but did quote when run from a subdirectory, both of which has been corrected.
- GNU/Hurd is also among the ones that need the fopen() wrapper.
- Those fetching over protocol v2 from linux-next and other kernel repositories are reporting that v2 often fetches way too much than needed.
- The upload-pack protocol v2 gave up too early before finding a common ancestor, resulting in a wasteful fetch from a fork of a project. This has been corrected to match the behaviour of v0 protocol.
- The build procedure did not use the libcurl library and its include files correctly for a custom-built installation.
- Tighten "git mailinfo" to notice and error out when decoded result contains NUL in it.
- Fix in-core inconsistency after fetching into a shallow repository that broke the code to write out commit-graph.
- The commit-graph code exhausted file descriptors easily when it does not have to.
- The multi-pack-index left mmapped file descriptors open when it does not have to.
- Recent update to Homebrew used by macOS folks breaks build by moving gettext library and necessary headers.
- Incompatible options "--root" and "--fork-point" of "git rebase" have been marked and documented as being incompatible.
- Error and verbose trace messages from "git push" did not redact credential material embedded in URLs.
- Update the parser used for credential.<URL>.<variable> configuration, to handle <URL>s with '/' in them correctly.
- Recent updates broke parsing of "credential.<url>.<key>" where <url> is not a full URL (e.g. [credential "https://"] helper = ...) stopped working, which has been corrected.
- Some of the files commit-graph subsystem keeps on disk did not correctly honor the core.sharedRepository settings and some were left read-write.
- In error messages that "git switch" mentions its option to create a new branch, "-b/-B" options were shown, where "-c/-C" options should be, which has been corrected.
- With the recent tightening of the code that is used to parse various parts of a URL for use in the credential subsystem, a hand-edited credential-store file causes the credential helper to die, which is a bit too harsh to the users. Demote the error behaviour to just ignore and keep using well-formed lines instead.
- The samples in the credential documentation has been updated to make it clear that we depict what would appear in the .git/config file, by adding appropriate quotes as needed..
- git branch" and other "for-each-ref" variants accepted multiple --sort=<key> options in the increasing order of precedence, but it had a few breakages around "--ignore-case" handling, and tie-breaking with the refname, which have been fixed.
- The coding guideline for shell scripts instructed to refer to a variable with dollar-sign inside arithmetic expansion to work around a bug in old versions of dash, which is a thing of the past. Now we are not forbidden from writing $((var+1)).
- The <stdlib.h> header on NetBSD brings in its own definition of hmac() function (eek), which conflicts with our own and unrelated function with the same name. Our function has been renamed to work around the issue.
- The basic test did not honor $TEST_SHELL_PATH setting, which has been corrected.
- Minor in-code comments and documentation updates around credential API.
- Teach "am", "commit", "merge" and "rebase", when they are run with the "--quiet" option, to pass "--quiet" down to "gc --auto".
- The code to skip unmerged paths in the index when sparse checkout is in use would have made out-of-bound access of the in-core index when the last path was unmerged, which has been corrected.
- Serving a "git fetch" client over "git://" and "ssh://" protocols using the on-wire protocol version 2 was buggy on the server end when the client needs to make a follow-up request to e.g. auto-follow tags.
- "git bisect replay" had trouble with input files when they used CRLF line ending, which has been corrected.
- "rebase -i" segfaulted when rearranging a sequence that has a fix-up that applies another fix-up (which may or may not be a fix-up of yet another step).
- "git fsck" ensures that the paths recorded in tree objects are sorted and without duplicates, but it failed to notice a case where a blob is followed by entries that sort before a tree with the same name. This has been corrected.
- Code clean-up by removing a compatibility implementation of a function we no longer use.
- When a binary file gets modified and renamed on both sides of history to different locations, both files would be written to the working tree but both would have the contents from "ours". This has been corrected so that the path from each side gets their original content.
- Fix for a copy-and-paste error introduced during 2.20 era.
- Update an unconditional use of "grep -a" with a perl script in a test.
- Other code cleanup, docfix, build fix, etc.