[PATCH] Paper bag fix git-describe on packed tags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In 212945d ("Teach git-describe to verify annotated tag names")
we tried to access a possibly unparsed tag structure.  We must
make sure it was parsed before we try to read its tag name.

Signed-off-by: Shawn O. Pearce <spearce@xxxxxxxxxxx>
---

 As 212945d is already in master this probably should be
 fast-tracked there.  Whoops.  :-)

 builtin-describe.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/builtin-describe.c b/builtin-describe.c
index 2f1e7ba..d4204ee 100644
--- a/builtin-describe.c
+++ b/builtin-describe.c
@@ -156,7 +156,7 @@ static void display_name(struct commit_name *n)
 {
 	if (n->prio == 2 && !n->tag) {
 		n->tag = lookup_tag(n->sha1);
-		if (!n->tag || !n->tag->tag)
+		if (!n->tag || parse_tag(n->tag) || !n->tag->tag)
 			die("annotated tag %s not available", n->path);
 		if (strcmp(n->tag->tag, n->path))
 			warning("tag '%s' is really '%s' here", n->tag->tag, n->path);
-- 
1.5.4.3.509.gf785
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux