X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=builtin-describe.c;h=63c6a19da5b38bc7c00c624c080ba0afbb10ff8a;hb=8146f19762c8fd67f6df3da4ba87a4e5ea880909;hp=d2cfb1b0837ffd1ab3b1f69e8dee0ffa36f2e1ab;hpb=1e2bba92d21d9c72d4a6816c3a98a22779856f9e;p=git.git diff --git a/builtin-describe.c b/builtin-describe.c index d2cfb1b08..63c6a19da 100644 --- a/builtin-describe.c +++ b/builtin-describe.c @@ -158,7 +158,7 @@ static void display_name(struct commit_name *n) n->tag = lookup_tag(n->sha1); 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)) + if (strcmp(n->tag->tag, all ? n->path + 5 : n->path)) warning("tag '%s' is really '%s' here", n->tag->tag, n->path); } @@ -334,7 +334,7 @@ int cmd_describe(int argc, const char **argv, const char *prefix) die("--long is incompatible with --abbrev=0"); if (contains) { - const char **args = xmalloc((7 + argc) * sizeof(char*)); + const char **args = xmalloc((7 + argc) * sizeof(char *)); int i = 0; args[i++] = "name-rev"; args[i++] = "--name-only"; @@ -349,7 +349,7 @@ int cmd_describe(int argc, const char **argv, const char *prefix) args[i++] = s; } } - memcpy(args + i, argv, argc * sizeof(char*)); + memcpy(args + i, argv, argc * sizeof(char *)); args[i + argc] = NULL; return cmd_name_rev(i + argc, args, prefix); }