Git: Do not invoke git for details about empty change

Change-Id: I2a7b36063ad3c67d3a1fbe999659dc0051723b10
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>