What's new in Git 2.9?

What's new in Git 2.9?

On the 13th June, Git 2.9 was released, and you can read all about it in the official release notes,and a whole host of other places, such as Softpedia. So, instead of simply going over the release notes, I'd like to take a look at the improvements and changes in Git 2.9, and what they actually mean.

Submodules

Git 2.9 brings support for cloning and updating submodules in parallel. In Git 2.8, it was already possible to use the --recurse-submodule --jobs= switches with git fetch command, and now, in Git 2.9, it's also possible with git clone and git submodule update commands. You can also set this as a default, by setting submodule.fetchJobs in your Git configuration file.

Diffs

Git 2.9 adds a new experimental heuristics for diff handling. The experimental heuristics allow you to see in some rare cases, sometimes the changes in the appropriate context if you have identical lines. The experimental heuristics can be enabled with --compaction-heuristic switch or by setting diff.compactionHeuristic in your Git configuration file.

By far, the more important improvement for git diff is the ability to configure a diff-filter, that will do exactly what it says: filter your diffs before showing them. You can set diff filtering to use, for example, the diff-highlighting that is shipped with native Git using git config interactive.diffFilter diff-highlight, or configure it in your Git configuration file.

In addition, the git diff and git log commands in Git 2.9 enable rename detection by default.

Smaller improvements

Interoperability between Git and Perforce has seen improvements in git p4 command, which now allows mapping P4 author names to Git author names. Git merge, by default, now prevents merging branches that have no common base, which is a typically rare case that happens when migrating one code base to another. This can be still accomplished using --allow-unrelated-histories. Git clone can now use --shallow-submodules option which will do exactly what you would expect it to do.

Performance

Git 2.9 also comes with performance and other internal improvements. The most important is a major part of submodules functionality has been ported to C, and the repository set-up sequence has been streamlined, mainly by not looking into data that should not be there in the first place.

Conclusion

You can download the latest Git from the website or if you are interested in the fine-grained details, read the official release notes. Let us know your favourite updates in Git 2.9, in the comments below.

Seamless software development.

Code management and collaboration platform with Git, Subversion, and Mercurial.

Sign up for free
comments powered by Disqus