summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorRonnie Sahlberg <sahlberg@google.com>2014-06-20 14:42:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-07-14 18:54:40 (GMT)
commit6af926e8bcab15b42faeee9f2fe1c69b5fea1b15 (patch)
treed437eef79aeb740a4c12b35cb2a3346cc76d6010 /cache.h
parent995f8746bc421a537e12622770a90be2205cd26f (diff)
downloadgit-6af926e8bcab15b42faeee9f2fe1c69b5fea1b15.zip
git-6af926e8bcab15b42faeee9f2fe1c69b5fea1b15.tar.gz
git-6af926e8bcab15b42faeee9f2fe1c69b5fea1b15.tar.bz2
lockfile.c: add a new public function unable_to_lock_message
Introducing a new unable_to_lock_message helper, which has nicer semantics than unable_to_lock_error and cleans up lockfile.c a little. 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>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index cbe1935..8b12aa8 100644
--- a/cache.h
+++ b/cache.h
@@ -559,6 +559,8 @@ struct lock_file {
#define LOCK_DIE_ON_ERROR 1
#define LOCK_NODEREF 2
extern int unable_to_lock_error(const char *path, int err);
+extern void unable_to_lock_message(const char *path, int err,
+ struct strbuf *buf);
extern NORETURN void unable_to_lock_index_die(const char *path, int err);
extern int hold_lock_file_for_update(struct lock_file *, const char *path, int);
extern int hold_lock_file_for_append(struct lock_file *, const char *path, int);