Subject: Re: [PATCH 1/3] checkout: describe_detached_head: remove 3dots after committish

From: Junio C Hamano <[email-masked]>
Date: Tue, 07 Nov 2017 09:52:37 +0900

Ann T Ropea <[email-masked]> writes:

> Lest we confuse the meticulous observer, we ought to retire the 3dots in
> the circumstances described above.

Yes, as I said in my response to 3/3, I think it is a good goal to
avoid n-dots used as a "here we truncated something longer" sign,
which was a very old convention that was invented without knowing
that we'd later come up with a syntax that would conflict with it.

For this particular output, I wonder if it is even better to follow
our own advice, though.  Documentation/SubmittingPatches says:

    If you want to reference a previous commit in the history of a stable
    branch, use the format "abbreviated sha1 (subject, date)",
    with the subject enclosed in a pair of double-quotes, like this:

        Commit f86a374 ("pack-bitmap.c: fix a memleak", 2015-03-30)
        noticed that ...

I dunno.

> Signed-off-by: Ann T Ropea <[email-masked]>
> ---
>  builtin/checkout.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/builtin/checkout.c b/builtin/checkout.c
> index fc4f8fd2ea29..59cc52e55855 100644
> --- a/builtin/checkout.c
> +++ b/builtin/checkout.c
> @@ -404,7 +404,7 @@ static void describe_detached_head(const char *msg, struct commit *commit)
>  	struct strbuf sb = STRBUF_INIT;
>  	if (!parse_commit(commit))
>  		pp_commit_easy(CMIT_FMT_ONELINE, commit, &sb);
> -	fprintf(stderr, "%s %s... %s\n", msg,
> +	fprintf(stderr, "%s %s %s\n", msg,
>  		find_unique_abbrev(commit->object.oid.hash, DEFAULT_ABBREV), sb.buf);
>  	strbuf_release(&sb);
>  }