LfsFactory does not throw anything ;) But we could of course throw something instead of returning null. What would be
an appropriate Exception?
Cheers,
Markus
From: Halstrick, Christian [mailto:christian.halstrick@xxxxxxx]
Sent: Wednesday, March 14, 2018 4:53 PM
To: Duft Markus <Markus.Duft@xxxxxxxxxxxxxxxx>; Mark Waite <mark.earl.waite@xxxxxxxxx>; JGit Developers list <jgit-dev@xxxxxxxxxxx>
Subject: Re: [jgit-dev] Using LFS fails with NPE
Maybe we should throw better exception in this case. An NPE is not appropriate.
Chris
In this case, LFS support is not present and/or not active in JGit.
“Somebody” needs to call BuiltinLFS.register() once to activate the builtin (optional) LFS code, before using LfsFactory.
The JGit CLI does it like this:
https://git.eclipse.org/r/#/c/112864/34/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
HTH,
Markus
From:
jgit-dev-bounces@xxxxxxxxxxx [mailto:jgit-dev-bounces@xxxxxxxxxxx]
On Behalf Of Mark Waite
Sent: Wednesday, March 14, 2018 3:20 PM
To: JGit Developers list <jgit-dev@xxxxxxxxxxx>
Subject: [jgit-dev] Using LFS fails with NPE
I'm trying to add JGit LFS support to the Jenkins git client plugin to match the existing command line git LFS support. The LfsFactory.getInstance() returns a non-null, but the getInstallCommand()
always returns a null value.
The test code which exercises it is "mvn clean -Dtest=GitClientTest test".
SSI Schäfer IT Solutions GmbH | Friesachstrasse 15 | 8114 Friesach | Austria
Registered Office: Friesach | Commercial Register: 49324 K | VAT no. ATU28654300
Commercial Court: Landesgericht für Zivilrechtssachen Graz