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

[PATCH 4/5 v2] tag -v: Do not spawn a separate process for verify-tag

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Mar 20, 2010, 22:14 UTC
Message-ID
<20100320221451.GB31098@progeny.tock>
In-Reply-To
<20100320051414.GD24791@progeny.tock>

Aside from handling of SIGPIPE, there was no reason for verify-tag to run in a separate process.

Not much advantage to this I can see. It just simplifies things a little.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Rebased to remove the churn from patch 1, as suggested by Johannes.
Thanks.
The new series has only 4 patches:
  [PATCH 2/5] verify-tag: use sigchain library to block SIGPIPE
  [PATCH 3/5] Expose verify_tag()
  [PATCH 4/5 v2] tag -v: Do not spawn a separate process for verify-tag
  [PATCH 5/5] verify_tag_signature(): let caller look up tag object sha1
 builtin/tag.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/builtin/tag.c b/builtin/tag.c
index 4ef1c4f..d138e0c 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -147,11 +147,7 @@ static int delete_tag(const char *name, const char *ref,
 static int verify_tag(const char *name, const char *ref,
 				const unsigned char *sha1)
 {
-	const char *argv_verify_tag[] = {"git-verify-tag",
-					"-v", "SHA1_HEX", NULL};
-	argv_verify_tag[2] = sha1_to_hex(sha1);
-
-	if (run_command_v_opt(argv_verify_tag, 0))
+	if (verify_tag_signature(sha1_to_hex(sha1), 1))
 		return error("could not verify the tag '%s'", name);
 	return 0;
 }
-- 
1.7.0.2
Previous: Jonathan NiederNext: Jonathan Nieder
Message 8 of 9 in “libify verify_tag()”
  1. 0/5 libify verify_tag()Jonathan Nieder, Mar 20, 2010
  2. 1/5 tag -v: use ‘git verify-tag’ without dashJonathan Nieder, Mar 20, 2010
  3. Johannes SixtMar 20, 2010
  4. Jonathan NiederMar 20, 2010
  5. 2/5 verify-tag: use sigchain library to block SIGPIPEJonathan Nieder, Mar 20, 2010
  6. 3/5 Expose verify_tag()Jonathan Nieder, Mar 20, 2010
  7. 4/5 tag -v: Do not spawn a separate process for verify-tagJonathan Nieder, Mar 20, 2010
  8. 4/5 tag -v: Do not spawn a separate process for verify-tagJonathan Nieder, Mar 20, 2010
  9. 5/5 verify_tag_signature(): let caller look up tag object sha1Jonathan Nieder, Mar 20, 2010

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.