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>
This commit is contained in:
Nickolai Belakovski
2018-10-29 23:24:09 -07:00
committed by Junio C Hamano
parent e21cc076a3
commit d236f12bde
3 changed files with 8 additions and 8 deletions

View File

@ -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)