hold_lock_file_for_append(): restore errno before returning
commit4d423a3e62c7ab0b04c4bd84995c32daff3b24c3
authorMichael Haggerty <mhagger@alum.mit.edu>
Wed, 1 Oct 2014 10:28:40 +0000 (1 12:28 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 1 Oct 2014 20:53:54 +0000 (1 13:53 -0700)
tree7d8744732c898c665086d784bd2fce28cd8248d5
parentec38b4e482e96e62762452cab5714e55abdb48c3
hold_lock_file_for_append(): restore errno before returning

Callers who don't pass LOCK_DIE_ON_ERROR might want to examine errno
to see what went wrong, so restore errno before returning.

In fact this function only has one caller, add_to_alternates_file(),
and it *does* use LOCK_DIE_ON_ERROR, but, you know, think of future
generations.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
lockfile.c