git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Junio C Hamano <junkio@cox.net>,
	Git Mailing List <git@vger.kernel.org>,
	Andy Parkins <andyparkins@gmail.com>
Subject: Fix "git tag -u" breakage
Date: Tue, 30 Jan 2007 20:00:22 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0701301957320.3611@woody.linux-foundation.org> (raw)


The recent cleanup to understand

	[user]
		signingkey = ..

sadly broke the old "-u signingkey" syntax. Admittedly the config file 
approach is nicer, and I should probably use it, but even so, there's 
really no reason to break the old syntax either.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---

This fixes it for me, and _looks_ obvious enough, but I didn't actually 
test the other cases (ie tagger name and the config file). Caveat patchor.

diff --git a/git-tag.sh b/git-tag.sh
index 988bf4c..c2c57d5 100755
--- a/git-tag.sh
+++ b/git-tag.sh
@@ -115,6 +115,7 @@ tagger=$(git-var GIT_COMMITTER_IDENT) || exit 1
 
 keyid=$(git-repo-config user.signingkey) ||
 	keyid=$(expr "z$tagger" : 'z\(.*>\)')
+username=${username:-$keyid}
 
 trap 'rm -f "$GIT_DIR"/TAG_TMP* "$GIT_DIR"/TAG_FINALMSG "$GIT_DIR"/TAG_EDITMSG' 0
 
@@ -141,7 +142,7 @@ if [ "$annotate" ]; then
       cat "$GIT_DIR"/TAG_FINALMSG ) >"$GIT_DIR"/TAG_TMP
     rm -f "$GIT_DIR"/TAG_TMP.asc "$GIT_DIR"/TAG_FINALMSG
     if [ "$signed" ]; then
-	gpg -bsa -u "$keyid" "$GIT_DIR"/TAG_TMP &&
+	gpg -bsa -u "$username" "$GIT_DIR"/TAG_TMP &&
 	cat "$GIT_DIR"/TAG_TMP.asc >>"$GIT_DIR"/TAG_TMP ||
 	die "failed to sign the tag with GPG."
     fi

             reply	other threads:[~2007-01-31  4:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-31  4:00 Linus Torvalds [this message]
2007-01-31  4:56 ` Fix "git tag -u" breakage Junio C Hamano
2007-01-31  8:37   ` Andy Parkins

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=Pine.LNX.4.64.0701301957320.3611@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=andyparkins@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /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).