Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
lockfile: add accessor get_lock_file_path()
[gitweb.git]
/
lockfile.c
diff --git
a/lockfile.c
b/lockfile.c
index df9c704f51d6f2147421e67a70f9f91034ebb1d2..5e954baf07a5266a7abe341fadf647da55a28705 100644
(file)
--- a/
lockfile.c
+++ b/
lockfile.c
@@
-364,6
+364,13
@@
FILE *fdopen_lock_file(struct lock_file *lk, const char *mode)
return lk->fp;
}
+const char *get_lock_file_path(struct lock_file *lk)
+{
+ if (!lk->active)
+ die("BUG: get_lock_file_path() called for unlocked object");
+ return lk->filename.buf;
+}
+
int get_lock_file_fd(struct lock_file *lk)
{
if (!lk->active)