BT

Git 2.11 Improves SHA-1 Name Handling, Performance and More

| by Rags Srinivas Follow 11 Followers on Nov 30, 2016. Estimated reading time: 1 minute |

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.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT