git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] history: squash the commits not in the upstream by default

From
Patrick Steinhardt <ps@pks.im>
Date
Dec 1, 2026, 15:47 UTC
Message-ID
<aw7sH9-JCd43kCDX@pks.im>
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:
Show 11 quoted lines
> 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
Previous: Harald Nordgren via GitGitGadget
Message 2 of 2 in “history: squash the commits not in the upstream by default”
  1. history: squash the commits not in the upstream by defaultHarald Nordgren via GitGitGadget, Nov 25, 2026
  2. Patrick SteinhardtDec 1, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.