Fix determining latest commit from git.

Change-Id: I1711516d780d1d60d1f104eaad7af8a60b5297b1
Merge "Fix determining latest commit from git."