From patchwork Mon Oct 7 20:15:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kristoffer Haugsbakk X-Patchwork-Id: 13825245 Received: from fout-a1-smtp.messagingengine.com (fout-a1-smtp.messagingengine.com [103.168.172.144]) (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 9F5C31DE3CF for ; Mon, 7 Oct 2024 20:16:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.144 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728332177; cv=none; b=QYNAHOkNfQpfvjmY3s9F2SeNQCTZQSkDMMiMYDpNjEjrlQRPDxfKn5L9d0U8h/iU/VKDLgxzqjA14x16hCum6NfbyBgR6cUp+bGrPWXvJtqfMqClxo04qgndF5slSGJbMOpYFONa70WWh81icVl1Dzd+6SKxZzIvm6XyGP924Rs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728332177; c=relaxed/simple; bh=v2oPXqCUSaDw0dUhszVT7zPZn/cDFezpWlCpatxfmBY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tg3S+7+pYeIdxC9WVf/RFxhLlp2q7Pak2SCYN92B1dn8FrhlcH3sPKzbX42GSe9arhDk3SH1pWh2bU6VnqmkuHs+eLI8tOAhVf8JiC14PyXif1y/PjqY3oa/G/gZ7k2Z5ZSrgwzW8MRkr17jD/JtXVCcCWcT6TTDCUsky2azQPw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=khaugsbakk.name; spf=pass smtp.mailfrom=khaugsbakk.name; dkim=pass (2048-bit key) header.d=khaugsbakk.name header.i=@khaugsbakk.name header.b=C8qcJ72a; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=aw/hUkql; arc=none smtp.client-ip=103.168.172.144 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=khaugsbakk.name Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=khaugsbakk.name Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=khaugsbakk.name header.i=@khaugsbakk.name header.b="C8qcJ72a"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="aw/hUkql" Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfout.phl.internal (Postfix) with ESMTP id AB6A31380368; Mon, 7 Oct 2024 16:16:14 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Mon, 07 Oct 2024 16:16:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=khaugsbakk.name; h=cc:cc:content-transfer-encoding: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=1728332174; x= 1728418574; bh=jC2O0LbeSTPcOj63eqniDkv6VS6eOP/ySgf9kZsmz60=; b=C 8qcJ72aOFiYUUG52ghNnH9VCaXjHVF4lzr3QiB5/D5U7WsAkaQJ962J4FuR/eWPX wrBoeSwF/nOVxoOgPRBBFcmpvfkKtr7x/iG1h95NH3SoshkDL5bON7tvMj+9tnxh Q/PmwBFqhq8s2mR7RBT3yMX5NjQCB6QzgMrB6/biRRHXLxCWpD2amUITorAFFa7k CIQsCtPD0ZmCsH5QlSKHnx7oRFjPUmkabJusgK3oArsTvrKY1C9QoXTAXIHrcbRq 4S+hJbP8xb9MpwUpI8RdYH/pRRyEH0Z/4PaxlJMVfX96e8RmqQPhQfDiiwLE+A7Z 4N1syEBenblPbpCXAuVTA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1728332174; x= 1728418574; bh=jC2O0LbeSTPcOj63eqniDkv6VS6eOP/ySgf9kZsmz60=; b=a w/hUkqlydg7TFdJhsDuSAs44ZIKfYwlVVNSOMlSUhGckVyOOXjOUrRvbJyONKTOs Mm6euhOcHGEH3k2EiJtzcq34yZRls88DsNfEIqDUMhvQbg3kT+rQjIg98vYe779d 83uwj7CeWoEKc7bxUIZ2QYj63lODFgYfLi7gVjfqAMeeJ53r6ShjzIwSe/FppTei tz5WA61BaxPRUKtlAQ3aTyeu1I5X+2+Mbi12cRymaU8hO/QwgS+rN1KH1Wlh1aJ5 kCQnTXKGIMmIu6KjaS9la7q143gDXex7L+2cJ4pZmcPg6QYdZ48LP4R6Sc4uKKe7 XxhxqQSxjc+SryZeelwlg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddvledgudeglecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvve fufffkofgjfhgggfestdekredtredttdenucfhrhhomhepmfhrihhsthhofhhfvghrucfj rghughhssggrkhhkuceotghouggvsehkhhgruhhgshgsrghkkhdrnhgrmhgvqeenucggtf frrghtthgvrhhnpeetudeiheeguddtgfduveekhfevudeiieetjefhffetiedtgeejieeh tdfhjefgteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpegtohguvgeskhhhrghughhssggrkhhkrdhnrghmvgdpnhgspghrtghpthhtohepfedp mhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlh drohhrghdprhgtphhtthhopegtohguvgeskhhhrghughhssggrkhhkrdhnrghmvgdprhgt phhtthhopehpvghffhesphgvfhhfrdhnvght X-ME-Proxy: Feedback-ID: i2671468f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Oct 2024 16:16:13 -0400 (EDT) From: Kristoffer Haugsbakk To: git@vger.kernel.org Cc: Kristoffer Haugsbakk , peff@peff.net Subject: [PATCH 1/3] object-name: fix whitespace Date: Mon, 7 Oct 2024 22:15:17 +0200 Message-ID: <689eb69554480343b9f6db15ee6bef2c505717ad.1728331771.git.code@khaugsbakk.name> X-Mailer: git-send-email 2.46.1.641.g54e7913fcb6 In-Reply-To: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Commit-Hash: 689eb69554480343b9f6db15ee6bef2c505717ad Fix double newlines according to `clang format`. Signed-off-by: Kristoffer Haugsbakk --- object-name.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/object-name.c b/object-name.c index c892fbe80aa..42e3ba4a77a 100644 --- a/object-name.c +++ b/object-name.c @@ -482,7 +482,6 @@ static int show_ambiguous_object(const struct object_id *oid, void *data) strbuf_addf(sb, _("%s blob"), hash); } - out: /* * TRANSLATORS: This is line item of ambiguous object output @@ -1965,7 +1964,6 @@ static void diagnose_invalid_index_path(struct repository *r, strbuf_release(&fullname); } - static char *resolve_relative_path(struct repository *r, const char *rel) { if (!starts_with(rel, "./") && !starts_with(rel, "../")) From patchwork Mon Oct 7 20:15:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kristoffer Haugsbakk X-Patchwork-Id: 13825246 Received: from fhigh-a6-smtp.messagingengine.com (fhigh-a6-smtp.messagingengine.com [103.168.172.157]) (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 28A871DE4F8 for ; Mon, 7 Oct 2024 20:16:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728332181; cv=none; b=nCWc5Dy7Vn1edU8Eu6WDcpFj7x0q2o67zWZxaZV/Ag3algeAj+rc0bRCKT/kC1Cd9dwBg0+FQV5kpj3PzBC0Ku5ufuRPfyyYN3gxuMnRtv2GjuSieYsTArkoN1oxZIAUYtGC9+n2CeXW1AmzFLR5bP3cflfTypdBhJrHMxvQA4Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728332181; c=relaxed/simple; bh=KI+xg3cph88ddxeR5uF3sIsSTrJMXeQp8smjviiCGT4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=WT+9kyGsotVaf2RICJAS3Aac2sGqpMMDxpUFLgNqlUg2fCYSpfWWuR2qXmOXoLDHlk2ZoHubMnEbhZQdpMHc5hps797Sf608wZ24fa+l3o2IUKd3pE1tHiSB3J0Jlvcp9twIv+OAx2uicyMhQ3oP2uNXRpEKMobfCy0HHSnv8to= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=khaugsbakk.name; spf=pass smtp.mailfrom=khaugsbakk.name; dkim=pass (2048-bit key) header.d=khaugsbakk.name header.i=@khaugsbakk.name header.b=ddyu96xx; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=mq+5vNpl; arc=none smtp.client-ip=103.168.172.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=khaugsbakk.name Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=khaugsbakk.name Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=khaugsbakk.name header.i=@khaugsbakk.name header.b="ddyu96xx"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="mq+5vNpl" Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id 425E511401CA; Mon, 7 Oct 2024 16:16:18 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Mon, 07 Oct 2024 16:16:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=khaugsbakk.name; 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=1728332178; x=1728418578; bh=MiICQqcYku+4NSVUlpEXFja699ppQ0pq K03b9ufm9CI=; b=ddyu96xxN4z0kir0KHxW+4rX2k9GKqlB+xRhd8qOaU2S13I3 eF/+x5fvA8wkkFgWz5U1PsnKd4zEoxDWDbOCUzA8gl0tPAzmZYYlWVFh19WuJF85 qmXEQ8f8VVsdhpT26MWPVBVuNXteB/DGaaZPTSMN2iFx/28imzItmft0aaDIytVH Y2QBoFwHAL2MvKmt4CSlJQt2B9kT853QG+b73P6ghuF+vlr3otQWdyYU+nrkmmDI YgmPX4fkidH/VdXAdEKC8s5B1PVHn8VnaWCmrdyrcA3vo14lzv788nfWGrsGpUhT Jp740FlDW+Gl07VnB0YZyd8lcrppZPC1DYyOfg== 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-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1728332178; x= 1728418578; bh=MiICQqcYku+4NSVUlpEXFja699ppQ0pqK03b9ufm9CI=; b=m q+5vNplAuekSwjhe/FM3VHyyTozWKwMzGJXAzSLohVhLXurufcgpRqYn5iMmXQXE t+sHd+OnqZ+7Bax/ScpB20DTG2AIf3XDLu85Md/HIW6HUGoWVdeXAsoTnNuuhsoi old67bxuQ3hRfaCTRwSiroV/m54ssM+WHOrfJbzEXe6W50YAq5OneyVrOV/pPdX3 zklLFf4V1rl352WU7L6u5t+8+U5QUcfH8Dw7tZo9X0XJxQ3Nf26julV9TYly2eX8 89b0CMb34R8WSsV2FhFiAwGGeCcdsQUTVunyovkGoWLGnUjbhwZHLAeXAd/00aRa /4pxsQvFb26UwJkoGeZMQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddvledgudegkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvve fufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpefmrhhishhtohhffhgvrhcu jfgruhhgshgsrghkkhcuoegtohguvgeskhhhrghughhssggrkhhkrdhnrghmvgeqnecugg ftrfgrthhtvghrnhepvefgleevieekgeejieekueevhfelieduvdelgeefkeejtdekvedt tefgffevtedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homheptghouggvsehkhhgruhhgshgsrghkkhdrnhgrmhgvpdhnsggprhgtphhtthhopeef pdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehgihhtsehvghgvrhdrkhgvrhhnvg hlrdhorhhgpdhrtghpthhtoheptghouggvsehkhhgruhhgshgsrghkkhdrnhgrmhgvpdhr tghpthhtohepphgvfhhfsehpvghffhdrnhgvth X-ME-Proxy: Feedback-ID: i2671468f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Oct 2024 16:16:16 -0400 (EDT) From: Kristoffer Haugsbakk To: git@vger.kernel.org Cc: Kristoffer Haugsbakk , peff@peff.net Subject: [PATCH 2/3] object-name: don't allow @ as a branch name Date: Mon, 7 Oct 2024 22:15:18 +0200 Message-ID: X-Mailer: git-send-email 2.46.1.641.g54e7913fcb6 In-Reply-To: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Commit-Hash: b88c2430f88b641d69e5f161d3a18cce113a81c9 `HEAD` is an invalid branch name.[1] But the `@` synonym is allowed. This is just as inconvenient since commands like `git checkout @` will, quite sensibly, do `git checkout HEAD` instead of checking out that branch; in turn there is no practical reason to use this as a branch name since you cannot even check out the branch itself (only check out the commit which `refs/heads/@` points to). † 1: a625b092cc5 (branch: correctly reject refs/heads/{-dash,HEAD}, 2017-11-14) Signed-off-by: Kristoffer Haugsbakk --- object-name.c | 3 ++- t/t3204-branch-name-interpretation.sh | 9 ++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/object-name.c b/object-name.c index 42e3ba4a77a..56b288ff4c3 100644 --- a/object-name.c +++ b/object-name.c @@ -1763,7 +1763,8 @@ int strbuf_check_branch_ref(struct strbuf *sb, const char *name) strbuf_splice(sb, 0, 0, "refs/heads/", 11); if (*name == '-' || - !strcmp(sb->buf, "refs/heads/HEAD")) + !strcmp(sb->buf, "refs/heads/HEAD") || + !strcmp(sb->buf, "refs/heads/@")) return -1; return check_refname_format(sb->buf, 0); diff --git a/t/t3204-branch-name-interpretation.sh b/t/t3204-branch-name-interpretation.sh index 594e3e43e12..7dcd1308f8c 100755 --- a/t/t3204-branch-name-interpretation.sh +++ b/t/t3204-branch-name-interpretation.sh @@ -119,13 +119,8 @@ test_expect_success 'disallow deleting remote branch via @{-1}' ' expect_branch refs/heads/origin/previous two ' -# The thing we are testing here is that "@" is the real branch refs/heads/@, -# and not refs/heads/HEAD. These tests should not imply that refs/heads/@ is a -# sane thing, but it _is_ technically allowed for now. If we disallow it, these -# can be switched to test_must_fail. -test_expect_success 'create branch named "@"' ' - git branch -f @ one && - expect_branch refs/heads/@ one +test_expect_success 'disallow branch named "@"' ' + test_must_fail git branch -f @ one ' test_expect_success 'delete branch named "@"' ' From patchwork Mon Oct 7 20:15:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kristoffer Haugsbakk X-Patchwork-Id: 13825247 Received: from fout-a1-smtp.messagingengine.com (fout-a1-smtp.messagingengine.com [103.168.172.144]) (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 519221DE4FC for ; Mon, 7 Oct 2024 20:16:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.144 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728332183; cv=none; b=bIZxdJmQorOSo3jQDWa8gIP6TPLtnaRcENvt13MJ53gndyctI7/+716+N2hfpFk6qdHMH744sSZMxa8GoTe++c8SoDjbtoA7OBkCzkKjVDS90J7nrp7YilLcvYxKoc1zOdyjtOBv8EhqanDpYIHOh8gbOLFsIxMQjrmREnT+rFI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728332183; c=relaxed/simple; bh=nsvgZapsOklNVueRLgafg4/9lgEEeZNX2XMDgS2xM8w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bZX/hg4MXYhGb/zBcVlft0NEV6KYTQeXmgpMFC/jQ7nLDBOOJU3jlt4UfyGJARXihC7E3v8TclQdlWcrAbo9NtbWcoH4/AWLyhYSResFnlR+W5i639DRfTAhHqY1Pi4su8POlhUOQFRbf13/uyhDu8GDMkMxA7+BJLRAmcdA6mc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=khaugsbakk.name; spf=pass smtp.mailfrom=khaugsbakk.name; dkim=pass (2048-bit key) header.d=khaugsbakk.name header.i=@khaugsbakk.name header.b=Uq4X7NKa; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=DHeFJKng; arc=none smtp.client-ip=103.168.172.144 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=khaugsbakk.name Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=khaugsbakk.name Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=khaugsbakk.name header.i=@khaugsbakk.name header.b="Uq4X7NKa"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="DHeFJKng" Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfout.phl.internal (Postfix) with ESMTP id 7775E138038D; Mon, 7 Oct 2024 16:16:21 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Mon, 07 Oct 2024 16:16:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=khaugsbakk.name; h=cc:cc:content-transfer-encoding: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=1728332181; x= 1728418581; bh=rr3c47RPkSr13LxuZRWabIG18+TCdDbJxmQ9KOPOl/U=; b=U q4X7NKa6YruEKkXCIFjnMdNv710Yf6enrSSZnbEk+5Mf95d5wXRl4HXdvWyMujo5 BCDeZQRCKR+oNbNbjlDWvKEHM3cI8nay52JV9dB+zV4SbOvfwdht4usFg0fo7Lok fhBGJb8nmYlHr9HlE8so/8PsN5TOzuvKsphc9Cj6dFR59P+HLtt0qclecmd03Hmu sPR9b8rk6Utc1V/UI2NaIvQJ59QBj+PR4Wu4Ir0hoJJPl7e9wOESoqZtRx2RLxUH zOyuurWzCy5EyalKHiY2+TBn1MocMjUVHXPIt2RasZbSpjtHo+WxXqbIPvldRZ0U x4XI2YVANB6mBBkbSh6iA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1728332181; x= 1728418581; bh=rr3c47RPkSr13LxuZRWabIG18+TCdDbJxmQ9KOPOl/U=; b=D HeFJKnghJJ8Yf8RqgANxOcy1ZhiFkfQP+jlobzltJhmeCTfuLLd+gqTkzukdL5Ub 2rLiD+QELdGADP6kIg7MMXVt+vzTFG1WSHKrGbOrHimLbnMNUXZJ42hDooL7ycRz fAA18WUySfMdAFMYB8TtM4/jWcPJTFSOIYROkLxYqTEpIsYjSiov6umbxz1WyRrC hhUw5apVyZBg3uMMYAu9Fnn1O+BJoPQvxfwafbPdFsiBICEff0k8s0nMOC+FMDMv idu4PgMgm85IaeoR+zD12tYFFSk7yZg1Zh0EzITmyJ8zYSX3bUMm4poT9gTOjaV5 0Sxjdrw3uEDom0CT04n/g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddvledgudeglecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvve fufffkofgjfhgggfestdekredtredttdenucfhrhhomhepmfhrihhsthhofhhfvghrucfj rghughhssggrkhhkuceotghouggvsehkhhgruhhgshgsrghkkhdrnhgrmhgvqeenucggtf frrghtthgvrhhnpeetudeiheeguddtgfduveekhfevudeiieetjefhffetiedtgeejieeh tdfhjefgteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpegtohguvgeskhhhrghughhssggrkhhkrdhnrghmvgdpnhgspghrtghpthhtohepfedp mhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlh drohhrghdprhgtphhtthhopegtohguvgeskhhhrghughhssggrkhhkrdhnrghmvgdprhgt phhtthhopehpvghffhesphgvfhhfrdhnvght X-ME-Proxy: Feedback-ID: i2671468f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Oct 2024 16:16:20 -0400 (EDT) From: Kristoffer Haugsbakk To: git@vger.kernel.org Cc: Kristoffer Haugsbakk , peff@peff.net Subject: [PATCH 3/3] t1402: exercise disallowed branch names Date: Mon, 7 Oct 2024 22:15:19 +0200 Message-ID: <8262b81141bbd36cd7a17e6abe5eb6bb688290f3.1728331771.git.code@khaugsbakk.name> X-Mailer: git-send-email 2.46.1.641.g54e7913fcb6 In-Reply-To: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Commit-Hash: 8262b81141bbd36cd7a17e6abe5eb6bb688290f3 Signed-off-by: Kristoffer Haugsbakk --- t/t1402-check-ref-format.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/t/t1402-check-ref-format.sh b/t/t1402-check-ref-format.sh index 5ed9d7318e0..06ef54c6091 100755 --- a/t/t1402-check-ref-format.sh +++ b/t/t1402-check-ref-format.sh @@ -68,6 +68,10 @@ valid_ref 'heads/foo*/bar' --refspec-pattern valid_ref 'heads/f*o/bar' --refspec-pattern invalid_ref 'heads/f*o*/bar' --refspec-pattern invalid_ref 'heads/foo*/bar*' --refspec-pattern +invalid_ref 'HEAD' --branch +invalid_ref '@' --branch +invalid_ref '-' --branch +invalid_ref '-something' --branch ref='foo' invalid_ref "$ref"