worktree: update documentation for lock_reason and lock_reason_valid
authorNickolai Belakovski <nbelakovski@gmail.com>
Tue, 30 Oct 2018 06:24:08 +0000 (23:24 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 31 Oct 2018 02:28:52 +0000 (11:28 +0900)
Clarify that these fields are to be considered implementation details
and direct the reader to use the is_worktree_locked function to retrieve
said information.

Signed-off-by: Nickolai Belakovski <nbelakovski@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
worktree.h

index df3fc30..6b12a3c 100644 (file)
@@ -10,12 +10,12 @@ struct worktree {
        char *path;
        char *id;
        char *head_ref;         /* NULL if HEAD is broken or detached */
        char *path;
        char *id;
        char *head_ref;         /* NULL if HEAD is broken or detached */
-       char *lock_reason;      /* internal use */
+       char *lock_reason;      /* private - use is_worktree_locked */
        struct object_id head_oid;
        int is_detached;
        int is_bare;
        int is_current;
        struct object_id head_oid;
        int is_detached;
        int is_bare;
        int is_current;
-       int lock_reason_valid;
+       int lock_reason_valid; /* private */
 };
 
 /* Functions for acting on the information about worktrees. */
 };
 
 /* Functions for acting on the information about worktrees. */