Also, with the implementation above, paths like "/foo/bar" or "//foo///bar" wouldn't work even if a path such as "foo/bar" exists.

I don't think it would be too hard to fix, but is the expectation for jgit API users to handle cleaning up their inputs for methods like these?  Or should we try to be forgiving here?