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,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, 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 D31681F463 for ; Tue, 26 Nov 2019 01:18:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727296AbfKZBSg (ORCPT ); Mon, 25 Nov 2019 20:18:36 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:32924 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727091AbfKZBSg (ORCPT ); Mon, 25 Nov 2019 20:18:36 -0500 Received: by mail-pl1-f193.google.com with SMTP id ay6so7366464plb.0 for ; Mon, 25 Nov 2019 17:18:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=d1AG+rPKY26gU4AjXr/WO4BMUs1TbXq2102nCb0bGWo=; b=RtXmVRd392nwmNhQgTNlYZeX7GdkSDEq9t3alEpGJQcjLHWdYBzhwBm7XfPvwcffhM lf6By7BQGbYfjexs/wTplMJpG8gvfz8WyMSwlW1Ih5t49nYpUn1Wv2/jRl9mG7F/XPJB 1wvrG/hLtcXiI/28qfcZgngeyuXJYSrgBFV8cmPk2IgQlO/8Jk+mlQ2a/SeOalhIi0vx CkqOiGDTYoDWKWU0VsPfeZ62Jn1PJ7NoJM66qCVOzuiAaxNeoRbrBB3jDTS2+i0SASsy kq70FIolqcLIIACX6JUK+VVrwJMtZb6oBtzBps8rdDeIXZ6ZIzdixLGB6fEPNUa5a9+D 0wGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=d1AG+rPKY26gU4AjXr/WO4BMUs1TbXq2102nCb0bGWo=; b=YSuP6VNstlzSfWRHZzMc3tlRZq4iNyAu3ukYLHCxs9UNV/naVYyqXNFtn1gdJ4pXeD eKbxoiUBNP2XkuPq4ELqOjgLGctHgWjC3UXEALzr9kgepJLXdvhYvJBugNZEnhotdfHZ /C1G7y2RPslWbiFPxUJKRcXG7KvD2Tt0JdijN9M42pcivd2ov7epZCM+KQzF4cxe4iRs Dcq9NJy0aL0eVFvYqhtPbogzPqC+5tYJ2TfUrLkhH18TLDcmxCA8B7OsocccR3gJXyk4 YXzK7qK+3q7FUZYIEXm7ZNDP+4Qm+W9vyj6AUUamBt0MCLiAVKEmzL4WVlTFksKLWHSQ 1qvw== X-Gm-Message-State: APjAAAVylnULNJOn8ZENiNp4EOEYT++0/FSbteK2g5wBLpdgvznj6LVv UZ/EMtO5tmUeHBFghvyZhzFMxRDF X-Google-Smtp-Source: APXvYqyxZLg5yO22Kkqu/lX78vMchW0hGitezvb3NPF9eW4LuHdHQa5OyIPFPJs1k/U+gFDRs2z2Ww== X-Received: by 2002:a17:902:8bc8:: with SMTP id r8mr32211452plo.189.1574731114536; Mon, 25 Nov 2019 17:18:34 -0800 (PST) Received: from generichostname ([204.14.239.138]) by smtp.gmail.com with ESMTPSA id w69sm10002093pfc.164.2019.11.25.17.18.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2019 17:18:34 -0800 (PST) Date: Mon, 25 Nov 2019 17:18:32 -0800 From: Denton Liu To: Git Mailing List Cc: Eric Sunshine , Junio C Hamano , Jeff King Subject: [PATCH v4 20/27] t7700: move keywords onto their own line Message-ID: <82bf24d06ab663d404a717ae9091dd272d1c3396.1574731022.git.liu.denton@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org The code style for tests is to have statements on their own line if possible. Move keywords onto their own line so that they conform with the test style. Signed-off-by: Denton Liu --- t/t7700-repack.sh | 51 +++++++++++++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 17 deletions(-) diff --git a/t/t7700-repack.sh b/t/t7700-repack.sh index 8936928387..a96e876c4e 100755 --- a/t/t7700-repack.sh +++ b/t/t7700-repack.sh @@ -29,10 +29,12 @@ test_expect_success 'objects in packs marked .keep are not repacked' ' mv pack-* .git/objects/pack/ && git repack -A -d -l && git prune-packed && - for p in .git/objects/pack/*.idx; do + for p in .git/objects/pack/*.idx + do idx=$(basename $p) test "pack-$packsha1.idx" = "$idx" && continue - if git verify-pack -v $p | egrep "^$objsha1"; then + if git verify-pack -v $p | egrep "^$objsha1" + then found_duplicate_object=1 echo "DUPLICATE OBJECT FOUND" break @@ -45,10 +47,12 @@ test_expect_success 'writing bitmaps via command-line can duplicate .keep object # build on $objsha1, $packsha1, and .keep state from previous git repack -Adbl && test_when_finished "found_duplicate_object=" && - for p in .git/objects/pack/*.idx; do + for p in .git/objects/pack/*.idx + do idx=$(basename $p) test "pack-$packsha1.idx" = "$idx" && continue - if git verify-pack -v $p | egrep "^$objsha1"; then + if git verify-pack -v $p | egrep "^$objsha1" + then found_duplicate_object=1 echo "DUPLICATE OBJECT FOUND" break @@ -61,10 +65,12 @@ test_expect_success 'writing bitmaps via config can duplicate .keep objects' ' # build on $objsha1, $packsha1, and .keep state from previous git -c repack.writebitmaps=true repack -Adl && test_when_finished "found_duplicate_object=" && - for p in .git/objects/pack/*.idx; do + for p in .git/objects/pack/*.idx + do idx=$(basename $p) test "pack-$packsha1.idx" = "$idx" && continue - if git verify-pack -v $p | egrep "^$objsha1"; then + if git verify-pack -v $p | egrep "^$objsha1" + then found_duplicate_object=1 echo "DUPLICATE OBJECT FOUND" break @@ -83,8 +89,10 @@ test_expect_success 'loose objects in alternate ODB are not repacked' ' git commit -m commit_file3 && git repack -a -d -l && git prune-packed && - for p in .git/objects/pack/*.idx; do - if git verify-pack -v $p | egrep "^$objsha1"; then + for p in .git/objects/pack/*.idx + do + if git verify-pack -v $p | egrep "^$objsha1" + then found_duplicate_object=1 echo "DUPLICATE OBJECT FOUND" break @@ -99,10 +107,13 @@ test_expect_success 'packed obs in alt ODB are repacked even when local repo is git repack -a && myidx=$(ls -1 .git/objects/pack/*.idx) && test -f "$myidx" && - for p in alt_objects/pack/*.idx; do + for p in alt_objects/pack/*.idx + do git verify-pack -v $p | sed -n -e "/^[0-9a-f]\{40\}/p" - done | while read sha1 rest; do - if ! ( git verify-pack -v $myidx | grep "^$sha1" ); then + done | while read sha1 rest + do + if ! ( git verify-pack -v $myidx | grep "^$sha1" ) + then echo "Missing object in local pack: $sha1" return 1 fi @@ -119,10 +130,13 @@ test_expect_success 'packed obs in alt ODB are repacked when local repo has pack git repack -a -d && myidx=$(ls -1 .git/objects/pack/*.idx) && test -f "$myidx" && - for p in alt_objects/pack/*.idx; do + for p in alt_objects/pack/*.idx + do git verify-pack -v $p | sed -n -e "/^[0-9a-f]\{40\}/p" - done | while read sha1 rest; do - if ! ( git verify-pack -v $myidx | grep "^$sha1" ); then + done | while read sha1 rest + do + if ! ( git verify-pack -v $myidx | grep "^$sha1" ) + then echo "Missing object in local pack: $sha1" return 1 fi @@ -144,10 +158,13 @@ test_expect_success 'packed obs in alternate ODB kept pack are repacked' ' git repack -a -d && myidx=$(ls -1 .git/objects/pack/*.idx) && test -f "$myidx" && - for p in alt_objects/pack/*.idx; do + for p in alt_objects/pack/*.idx + do git verify-pack -v $p | sed -n -e "/^[0-9a-f]\{40\}/p" - done | while read sha1 rest; do - if ! ( git verify-pack -v $myidx | grep "^$sha1" ); then + done | while read sha1 rest + do + if ! ( git verify-pack -v $myidx | grep "^$sha1" ) + then echo "Missing object in local pack: $sha1" return 1 fi -- 2.24.0.504.g3cd56eb17d