summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2014-10-01 10:28:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-10-01 20:53:54 (GMT)
commitec38b4e482e96e62762452cab5714e55abdb48c3 (patch)
tree7b9e0268013d641289da53c9630ebd7af5aba8d7 /cache.h
parent316683bd37608e31cc3f5e932c4e5c7dde1b39f0 (diff)
downloadgit-ec38b4e482e96e62762452cab5714e55abdb48c3.zip
git-ec38b4e482e96e62762452cab5714e55abdb48c3.tar.gz
git-ec38b4e482e96e62762452cab5714e55abdb48c3.tar.bz2
get_locked_file_path(): new function
Add a function to return the path of the file that is locked by a lock_file object. This reduces the knowledge that callers have to have about the lock_file layout. Suggested-by: Ronnie Sahlberg <sahlberg@google.com> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 7ea4e81..d19e57f 100644
--- a/cache.h
+++ b/cache.h
@@ -590,6 +590,7 @@ extern void unable_to_lock_message(const char *path, int err,
extern NORETURN void unable_to_lock_die(const char *path, int err);
extern int hold_lock_file_for_update(struct lock_file *, const char *path, int);
extern int hold_lock_file_for_append(struct lock_file *, const char *path, int);
+extern char *get_locked_file_path(struct lock_file *);
extern int commit_lock_file_to(struct lock_file *, const char *path);
extern int commit_lock_file(struct lock_file *);
extern int reopen_lock_file(struct lock_file *);