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

Re: git submodule update --merge (Was: What's cooking in git.git (May 2009, #02; Sun, 17))

From
Peter Hutterer <peter.hutterer@who-t.net>
Date
May 25, 2009, 23:15 UTC
Message-ID
<20090525231544.GA3999@dingo.bne.redhat.com>
In-Reply-To
<200905251359.37619.johan@herland.net>
On Mon, May 25, 2009 at 01:59:37PM +0200, Johan Herland wrote:
Show 60 quoted lines
> On Tuesday 19 May 2009, Johan Herland wrote:
> > On Tuesday 19 May 2009, Johannes Schindelin wrote:
> > > On Tue, 19 May 2009, Johan Herland wrote:
> > > > I still don't see any reason why one should be added (--rebase),
> > > > and not the other (--merge).
> > >
> > > When you rebase, you see your personal stuff (i.e. stuff that you
> > > do not want to submit, or not in its current form, or that you
> > > submitted and it waits for inclusion) on top of things right away.
> >
> > But if there are developers downstream whose work is based on your
> > submodule branch, the rebase will disrupt _their_ work, in the same
> > way that rebasing any other public branch would disrupt people's
> > work.
> >
> > > In contrast, if you merge, you will have a different state from the
> > > upstream _forever_.  Even if your stuff gets included.
> >
> > Correct, but there are cases where reconciliation with the upstream
> > repo is less important than not disrupting downstream developers (see
> > below).
> >
> > > Needless to say, I do not see much use for the latter case, but
> > > tons for the former.
> >
> > I fully agree that for a regular downstream (or "leaf") developer,
> > there is not much use for git submodule rebase --merge.
> >
> > But not all developers fit nicely into your scenario above.
> > 
> > [Workflow description in which "git submodule update --merge" would
> >  be a helpful addition]
> >
> > I understand that the above scenario is not common in the free
> > software world, but I believe it is much more common in an
> > enterprise/company setting. Therefore, the support of such workflows
> > is important to companies that are currently considering (or have
> > already chosen) Git. I believe there is value in supporting such
> > workflows, especially when doing so is as straightforward as my patch
> > shows.
> 
> I haven't received any replies to my attempt to describe the context in 
> which "git submodule update --merge" is useful. A hint as to whether my 
> argument is valid, or just crap, would be nice.
> 
> In any case, even if we don't include "git submodule update --merge", 
> could we _please_ consider changing the associated config variable from
> 
>   submodule.<name>.rebase = true/false (false if unset)
> 
> to something like
> 
>   submodule.<name>.update = checkout/rebase (checkout if unset)
> 
> or (Junio's suggestion)
> 
>   submodule.<name>.rebind = never/rebase (never if unset)
> 
> so that we at least have the _option_ of adding other alternatives in 
> the future?

I can't really chime in on the merge debate since it's not part of my workflow, but I definitely support the above. Even if we never add any options other than checkout/rebase, it's still better than the prospect of having possibly conflicting boolean settings in the future.

Cheers,
  Peter
Previous: Johan Herland
Message 23 of 23 in “What's cooking in git.git (May 2009, #02; Sun, 17)”
  1. Junio C HamanoMay 17, 2009
  2. Jakub NarebskiMay 17, 2009
  3. Junio C HamanoMay 17, 2009
  4. Jakub NarebskiMay 17, 2009
  5. David AguilarMay 17, 2009
  6. Johan HerlandMay 18, 2009
  7. Markus HeidelbergMay 18, 2009
  8. Johan HerlandMay 18, 2009
  9. git-submodule: add support for --merge.Johan Herland, May 19, 2009
  10. Junio C HamanoMay 19, 2009
  11. Johan HerlandMay 19, 2009
  12. Johannes SchindelinMay 19, 2009
  13. Johan HerlandMay 19, 2009
  14. Johannes SchindelinMay 19, 2009
  15. Johan HerlandMay 19, 2009
  16. Johan HerlandMay 25, 2009
  17. Junio C HamanoMay 25, 2009
  18. Johannes SchindelinMay 25, 2009
  19. Avery PennarunMay 25, 2009
  20. Johannes SchindelinMay 25, 2009
  21. Johan HerlandMay 25, 2009
  22. Johan HerlandMay 25, 2009
  23. Peter HuttererMay 25, 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.