[PATCH v4 23/27] squash! t7700: consolidate code into test_no_missing_in_packs()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Instead of verifying each file of `alt_objects/pack/*.idx` individually
in a for-loop, batch them together into one verification step.

Signed-off-by: Denton Liu <liu.denton@xxxxxxxxx>
---

Notes:
    We should probably squash this in but before we do this, I'd like some
    confirmation that doing this doesn't have any negative impacts.

 t/t7700-repack.sh | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/t/t7700-repack.sh b/t/t7700-repack.sh
index a6c3d34277..4bcd9fcc80 100755
--- a/t/t7700-repack.sh
+++ b/t/t7700-repack.sh
@@ -13,12 +13,8 @@ commit_and_pack () {
 test_no_missing_in_packs () {
 	myidx=$(ls -1 .git/objects/pack/*.idx) &&
 	test_path_is_file "$myidx" &&
-	for p in alt_objects/pack/*.idx
-	do
-		git verify-pack -v $p >packlist || return $?
-		grep "^[0-9a-f]\{40\}" packlist
-	done >orig.raw &&
-	cut -d" " -f1 orig.raw | sort >orig &&
+	git verify-pack -v alt_objects/pack/*.idx >orig.raw &&
+	grep "^[0-9a-f]\{40\}" orig.raw | cut -d" " -f1 | sort >orig &&
 	git verify-pack -v $myidx >dest.raw &&
 	cut -d" " -f1 dest.raw | sort >dest &&
 	comm -23 orig dest >missing &&
-- 
2.24.0.504.g3cd56eb17d




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux