From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-a8-smtp.messagingengine.com (fout-a8-smtp.messagingengine.com [103.168.172.151]) (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 EAB9D3EF0DC for ; Mon, 15 Jun 2026 12:45:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781527558; cv=none; b=jNaNsb7A/Hp/9F4IBUh9xqOJTI7x7NtqFnCfMWPS9zJbKfQm5msEACh2Dv8kjThCJzjPXr4hvLlsh5+stkG5SFCylX8Ka18zamvuSuM9T5dq4EaBbt6Wx5vFM7Uv+dw4w1wlaFyTsPuqmRvW4y+EIEeMTc96zHYtYkPS6tH3YiQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781527558; c=relaxed/simple; bh=jUIYbjbSSBf2hFxRraaFKsXX2PObExuFvFjiPoeq8uQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bWOs/mktN9l+W8z3txmoqA02LHybBBHZt5g48TiNA5v1hNSGzHv3RFFFqnF9tOshtD+7j12cz1ma2pQ7oCNXk+/PsrDjD6ccnPBJCZKkHORp2L4Sl9HLJLHaZ5AQMBAtBJNe8GQK7tm7RFtyOTBuEcESjFgL0t8NL9lUPIoS0hY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=qAcCLesg; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Pd7I9svC; arc=none smtp.client-ip=103.168.172.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="qAcCLesg"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Pd7I9svC" Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id 2C850EC0222; Mon, 15 Jun 2026 08:45:56 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Mon, 15 Jun 2026 08:45:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; 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=1781527556; x=1781613956; bh=p7kDoBMxdo JOaGefthBlGQWAy73gYzq9hKBGQMFf3+0=; b=qAcCLesg2gYFpmEmPVaPPjMbVg TsZjvqmb0DLbsj4PHbqgag7dzOFuzTXXDegxSsuOJ/sv+a50gMVr3ctFHA3T4bFI xmKghzIBrkRAGs1j3CiU3ncAqrkvBXVq5yLVOLpYQ5yBo3OEf7ydg1ZpeC8U6FCp kBFb510/kdd8OLs4VtM+ilrg6lA2iBsfg3un+0tnPAIeK11uCUCPClKewO9Gu2ag WC46ftcYx04A//7IXVF2tcPXrwhcNiEPSW6TBUkXqurQq4ayb88vtQk9zGGRmRoT 6lgrxvujqcgc3rWqdTvJLDcKDesDLLyQULkfnZOGjg4WmMFyVKhD+W32cLpQ== 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=fm1; t= 1781527556; x=1781613956; bh=p7kDoBMxdoJ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syqFjEdB3jthCDQTcvX9A5XzjEw X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 15 Jun 2026 08:45:54 -0400 (EDT) Received: by mail (OpenSMTPD) with ESMTPSA id 372047be (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 15 Jun 2026 12:45:53 +0000 (UTC) Date: Mon, 15 Jun 2026 14:45:50 +0200 From: Patrick Steinhardt To: Junio C Hamano Cc: git@vger.kernel.org, Pablo Sabater , Kristoffer Haugsbakk , Phillip Wood Subject: Re: [PATCH v5 06/10] reset: introduce ability to skip updating HEAD Message-ID: References: <20260611-b4-pks-history-drop-v5-0-34d35725559c@pks.im> <20260611-b4-pks-history-drop-v5-6-34d35725559c@pks.im> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Jun 11, 2026 at 11:00:25AM -0700, Junio C Hamano wrote: > Patrick Steinhardt writes: > > > Note that in a previous iteration we instead introduced a flag that made > > callers opt out of updating any references. This was somewhat awkward > > though because we already have the `UPDATE_ORIG_HEAD` flag, so the > > result was somewhat inconsistent. > > > > Suggested-by: Phillip Wood > > Signed-off-by: Patrick Steinhardt > > --- > > builtin/rebase.c | 14 ++++++++++---- > > reset.c | 9 +++++++-- > > reset.h | 9 ++++++--- > > sequencer.c | 4 +++- > > 4 files changed, 26 insertions(+), 10 deletions(-) > > > > diff --git a/reset.c b/reset.c > > ... > > @@ -129,7 +133,7 @@ int reset_working_tree(struct repository *r, > > oid = &head_oid; > > > > if (refs_only) { > > - if (!dry_run) > > + if (update_head) > > return update_refs(r, opts, oid, head); > > return 0; > > } > > So when refs_only and update-head are in effect, we will call > update_refs(), even if dry_run is given. update_refs() does not > seem to pay attention to (opts->flags & RESET_WORKING_TREE_DRY_RUN) > at all, so wouldn't this mean that we would update even in a dry-run > session? Ugh, good catch, this is obviously wrong. Will fix. Patrick