From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-b8-smtp.messagingengine.com (fout-b8-smtp.messagingengine.com [202.12.124.151]) (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 3FF0520E702 for ; Thu, 25 Jun 2026 03:36:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782358583; cv=none; b=hulyw8HgqS8l6kojcWWVM92T0T9xcnPHr14u29dANtg/4cR8GfcMV4MpEequkcv1LBGCX4YeAF4rWbNJCU1q5zYxahluvmtOaUtnL33hqPBXMQ7ZRhskxeswKecSpspndfILQRElQUqowyhlALUqD/fmECAOriL8TdrwCnoRIKQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782358583; c=relaxed/simple; bh=rqF9KvSmsd8YmhRqDdcH2ilDCIPAmbc3e9V2xWIB9kg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=mi4Fk71q1ELI8puAl1pYyTQJ9AeA7GWKs40r9+ijNf1BAuFLtmYXiInWk629bI2V7nz1YvYDFoDIZnHqL1WQAsD2MO/uToSa8uGNdjNkRKBHKPzcVtRGT9ViJiNGmspHOtSqYjqquJ++iReqQnHjcyHv0TOq0BdKpPXt6bBZ3ts= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=dnSMUbr4; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=OgsiZc/x; arc=none smtp.client-ip=202.12.124.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="dnSMUbr4"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="OgsiZc/x" Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfout.stl.internal (Postfix) with ESMTP id 7120C1D00070; Wed, 24 Jun 2026 23:36:20 -0400 (EDT) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-03.internal (MEProxy); Wed, 24 Jun 2026 23:36:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc :cc: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=fm3; t=1782358580; x=1782444980; bh=vzbDks4414 V3MuUuKAf/YtwZVEyRR5BDHueYs2gzNL0=; b=dnSMUbr4eAC3n/GHJ9q4LZPgCZ gSRfMh6WV41Tlw/NvZWJjHa2twI7/pyLHHvmHeYeV+yYFad+//LLlpfgNJD+IUE+ fVFimFwF639WE0Bm71MWS7rG4ZynUnKVoWMKQ8VO+9o8WRqONPRxBw7Sdo7tJAWp rcy9iUYleJoRcL2s2e7muqbScFg3FCr2acaYKezU5DE6mz43bbpRVGzQEu59Sxbg zO8/eNKHh36ZnNZghNIG0gItSmt7/6Og6dtDAcMhKMjN4GrqsazNGP2FSMukTM4q pICGyUnU/sXuT9il71blqGBIZcJzQPfRDMQz//J3dprqFJ9+SY91Yq/4nWpQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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= 1782358580; x=1782444980; bh=vzbDks4414V3MuUuKAf/YtwZVEyRR5BDH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RF2hHJv9zDfGTw X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 24 Jun 2026 23:36:19 -0400 (EDT) From: Junio C Hamano To: "Harald Nordgren via GitGitGadget" Cc: git@vger.kernel.org, Harald Nordgren Subject: Re: [PATCH v2 2/2] push: suggest for a slash slip In-Reply-To: (Junio C. Hamano's message of "Wed, 24 Jun 2026 15:42:59 -0700") References: <49de5a925de506ed9a141eb72927b2548b73af22.1782338114.git.gitgitgadget@gmail.com> Date: Wed, 24 Jun 2026 20:36:18 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Junio C Hamano writes: > "Harald Nordgren via GitGitGadget" writes: > >> diff --git a/t/t5529-push-errors.sh b/t/t5529-push-errors.sh >> index 80b06a0cd2..cfb294305d 100755 >> --- a/t/t5529-push-errors.sh >> +++ b/t/t5529-push-errors.sh >> @@ -54,6 +54,37 @@ test_expect_success 'detect empty remote with targeted refspec' ' >> grep "fatal: bad repository ${SQ}${SQ}" stderr >> ' > t5529-push-errors.sh:59: error: bare grep outside pipeline (use test_grep) > t5529-push-errors.sh:60: error: bare grep outside pipeline (use test_grep) > t5529-push-errors.sh:62: error: bare grep outside pipeline (use test_grep) > t5529-push-errors.sh:67: error: bare grep outside pipeline (use test_grep) > t5529-push-errors.sh:72: error: bare grep outside pipeline (use test_grep) > t5529-push-errors.sh:77: error: bare grep outside pipeline (use test_grep) > t5529-push-errors.sh:84: error: bare grep outside pipeline (use test_grep) I've queued this squashable? fix on top of the branch before merging the result to 'seen' for tonight's push-out. Thanks. --- >8 --- Subject: [PATCH] SQUASH??? use test_grep --- t/t5529-push-errors.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/t/t5529-push-errors.sh b/t/t5529-push-errors.sh index cfb294305d..2294645902 100755 --- a/t/t5529-push-errors.sh +++ b/t/t5529-push-errors.sh @@ -56,32 +56,32 @@ test_expect_success 'detect empty remote with targeted refspec' ' test_expect_success 'suggest for a / slip' ' test_must_fail git push origin/main 2>stderr && - grep "${SQ}origin/main${SQ} is not a valid push target" stderr && - grep "hint: Did you mean to use: git push origin main?" stderr && + test_grep "${SQ}origin/main${SQ} is not a valid push target" stderr && + test_grep "hint: Did you mean to use: git push origin main?" stderr && test_must_fail git -c advice.pushRepoLooksLikeRef=false push origin/main 2>stderr && - ! grep "Did you mean" stderr + test_grep ! "Did you mean" stderr ' test_expect_success 'suggest when the branch has slashes' ' test_must_fail git push origin/feature/x 2>stderr && - grep "hint: Did you mean to use: git push origin feature/x?" stderr + test_grep "hint: Did you mean to use: git push origin feature/x?" stderr ' test_expect_success 'no suggestion when prefix is not a configured remote' ' test_must_fail git push not-a-remote/main 2>stderr && - ! grep "Did you mean" stderr + test_grep ! "Did you mean" stderr ' test_expect_success 'no suggestion for a trailing slash with no branch' ' test_must_fail git push origin/ 2>stderr && - ! grep "Did you mean" stderr + test_grep ! "Did you mean" stderr ' test_expect_success 'no suggestion when the argument is an existing path' ' test_when_finished "rm -rf origin" && git init --bare origin/main && git push origin/main HEAD:refs/heads/pushed 2>stderr && - ! grep "Did you mean" stderr && + test_grep ! "Did you mean" stderr && git -C origin/main rev-parse --verify refs/heads/pushed ' -- 2.55.0-rc2-165-g3249676ba5