From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 116A11F45D for ; Mon, 23 Mar 2020 17:46:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727026AbgCWRqr (ORCPT ); Mon, 23 Mar 2020 13:46:47 -0400 Received: from pb-smtp2.pobox.com ([64.147.108.71]:50130 "EHLO pb-smtp2.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725880AbgCWRqr (ORCPT ); Mon, 23 Mar 2020 13:46:47 -0400 Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id B3BB953BB4; Mon, 23 Mar 2020 13:46:45 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=X/chSHw3Vb6Moka/jbA4iU7+HMc=; b=FKftBs Y4+ri2cHypSsKHC01f+bxUcyCjNCOxxsHxwTXYHNbSsg0pF33wdDTGt8J/QR4MLr 902/NnWdz61eVPNXbVbUtMDTCvTLvPp74tC2BOofkJ0xBvHSxyKDc/mkqd4wEtPC ecWg4df3e7m++CB/DnstxqdvPOTR9pihl59JU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=GS/0pa3+KQRFgWvYACEIrsrUugvLWliR bwU9BTE7Yn6DbFTPSb1mIvVWO8fUO839otf+ecTpo12EwRW6AyAlLbspYcco+Xsi MaohIL+hIk2pHDwNbyCuWjcbil1Xj5Hl8ipVPP3DSnMIYdGhkRy75HurAQMODYOn h/pVNb2LfOg= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id AB27253BB3; Mon, 23 Mar 2020 13:46:45 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.74.119.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id 27ECD53BB0; Mon, 23 Mar 2020 13:46:45 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: "Johannes Schindelin via GitGitGadget" Cc: git@vger.kernel.org, Johannes Schindelin Subject: Re: [PATCH 1/2] tests(gpg): allow the gpg-agent to start on Windows References: <287a21f1033b2a74420029c529ad4db956051a85.1584968990.git.gitgitgadget@gmail.com> Date: Mon, 23 Mar 2020 10:46:44 -0700 In-Reply-To: <287a21f1033b2a74420029c529ad4db956051a85.1584968990.git.gitgitgadget@gmail.com> (Johannes Schindelin via GitGitGadget's message of "Mon, 23 Mar 2020 13:09:49 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 4336843E-6D2E-11EA-B54D-D1361DBA3BAF-77302942!pb-smtp2.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org "Johannes Schindelin via GitGitGadget" writes: > From: Johannes Schindelin > > In Git for Windows' SDK, we use the MSYS2 version of OpenSSH, meaning > that the `gpg-agent` will fail horribly when being passed a `--homedir` > that contains colons. > > Previously, we did pass the Windows version of the absolute path, > though, which starts in the drive letter followed by, you guessed it, a > colon. > > Let's use the same trick found elsewhere in our test suite where `$PWD` > is used to refer to the pseudo-Unix path (which works only within the > MSYS2 Bash/OpenSSH/Perl/etc, as opposed to `$(pwd)` which refers to the > Windows path that `git.exe` understands, too). Makes sense. Do we have a short/concise instruction, e.g. "You should use $(pwd) in most cases, but for such and such purposes use $PWD instead", in t/README for test writers, who are not familiar with the distinction between $(pwd) and $PWD, to help them decide which one to use in what situation? I see this kind of fix-ups from time to time, and am wondering if there is a way to reduce the need for you or J6t to spot and fix the new ones. Thanks. > Signed-off-by: Johannes Schindelin > --- > t/lib-gpg.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh > index 8d28652b729..11b83b8c24a 100755 > --- a/t/lib-gpg.sh > +++ b/t/lib-gpg.sh > @@ -29,7 +29,7 @@ then > # > lib-gpg/ownertrust > mkdir ./gpghome && > chmod 0700 ./gpghome && > - GNUPGHOME="$(pwd)/gpghome" && > + GNUPGHOME="$PWD/gpghome" && > export GNUPGHOME && > (gpgconf --kill gpg-agent >/dev/null 2>&1 || : ) && > gpg --homedir "${GNUPGHOME}" 2>/dev/null --import \