From 76d70dc0c63fe89958308f249136864aec5cdf03 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Fri, 20 Jun 2014 07:42:54 -0700 Subject: refs.c: make resolve_ref_unsafe set errno to something meaningful on error Making errno when returning from resolve_ref_unsafe() meaningful, which should fix * a bug in lock_ref_sha1_basic, where it assumes EISDIR means it failed due to a directory being in the way Signed-off-by: Ronnie Sahlberg Signed-off-by: Junio C Hamano Acked-by: Michael Haggerty --- cache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cache.h') diff --git a/cache.h b/cache.h index 8b12aa8766..e7ec6267bd 100644 --- a/cache.h +++ b/cache.h @@ -979,7 +979,7 @@ extern int read_ref(const char *refname, unsigned char *sha1); * NULL. If more than MAXDEPTH recursive symbolic lookups are needed, * give up and return NULL. * - * errno is sometimes set on errors, but not always. + * errno is set to something meaningful on error. */ extern const char *resolve_ref_unsafe(const char *ref, unsigned char *sha1, int reading, int *flag); extern char *resolve_refdup(const char *ref, unsigned char *sha1, int reading, int *flag); -- cgit v1.2.3