Speed up the commit without a parent test

There's no need to do the full git log to check if there's only one
entry.
git log -2 is enough.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>