From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS54825 147.75.192.0/21 X-Spam-Status: No, score=-3.5 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 8F11F1F44D for ; Fri, 29 Mar 2024 21:56:41 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=pobox.com header.i=@pobox.com header.a=rsa-sha256 header.s=sasl header.b=gHl4A664; dkim-atps=neutral Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id DF94D1C20F2A for ; Fri, 29 Mar 2024 21:56:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 97C9D28DCA; Fri, 29 Mar 2024 21:56:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=pobox.com header.i=@pobox.com header.b="gHl4A664" Received: from pb-smtp1.pobox.com (pb-smtp1.pobox.com [64.147.108.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2190E1E862 for ; Fri, 29 Mar 2024 21:56:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.108.70 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711749373; cv=none; b=kW2fR1InqMsno8qRFbOWYWZfTpfwdJ4IcqJi4tBOh/wqchskard3OEuDq+bVMVJUXKyzOCeP4FcOmNk4/o93Ltc1/UvNnOLqJzAcBAUn2INoVZXZw9bv9wAREMB/aBJEqpe2qHFA2hLkdry7jcLcNFVZbqHQNkhJBHj/PNaNLmU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711749373; c=relaxed/simple; bh=wLMjsyjQtLuiXo7OT7KRalyeZnSLIfmmeBB20/aJ9hQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=qNBcj7xqdnPd93TTGJRiVEqXAOTjvRxxa8mQ5ieuGhcL7shAurWgJjUYv3Ehi5fgutBUMHehZrKi5v3J12IhRuAHpqP2xkvJGtifLfOaArNrEFBKSTHYHGDnEFNS/BAduQ1B9rWbRqMWc867X+NW5ch1aP1Fe09uNnXe8oLpFk0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (1024-bit key) header.d=pobox.com header.i=@pobox.com header.b=gHl4A664; arc=none smtp.client-ip=64.147.108.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 15FA41F5AC9; Fri, 29 Mar 2024 17:56:10 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type; s=sasl; bh=wLMjsyjQtLuiXo7OT7KRalyeZnSLIfmmeBB20/ aJ9hQ=; b=gHl4A6641dM2rj1QQEHwqkdTal67MkJa2qr+cqsHRGP6oLEfJU/e0w +id5xctGfHi/Y+sUJGMzq+xWFBl+/fncCV163nR7CFhak+CBnaZjOOs/1wx10fTI NK2Ct96Pg1GkyjoIPp/oAUSyToFIwZj98GyZJKs0nXIjCqARm8rq8= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 0CA531F5AC7; Fri, 29 Mar 2024 17:56:10 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.125.139.61]) (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 740E41F5AC6; Fri, 29 Mar 2024 17:56:09 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: "Justin Tobler via GitGitGadget" Cc: git@vger.kernel.org, Patrick Steinhardt , Karthik Nayak , Justin Tobler Subject: Re: [PATCH v3 1/3] reftable/stack: add env to disable autocompaction In-Reply-To: <2fdd8ea11331da13ec56d511fe4cadd47544419f.1711685809.git.gitgitgadget@gmail.com> (Justin Tobler via GitGitGadget's message of "Fri, 29 Mar 2024 04:16:47 +0000") References: <2fdd8ea11331da13ec56d511fe4cadd47544419f.1711685809.git.gitgitgadget@gmail.com> Date: Fri, 29 Mar 2024 14:56:08 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 26A2574E-EE17-11EE-B8DB-78DCEB2EC81B-77302942!pb-smtp1.pobox.com "Justin Tobler via GitGitGadget" writes: > - if (!add->stack->disable_auto_compact) > + if (!add->stack->disable_auto_compact && !git_env_bool("GIT_TEST_REFTABLE_NO_AUTOCOMPACTION", 0)) Fold the line after " &&", i.e. if (!add->stack->disable_auto_compact && !git_env_bool("GIT_TEST_REFTABLE_NO_AUTOCOMPACTION", 0)) > diff --git a/reftable/system.h b/reftable/system.h > index 5d8b6dede50..05b7c8554af 100644 > --- a/reftable/system.h > +++ b/reftable/system.h > @@ -17,6 +17,7 @@ license that can be found in the LICENSE file or at > #include "tempfile.h" > #include "hash-ll.h" /* hash ID, sizes.*/ > #include "dir.h" /* remove_dir_recursively, for tests.*/ > +#include "parse.h" > > int hash_size(uint32_t id); > > diff --git a/t/t0610-reftable-basics.sh b/t/t0610-reftable-basics.sh > index 686781192eb..434044078ed 100755 > --- a/t/t0610-reftable-basics.sh > +++ b/t/t0610-reftable-basics.sh > @@ -299,6 +299,21 @@ test_expect_success 'ref transaction: writes cause auto-compaction' ' > test_line_count = 1 repo/.git/reftable/tables.list > ' > > +test_expect_success 'ref transaction: environment variable disables auto-compaction' ' > + test_when_finished "rm -rf repo" && > + > + git init repo && > + test_commit -C repo A && > + for i in $(test_seq 20) > + do > + GIT_TEST_REFTABLE_NO_AUTOCOMPACTION=true git -C repo update-ref branch-$i HEAD || return 1 Fold the line before "git", i.e. GIT_TEST_REFTABLE_NO_AUTOCOMPACTION=true \ git -C repo update-ref branch-$i HEAD || return 1 > + done && > + test_line_count = 23 repo/.git/reftable/tables.list && > + > + git -C repo update-ref foo HEAD && > + test_line_count = 1 repo/.git/reftable/tables.list > +' > + > check_fsync_events () { > local trace="$1" && > shift &&