Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] RemoteAddCommand chaining

Thanks Matthias. I'll try it.

On Wed, May 30, 2018 at 5:26 PM, Matthias Sohn <matthias.sohn@xxxxxxxxx> wrote:
On Wed, May 30, 2018 at 3:23 PM, Mincong Huang <mhuang@xxxxxxxxx> wrote:
I guess the email didn't send because I wasn't subscribed to JGIt mailing list.

yes, all Eclipse mailing lists require that you are registered in order to be able to post.
AFAIK that's done to reduce spam.
 
On Wed, May 30, 2018 at 2:41 PM, Mincong Huang <mhuang@xxxxxxxxx> wrote:
Hi,

I just discovered that command `org.eclipse.jgit.api.RemoteAddCommand` does not allow method chaining. Currently, I need to do:

    RemoteAddCommand command = git.remoteAdd();
    command.setName("origin");
    command.setUri(new URIish(myUrl));
    command.call();

​Do you think it worth to change it into method chaining? This change will be backward compatible.​ The version used is 4.11.0.201803080745-r.

yes, this should be fixed. Commands in the api package in general allow method chaining, so I'd say that's a bug. 

I'm new to JGit but I'd like to submit a patch if possible :)

yes, patches are welcome. Follow the contributor guide [1].


-Matthias



--

Nuxeo Logo

Mincong Huang Software Engineer Github

Nuxeo Content Services Platform. Stay ahead.


Back to the top