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>
This commit is contained in:
Michael Haggerty
2015-08-10 11:47:39 +02:00
committed by Junio C Hamano
parent c99a4c2db3
commit b4fb09e4da
6 changed files with 34 additions and 20 deletions

View File

@@ -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)