Skip to content

Commit

Permalink
lockfile: fix documentation on close_lock_file_gently()
Browse files Browse the repository at this point in the history
Commit 83a3069 (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>
  • Loading branch information
Martin Ågren authored and gitster committed Oct 6, 2017
1 parent 837e34e commit d613576
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lockfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d613576

Please sign in to comment.