BT

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

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

This item in japanese

This item in chinese

Bookmarks

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

Adoption
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.

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

Community comments

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

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

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.