git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH/RFC] builtin/tag: Changes argument format for verify

From
santiago@nyu.edu <santiago@nyu.edu>
Date
Feb 27, 2016, 00:27 UTC
Message-ID
<1456532864-30327-1-git-send-email-santiago@nyu.edu>
From: Santiago Torres <santiago@nyu.edu>

The verify tag function converts the commit sha1 to hex and passes it as a command-line argument to builtin/verify-tag. Given that builtin/verify-tag already resolves the ref name sha1 equivalent, the sha1 to hex_sha1 conversion is unnecessary and the ref-name can be used instead.

Signed-off-by: Santiago Torres <santiago@nyu.edu>
---
 builtin/tag.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/builtin/tag.c b/builtin/tag.c
index 1705c94..5de1161 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -105,8 +105,7 @@ static int verify_tag(const char *name, const char *ref,
 				const unsigned char *sha1)
 {
 	const char *argv_verify_tag[] = {"verify-tag",
-					"-v", "SHA1_HEX", NULL};
-	argv_verify_tag[2] = sha1_to_hex(sha1);
+					"-v", name, NULL};
 
 	if (run_command_v_opt(argv_verify_tag, RUN_GIT_CMD))
 		return error(_("could not verify the tag '%s'"), name);
-- 
2.7.0.435.g70bd996.dirty
Next: Jeff King
Message 1 of 6 in “builtin/tag: Changes argument format for verify”
  1. builtin/tag: Changes argument format for verifysantiago@nyu.edu, Feb 27, 2016
  2. Jeff KingFeb 27, 2016
  3. Santiago TorresFeb 27, 2016
  4. Jeff KingFeb 27, 2016
  5. Santiago TorresMar 3, 2016
  6. Jeff KingMar 3, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.