Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] Why does jGit RemoteAdd command not chain like the others?


I have recently been using jGit and I noticed that the RemoteAddCommand doesn't use a chainable model like the other commands.

// doesn't compile because setName returns void
git.remoteAdd().setName('other').setUri(new URIish(destUri)).call()
// works fine   
 git.push().setRemote('other').setPushTags().setPushAll().setProgressMonitor(new TextProgressMonitor()).call()
The APIs seem so consistent otherwise (and stable) that it's hard to imagine this was an oversight. What was the design thinking here? or was it an oversight?
--
Christian Bongiorno

Back to the top