From b4fb09e4da53bfc6c720337142af5db3204736d5 Mon Sep 17 00:00:00 2001 From: Michael Haggerty Date: Mon, 10 Aug 2015 11:47:39 +0200 Subject: lockfile: add accessor get_lock_file_path() Signed-off-by: Michael Haggerty Signed-off-by: Junio C Hamano --- lockfile.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lockfile.h') diff --git a/lockfile.h b/lockfile.h index d9dfbc999c..a204ab6f60 100644 --- a/lockfile.h +++ b/lockfile.h @@ -203,6 +203,12 @@ extern NORETURN void unable_to_lock_die(const char *path, int err); */ extern FILE *fdopen_lock_file(struct lock_file *lk, const char *mode); +/* + * Return the path of the lockfile. The return value is a pointer to a + * field within the lock_file object and should not be freed. + */ +extern const char *get_lock_file_path(struct lock_file *lk); + extern int get_lock_file_fd(struct lock_file *lk); extern FILE *get_lock_file_fp(struct lock_file *lk); -- cgit v1.2.3