Otherwise the error from `git rev-parse` is uselessly
polluting the debug output.
Redirecting to a file, instead of /dev/null, makes it
possible to check that we got the error we expected, so
let's check that too.
Reviewed-by: Taylor Blau <redacted> Helped-by: Eric Sunshine <redacted> Helped-by: Ævar Arnfjörð Bjarmason <redacted> Signed-off-by: Christian Couder <redacted> Signed-off-by: Junio C Hamano <redacted>