BT
x Share your thoughts on trends and content!

Git 2.8 Adds Improvements to Submodules, Identity Handling, and Windows Support

by Sergio De Simone on Mar 29, 2016 |

Recently announced Git 2.8 brings many new features, improvements, and bug fixes. Among the most noteworthy are parallel fetch for submodules, an improvement to how Git handles a user’s identity, and better support for Windows.

Submodules parallel fetch aims at reducing the time required to fetch a repositories and all of its related submodules by enabling the fetching of multiple repositories at once. This can be accomplished by using the new --jobs option, e.g.:

git fetch --recurse-submodules --jobs=4

According to Git team, this can substantially speed up updating repositories that contain many submodules. When using --recurse-submodules without the new --jobs option, Git will fetch submodules one by one.

A new feature that will be welcomed by all developers that want to use different identities for different projects, e.g., work projects and open source projects, is a global configuration option that will disable Git’s default behaviour of guessing the committer’s identity when no explicit identity has been specified through the user.name and user.email config options. In such cases, Git by default guesses the committer’s identity, which may lead to the wrong identity being used for a new repository. On the other hand, setting the new user.useconfigonly option, i.e.,

git config --global user.useconfigonly true

will make Git emit a warning when the developer commits to a new repository and force them to provide an explicit identity to use for that repo if none has been specified.

A related change aims to make it easier to tell where a specific setting has been defined, whether as system-, user-, or repo-level. Indeed, developers can now use:

git config --show-origin <setting name>

to be shown where that specific setting comes from.

Git 2.8 also aims to improve its integration with Windows by:

  • rewriting many Git commands in C to make them faster;
  • merging a number of Windows-specific changes from the it-for-Windows;
  • enabling the recognition of CRLF line endings along with LF.

Additionally, Git 2.8.0 fixes an integer overflow security vulnerability that could result in executing arbitrary code when cloning a malicious repository. The patch has been also made available for previous Git versions, namely 2.4.11+, 2.5.5+, 2.6.6+, 2.7.4+.

Other useful new features in Git 2.8 are:

  • git ls-files --eol <filename> may help diagnose end-of-line related issues;
  • git pull --rebase can now invoke history rewriting using rebase -i.

You can read the full list of changes to Git 2.8 here.

Rate this Article

Relevance
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
General Feedback
Bugs
Advertising
Editorial
Marketing
InfoQ.com and all content copyright © 2006-2016 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT

We notice you're using an ad blocker

We understand why you use ad blockers. However to keep InfoQ free we need your support. InfoQ will not provide your data to third parties without individual opt-in consent. We only work with advertisers relevant to our readers. Please consider whitelisting us.