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

[PATCH v2 1/1] t/lib-gpg.sh: fix GPG keyring import options

From
DHDave Huseby <dhuseby@linuxfoundation.org>
Date
Mar 19, 2019, 23:20 UTC
Message-ID
<20190319232013.t5pmbgfgojjbczqh@localhost>

Fix the way GPG keyrings are imported during testing to prevent GPG from prompting for approval to change the default config. This appears to have no adverse affects on GPG users with "normal" configurations but fixes the always-interactive prompting I see with my multi-keyring setup.

v2: fixed the whitespace.
Signed-off-by: Dave Huseby <dhuseby@linuxfoundation.org>
---
 t/lib-gpg.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
index 8d28652b72..e72e0554f1 100755
--- a/t/lib-gpg.sh
+++ b/t/lib-gpg.sh
@@ -32,8 +32,8 @@ then
 		GNUPGHOME="$(pwd)/gpghome" &&
 		export GNUPGHOME &&
 		(gpgconf --kill gpg-agent >/dev/null 2>&1 || : ) &&
-		gpg --homedir "${GNUPGHOME}" 2>/dev/null --import \
-			"$TEST_DIRECTORY"/lib-gpg/keyring.gpg &&
+		gpg --import-options merge-only --homedir "${GNUPGHOME}" 2>/dev/null \
+			--import "$TEST_DIRECTORY"/lib-gpg/keyring.gpg &&
 		gpg --homedir "${GNUPGHOME}" 2>/dev/null --import-ownertrust \
 			"$TEST_DIRECTORY"/lib-gpg/ownertrust &&
 		gpg --homedir "${GNUPGHOME}" </dev/null >/dev/null 2>&1 \
-- 
2.11.0
Next: Junio C Hamano
Message 1 of 3 in “t/lib-gpg.sh: fix GPG keyring import options”
  1. 1/1 t/lib-gpg.sh: fix GPG keyring import optionsDave Huseby, Mar 19, 2019
  2. Junio C HamanoMar 20, 2019
  3. SZEDER GáborMar 20, 2019

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.