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

Re: [PATCH] rebase: convert revert to squash on autosquash

From
MTMichael S. Tsirkin <mst@redhat.com>
Date
Apr 7, 2016, 15:51 UTC
Message-ID
<20160407184026-mutt-send-email-mst@redhat.com>
In-Reply-To
<alpine.DEB.2.20.1604071720160.2967@virtualbox>
On Thu, Apr 07, 2016 at 05:23:09PM +0200, Johannes Schindelin wrote:
Show 9 quoted lines
> Hi,
> 
> On Thu, 7 Apr 2016, Michael S. Tsirkin wrote:
> 
> > Reverts can typically be treated like squash.  Eliminating both the
> > original commit and the revert would be even nicer, but this seems a bit
> > harder to implement.
> 
> Whoa. This rings a lot of alarm bells, very loudly.

Whoa don't be alarmed. It's just a patch :). I've been using this patch for more than a year now, so I thought I'd post it in case it's useful for others.

> It seems you intend to
> introduce a *major* change in behavior,

Doing this automatically for all users might be a bit too drastic for the upstream git. So there could be an option, or something - if there's interest I can add that. I thought I'd test the waters before I spend time on that.

Show 13 quoted lines
> and all we get to convince us that
> this is a good change is this puny paragraph (which, by the way, does not
> do half a good job of explaining to me what you think this patch is
> supposed to do, let alone of convincing me that what you want is a good
> change).
> 
> So. What is it again that you want to achieve? Please use plain English,
> e.g. explaining how exactly reverts are typically to be treated like
> squashes. And please make it convincing, because so far, I am far from
> convinced.
> 
> Ciao,
> Johannes
It's rather simple.

If there's a commit later followed by a revert, history can be simplified by squashing them, and if the result is empty, removing both.

The removal part is not automatic with my patch. If someone wants to implement it, that would be nice and useful for me.

squashing/fixing is similar in that they are also useful to keep history clean.

-- 
MST
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 3 of 9 in “rebase: convert revert to squash on autosquash”
  1. rebase: convert revert to squash on autosquashMichael S. Tsirkin, Apr 7, 2016
  2. Johannes SchindelinApr 7, 2016
  3. Michael S. TsirkinApr 7, 2016
  4. Johannes SchindelinApr 8, 2016
  5. Matthieu MoyApr 8, 2016
  6. Michael S. TsirkinApr 8, 2016
  7. Michael S. TsirkinApr 8, 2016
  8. Michael S. TsirkinApr 9, 2016
  9. Matthieu MoyApr 8, 2016

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.