Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds

Git 2.19.0 released with better git grep, Python 3 compatibility for git p4

Save for later
  • 180 min read
  • 2018-09-13 04:21:34

article-image

Git project released Git 2.19 earlier this week (September 10th, 2018).

Git 2.19 brings more Python 3 compatibility work for git p4, a rewritten git submodule now implemented in C. Git Instaweb works better with newer versions of Apache. It also has a git range-diff feature, new capabilities in git grep, branch sorting changes, and a variety of other additions.

Features in Git 2.19

A new ‘git range-diff’ tool


Developers previously used the git rebase to rewrite history and polish their commits before making them public. git diff shows the difference between the two end states, but it doesn’t provide information about any of the individual commits.

This version includes git range-diff, a tool for comparing two sequences of commits, including changes to their order, commit messages, and the actual content changes they introduce.

Improvements in ‘git grep’


In Git 2.19 you can now locate the first matching column of your query with git grep --column.

git grep also learned the new --only-matching option. This is useful if you have a non-trivial regular expression and want to gather only the matching parts of your search.

A new ‘auto’ option


The content-transfer-encoding of the message "git send-email" sends out by default was 8bit, which can cause trouble when there is an overlong line to bust RFC 5322/2822 limit.  A new option 'auto' to automatically switch to quoted-printable when there is such a line in the payload has been introduced and is made the default.

The branch.sort option and other sorting options


The git branch command, like git tag (and their scriptable counterpart, git for-each-ref), takes a --sort option to let you order the results by a number of properties. To show branches in the order of most recent update, you could use git branch --sort=-authordate. However, if you always prefer that order, typing that sort option can get tiresome.

This version introduces the branch.sort config to set the default ordering of git branch. By default, git branch sorts by refname, hence master is first and newest is last.

The other sorting options include:

  • --sort=numparent shows the best merges.
  • --sort=refname sorts branches alphabetically by their name.
  • --sort=upstream sorts branches by the remote from which they originate.
  • Unlock access to the largest independent learning library in Tech for FREE!
    Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
    Renews at £15.99/month. Cancel anytime

Other improvements in Git 2.19

  • ‘git submodule foreach’ has been largely rewritten in C.
  • ‘git diff --color-moved’ feature has further improvised.
  • The userdiff pattern for .php has been updated.
  • ‘git instaweb’ has been adjusted to run better with newer Apache on RedHat based distros.
  • Preparatory code to later add json output for telemetry data has been added.


Read the complete updates and improvements in the Git 2.19 release notes.

Microsoft announces Azure DevOps, makes Azure pipelines available on GitHub Marketplace

Packt’s GitHub portal hits 2,000 repositories

GitHub parts ways with JQuery, adopts Vanilla JS for its frontend