]> git.ipfire.org Git - thirdparty/git.git/commit - refs.c
lockfile.c: make lock_file return a meaningful errno on failurei
authorRonnie Sahlberg <sahlberg@google.com>
Fri, 20 Jun 2014 14:42:48 +0000 (07:42 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 14 Jul 2014 18:54:41 +0000 (11:54 -0700)
commit447ff1bf0acf9a1d7d2dc3aed032c209f105fb8a
treede6ade85f9d825f1300f06eda4a7e1627c676d64
parent6af926e8bcab15b42faeee9f2fe1c69b5fea1b15
lockfile.c: make lock_file return a meaningful errno on failurei

Making errno when returning from lock_file() meaningful, which should
fix

 * an existing almost-bug in lock_ref_sha1_basic where it assumes
   errno==ENOENT is meaningful and could waste some work on retries

 * an existing bug in repack_without_refs where it prints
   strerror(errno) and picks advice based on errno, despite errno
   potentially being zero and potentially having been clobbered by
   that point

Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Michael Haggerty <mhagger@alum.mit.edu>
lockfile.c
refs.c
refs.h