All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Santi Béjar" <sbejar@gmail.com>
To: git@vger.kernel.org
Cc: "Santi Béjar" <sbejar@gmail.com>
Subject: [PATCH] describe: fix --long output
Date: Mon,  3 Mar 2008 15:37:46 +0100	[thread overview]
Message-ID: <1204555066-8820-1-git-send-email-sbejar@gmail.com> (raw)

Without this the output is:

$ git describe --long origin/next
v1.5.4.3-0-g31e0b2c-500-g83a2cbb

It was introduced in the conflicting part of
b00ac8c (Merge branch 'sp/describe-tag')

Signed-off-by: Santi Béjar <sbejar@gmail.com>
---
 builtin-describe.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/builtin-describe.c b/builtin-describe.c
index 2f1e7ba..7ba822a 100644
--- a/builtin-describe.c
+++ b/builtin-describe.c
@@ -166,9 +166,6 @@ static void display_name(struct commit_name *n)
 		printf("%s", n->tag->tag);
 	else
 		printf("%s", n->path);
-	if (longformat)
-		printf("-0-g%s",
-		       find_unique_abbrev(n->tag->tagged->sha1, abbrev));
 }
 
 static void describe(const char *arg, int last_one)
@@ -196,6 +193,9 @@ static void describe(const char *arg, int last_one)
 	n = cmit->util;
 	if (n) {
 		display_name(n);
+		if (longformat)
+			printf("-0-g%s",
+				find_unique_abbrev(n->tag->tagged->sha1, abbrev));
 		printf("\n");
 		return;
 	}
-- 
1.5.4.3.488.g7b3a6


                 reply	other threads:[~2008-03-03 15:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1204555066-8820-1-git-send-email-sbejar@gmail.com \
    --to=sbejar@gmail.com \
    --cc=git@vger.kernel.org \
    /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.