From: Daniel Knittl-Frank <knittl89@googlemail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: "git describe" documentation and behavior mismatch
Date: Mon, 11 Dec 2017 19:37:53 +0100 [thread overview]
Message-ID: <CACx-yZ3FxqFvXgM-V0stODcyAdCoO83s=WwyZ2OLiJON6qqvkA@mail.gmail.com> (raw)
In-Reply-To: <CACx-yZ1DGz2z6qqAX=pzeExT689y0sON+wVDaocdWk75a5SOxA@mail.gmail.com>
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(-)
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
--
typed with http://neo-layout.org
next prev parent reply other threads:[~2017-12-11 18:38 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 [this message]
2017-12-15 19:25 ` Junio C Hamano
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='CACx-yZ3FxqFvXgM-V0stODcyAdCoO83s=WwyZ2OLiJON6qqvkA@mail.gmail.com' \
--to=knittl89@googlemail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).