summaryrefslogtreecommitdiff
path: root/lockfile.h
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2015-08-10 09:47:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-08-10 19:57:14 (GMT)
commitb4fb09e4da53bfc6c720337142af5db3204736d5 (patch)
treeee21234e6668f9a03d08d0713b3a27df4e3d444a /lockfile.h
parentc99a4c2db3053e4fb6a43870f5c747f858b0f58f (diff)
downloadgit-b4fb09e4da53bfc6c720337142af5db3204736d5.zip
git-b4fb09e4da53bfc6c720337142af5db3204736d5.tar.gz
git-b4fb09e4da53bfc6c720337142af5db3204736d5.tar.bz2
lockfile: add accessor get_lock_file_path()
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'lockfile.h')
-rw-r--r--lockfile.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lockfile.h b/lockfile.h
index d9dfbc9..a204ab6 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);