From patchwork Sat Oct 5 21:12:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "brian m. carlson" X-Patchwork-Id: 11175879 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BBB9716B1 for ; Sat, 5 Oct 2019 21:12:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9A830222C0 for ; Sat, 5 Oct 2019 21:12:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b="xAKbrkDK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726170AbfJEVMZ (ORCPT ); Sat, 5 Oct 2019 17:12:25 -0400 Received: from injection.crustytoothpaste.net ([192.241.140.119]:36342 "EHLO injection.crustytoothpaste.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726139AbfJEVMZ (ORCPT ); Sat, 5 Oct 2019 17:12:25 -0400 Received: from camp.crustytoothpaste.net (unknown [IPv6:2001:470:b978:101:b610:a2f0:36c1:12e3]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by injection.crustytoothpaste.net (Postfix) with ESMTPSA id 69B1C61C71; Sat, 5 Oct 2019 21:12:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crustytoothpaste.net; s=default; t=1570309943; bh=v+qOBlhknk2JmCEKxVPu22ZOeyUBzrkh2PeLVzN8pEM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Reply-To: Subject:Date:To:CC:Resent-Date:Resent-From:Resent-To:Resent-Cc: In-Reply-To:References:Content-Type:Content-Disposition; b=xAKbrkDKlTtiGnJw4RBsOTXPjxwbcgIzRAsvijFJZN0Xxdpu9cKW5pJ+q1oXFW3xP 4gX/6kniLb0AaAF2DTK9jjGV65h0/8J8z+UgoLVmHT3PbY65sACtKluW9H8YcqvjNk /M4Gvk2XlBsqx/KfwGqjkFNvesSsqndp+hGkJsrncexDAbRca5P4KGmuMFhBNgIvXx nBL625tgWuqiaKrYCNqAGZSk6o+h3Msut1lGFmiHcPYFJFDWCfOLYteq/K4NOtG+AR gxQSaYDKrbvKAbMcpweRgHRIF3nPbaW4+3XrsRogVrncU/Zr6xLnnx4QSxGVfFe2g5 GxLw3K1Jyuq7rrX+AMradScSQRBv9XDnAqBcRihnnpA2S/Ob+/oVSWBjAjifpDURRx HCkyIJaSIxzl/hOJfCwLOPkTpe8Vvc4wOxT1riZBkFfn6AqBjusKYjEo9GZ93cWdON LMTBnJ2q/JijRfxzg+eahzm2XimTr0fAX4sP3I6MJEcPYsLyaMN From: "brian m. carlson" To: Cc: Stefan Beller , Johannes Schindelin Subject: [PATCH 15/15] t4048: abstract away SHA-1-specific constants Date: Sat, 5 Oct 2019 21:12:09 +0000 Message-Id: <20191005211209.18237-16-sandals@crustytoothpaste.net> X-Mailer: git-send-email 2.23.0.700.g56cf767bdb In-Reply-To: <20191005211209.18237-1-sandals@crustytoothpaste.net> References: <20191005211209.18237-1-sandals@crustytoothpaste.net> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Adjust the test so that it computes variables for object IDs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t4048-diff-combined-binary.sh | 58 ++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/t/t4048-diff-combined-binary.sh b/t/t4048-diff-combined-binary.sh index 87a8949500..7f9ad9fa3d 100755 --- a/t/t4048-diff-combined-binary.sh +++ b/t/t4048-diff-combined-binary.sh @@ -9,24 +9,27 @@ test_expect_success 'setup binary merge conflict' ' git commit -m one && echo twoQ2 | q_to_nul >binary && git commit -a -m two && + two=$(git rev-parse --short HEAD:binary) && git checkout -b branch-binary HEAD^ && echo threeQ3 | q_to_nul >binary && git commit -a -m three && + three=$(git rev-parse --short HEAD:binary) && test_must_fail git merge master && echo resolvedQhooray | q_to_nul >binary && - git commit -a -m resolved + git commit -a -m resolved && + res=$(git rev-parse --short HEAD:binary) ' -cat >expect <<'EOF' +cat >expect <expect <<'EOF' +cat >expect <expect <<'EOF' +cat >expect <.gitattributes ' -cat >expect <<'EOF' +cat >expect <expect <<'EOF' +cat >expect <expect <<'EOF' +cat >expect <expect <<'EOF' +cat >expect <expect <<'EOF' +cat >expect <expect <<'EOF' +cat >expect <expect <<'EOF' +cat >expect <expect <<'EOF' +cat >expect <