Git 2.11, recently released, has over 650 commits in the areas of SHA-1 name handling, performance improvements and so on.
Abbreviated SHA-1 names are abbreviations derived from the 160-bit (or 40-hexadecimal character) signature of a commit. Developers use an abbreviation of four characters, for example as a convenience instead of the original 40-character Hash. However, this convenience can also lead to a name clash.
For instance, using prior versions the git show
command would yield a message to the effect that the abbreviated name was ambiguous.
git show 454c error: short SHA1 454c is ambiguous. error: short SHA1 454c is ambiguous.
Now, the same command will yield:
git show 454c error: short SHA1 454c is ambiguous hint: The candidates are: hint: 454cb6bd5 commit 2016-11-29 - Git 2.11 hint: 454ce7ef2 blob
The ambiguity in names can then be disambiguated manually by supplying more characters or via a git config
command.
The longer abbreviated names are also shown by default. As an example, the following command yields the nine character abbreviated name instead of the seven character abbreviated name as in prior versions:
git log --oneline 454cb6bd5 Git 2.11
Git 2.11 has significant performance improvements for Delta Chains and Object lookups in packfiles. It speeds up computation of patch IDs, which is used by the command git rebase
and finally includes a filter mechanism to speed up conversion to and from the local filesystem representation.
There are numerous other improvements classified as sundries in the blog. These include:
- An improvement to the diff algorithm that makes results easier to read, that will likely become a default in future
- Improvement to
git log
to be able to exclude a given parent - A credential helper in
contrib/
that can use GNOME libsecret to store Git passwords - The
git diff
command will show changes to submodules as an actual patch between the two submodule states - The
git status
output makes scripting easier with a new machine-readable output format - Beginning conversion work of some the Git's shell scripts into C programs that should improve overall performance.
Git 2.11 has numerous other features that can be found in the Release Notes.