From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id sPyhM7tDgWJ6dAAAbAwnHQ (envelope-from ) for ; Sun, 15 May 2022 20:17:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id eVGDM7tDgWJfkwAAauVa8A (envelope-from ) for ; Sun, 15 May 2022 20:17:31 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 71EA6A154 for ; Sun, 15 May 2022 20:17:31 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id A94635F6D1; Sun, 15 May 2022 18:17:18 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id F0E2F5F6D1 for ; Sun, 15 May 2022 18:17:15 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 7E7825FC01; Sun, 15 May 2022 14:17:15 -0400 (EDT) Received: (nullmailer pid 57808 invoked by uid 1000); Sun, 15 May 2022 18:17:13 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH 04/17] CLI/git: make existance of config branch optional on clone Date: Sun, 15 May 2022 15:14:09 -0300 Message-Id: <20220515181421.57088-5-david@tethera.net> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220515181421.57088-1-david@tethera.net> References: <20220515181421.57088-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: SRSGC7ZIPLAPZJX6FC3SE6R3N6PVIXKH X-Message-ID-Hash: SRSGC7ZIPLAPZJX6FC3SE6R3N6PVIXKH X-MailFrom: bremner@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1652638651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=+RFW+ZOHd+IfVIK6X1gZTFQ0dDITKpzxjmwtMgs1Vzs=; b=CRpQ+46I2ZrNLi1ZdZbez2SLVmCLxcFZIrk9+KK296LNkcVJWzjsbmT0Eb/V9eCRMlY7/F YYitkhvxuFI/i7SaHrDiF+WfsZOJszdiBn3gwzwYZUcWskr23y4r+dgoY+lxrQW8sZ168i 4gBir9tz1sKHlFOB78SZp0xNGUKWiClRo7n3vfQuujXqTx4v5273jTK1n0qMI8uUlYTIAW Gfqw2BFqbP9RXPpr9QpYq1Pjgmmr7FmITn+f1jPJIgyzQajaVwLacMIUrKjWu5HyHxePhv GL/gTu3+HYj8MvYmnF25MLJolTun86hwtfNk8nGs+VnZpGTK2DHG6sxg5f0MEg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652638651; a=rsa-sha256; cv=none; b=c52SaDbQk3nVKT7yhym5AeH52Fy4u4B44/UGnkZ7wdzB0fuph4pD1g4nhlsgbspRsBxTWf lWINXeiPt85u9UT7pN9Gl/ZXi8BQ1Qmily7FNY2OMIvHrwQoF7jSf6hdOXScf/XglpWjAQ ATYu55eTiHCVreWoKTLsrFrxC4Rr4/G0FXQxGqHTXDxF7JJs7p037f7ipPmV3kTNJaRQUw Q7zlNEncDXZ+BzusYGUgHSjUu8efU4Be0NFEmoJlV4eYYvC4W481FWDrR3twHDT1F9cdO7 ohhzxLckwM15Gyu6REo7JVPrdVBTWUYek32VzePk2+/wRlsivHORBarCD+tTuQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.99 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 71EA6A154 X-Spam-Score: -0.99 X-Migadu-Scanner: scn1.migadu.com X-TUID: MyXp4uxO8c5Z This branch is actually only used by an associated utility (notmuch-report), and notmuch-git works fine without it. --- notmuch-git.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/notmuch-git.in b/notmuch-git.in index 4b94046d..57b5a0ec 100755 --- a/notmuch-git.in +++ b/notmuch-git.in @@ -273,7 +273,13 @@ def clone(repository): wait=True) _git(args=['config', '--unset', 'core.worktree'], wait=True, expect=(0, 5)) _git(args=['config', 'core.bare', 'true'], wait=True) - _git(args=['branch', 'config', 'origin/config'], wait=True) + (status, stdout, stderr) = _git(args=['show-ref', '--verify', + '--quiet', + 'refs/remotes/origin/config'], + expect=(0,1), + wait=True) + if status == 0: + _git(args=['branch', 'config', 'origin/config'], wait=True) existing_tags = get_tags() if existing_tags: _LOG.warning( -- 2.35.2