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

Re: Is there a way to add a default `--squash` flag for all merges into a head?

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 9, 2011, 19:27 UTC
Message-ID
<7v7hc8aybn.fsf@alter.siamese.dyndns.org>
In-Reply-To
<5aad866e-38e6-4f0e-a942-97cc174651bb@o14g2000prb.googlegroups.com>
Dun Peal <dunpealer@gmail.com> writes:
Show 7 quoted lines
> All of our branches right now are feature branches of master, whose
> short lives end with a single merge back. Thus, merging back as a
> single patch implementing that single feature is ideal: the branch was
> only created to implement the feature, so by definition all of its
> individual commits are intermediary, and once the final feature state
> is achieved, the incremental steps leading to it are not interesting
> at all - they're just noise!

You sounds as if none of your developers make mistakes and your reviewers are always so perfect that you have absolute confidence that all the possible bugs are killed in these feature branches before they are merged to the master.

That does not sound like a real world to me, though. When a fix or tweak is needed for codepaths introduced by these feature branches after they are merged to master, the cleanest thing to do is to queue the fix on top of the branch that needs that fix or tweak, and merge that to master.

Of course, you can choose to abandon these feature branches that are potentially buggy and fork a fix branch from the master branch that was current when the bug happened to be discovered. But that would make the backporting bugfixes (or feature tweaks for that matter) to anything older a lot harder.

> Why would John care that while implementing feature X, Jill committed
> her half-state Y so she can go home, or made and fixed typo Z ?  In
> fact, why would Jill care a day, let a lone a couple of months, after
> X was completed and merged to master?

Who is merging half-state to 'master' or merging 'master' back to the feature branches? I don't think any of the above relates to the topic of 'merge --squash' anyway...

Previous: Dun PealNext: Dun Peal
Message 6 of 9 in “Is there a way to add a default `--squash` flag for all merges into a head?”
  1. Dun PealMar 7, 2011
  2. Andreas SchwabMar 7, 2011
  3. Dun PealMar 7, 2011
  4. Junio C HamanoMar 8, 2011
  5. Dun PealMar 9, 2011
  6. Junio C HamanoMar 9, 2011
  7. Dun PealMar 9, 2011
  8. Jay SoffianMar 8, 2011
  9. Dun PealMar 10, 2011

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.