All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: nbelakovski@gmail.com
Cc: git@vger.kernel.org, sunshine@sunshineco.com
Subject: Re: [PATCH v3 1/2] worktree: update documentation for lock_reason and lock_reason_valid
Date: Wed, 31 Oct 2018 11:28:35 +0900	[thread overview]
Message-ID: <xmqqlg6ezw6k.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20181030062409.42169-1-nbelakovski@gmail.com> (nbelakovski's message of "Mon, 29 Oct 2018 23:24:08 -0700")

nbelakovski@gmail.com writes:

> From: Nickolai Belakovski <nbelakovski@gmail.com>
>
> 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>
> ---
>  worktree.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/worktree.h b/worktree.h
> index df3fc30f7..6b12a3cf6 100644
> --- a/worktree.h
> +++ b/worktree.h
> @@ -10,12 +10,12 @@ struct worktree {
>  	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 */

s/use /used by/, probably.

>  	struct object_id head_oid;
>  	int is_detached;
>  	int is_bare;
>  	int is_current;
> -	int lock_reason_valid;
> +	int lock_reason_valid; /* private */
>  };

These annotations to the two fields are not wrong per-se, but I have
a feeling that it would equally be important to document what the
other "non-private" fields mean, if peeking them *is* the API this
subsystem offers.

Thanks.

  reply	other threads:[~2018-10-31  2:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-24  6:39 [PATCH] worktree: populate lock_reason in get_worktrees and light refactor/cleanup in worktree files nbelakovski
2018-10-24  8:11 ` Eric Sunshine
2018-10-25  5:46   ` Nickolai Belakovski
2018-10-25  5:51     ` [PATCH] worktree: refactor lock_reason_valid and lock_reason to be more sensible nbelakovski
2018-10-25  6:56       ` Junio C Hamano
2018-10-28 21:56         ` Nickolai Belakovski
2018-10-29  3:52           ` Junio C Hamano
2018-10-29  5:43             ` Nickolai Belakovski
2018-10-29  6:42               ` Junio C Hamano
     [not found]         ` <CAC05386cSUhBm4TLD5NUeb5Ut9GT5=h-1MvqDnFpuc+UdZFmwg@mail.gmail.com>
2018-10-28 23:02           ` Eric Sunshine
2018-10-29  1:10             ` Nickolai Belakovski
2018-10-29  4:01               ` Eric Sunshine
2018-10-29  5:45                 ` Nickolai Belakovski
2018-10-29  6:21                   ` Eric Sunshine
2018-10-30  6:24       ` [PATCH v3 1/2] worktree: update documentation for lock_reason and lock_reason_valid nbelakovski
2018-10-31  2:28         ` Junio C Hamano [this message]
2018-10-30  6:24       ` [PATCH v3 2/2] worktree: rename is_worktree_locked to worktree_lock_reason nbelakovski
2018-10-31  2:41         ` Junio C Hamano
2018-10-25 19:14     ` [PATCH] worktree: populate lock_reason in get_worktrees and light refactor/cleanup in worktree files Eric Sunshine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqlg6ezw6k.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=nbelakovski@gmail.com \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.