All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Harald Nordgren via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Harald Nordgren <haraldnordgren@gmail.com>
Subject: Re: [PATCH] history: squash the commits not in the upstream by default
Date: Tue, 1 Dec 2026 16:47:43 +0100	[thread overview]
Message-ID: <aw7sH9-JCd43kCDX@pks.im> (raw)
In-Reply-To: <pull.2463.git.git.1795633401382.gitgitgadget@gmail.com>

On Wed, Nov 25, 2026 at 07:03:21PM +0000, Harald Nordgren via GitGitGadget wrote:
> From: Harald Nordgren <haraldnordgren@gmail.com>
> 
> "git history squash" with no arguments refuses to run and asks for a
> revision range, even though the commits to squash are usually the ones
> on the current branch that its upstream does not have.
> 
> The subcommand added in 6fd039c984 (history: add skeleton for squash
> subcommand, 2026-09-08) started out on the list as "git rebase --squash
> [<upstream>]", which folded "@{upstream}..HEAD" when given no argument.
> It moved to "git history" to take any range, and that default was lost
> in the move.

Yes, but isn't that a good thing? I wonder whether it becomes too
magical when we start to assume the user's intention like this, and
users may have a hard time to recover from such an operation. So
honestly, I'm not sure that just doing something and hoping that this is
what the user wants is sensible and I'd rather prefer to keep the status
quo.

I am of course open to have my opinion changed in case there are good
arguments for it.

Thanks!

Patrick

      reply	other threads:[~2026-12-01 15:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 19:03 [PATCH] history: squash the commits not in the upstream by default Harald Nordgren via GitGitGadget
2026-12-01 15:47 ` Patrick Steinhardt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aw7sH9-JCd43kCDX@pks.im \
    --to=ps@pks.im \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=haraldnordgren@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.