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 454A31F5AE for ; Wed, 17 Jun 2020 18:23:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727095AbgFQSXu (ORCPT ); Wed, 17 Jun 2020 14:23:50 -0400 Received: from pb-smtp20.pobox.com ([173.228.157.52]:51364 "EHLO pb-smtp20.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726835AbgFQSXt (ORCPT ); Wed, 17 Jun 2020 14:23:49 -0400 Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 83F01E7993; Wed, 17 Jun 2020 14:23:47 -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=FJp4B9MUtYoy0uqi+Ac4Qw68Wnw=; b=tfGhI4 v3cvBTuHrdp+GMHVrw8gSlGX4nb4C1Cng2658zmR7CYEoGo0R0ztlC/G+CejKcqM Y/xgmGsb1C+TWvEu29PghA028vUlJ0PrszXwjsTDVlWULMV6IlZjzqQ2M2vJHTfJ 0y2XCmvDaI9+7qkXH6FZc5yKltIDzHIYIRYWM= 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=ayi9w7Yz573q77/g39eDj79/GTd6s34t cw3lC95pVmTDtwaFhRdRC18kkFlQwGdPu1rj2eMdqq6UJnE+7JpRbh3XEvvk5rMN oz9QCBN03ZLtUYHwYu4sX7UWIjOoe/xsB2+EsHjE05O1C2e0FZLv7t7loP7XqUKz psK2a23pEzs= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 76026E7992; Wed, 17 Jun 2020 14:23:47 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [35.196.173.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id B5D62E7990; Wed, 17 Jun 2020 14:23:44 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Jeff King Cc: Johannes Schindelin via GitGitGadget , git@vger.kernel.org, don@goodman-wilson.com, stolee@gmail.com, sandals@crustytoothpaste.net, Matt Rogers , Eric Sunshine , Taylor Blau , Phillip Wood , Alban Gruin , Johannes Sixt , Johannes Schindelin Subject: Re: [PATCH v2 02/12] fmt-merge-msg: introduce a way to override the main branch name References: <20200616130456.GF666057@coredump.intra.peff.net> Date: Wed, 17 Jun 2020 11:23:43 -0700 In-Reply-To: <20200616130456.GF666057@coredump.intra.peff.net> (Jeff King's message of "Tue, 16 Jun 2020 09:04:56 -0400") 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: ADB7158A-B0C7-11EA-A671-B0405B776F7B-77302942!pb-smtp20.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Jeff King writes: > I'm not sure if this check_refname_format() is valid, though. IIRC we've > had issues where "ONELEVEL" was used to check a branch name, but misses > some cases. The more full check done by strbuf_check_branch_ref() > actually creates the full refname and checks that. It also catches stuff > like refs/heads/HEAD. Yup. I actually am in favor of removing special casing of a single branch done by fmt-merge-msg and fast-export --anonymize, so this may not matter. We still need a mechanism to allow users specify the default name to be given to the first branch "git init" creates and used by "git clone" as a fallback name when it cannot infer what the other side uses, though.