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

[PATCH v2 1/4] lib-gpg: drop unnecessary "missing GPG" warning

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Mar 7, 2016, 00:10 UTC
Message-ID
<1457309427-30124-2-git-send-email-sunshine@sunshineco.com>
In-Reply-To
<1457309427-30124-1-git-send-email-sunshine@sunshineco.com>

When 37d3e85 (t7004: factor out gpg setup, 2011-09-07) pulled gpg detection code out of t7004-tag.sh and turned it into a standard test prerequisite, it added an unconditional "missing GPG" warning when gpg is not detected.

However, this is redundant since all tests which require GPG already warn via either 'test_expect_success GPG' ("skipping: missing GPG") on a test-by-test basis, or when skipping all tests in a script ("skipping all foobar tests; missing GPG"). Consequently, the extra warning from lib-gpg.sh is unnecessary, so retire it.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---

At first I found this warning alarming and then annoying when changing t6302 to skip only signed tag testing (rather than skipping all tests entirely). It does seem like a redundant warning, hence this patch...

I also sneaked in a minor style cleanup.
 t/lib-gpg.sh | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
index db2ef22..ec2aa8f 100755
--- a/t/lib-gpg.sh
+++ b/t/lib-gpg.sh
@@ -1,9 +1,8 @@
 #!/bin/sh
 
 gpg_version=$(gpg --version 2>&1)
-if test $? = 127; then
-	say "You do not seem to have gpg installed"
-else
+if test $? != 127
+then
 	# As said here: http://www.gnupg.org/documentation/faqs.html#q6.19
 	# the gpg version 1.0.6 didn't parse trust packets correctly, so for
 	# that version, creation of signed tags using the generated key fails.
-- 
2.8.0.rc1.175.g19dcece
Previous: Eric SunshineNext: Johannes Schindelin
Message 2 of 9 in “make t6302 usable even without GPG installed”
  1. 0/4 make t6302 usable even without GPG installedEric Sunshine, Mar 7, 2016
  2. 1/4 lib-gpg: drop unnecessary "missing GPG" warningEric Sunshine, Mar 7, 2016
  3. Johannes SchindelinMar 15, 2016
  4. Eric SunshineMar 15, 2016
  5. 2/4 t6302: normalize names and descriptions of signed tagsEric Sunshine, Mar 7, 2016
  6. 3/4 t6302: also test annotated in addition to signed tagsEric Sunshine, Mar 7, 2016
  7. 4/4 t6302: skip only signed tags rather than all tests when GPG is missingEric Sunshine, Mar 7, 2016
  8. Johannes SchindelinMar 15, 2016
  9. Eric SunshineMar 17, 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.