From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-a2-smtp.messagingengine.com (fout-a2-smtp.messagingengine.com [103.168.172.145]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D99F64477E4 for ; Thu, 3 Sep 2026 08:38:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.145 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788424739; cv=none; b=DODDMsgaMkSFd+qOVVwgLtPdyH2itsOuUZ5mPzYBIRirArconObCambsjuXrPYPalTao+u5F1Z53ipv/3LbPemA4lDzLzkRP8cw45CpMEKt2FIkBJIsC3XGA1cdzDM2C9UonXVOmN0wrkHBxEcvPGbuN5MK60l64/36YF3Eftxo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788424739; c=relaxed/simple; bh=+lrWkg5K0NyXHcaudaOQzYsThRolNNtJgT1NNPQxKJg=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=OhNjWW4NWW57kKkhSRxuvduTuwYWTfHXQNHveAVWRPpb5LZHcxAdJJyoLCuB4SvQ28Qh3q9h/fT3dPWu595iHauWS0dfCuWClA9boX+X8K5/p4NZwLz0B7xDhVO6i8RT9fkdbUK69soQA/MWMbTrbKlneq48n7aV2GmfDl2zdi8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fastmail.com; spf=pass smtp.mailfrom=fastmail.com; dkim=pass (2048-bit key) header.d=fastmail.com header.i=@fastmail.com header.b=Seu839wp; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=pQEfja7H; arc=none smtp.client-ip=103.168.172.145 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fastmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fastmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fastmail.com header.i=@fastmail.com header.b="Seu839wp"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="pQEfja7H" Received: from ams-compute-01.internal (ams-compute-01.internal [10.64.2.61]) by mailfout.phl.internal (Postfix) with ESMTP id 7F6A0EC0283; Thu, 3 Sep 2026 04:38:55 -0400 (EDT) Received: from ams-imap-15 ([10.64.2.35]) by ams-compute-01.internal (MEProxy); Thu, 03 Sep 2026 04:38:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1788424734; x=1788511134; bh=WEvjDgUCJ4K9Oa1L0VPEJLaiTSvH+V3acldA4mj46KM=; b= Seu839wpBdIq29PwZQ0fidezMcT5kzFwoqDEnvZdMcbLAA5uH8WEuXeDr8OIGvuY R5nPLaGsms86QaEB3pU3aHAsrlcrW/+dYIKLYvz4hPvU+n2UDHoSAG4TfPw1CdB5 i5/I1W4d4+rGqdmRq3wFxbRB36XgM1o0x3uu6t6kwIX+YUud1lMSODIc+K1sU794 Fp6EZdG5dWAtlLgCJOZa0vHiGbbvsgEw3Q6bFGSMnv2Pg6N44MPby3fL5nORJi1G QITJ78C9N/Xc66Z6QrianVXznf5aBDlfwuY220IdarDaTvug+0D7XXhB2B75ue0j 791UuA4eQUXANI/uXw8ypA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1788424734; x= 1788511134; bh=WEvjDgUCJ4K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UQN8HZAW6KZA X-ME-Proxy: Feedback-ID: i8b11424c:Fastmail Received: by mailuser.ams.internal (Postfix, from userid 501) id EE99B22C007D; Thu, 3 Sep 2026 04:38:51 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: AdFTpIy9UMIo Date: Thu, 03 Sep 2026 10:38:31 +0200 From: "Kristoffer Haugsbakk" To: "D. Ben Knoble" , =?UTF-8?Q?Bence_Cs=C3=B3k=C3=A1s?= Cc: git@vger.kernel.org, "Jeff King" Message-Id: <958622c0-e0a5-4e27-9815-cd1fff2ed111@app.fastmail.com> In-Reply-To: References: <4e8d8b75-ddf4-4602-a2a8-26e5214c65f0@arm.com> Subject: Re: [Bug] Porcelain allows creation of '@' branch Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, Aug 31, 2026, at 21:59, D. Ben Knoble wrote: > On Mon, Aug 31, 2026 at 3:12=E2=80=AFPM Bence Cs=C3=B3k=C3=A1s wrote: >> >> Hi, >> >> I ran into this issue a few weeks ago. I'm using Git 2.55.0, which is >> the latest released. >> >> `git help check-ref-format` says this about a branch name: >> >> [...] >> 9. They cannot be the single character @. >> [...] > > This is the rule for a reference. > >> And as expected, it is rejected: >> >> $ git check-ref-format @ && echo BUG! >> $ >> >> However, the following commands all create a branch named @ : >> >> $ git checkout -b @ >> $ git switch -c @ >> $ git branch @ > > But (with git refs list) we should see this creates a ref "refs/heads/= @". > > I happen to think that's extremely confusing given that "@" is the > shorthand for HEAD, but=E2=80=A6 it's not against the current document= ed > rules, I think. (e.g., "git switch @" will fail, since it sees "git > switch HEAD"; using "refs/heads/@" will also fail.) git-checkout > doesn't fail but also doesn't change to the "@" branch. Futzing with > .git/HEAD and restoring the working tree works, but=E2=80=A6 yikes. > > Of course, --branch mode is allowed to be stricter; maybe we should > reject this case? Not a bug (2024) https://lore.kernel.org/git/xmqqy12z7eti.fsf@gitster.g/ I suspect that it is much more productive to deprecate and remove "@" that is a built-in synomym for HEAD (but "refs/remotes/origin/@" does not act as a synonym for "refs/remotes/origin/HEAD"). [...] >[snip]