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

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

From
EWEric Wong <normalperson@yhbt.net>
Date
Sep 18, 2007, 00:50 UTC
Message-ID
<20070918005013.GA6368@muzzle>
In-Reply-To
<11900461843997-git-send-email-hjemli@gmail.com>
Lars Hjemli <hjemli@gmail.com> wrote:
Show 13 quoted lines
> This option forces fast-forward merges to create a "true" merge commit,
> i.e. a commit with multiple parents.
> 
> Although a fast-forward merge would normally be the right thing to do with
> git branches, it is suboptimal when operating on git-svn branches since it
> makes 'git-svn dcommit' fail to recognize the correct upstream subversion
> branch. But performing such a merge with --no-ff specified will both make
> git-svn dcommit recognize the correct upstream and create the logically
> correct history in subversion (the merge performed in git will be recorded
> as a single revision in subversion, not as a series of revisions seemingly
> cherry-picked from the merged branch).
> 
> Signed-off-by: Lars Hjemli <hjemli@gmail.com>

Would automatically enabling --no-ff when it detects merging of two (or more) SVN branches be a good thing? We can add scripting support to git-svn for detecting if any given commit is really from SVN or not. Then we could do something like this in git-merge

---------------------------- 8< --------------------------------
if git-svn test-svn-commits "$@"
then
	no_ff=t
	no_fast_forward_strategies=$all_strategies
fi
---------------------------- 8< --------------------------------

It'd probably prevent a lot of users from shooting themselves in the foot if they forget to read or learn about the --no-ff option.

> ---
> 
> When updating git-svn.txt, I noticed that we might want to update the 
> section "DESIGN PHILOSOPHY". Eric?
Yeah.  That's very much out of date.  I'll update it in a bit.
-- 
Eric Wong
Previous: Lars HjemliNext: Junio C Hamano
Message 14 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.