git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Daniel Knittl-Frank <knittl89@googlemail.com>
Cc: "git\@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: "git describe" documentation and behavior mismatch
Date: Fri, 15 Dec 2017 11:25:39 -0800	[thread overview]
Message-ID: <xmqqwp1npzd8.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CACx-yZ3FxqFvXgM-V0stODcyAdCoO83s=WwyZ2OLiJON6qqvkA@mail.gmail.com> (Daniel Knittl-Frank's message of "Mon, 11 Dec 2017 19:37:53 +0100")

Daniel Knittl-Frank <knittl89@googlemail.com> writes:

> Forget the above patch. I should compile my code after refactoring ...
>
> Here is the fixed version.
>
> -- >8 --
>
> From 8203bd0ad5baab7024ebff597c9f35a0250d09ff Mon Sep 17 00:00:00 2001
> From: Daniel Knittl-Frank <knittl89+git@googlemail.com>
> Date: Mon, 11 Dec 2017 19:24:54 +0100
> Subject: [PATCH] Prepend "tags/" when describing tags with embedded name
>
> Signed-off-by: Daniel Knittl-Frank <knittl89+git@googlemail.com>
> ---
>  builtin/describe.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)

I think the code makes sense, but it won't be understandable by
those who do not know what you discussed in the original thread.

A proper commit log message, with a new test or two in t6120, would
be an appropriate way to fix that.

Care to follow through, along the lines in
Documentation/SubmittingPatches?

Thanks.

> diff --git a/builtin/describe.c b/builtin/describe.c
> index e14e162ef6..9da6d85ea3 100644
> --- a/builtin/describe.c
> +++ b/builtin/describe.c
> @@ -271,10 +271,13 @@ static void display_name(struct commit_name *n)
>          n->name_checked = 1;
>      }
>
> -    if (n->tag)
> +    if (n->tag) {
> +        if (all)
> +            printf("tags/");
>          printf("%s", n->tag->tag);
> -    else
> +    } else {
>          printf("%s", n->path);
> +    }
>  }
>
>  static void show_suffix(int depth, const struct object_id *oid)
> -- 
> 2.15.GIT

      reply	other threads:[~2017-12-15 19:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-30 18:47 "git describe" documentation and behavior mismatch Daniel Knittl-Frank
2017-11-30 19:26 ` Daniel Knittl-Frank
2017-12-03  5:39   ` Junio C Hamano
2017-12-11 18:34     ` Daniel Knittl-Frank
2017-12-11 18:37       ` Daniel Knittl-Frank
2017-12-15 19:25         ` Junio C Hamano [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=xmqqwp1npzd8.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=knittl89@googlemail.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).