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

Re: [Q] git rebase -i -p conflicts with squash

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 15, 2009, 00:38 UTC
Message-ID
<alpine.DEB.1.00.0901150137070.3586@pacific.mpi-cbg.de>
In-Reply-To
<85647ef50901140813r6e62ae53u1dbcd48cc472dbcc@mail.gmail.com>
Hi,
On Wed, 14 Jan 2009, Constantine Plotnikov wrote:
Show 12 quoted lines
> If I run git rebase --interactive with --preserve-merges option and 
> select "squash" for one of the commit, the rebase process fails with the 
> message "Refusing to squash a merge: 
> 5e775c536654640c173ba71a0af7e84bf8bc618a". However the neither commit 
> participating in the squash is a merge commit. Even more, there are no 
> merge commits in the repository at all.
> 
> From my limited understanding of squash operation, it should fail only 
> if one of squashed commits is a merge commit, but it should be possible 
> to squash non-merge commits without problem as it looks like quite safe 
> and local operation (and I might want to preserve merges that happened 
> after squashed commits). Is it the current behaviour a bug or a feature?
>From your description, it seems that you are hitting an ordering bug of 
rebase -i -p.

But without a reproduction recipe (preferably as a patch against our testsuite), I cannot tell.

Ciao, Dscho

Previous: Constantine PlotnikovNext: Constantine Plotnikov
Message 2 of 3 in “[Q] git rebase -i -p conflicts with squash”
  1. Constantine PlotnikovJan 14, 2009
  2. Johannes SchindelinJan 15, 2009
  3. Constantine PlotnikovJan 15, 2009

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.