git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: git@vger.kernel.org
Cc: Deskin Miller <deskinm@umich.edu>, Johannes Sixt <j6t@kdbg.org>
Subject: [PATCH v2] tag -v: use RUN_GIT_CMD to run verify-tag
Date: Thu, 15 Apr 2010 04:36:25 -0500	[thread overview]
Message-ID: <20100415093625.GA18612@progeny.tock> (raw)

This is the preferred way to run a git command.

The only obvious observable effects I can think of are that the exec
is properly reported in GIT_TRACE output and that verifying signed
tags will still work if the git-verify-tag hard link in gitexecdir
goes missing.

Helped-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
v1 was part of a longer series that replaced the run_command with a
function call [1].

Thanks to Hannes for the pointer.

[1] http://thread.gmane.org/gmane.comp.version-control.git/142681/focus=142682
What about the rest of the series?  Without some facility [2] to
verify tags without going out of the way to do it, it is hard to end
up using tag -v often enough to notice the speed difference.
[2] maybe a fetch-update hook.
http://thread.gmane.org/gmane.comp.version-control.git/101585/focus=101590

 builtin/tag.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/builtin/tag.c b/builtin/tag.c
index 4ef1c4f..d311491 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -147,11 +147,11 @@ 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",
+	const char *argv_verify_tag[] = {"verify-tag",
 					"-v", "SHA1_HEX", NULL};
 	argv_verify_tag[2] = sha1_to_hex(sha1);
 
-	if (run_command_v_opt(argv_verify_tag, 0))
+	if (run_command_v_opt(argv_verify_tag, RUN_GIT_CMD))
 		return error("could not verify the tag '%s'", name);
 	return 0;
 }
-- 
1.7.1.rc1

                 reply	other threads:[~2010-04-15  9:36 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=20100415093625.GA18612@progeny.tock \
    --to=jrnieder@gmail.com \
    --cc=deskinm@umich.edu \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).