Translate ssh://user@host/~foo/bar to be relative to home directory
commitfd9bd89725f7155df2be000b69c5a53f123cad78
authorShawn O. Pearce <spearce@spearce.org>
Thu, 8 May 2008 00:48:30 +0000 (7 20:48 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Sun, 11 May 2008 05:16:37 +0000 (11 01:16 -0400)
tree0361938a380f75ad405e7f82b57da662c285c03d
parent5a5c95362f65d7a093914fc59e7638c7838610a2
Translate ssh://user@host/~foo/bar to be relative to home directory

If we get a URL of the form "ssh://user@host/~foo" what the user
really is asking for is "bar" inside of foo's home directory, but
they are required to start the path with a "/" to separate it from
the hostname.

We must permit the remote shell to evaluate ~/ or ~who/ in order
to translate to the designated user's home directory, but for the
remainder of the path we must escape it from the shell to protect
whitespace or metacharacters.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.spearce.jgit/src/org/spearce/jgit/transport/TransportGitSsh.java