-
Notifications
You must be signed in to change notification settings - Fork 915
Introduce merge.ff configuration handling #709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This keeps libgit2sharp's "analysis" function to truly only perform the analysis of the mergability, such that it will always report "fastforwardable" when the merge is, indeed, fastforwardable, without contemplating policy decisions by the user. Since LibGit2Sharp introduces the idea of a "default action", it is the layer that queries this configuration setting and applies it to the default. /cc @nulltoken |
|
libgit2 automatically handles the config options in other places (e.g. the handling of |
|
Yes, I thought that this would be a contentious issue. This was also my first thought, but I can't think of a sensible place to put this. Do you think that |
|
What if there was another function (e.g. |
|
That seems reasonable to me. |
|
I wonder what @carlosmn thinks about this, when he has a moment. |
LibGit2Sharp/Repository.cs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is missing "0" as a falsy value. I'd recommend using Config.Get<bool>("merge.ff") for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
I think this could fit as part of Making use of this information is still something that should be up to the tool using libgit2. |
|
Shouldn't this be handled by the new API exposed in #722. |
|
Yes. I will update once your PR is merged. |
|
Perfecto! |
|
Just a minor update: In case you forgot, #722 is merged. |
|
Updated! /cc @Therzok |
|
Oops; I rebased the wrong thing onto the wrong thing, let's try this again! |
|
@ethomson Could you please update |
When the provided FastForwardStrategy is FastForwardStrategy.Default, honor the merge.ff configuration setting. When merge.ff=only, enable fast-forward only mode; when merge.ff=false, enable no-ff mode.
@nulltoken Done! |
|
Very very neat PR! 💖 |
When the provided
FastForwardStrategyisFastForwardStrategy.Default, honor themerge.ffconfiguration setting. Whenmerge.ff=only, enable fast-forward only mode; whenmerge.ff=false, enable no-ff mode.