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

Re: git-svn merge helper

From
Björn Steinbrink <b.steinbrink@gmx.de>
Date
Oct 3, 2007, 01:02 UTC
Message-ID
<20071003010233.GA8610@atjola.homenet>
In-Reply-To
<20071003004252.GA28495@dervierte>
On 2007.10.02 20:42:52 -0400, Steven Walter wrote:
Show 38 quoted lines
> On Wed, Oct 03, 2007 at 12:38:13AM +0200, Björn Steinbrink wrote:
> > > The other option is to have a "build" branch.  By example:
> > > 
> > > git checkout build
> > > git reset --hard master
> > > git merge mybranch
> > > make
> > > 
> > > In that way, I have branch with the latest changes from head and the
> > > changes from mybranch together.  The downside to this method is that you
> > > may have to repeated resolve merges.  Despite the downsides, I find
> > > these two methods to work quite well.
> > 
> > Thanks, but it makes no difference here, it stil results in a fast
> > forward. This is a small test case which exhibits the behaviour and
> > matches my current workflow with git-svn (except for the dcommits):
> > 
> > git init
> > echo Hi > file1; git add file1; git commit -m file1
> > git checkout -b branch
> > echo Hi > file2; git add file2; git commit -m file2
> > git checkout master
> > echo Hi > file3; git add file3; git commit -m file3
> > git checkout branch
> > git merge master
> > 
> > # Then I'd normally do the following which causes a fast forward
> > #git checkout master
> > #git merge branch
> > 
> > # Now I tried this, which also results in a fast-forward:
> > git checkout -b merge
> > git reset --hard master
> > git merge branch
> 
> I believe you misunderstood my suggestion.  In using a "build" branch,
> you would not merge master into branch, as you did above.  Instead, you
> would create a third, unpublished branch to hold the merge.
Almost though so.
Show 5 quoted lines
> At the same time, I have a slightly better understanding of what it is
> you're trying to do.  If you are trying to keep up an SVN-like workflow
> (namely pulling changes from trunk into a branch from time to time),
> then my solution probably isn't suitable for you.  However, you might
> consider why you actually /need/ to do that, outside of SVN convention.

Due to the same reason for which the branch needs to be public at all, there are other people who want to follow it and test it, while there are external dependencies that currently change quite often. So I need to get the relevant changes from trunk into my branch anyway, even with svn conventions put aside (well, unless I force everyone else to merge over and over again). And as sometimes others commit to that branch, too (you just have to love that), keeping a separate branch for the final merge isn't so nice either, as I'd need to constantly cherry-pick those changes then and probably get even more conflicts along the way.

That said, Google finally liked some of the search terms that I threw at it and revealed a thread [1] from march, where Linus was torn on whether or not a --no-fast-forward option should be introduced. That sounds like it would help here, any chance of getting such a thing?

Thanks, Björn

[1] http://lists-archives.org/git/419374-git-merge-and-merge-message.html

Previous: Steven WalterNext: Andreas Ericsson
Message 9 of 10 in “git-svn merge helper”
  1. Björn SteinbrinkSep 30, 2007
  2. Benoit SIGOURESep 30, 2007
  3. Björn SteinbrinkOct 1, 2007
  4. Benoit SIGOUREOct 1, 2007
  5. Björn SteinbrinkOct 2, 2007
  6. Steven WalterOct 2, 2007
  7. Björn SteinbrinkOct 2, 2007
  8. Steven WalterOct 3, 2007
  9. Björn SteinbrinkOct 3, 2007
  10. Andreas EricssonOct 3, 2007

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.