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-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 04E8D1F55B for ; Wed, 10 Jun 2020 23:23:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726842AbgFJXXX (ORCPT ); Wed, 10 Jun 2020 19:23:23 -0400 Received: from injection.crustytoothpaste.net ([192.241.140.119]:39196 "EHLO injection.crustytoothpaste.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726374AbgFJXXX (ORCPT ); Wed, 10 Jun 2020 19:23:23 -0400 Received: from camp.crustytoothpaste.net (unknown [IPv6:2001:470:b978:101:b610:a2f0:36c1:12e3]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by injection.crustytoothpaste.net (Postfix) with ESMTPSA id 524D66048D; Wed, 10 Jun 2020 23:22:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crustytoothpaste.net; s=default; t=1591831371; bh=HiFsajb7LiyJvZpbe2HD5eyDXduiAvDkxhJo83Ys6Zg=; h=Date:From:To:Cc:Subject:References:Content-Type: Content-Disposition:In-Reply-To:From:Reply-To:Subject:Date:To:CC: Resent-Date:Resent-From:Resent-To:Resent-Cc:In-Reply-To:References: Content-Type:Content-Disposition; b=XBeEa7DNbpZ77q2SwJfViwlokOuVju+dqeqcPkadAyKEKS8dttTtfV0OikhO0euKK rqiMw0bDfc95Dgr/mxrlfVa0o1fcDFNgUwWqr6+Hsgcr4Q8YAnnwNcrcWVDoY2LFLE xuP/OdvmKLJqfrlUq114smFelKsUrQvfhLYxTsJglHMlZDET/gi34K+EEkQGL+giWc IecE27aoKU2AZTMKMELypeu11NvzyqI3h16Eo4cN1obp8q2WCtRcK2gworN+QRYpDa msIGTyXyGy5/Jmz1hJPFNBmUi4eGGZ4BNXib7+pEI+dFGd2FBaRQi1S3rNhBQS7E8r vBHWRHqcuGUq+mE02kkkbvXw7KjSi8kf2dqCcdcuYeiuczxZkvCiGTnX9JsSCqXAOo DCLP2tcl0gfKOL8Y+m701SbGSV+TW8qW4q+KV33ZQoe9aAazUN22/tUbSYn+Exx+TA d/W6Q4tHdz1SvLdc3Ye/4YpvVBF9DC5mIj3kwLLAAflIEU72sB/ Date: Wed, 10 Jun 2020 23:22:46 +0000 From: "brian m. carlson" To: Don Goodman-Wilson via GitGitGadget Cc: git@vger.kernel.org, don@goodman-wilson.com, stolee@gmail.com, peff@peff.net, Johannes Schindelin Subject: Re: [PATCH 1/9] init: allow overriding the default branch name for new repositories Message-ID: <20200610232246.GT6569@camp.crustytoothpaste.net> Mail-Followup-To: "brian m. carlson" , Don Goodman-Wilson via GitGitGadget , git@vger.kernel.org, don@goodman-wilson.com, stolee@gmail.com, peff@peff.net, Johannes Schindelin References: <90912e32da1192cfc3b39a18cb606caa46e85b1c.1591823971.git.gitgitgadget@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+Yg8W10oK6rlW0RR" Content-Disposition: inline In-Reply-To: <90912e32da1192cfc3b39a18cb606caa46e85b1c.1591823971.git.gitgitgadget@gmail.com> X-Machine: Running on camp using GNU/Linux on x86_64 (Linux kernel 5.6.0-2-amd64) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org --+Yg8W10oK6rlW0RR Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-06-10 at 21:19:22, Don Goodman-Wilson via GitGitGadget wrote: > + /* prepend "refs/heads/" to the branch name */ > + prefixed =3D xstrfmt("refs/heads/%s", branch_name); > + if (check_refname_format(prefixed, 0)) > + die(_("invalid default branch name: '%s'"), branch_name); I'm glad to see this part and a check for it in the test below. We wouldn't want a typo to create a broken branch name. > +test_expect_success 'invalid custom default branch name' ' > + test_must_fail env GIT_TEST_DEFAULT_BRANCH_NAME=3D"with space" \ > + git init custom-invalid 2>err && > + test_i18ngrep "invalid default branch name" err > +' > + --=20 brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204 --+Yg8W10oK6rlW0RR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.2.20 (GNU/Linux) iHUEABYKAB0WIQQILOaKnbxl+4PRw5F8DEliiIeigQUCXuFrRQAKCRB8DEliiIei gWh3AQC72M5zaVgqd44QK6VjjLfyxiVHSfnOOSyV3a/g+9EozgD+M7TTfdk7K5r8 OLAKBjiij42iFmjcqHG06qijbKVKpg4= =KA2m -----END PGP SIGNATURE----- --+Yg8W10oK6rlW0RR--