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-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,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 AC9181F5AE for ; Tue, 11 May 2021 05:41:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230328AbhEKFmJ (ORCPT ); Tue, 11 May 2021 01:42:09 -0400 Received: from pb-smtp1.pobox.com ([64.147.108.70]:50702 "EHLO pb-smtp1.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230019AbhEKFmI (ORCPT ); Tue, 11 May 2021 01:42:08 -0400 Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 539EBBD5A0; Tue, 11 May 2021 01:41:02 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=W6VHcFLa48hv4Y2TQ5a8rZM3dUbtz7PmQNhvL2 tAyPU=; b=XBvsr3TuQ4YgQTw9NFHwLdyRN/1cCulN1mw/38coM7bw8HrjAB/la/ aSSpIV9G7jOEarl1XANBehz7zXwdknTyDH5zh7asStIHl8wTl6ywW7ObHeVOJsgi 7kPKPj8g5dsCYbCveAQihD0CNASH7beQGzARKZhHf4U+qsp1P5tM4= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 3926FBD59E; Tue, 11 May 2021 01:41:02 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.74.119.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id 99F29BD59D; Tue, 11 May 2021 01:41:01 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Sergey Organov Cc: Jeff King , Philip Oakley , Elijah Newren , Felipe Contreras , =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason , Alex Henrie , git@vger.kernel.org Subject: Re: [PATCH 2/6] diff-merges: move specific diff-index "-m" handling to diff-index References: <20210510153451.15090-1-sorganov@gmail.com> <20210510153451.15090-3-sorganov@gmail.com> Date: Tue, 11 May 2021 14:41:00 +0900 In-Reply-To: (Junio C. Hamano's message of "Tue, 11 May 2021 14:23:46 +0900") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 7843D0F4-B21B-11EB-9796-D152C8D8090B-77302942!pb-smtp1.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org I'll insert the following immediately after this step as a reminder for ourselves while queuing. ---- >8 -------- >8 -------- >8 -------- >8 -------- >8 ---- Subject: [PATCH] t4062: diff-index -S can take its string as a separate arg Butchering the command line parser in a wrong way can break this test, confusing the parser to mistake "--cached" which is a mere argument to the "-S" option as "compare the tree with the index" option. Signed-off-by: Junio C Hamano --- t/t4062-diff-pickaxe.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/t/t4062-diff-pickaxe.sh b/t/t4062-diff-pickaxe.sh index 1130c8019b..1c93812378 100755 --- a/t/t4062-diff-pickaxe.sh +++ b/t/t4062-diff-pickaxe.sh @@ -26,4 +26,9 @@ test_expect_success '-S --pickaxe-regex' ' verbose test 4096-zeroes.txt = "$(cat out)" ' +test_expect_failure '-S with separate option should not error out' ' + # "--cached" here is not an option---it is an arg to "-S" + git diff-index -S --cached HEAD^ +' + test_done -- 2.31.1-734-g054d640baf