* [JGIT PATCH] Accept absolute IdentityFile paths in ssh config
@ 2008-08-21 23:07 Robin Rosenberg
0 siblings, 0 replies; only message in thread
From: Robin Rosenberg @ 2008-08-21 23:07 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: git
Don't prepend the home directory to absolute paths
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
.../org/spearce/jgit/transport/OpenSshConfig.java | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/org.spearce.jgit/src/org/spearce/jgit/transport/OpenSshConfig.java b/org.spearce.jgit/src/org/spearce/jgit/transport/OpenSshConfig.java
index 9ad19e7..a6849c6 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/transport/OpenSshConfig.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/transport/OpenSshConfig.java
@@ -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);
}
--
1.6.0.rc2.35.g04c6e9
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-08-21 23:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-21 23:07 [JGIT PATCH] Accept absolute IdentityFile paths in ssh config Robin Rosenberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).