diff options
author | Martin Ågren <martin.agren@gmail.com> | 2017-10-05 22:32:05 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-06 03:07:17 +0200 |
commit | d613576dfe7010b13157e63b2401d321074bbab8 (patch) | |
tree | f3e72dd53a75a6c65d21d809b4603ee0b698c20a /lockfile.h | |
parent | treewide: prefer lockfiles on the stack (diff) | |
download | git-d613576dfe7010b13157e63b2401d321074bbab8.tar.xz git-d613576dfe7010b13157e63b2401d321074bbab8.zip |
lockfile: fix documentation on `close_lock_file_gently()`
Commit 83a3069a3 (lockfile: do not rollback lock on failed close,
2017-09-05) forgot to update the documentation by the function definition
to reflect that the lock is not rolled back in case closing fails.
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'lockfile.h')
-rw-r--r-- | lockfile.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lockfile.h b/lockfile.h index 7c1c484d7c..f401c979f0 100644 --- a/lockfile.h +++ b/lockfile.h @@ -240,8 +240,8 @@ extern char *get_locked_file_path(struct lock_file *lk); * If the lockfile is still open, close it (and the file pointer if it * has been opened using `fdopen_lock_file()`) without renaming the * lockfile over the file being locked. Return 0 upon success. On - * failure to `close(2)`, return a negative value and roll back the - * lock file. Usually `commit_lock_file()`, `commit_lock_file_to()`, + * failure to `close(2)`, return a negative value (the lockfile is not + * rolled back). Usually `commit_lock_file()`, `commit_lock_file_to()`, * or `rollback_lock_file()` should eventually be called. */ static inline int close_lock_file_gently(struct lock_file *lk) |