Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lockfile.c')
-rw-r--r--lockfile.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lockfile.c b/lockfile.c
index df9c704f51..5e954baf07 100644
--- 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)