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: AS31976 209.132.180.0/23 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_HI,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 87BBE1F4B9 for ; Sat, 25 Jan 2020 23:01:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729078AbgAYXBB (ORCPT ); Sat, 25 Jan 2020 18:01:01 -0500 Received: from injection.crustytoothpaste.net ([192.241.140.119]:46810 "EHLO injection.crustytoothpaste.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729016AbgAYXAx (ORCPT ); Sat, 25 Jan 2020 18:00:53 -0500 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 90EB260FC4; Sat, 25 Jan 2020 23:00:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crustytoothpaste.net; s=default; t=1579993252; bh=UDDWDfHq6vQ4mafDgi/0WqfOho8EmhNcpUk8RRIhlEI=; 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=puBFSVHrbbtbpgonnP3EUXrRwZ95BJTOv8oDkIBlJQJxaGJZwHQhrZJMkUAZfet57 EQKxVD0eYqXHfhegIBUnzAOYSXtVYjM6g+z2dzpuGoSjfQtEauZfiasfMKgB9bI/RC jUOMjVQHdAtz1RM0VgkGgEWWtOhgxz16w7vdyHdtMIuQlHAhw+Q0qrRty7p60IibUm GKZebWfzFj/iHPRzaaGVp49MsMThA8d4QmbajQQwi9jQQae82oST6xh5Iach8LXl2t QuJARAfyPae7Li/e0R0zEIn7s42L8ZbsYRKawxDHOY9mpQAO1trlZTHxsH/Nm06D08 fd3ihOS8AwZCqTjI0sUlIMG05hVhEHNj0K9Ab5SJsdD0ejxoqfD/pdqkQzXuO3lHem RytOO1jTay5LZN3QtEBjpvRjJp10yyokYW2g+uzqFtc3pIfPFoxSkX2hJnzoxjuycY d7cA2jV1iz0cC5yQ193cKZXJbpNK3A9ZpcZTfWA4/O2APfG2QZr From: "brian m. carlson" To: Cc: Eric Sunshine Subject: [PATCH v2 21/22] t6006: make hash size independent Date: Sat, 25 Jan 2020 23:00:32 +0000 Message-Id: <20200125230035.136348-27-sandals@crustytoothpaste.net> X-Mailer: git-send-email 2.25.0.24.g3f081b084b0 In-Reply-To: <20200125230035.136348-1-sandals@crustytoothpaste.net> References: <20200125230035.136348-1-sandals@crustytoothpaste.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Instead of hard-coding the length of an object ID when creating a tree, compute it for the hash in use using the translation tables. Signed-off-by: brian m. carlson --- t/t6006-rev-list-format.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh index ebdc49c496..7e82e43a63 100755 --- a/t/t6006-rev-list-format.sh +++ b/t/t6006-rev-list-format.sh @@ -32,6 +32,7 @@ changed_iso88591=$(echo "$changed" | iconv -f utf-8 -t $test_encoding) truncate_count=20 test_expect_success 'setup' ' + test_oid_init && : >foo && git add foo && git config i18n.commitEncoding $test_encoding && @@ -463,9 +464,10 @@ test_expect_success '--abbrev' ' ' test_expect_success '%H is not affected by --abbrev-commit' ' + expected=$(($(test_oid hexsz) + 1)) && git log -1 --format=%H --abbrev-commit --abbrev=20 HEAD >actual && len=$(wc -c