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

Re: [PATCH] git-merge: add option --no-ff

From
LHLars Hjemli <hjemli@gmail.com>
Date
Sep 18, 2007, 14:01 UTC
Message-ID
<8c5c35580709180701m54810d80nefa4704abb8797dd@mail.gmail.com>
In-Reply-To
<46EFD0F8.5050603@vilain.net>
On 9/18/07, Sam Vilain <sam@vilain.net> wrote:
Show 8 quoted lines
> Lars Hjemli wrote:
> > On 9/18/07, Sam Vilain <sam@vilain.net> wrote:
> >> If you really want one, use git commit-tree directly.
> >>
> > Yeah, that's an option, but --no-ff is somewhat less work ;-)
> >
>
> Sure.  I just don't see a good use case for it from this yet.
Ok. I'll try to explain why I needed --no-ff in the first place:
I have two git-svn brances, lets call them FEATURE and RELEASE. At one
point, I did
  $ git checkout FEATURE
  $ git merge RELEASE
  $ git svn dcommit

Now, my coworkers can continue testing/developing on top of the subversion branch FEATURE (I'm currently the only git user), knowing that every bugfix from RELEASE have been merged.

A few days later, FEATURE is completed and tested and should be integrated in RELEASE. I did

  $ git checkout RELEASE
  $ git merge FEATURE
  $ git svn dcommit -n

and noticed that git-svn wanted to commit the result to FEATURE, since the merge actually was a fast-forward. If this was a a pure git environment it would be no problem, but as I needed to get a merge revision on top of the subversion RELEASE branch, I was in trouble.

My options:
* rebase FEATURE onto RELEASE: this would have duplicated ~150
revisions from FEATURE onto RELEASE in subversion
* merge --squash: this would have created the wanted history in
subversion, but my git history would have lacked the info that
everything in FEATURE had been integrated into RELEASE (this could
have been fixed by editing the grafts file)
* merge --no-ff: this made both the subversion history and my local
git history reflect what actually happened.
So I went for the --no-ff option.

If this use-case isn't good enough, oh well. I can always carry the patch forward in my git repo ;-)

-- larsh

Previous: Sam VilainNext: Sam Vilain
Message 26 of 34 in “git-merge: add option --no-ff”
  1. git-merge: add option --no-ffLars Hjemli, Sep 17, 2007
  2. Andreas EricssonSep 17, 2007
  3. Lars HjemliSep 17, 2007
  4. Johannes SchindelinSep 17, 2007
  5. Chris ShoemakerSep 17, 2007
  6. Lars HjemliSep 17, 2007
  7. Johannes SchindelinSep 17, 2007
  8. Lars HjemliSep 17, 2007
  9. Johannes SchindelinSep 17, 2007
  10. Lars HjemliSep 17, 2007
  11. Johannes SchindelinSep 17, 2007
  12. Lars HjemliSep 17, 2007
  13. git-merge: add option --no-ffLars Hjemli, Sep 17, 2007
  14. Eric WongSep 18, 2007
  15. Junio C HamanoSep 18, 2007
  16. Eric WongSep 18, 2007
  17. Lars HjemliSep 18, 2007
  18. Eric WongSep 18, 2007
  19. Junio C HamanoSep 18, 2007
  20. Sam VilainSep 18, 2007
  21. Sam VilainSep 18, 2007
  22. Lars HjemliSep 18, 2007
  23. Sam VilainSep 18, 2007
  24. Lars HjemliSep 18, 2007
  25. Sam VilainSep 18, 2007
  26. Lars HjemliSep 18, 2007
  27. Sam VilainSep 18, 2007
  28. Johannes SchindelinSep 18, 2007
  29. Lars HjemliSep 18, 2007
  30. Lars HjemliSep 18, 2007
  31. Peter BaumannSep 18, 2007
  32. Lars HjemliSep 19, 2007
  33. Chris ShoemakerSep 17, 2007
  34. Lars HjemliSep 17, 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.