Kaartic Sivaraam <kaarticsivaraam91...@gmail.com> writes:

>Subject: Re: [PATCH] wt-status.c: Modified status message shown for a 
>parent-less branch

$ git shortlog -20 --no-merges

may help learning the preferred style of writing the title.  We do
not say "[I] did this".  Instead we phrase things in imperative
mood, giving an order to the codebase to "become like so".  E.g.

    Subject: wt-status.c: rephrase "Initial commit" in "git status" output

or something like that.

> The status message shown for a paren-less branch wasn't so
> descriptive and was a little confusing.

s/paren/parent/; It was descritive enough, but the problem lied
elsewhere. It assumed that the user knows that "git status" message
is relative to the next commit the user creates from the state.

And it wasn't just "a little" confusing.

        "git status" indicated "Initial commit" when HEAD points at
        an unborn branch.  This message is shared with the commit
        log template "git commit" prepares for the user when
        creating a commit (i.e. "You are about to create the initial
        commit"), and is OK as long as the reader is aware of the
        nature of the message (i.e. it guides the user working
        toward the next commit), but was confusing to new users,
        especially the ones who do "git commit -m message" without
        having a chance to pay attention to the commit log template.

> The message has been changed to be more descriptive to users in
> such a way that it clearly shows the state of the branch / repository.

Again, not "This commit did X".

        Rephrase the message so that it is more clear that the state
        of the current branch (not the whole repository) is being
        described to remove this confusion.

> This allows the users to be reminded that they are about to make
> their initial commit which the previous message didn't seem to do
> communicate well.

And this paragraph becomes unnecessary.

> A few alternatives were,

s/were/considered were/;

>
> * No commit yet
> * Your current branch does not have any commits
> * Current branch waiting for initial commit
>
> Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91...@gmail.com>
> ---

Does this break "git commit", or is the update limited to "git
status"?

>  wt-status.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/wt-status.c b/wt-status.c
> index 0375484..7bfdde4 100644
> --- a/wt-status.c
> +++ b/wt-status.c
> @@ -1576,7 +1576,7 @@ static void wt_longstatus_print(struct wt_status *s)
>  
>       if (s->is_initial) {
>               status_printf_ln(s, color(WT_STATUS_HEADER, s), "%s", "");
> -             status_printf_ln(s, color(WT_STATUS_HEADER, s), _("Initial 
> commit"));
> +             status_printf_ln(s, color(WT_STATUS_HEADER, s), _("Waiting for 
> initial commit"));
>               status_printf_ln(s, color(WT_STATUS_HEADER, s), "%s", "");
>       }
>  
> @@ -1746,7 +1746,7 @@ static void wt_shortstatus_print_tracking(struct 
> wt_status *s)
>  #define LABEL(string) (s->no_gettext ? (string) : _(string))
>  
>       if (s->is_initial)
> -             color_fprintf(s->fp, header_color, LABEL(N_("Initial commit on 
> ")));
> +             color_fprintf(s->fp, header_color, LABEL(N_("Waiting for 
> initial commit on ")));
>  
>       if (!strcmp(s->branch, "HEAD")) {
>               color_fprintf(s->fp, color(WT_STATUS_NOBRANCH, s), "%s",

Reply via email to