summaryrefslogtreecommitdiff
path: root/worktree.h
diff options
context:
space:
mode:
authorLibravatar Nickolai Belakovski <nbelakovski@gmail.com>2018-10-29 23:24:09 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-10-31 11:41:47 +0900
commitd236f12bdeb478bbaabf056bc611c34cf9218ca8 (patch)
tree0f108fa94f81fa5169cd99d76697a2949e666e2e /worktree.h
parentworktree: update documentation for lock_reason and lock_reason_valid (diff)
downloadtgif-d236f12bdeb478bbaabf056bc611c34cf9218ca8.tar.xz
worktree: rename is_worktree_locked to worktree_lock_reason
A function prefixed with 'is_' would be expected to return a boolean, however this function returns a string. Signed-off-by: Nickolai Belakovski <nbelakovski@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'worktree.h')
-rw-r--r--worktree.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/worktree.h b/worktree.h
index 6b12a3cf67..55d449b6a9 100644
--- a/worktree.h
+++ b/worktree.h
@@ -10,7 +10,7 @@ struct worktree {
char *path;
char *id;
char *head_ref; /* NULL if HEAD is broken or detached */
- char *lock_reason; /* private - use is_worktree_locked */
+ char *lock_reason; /* private - use worktree_lock_reason */
struct object_id head_oid;
int is_detached;
int is_bare;
@@ -60,7 +60,7 @@ extern int is_main_worktree(const struct worktree *wt);
* Return the reason string if the given worktree is locked or NULL
* otherwise.
*/
-extern const char *is_worktree_locked(struct worktree *wt);
+extern const char *worktree_lock_reason(struct worktree *wt);
#define WT_VALIDATE_WORKTREE_MISSING_OK (1 << 0)