Accept absolute IdentityFile paths in ssh config
PATCH 1/1 Accept absolute IdentityFile paths in ssh config
Don't prepend the home directory to absolute paths
Signed-off-by Robin Rosenberg <[email protected]>
--- .../org/spearce/jgit/transport/OpenSshConfig.java | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
org.spearce.jgit/src/org/spearce/jgit/transport/OpenSshConfig.java +3 -1
@@ -246,10 +246,12 @@ private static String dequote(final String value) { return value.substring(1, value.length() - 2); return value; } - private File toFile(final String path) { if (path.startsWith("~/")) return new File(home, path.substring(2)); + File ret = new File(path); + if (ret.isAbsolute()) + return ret; return new File(home, path); }
Signature · 1 line
1.6.0.rc2.35.g04c6e9