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>
Martin Ågren committed
Oct 5, 2017 at 22:32 UTC
d613576dfe7010b13157e63b2401d321074bbab8
1 file changed
+2
-2
lockfile.h
+2
-2
@@ -240,8 +240,8 @@ extern char *get_locked_file_path(struct lock_file *lk);
240
* If the lockfile is still open, close it (and the file pointer if it
241
* has been opened using `fdopen_lock_file()`) without renaming the
242
* lockfile over the file being locked. Return 0 upon success. On
243
- * failure to `close(2)`, return a negative value and roll back the
244
- * lock file. Usually `commit_lock_file()`, `commit_lock_file_to()`,
243
+ * failure to `close(2)`, return a negative value (the lockfile is not
244
+ * rolled back). Usually `commit_lock_file()`, `commit_lock_file_to()`,
245
* or `rollback_lock_file()` should eventually be called.
246
*/
247
static inline int close_lock_file_gently(struct lock_file *lk)