]> source.dussan.org Git - jgit.git/commit
Fix RepoCommand to allow for relative URLs 58/94158/17
authorHan-Wen Nienhuys <hanwen@google.com>
Tue, 28 Mar 2017 12:00:38 +0000 (14:00 +0200)
committerDavid Pursehouse <david.pursehouse@gmail.com>
Thu, 13 Apr 2017 01:53:58 +0000 (10:53 +0900)
commitfe5437e96b91222e30d9105e7bab490fd68c2d52
tree69ed7c1809f904f246eaf5836ec26a72581fbd67
parente730fcce776b795692bbae086f0333bb4ae38a6c
Fix RepoCommand to allow for relative URLs

This is necessary for deploying submodules on android.googlesource.com.

* Allow an empty base URL. This is useful if the 'fetch' field is "."
  and all names are relative to some host root.

* The URLs in the resulting superproject are relative to the
  superproject's URL. Add RepoCommand#setDestinationURI to
  set this. If unset, the existing behavior is maintained.

* Add two tests for the Android and Gerrit case, checking the URL
  format in .gitmodules; the tests use a custom RemoteReader which is
  representative of the use of this class in Gerrit's Supermanifest
  plugin.

Change-Id: Ia75530226120d75aa0017c5410fd65d0563e91b
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/gitrepo/RepoCommandTest.java
org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java