Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit » EGit and no-fast-forward merges
EGit and no-fast-forward merges [message #698574] Tue, 19 July 2011 14:02 Go to next message
Mike Haney is currently offline Mike Haney
Messages: 25
Registered: June 2011
Junior Member
Is there a way in EGit to tell it to always create a commit after a merge instead of doing a fast-forward merge (i.e. the --no-ff flag)? I can't seem to find this option in the dialogs or the preferences. Am I just missing it, or has this feature not been implemented yet?
Re: EGit and no-fast-forward merges [message #698654 is a reply to message #698574] Tue, 19 July 2011 18:02 Go to previous messageGo to next message
R Shapiro is currently offline R Shapiro
Messages: 386
Registered: June 2011
Senior Member
You can do this with the config option "merge.ff = false". Set it once and you're done. The "Properties" view in the "Git Repository" perspective provides a simple gui for showing and editing your configuration settings at each level. The only caveat is that you must restart eclipse after editing the configuration for jgit and/or egit to pick up the change. At least that's what I found in my tests.

Using the Git configuration mechanism seems cleaner than adding an option to the egit gui, which has plenty to do already.







Re: EGit and no-fast-forward merges [message #698712 is a reply to message #698654] Wed, 20 July 2011 00:22 Go to previous messageGo to next message
Mike Haney is currently offline Mike Haney
Messages: 25
Registered: June 2011
Junior Member
R Shapiro wrote on Tue, 19 July 2011 18:02
You can do this with the config option "merge.ff = false". Set it once and you're done. The "Properties" view in the "Git Repository" perspective provides a simple gui for showing and editing your configuration settings at each level. The only caveat is that you must restart eclipse after editing the configuration for jgit and/or egit to pick up the change. At least that's what I found in my tests.

Using the Git configuration mechanism seems cleaner than adding an option to the egit gui, which has plenty to do already.



Thanks for the tip. I didn't realize there was a git config option for that.
Re: EGit and no-fast-forward merges [message #698789 is a reply to message #698574] Wed, 20 July 2011 04:29 Go to previous messageGo to next message
Christian Halstrick is currently offline Christian Halstrick
Messages: 99
Registered: July 2009
Member
did this really work for you? I was about to answer that we don't support that configuration parameter merge.ff yet - then I read the solution here. I checked it and I can't configure EGit to create a commit in fast-forward cases. What versio of EGit are your using

Ciao
Chris
Re: EGit and no-fast-forward merges [message #698825 is a reply to message #698789] Wed, 20 July 2011 06:21 Go to previous messageGo to next message
R Shapiro is currently offline R Shapiro
Messages: 386
Registered: June 2011
Senior Member
Hmm. The first few tests failed, then it worked when I restarted Eclipse. It's possible that by that time the branches were in a state that merge didn't use FF for other reasons. I'll run a simpler test again when I get a chance.

Right now I can't get at the machine I was testing on to find the exact egit version. I successfully updated from updates-nightly a couple of hours earlier, so I'm pretty sure it's 1.1.0.20110719xxxx. The jgit version had an earlier day tag, 0714 maybe.

Sorry about the vague reply, I should know more later today.


Re: EGit and no-fast-forward merges [message #698889 is a reply to message #698825] Wed, 20 July 2011 08:33 Go to previous messageGo to next message
R Shapiro is currently offline R Shapiro
Messages: 386
Registered: June 2011
Senior Member
I can't replicate the one seemingly successful result I had yesterday; I must have messed up the state of the branches being merged. Too bad, eagerly awaiting jgit/egit support for standard config options like merge.ff.

Not that it matters at this point but I'm running egit 1.1.0.201107190813 and jgit 1.1.0.201107141117.
Re: EGit and no-fast-forward merges [message #699667 is a reply to message #698889] Thu, 21 July 2011 23:45 Go to previous messageGo to next message
Mike Haney is currently offline Mike Haney
Messages: 25
Registered: June 2011
Junior Member
Bummer - I got excited when I saw the original reply. Should I enter a bug for this?
Re: EGit and no-fast-forward merges [message #699845 is a reply to message #699667] Fri, 22 July 2011 08:54 Go to previous message
R Shapiro is currently offline R Shapiro
Messages: 386
Registered: June 2011
Senior Member
Seems like this counts as a bug, though probably in jgit rather than egit. I assume the egit Merge action just fires off a jgit call to do the actual merging. If jgit is doing the merge, it should be respecting the Git configuration.

In the meantime, maybe an egit enhancement request would also be in order to add a no-ff option to the merge dialog.

Previous Topic:Push to Upstream with confirmation dialog ?
Next Topic:Local Terminal can be helpful for Git projects
Goto Forum:
  


Current Time: Wed Aug 20 18:31:40 EDT 2014

Powered by FUDForum. Page generated in 0.03036 seconds