From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-a6-smtp.messagingengine.com (fhigh-a6-smtp.messagingengine.com [103.168.172.157]) (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 3726324E4B5 for ; Thu, 30 Jul 2026 02:58:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785380292; cv=none; b=LvkwaZVYq8eB3MHl9xUPe1C5hQIU/Bm1Wih1Yf8IvKJksPtLfUOpgASAMbiNK0XRp1HfuM7uGhSflkAQZXmugAUWm8v/oer4sG4vsUwIhkeAt7NX3mZhhoeBwgvHewmN/Sn6/kY2IsUCaXvy1hzf7Pg1Nu3T0aAkxg4b88csb00= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785380292; c=relaxed/simple; bh=bi2Z/T3Q0Lj3ZDDeHrjODxGcfUzkSn/52/+3sNJ2q2k=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=g0F2QV5c3U/2NO32j57zmRZAAXmiHcbfJ5bhK0WPeLyVgDfjt6xCL53qy5Txm0JmXHgoHIB2RSpkSvSf5oYjTyGnb2tATU3wKCpGH3qvDnNlQXmpSwE0sn3v/pX6IeHtzJLNTGPzujUSYeLFuxcoKjgnTiBm+ZZJCWDl2bwE+AM= 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 (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=m+AhaogQ; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=RgUAmWd/; arc=none smtp.client-ip=103.168.172.157 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="m+AhaogQ"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="RgUAmWd/" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 470C11400364; Wed, 29 Jul 2026 22:58:10 -0400 (EDT) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-04.internal (MEProxy); Wed, 29 Jul 2026 22:58:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1785380290; x=1785466690; bh=P/tnkOobD0 fFcGfJCgMnlcKdkgWsiTMAizgy7ooh4sg=; b=m+AhaogQASXPA8gMpUI0+cRdFI 8OO3emaZOugXjCTIjwnwof9t3cmJWnR4wGO+rKH0gaXoBQMBcsmdRfa0fFmpN/L4 dhxtN+4rpoUUBwcDcr5qlJOdtU1dSFeWUmy5zoQ6xqLgXkTIACXwT2Ey7oP1ninA XMKwbozKooQxTcM165QqCRIbHpO4vsuKj5pBvTKMFmfiXxGf6pslMKB7nL9Wplz2 ulEY3Frq+q+fMCw/3TTh9nq2xjMz3E0r5D4ln+35t+5CToLR/7yCwPsstsdPrnNx +Zi4DYTN3O8J2j2lSxjTO7cv6Me9NH6YH7LJlMnTFGw7105hD8a0xY9VzXwg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1785380290; x=1785466690;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Uc4/aIlGVwiIXIETt6LnNgvaHeO5hqfXwW9WptvwIbAj0g X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 29 Jul 2026 22:58:09 -0400 (EDT) From: Junio C Hamano To: David Lin Cc: git@vger.kernel.org, ps@pks.im, David Lin Subject: Re: [PATCH] builtin/maintenance: accept "none" as a maintenance strategy In-Reply-To: <20260729194006.75317-1-davidlin@stripe.com> (David Lin's message of "Wed, 29 Jul 2026 15:40:06 -0400") References: <20260729194006.75317-1-davidlin@stripe.com> Date: Wed, 29 Jul 2026 19:58: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 David Lin writes: The author identity uses an @gmail.com address, but the sign-off uses a different address. Assuming the preferred address is the one used in the sign-off, you can 'lie' about the author identity by starting the body of the message with an 'in-body From:' line: From: David Lin This must be written without indentation and followed by a blank line before the true first line of the message body. > Commit d465be2327 (builtin/maintenance: don't silently ignore invalid > strategy, 2025-10-24) changed scheduled maintenance to error on an > unknown maintenance strategy instead of silently defaulting to the > `none` strategy. > > However, `parse_maintenance_strategy()` does not recognize `none`, so > Git rejects a valid and documented strategy that can be used to override > an existing strategy and disable maintenance tasks. > > Accept `none` as a valid maintenance strategy and add tests to ensure > it's accepted. > > Signed-off-by: David Lin > --- > builtin/gc.c | 2 ++ > t/t7900-maintenance.sh | 3 +++ > 2 files changed, 5 insertions(+) > > diff --git a/builtin/gc.c b/builtin/gc.c > index 46999a99ab..3d1e39d46a 100644 > --- a/builtin/gc.c > +++ b/builtin/gc.c > @@ -1922,6 +1922,8 @@ static const struct maintenance_strategy geometric_strategy = { > > static struct maintenance_strategy parse_maintenance_strategy(const char *name) > { > + if (!strcasecmp(name, "none")) > + return none_strategy; > if (!strcasecmp(name, "incremental")) > return incremental_strategy; > if (!strcasecmp(name, "gc")) > diff --git a/t/t7900-maintenance.sh b/t/t7900-maintenance.sh > index a8d691719d..130c971b15 100755 > --- a/t/t7900-maintenance.sh > +++ b/t/t7900-maintenance.sh > @@ -1022,6 +1022,9 @@ test_expect_success 'maintenance.strategy is respected' ' > test_must_fail git -c maintenance.strategy=unknown maintenance run 2>err && > test_grep "unknown maintenance strategy: .unknown." err && > > + test_strategy none + test_strategy none --schedule=weekly + > test_strategy incremental <<-\EOF && > git pack-refs --all --prune > git reflog expire --all > > base-commit: 13c7afec212fc97ce257d15601659314c6673d6c