]> git.ipfire.org Git - thirdparty/git.git/blobdiff - lockfile.h
builtin/am: make sure state files are text
[thirdparty/git.git] / lockfile.h
index cd2ec95d3003be5ff28f84e9e5b33cc85d9990c3..b4abc61c008b5199342c9e5eb12886039d2c0cc4 100644 (file)
@@ -74,8 +74,20 @@ struct lock_file {
 extern void unable_to_lock_message(const char *path, int err,
                                   struct strbuf *buf);
 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 int hold_lock_file_for_update_timeout(
+               struct lock_file *lk, const char *path,
+               int flags, long timeout_ms);
+
+static inline int hold_lock_file_for_update(
+               struct lock_file *lk, const char *path,
+               int flags)
+{
+       return hold_lock_file_for_update_timeout(lk, path, flags, 0);
+}
+
+extern int hold_lock_file_for_append(struct lock_file *lk, const char *path,
+                                    int flags);
+
 extern FILE *fdopen_lock_file(struct lock_file *, const char *mode);
 extern char *get_locked_file_path(struct lock_file *);
 extern int commit_lock_file_to(struct lock_file *, const char *path);