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

Re: [PATCH 0/1] sequencer: comment out the 'squash!' line

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Jan 7, 2020, 01:34 UTC
Message-ID
<20200107013401.GI6570@camp.crustytoothpaste.net>
In-Reply-To
<CANoM8SV=pT3sFrfnEqWc2xBn_c2rES0qSMsdptF0DgcxgYL94w@mail.gmail.com>
On 2020-01-06 at 19:20:09, Mike Rappazzo wrote:
Show 28 quoted lines
> On Mon, Jan 6, 2020 at 12:34 PM Junio C Hamano <gitster@pobox.com> wrote:
> >
> > "Michael Rappazzo via GitGitGadget" <gitgitgadget@gmail.com> writes:
> >
> > > Since this change what the expected post-rebase commit comment would look
> > > like, related test expectations are adjusted to reflect the the new
> > > expectation. A new test is added for the new expectation.
> >
> > Doesn't that mean automated tools people may have written require
> > similar adjustment to continue working correctly if this change is
> > applied?
> >
> > Can you tell us more about your expected use case?  I am imagining
> > that most people use the log messages from both/all commits being
> > squashed when manually editing to perfect the final log message (as
> > opposed to mechanically processing the concatenated message), so it
> > shouldn't matter if the squash! title is untouched or commented out
> > to them, and those (probably minority) who are mechanical processing
> > will be hurt with this change, so I do not quite see the point of
> > this patch.
> 
> This change isn't removing the subject line from the commit message
> during the edit phase, it is only commenting it out.  With the subject being
> commented out, it can minimize the effort to edit during the squash.
> 
> Furthermore, it can help to eliminate accidental inclusion in the final
> message.  Ultimately, the accidental inclusion is my motivation for
> submitting this.

I think this series would be useful. I've occasionally included the "squash!" line in my commit even after I've edited the rest of the commit message. It's not super frequent, but it is a hassle to have to delete it, and it does happen occasionally. Usually I catch it before I send out the series for review.

I can see the argument that this makes it a little harder for mechanical processing across versions, but I suspect most of that looks something like "sed -i -e '/^squash! /d' COMMIT_EDITMSG" and it probably won't be affected. We do make occasional slightly incompatible changes across versions in order to improve user experience, and I think a lot of folks who use squash commits will find this a pleasant improvement.

-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Previous: Junio C HamanoNext: Junio C Hamano
Message 11 of 15 in “sequencer: comment out the 'squash!' line”
  1. 0/1 sequencer: comment out the 'squash!' lineMichael Rappazzo via GitGitGadget, Jan 6, 2020
  2. 1/1 sequencer: comment out the 'squash!' lineMichael Rappazzo via GitGitGadget, Jan 6, 2020
  3. Phillip WoodJan 6, 2020
  4. Mike RappazzoJan 6, 2020
  5. Junio C HamanoJan 6, 2020
  6. Mike RappazzoJan 6, 2020
  7. Jeff KingJan 6, 2020
  8. Jonathan NiederJan 7, 2020
  9. Jeff KingJan 7, 2020
  10. Junio C HamanoJan 6, 2020
  11. brian m. carlsonJan 7, 2020
  12. Junio C HamanoJan 7, 2020
  13. brian m. carlsonJan 8, 2020
  14. Johannes SchindelinJan 8, 2020
  15. Junio C HamanoJan 8, 2020

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.