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.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/lockfile.c b/lockfile.c
index 2369eff541..df9c704f51 100644
--- a/lockfile.c
+++ b/lockfile.c
@@ -364,6 +364,20 @@ FILE *fdopen_lock_file(struct lock_file *lk, const char *mode)
return lk->fp;
}
+int get_lock_file_fd(struct lock_file *lk)
+{
+ if (!lk->active)
+ die("BUG: get_lock_file_fd() called for unlocked object");
+ return lk->fd;
+}
+
+FILE *get_lock_file_fp(struct lock_file *lk)
+{
+ if (!lk->active)
+ die("BUG: get_lock_file_fp() called for unlocked object");
+ return lk->fp;
+}
+
char *get_locked_file_path(struct lock_file *lk)
{
if (!lk->active)