Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit » Merge does not respect mergeoptions(config file value not used)
Merge does not respect mergeoptions [message #824488] Mon, 19 March 2012 18:33 Go to next message
rahim virani is currently offline rahim virani
Messages: 3
Registered: March 2012
Junior Member
I have the following entry in my global git config file:

branch.master.mergeoptions=--no-commit --no-ff

At the command line, this takes effect. However, in EGit, neither option is effective. EGit will do a fast forward merge and auto-commit (if applicable).

How do I get EGit to respect the value here, or at minimum, perform a non-fast-forward AND non-committing merge? The merge dialog has no options.
Re: Merge does not respect mergeoptions [message #824542 is a reply to message #824488] Mon, 19 March 2012 19:59 Go to previous messageGo to next message
Christian Halstrick is currently offline Christian Halstrick
Messages: 106
Registered: July 2009
Senior Member
EGit uses JGit for all git operations. And JGit simply doesn't support these options yet. We would have to first build these options into JGit and second enhance the UI in EGit to show these options.

I added a implementation of no-commit in https://git.eclipse.org/r/#/c/4945/. But it is not yet merged. I think nobody has started with no-ff yet. Contributions welcome Smile

I'll see whether we at least get no-commit in soon.


Ciao
Chris
Re: Merge does not respect mergeoptions [message #824548 is a reply to message #824542] Mon, 19 March 2012 20:05 Go to previous messageGo to next message
rahim virani is currently offline rahim virani
Messages: 3
Registered: March 2012
Junior Member
thanks for your response and work. I am looking forward to these features.
Re: Merge does not respect mergeoptions [message #1406951 is a reply to message #824548] Mon, 11 August 2014 13:55 Go to previous messageGo to next message
Andi Scharfstein is currently offline Andi Scharfstein
Messages: 2
Registered: August 2014
Junior Member
Sorry for reawakening such an old thread. I noticed that the implementation of no-commit has since been integrated to JGit, but I couldn't find any option to set it as a default instead of selecting it every time I merge in the merge dialog. Do you happen to know if there is such an option (and how to set it)?
Re: Merge does not respect mergeoptions [message #1408664 is a reply to message #1406951] Fri, 15 August 2014 18:34 Go to previous messageGo to next message
Konrad Kügler is currently offline Konrad Kügler
Messages: 2
Registered: August 2014
Junior Member
Since the latest EGIt release 3.4 you can use 'branch.<name>.mergeoptions' to configure the options used when merging into a given branch. As the command line Git client it supports a space-separated list of command line merge options as its value.

To always merge without committing into the master branch you can set
'branch.master.mergeoptions' to '--no-commit'. The merge dialog will show the appropriate options pre-selected.
Re: Merge does not respect mergeoptions [message #1409587 is a reply to message #1408664] Mon, 18 August 2014 13:24 Go to previous message
Andi Scharfstein is currently offline Andi Scharfstein
Messages: 2
Registered: August 2014
Junior Member
Perfect, works like a charm! Thanks a lot Smile
Previous Topic:Push a specific commit to remote repository
Next Topic:Is it possible to use git merge.conflictstyle=diff3 in Eclipse?
Goto Forum:
  


Current Time: Wed Sep 17 07:36:37 GMT 2014

Powered by FUDForum. Page generated in 0.02018 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software