From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-b3-smtp.messagingengine.com (fhigh-b3-smtp.messagingengine.com [202.12.124.154]) (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 CB95F233947 for ; Mon, 29 Jun 2026 05:50:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.154 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782712223; cv=none; b=IZcUgi4y/kq4VFZvZIaheIZPtW/Sux9P1YGimrJJIbbBZT1mRi/wtH5rTJLmcwS6w0SBSGk6hSwsRs5ETlWKN4rjk7+tl8bUzrk3bqlWu+QUc1HiVcP111CNxaQOTCwdE+w3KanSfDXnC1rlOK6fr3s8RXuGg7mITRw/4hwRkPM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782712223; c=relaxed/simple; bh=Jmt2rdzeFQQ9Pqn9kgiApPowYvG/K4GW2ma8SIzaZeQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=TnbywSR9wx+1o3aR+qyvoX35eKIQbDw6GZOWMftGtoPYn8Jlco2SaETUQmGAi2GLMMPdYFHAm35kW77fGni5Nb0zLk7qHf/t+lJcpENQZhVhQnFRPk9r7ETczYp8RMzK42lHUPmFB2Ey7MdFSyaUcMgXJRuuStZrbht/vBsL304= 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=G8pwFUvz; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=JzXr2lSD; arc=none smtp.client-ip=202.12.124.154 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="G8pwFUvz"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="JzXr2lSD" Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfhigh.stl.internal (Postfix) with ESMTP id 023F17A00B8; Mon, 29 Jun 2026 01:50:20 -0400 (EDT) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-02.internal (MEProxy); Mon, 29 Jun 2026 01:50:21 -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=fm3; t=1782712220; x=1782798620; bh=FagxXGOwV6 iTwoh5W6SVMetDsYz7pZlW1CemKlc1FOQ=; b=G8pwFUvzp4T3q6wM/9sg7zRD5S 68TyroM5nJ4v0REtMG2ZPZW8XuFHYwDXmBFWnWB4kUMLSrCoSibdMx4QuNZrva08 kTmcWncfS6diLWUk/o5Fla6RZJMPLlPI31pDAbj8oM+KHyuj+6Xo4v0P9lOC5rry 0FKV9EOxUpIQbqZ3vdjjq5UmrL3XDTp9owlHL969RT5a//JoGrfIOFBbhzR0YHCS mvdMX34kUKDftS1wCF/oaHe8JiRcmL9X2npPz92YqV/4VJZA0OjodAL4LsPKoGO1 DymtqX1dWT5WG8sHbVMgVNQ6Ye6x+Gl5ugF4rMHX5edpb7T3W61MPBYY/X1A== 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= 1782712220; x=1782798620; bh=FagxXGOwV6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oiGszq49SUYX9jt57fGzA72QLvEYixpFTydkg X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 29 Jun 2026 01:50:20 -0400 (EDT) From: Junio C Hamano To: "Harald Nordgren via GitGitGadget" Cc: git@vger.kernel.org, Harald Nordgren Subject: Re: [PATCH v6 3/4] history: add squash subcommand to fold a range In-Reply-To: <811e393ab48e2f79e6f8c78d883a5b92311791b3.1782635349.git.gitgitgadget@gmail.com> (Harald Nordgren via GitGitGadget's message of "Sun, 28 Jun 2026 08:29:08 +0000") References: <811e393ab48e2f79e6f8c78d883a5b92311791b3.1782635349.git.gitgitgadget@gmail.com> Date: Sun, 28 Jun 2026 22:50:19 -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 "Harald Nordgren via GitGitGadget" writes: > @@ -11,6 +11,7 @@ SYNOPSIS > git history fixup [--dry-run] [--update-refs=(branches|head)] [--reedit-message] [--empty=(drop|keep|abort)] > git history reword [--dry-run] [--update-refs=(branches|head)] > git history split [--dry-run] [--update-refs=(branches|head)] [--] [...] > +git history squash [--dry-run] [--update-refs=(branches|head)] [--reedit-message] Not your fault at all, as there are existing violators but the gitcli tells us that the canonical order of arguments on the command line is to have dashed options early before any real arguments. Seeing followed by --dry-run, --update-refs, etc. with the existing subcommands should also be corrected and this new command should not spread the existing violation by mimicking. The revision range (which is not just a single token A..B, but the usual range notation that rev-list takes, like ^A B..C) should come after all these dashed options. > +The range is given in the usual `..` form, where __ is > +the commit just below the oldest commit to squash. For example, `git > +history squash @~3..` folds the three most recent commits into one, and It is OK to use in your personal development, but in the official documentation, avoid cryptic @ and always spell HEAD (except for a single place that explain that @ can stand in for HEAD, for obvious reasons). It is extremely annoying and confusing to read as these look so similar to reflog notation for the current branch, e.g., @~1 vs @{1}. So "squash HEAD~3..HEAD" specifies a range of commits HEAD~2, HEAD~1 and HEAD (three commits), these are squashed into one commit on top of HEAD~3, creating a sibling to HEAD~2 whose tree matches HEAD. OK. Looking good.