On Wed, Sep 16, 2015 at 3:18 AM <[email protected]> wrote:

I'm currently working on adding the --no-commit option for the MergeCommand
> and wanted some input on naming/default behaviour.
>
> I added a 'setCommit' method to MergeCommand, accepting a boolean which
> defaults to true.
>
> For JGit, I call JGit's own 'setCommit', passing in the boolean.
> Looking at JGit's implementation, I realized that this changes the default
> behaviour of the Git Client Plugin (as did the implementations of the
> squash/message options, by the way).
> If JGit's 'setCommit' isn't called, it will look at the merge
> configuration of the repository.
> So simply by calling the JGit methods in our implementation, we're already
> enforcing our own defaults.
> Not to make a fuss about it, just wanted to bring that up.
>
>
I think that is a bug.  It seems like it should be fixed before the
MergeCommand.setMessage() call becomes part of a release of the git client
plugin.

Any chance you have a test which shows the problem?


> For the CLI implementation, I only add '--no-commit' when setCommit is set
> to false.
> If setCommit is said to true, I do nothing. This is in line with the
> implementations of the other options.
> I didn't want to explicitly add '--commit' when it was set to true,
> because that would change the default behaviour of the plugin.
> That's the way I like it, but it's not in line way the JGit
> implementation, where we always set either --commit or --no-commit.
>
> I wouldn't mind hearing your opinions on the matter.
>
>
I've tried where ever I could to keep the command line git and JGit
implementations similar.  This seems like a case where you've detected an
unnecessary and possibly undesirable behavioral difference between command
line git and JGit.

I admit that JGit and command line git are different, but it is a great
help (for me) to use those differences to assure that I understand the
behavior of the plugin and its implementations.


> Kind regards,
> Thierry
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/477f41cf-235a-4e8e-beeb-15edaaa4821e%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-dev/477f41cf-235a-4e8e-beeb-15edaaa4821e%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAO49JtEpoikW2g49abj28P4xN529Y-ic8WahYyA_uiawCyjijQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to