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

Re: theirs/ours was Re: [PATCH 6/6] Add a new test for using a custom merge strategy

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 29, 2008, 11:05 UTC
Message-ID
<alpine.DEB.1.00.0807291301060.4631@eeepc-johanness>
In-Reply-To
<20080729043839.GC26997@sigill.intra.peff.net>
Hi,
On Tue, 29 Jul 2008, Jeff King wrote:
Show 12 quoted lines
> On Tue, Jul 29, 2008 at 01:27:44AM +0200, Johannes Schindelin wrote:
> 
> > > So the logical sequence was:
> > > 
> > >   git checkout production
> > >   git merge -s theirs master
> > 
> > To me, this suggests that they were too married to 'production' being 
> > the "dominant" branch.
> 
> Perhaps. But I see this as an operation on the production branch: "pull
> in master's changes, forgetting ours".

First of all, I cannot say how wrong it is to forget any changes in a production branch without proper explanation. I.e. without a commit message explaining _why_ the change was wrong to begin with.

It is messy at best, and I am happy that Git does not make that easy.
> In your workflow (git checkout master && git merge -s ours production && 
> git push origin master:production) we perform an operation on master, 
> which doesn't seem as intuitive to me.
But why?  Isn't the _content_ of "master" what we want?
> Not to mention that we might not _control_ master.
This is Git.  We control all local branches.
Show 13 quoted lines
> What about (and I think Sverre mentioned something like this 
> previously):
> 
>  I forked the kernel and made some changes. Some of my changes got
>  applied upstream. The others are now obsolete. Now I want to bring
>  myself in sync with Linus, but I want to keep my history (either
>  because the history is interesting to me, or because others are basing
>  their work on it).
> 
> Then your workflow, while still possible within the local repository, 
> means you are munging the "linus" branch, which seems wrong. That branch 
> is probably even just a tracking branch, which you would not want to 
> build on, anyway.

No, this workflow almost _dictates_ a plain "pull" into your local branch. The fact that a few commits were applied to upstream usually only means that your merge succeeds trivially, since the merged branches contain the _same_ changes.

Ciao, Dscho

Previous: Jeff KingNext: Jeff King
Message 12 of 28 in “theirs/ours was Re: [PATCH 6/6] Add a new test for using a custom merge strategy”
  1. Sverre RabbelierJul 28, 2008
  2. Miklos VajnaJul 28, 2008
  3. Sverre RabbelierJul 28, 2008
  4. Jeff KingJul 28, 2008
  5. Johannes SchindelinJul 28, 2008
  6. Jeff KingJul 28, 2008
  7. Avery PennarunJul 28, 2008
  8. Johannes SchindelinJul 28, 2008
  9. Sverre RabbelierJul 29, 2008
  10. Jeff KingJul 29, 2008
  11. Jeff KingJul 29, 2008
  12. Johannes SchindelinJul 29, 2008
  13. Jeff KingJul 29, 2008
  14. Sverre RabbelierJul 29, 2008
  15. Junio C HamanoJul 29, 2008
  16. Jeff KingJul 29, 2008
  17. Mike RalphsonJul 29, 2008
  18. Jeff KingJul 29, 2008
  19. Sverre RabbelierJul 28, 2008
  20. Junio C HamanoJul 28, 2008
  21. Sverre RabbelierJul 28, 2008
  22. Junio C HamanoJul 28, 2008
  23. Sverre RabbelierJul 28, 2008
  24. Junio C HamanoJul 28, 2008
  25. Junio C HamanoJul 28, 2008
  26. Sverre RabbelierJul 28, 2008
  27. Jeff KingJul 29, 2008
  28. Junio C HamanoJul 29, 2008

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.