Browse Source

Merge branch 'stable-3.6'

* stable-3.6:
  Prepare 3.6.1-SNAPSHOT builds
  JGit v3.6.0.201412230720-r
  [pgm] Add option --bare to clone command
  [pgm] Implement clone using CloneCommand
  Fix junit tests under windows when the platform is explicitly changed
  Fix unit tests for windows by explicitly closing test repos
  [pgm] Add option --tags for ls-remote
  [pgm] Add option --heads for ls-remote
  [pgm] Use LsRemoteCommand to implement ls-remote and add a test

Change-Id: I8f31e76cb7e9416919f37e02c7e51ab1d221df40
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-3.7
Matthias Sohn 10 years ago
parent
commit
9882915810
  1. 12
      org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF
  2. 2
      org.eclipse.jgit.ant.test/pom.xml
  3. 6
      org.eclipse.jgit.ant/META-INF/MANIFEST.MF
  4. 2
      org.eclipse.jgit.ant/pom.xml
  5. 10
      org.eclipse.jgit.archive/META-INF/MANIFEST.MF
  6. 4
      org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF
  7. 2
      org.eclipse.jgit.archive/pom.xml
  8. 12
      org.eclipse.jgit.console/META-INF/MANIFEST.MF
  9. 2
      org.eclipse.jgit.console/pom.xml
  10. 10
      org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF
  11. 2
      org.eclipse.jgit.http.apache/pom.xml
  12. 25
      org.eclipse.jgit.http.server/META-INF/MANIFEST.MF
  13. 2
      org.eclipse.jgit.http.server/pom.xml
  14. 36
      org.eclipse.jgit.http.test/META-INF/MANIFEST.MF
  15. 2
      org.eclipse.jgit.http.test/pom.xml
  16. 22
      org.eclipse.jgit.java7.test/META-INF/MANIFEST.MF
  17. 2
      org.eclipse.jgit.java7.test/pom.xml
  18. 4
      org.eclipse.jgit.java7/META-INF/MANIFEST.MF
  19. 4
      org.eclipse.jgit.java7/META-INF/SOURCE-MANIFEST.MF
  20. 2
      org.eclipse.jgit.java7/pom.xml
  21. 20
      org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF
  22. 2
      org.eclipse.jgit.junit.http/pom.xml
  23. 30
      org.eclipse.jgit.junit/META-INF/MANIFEST.MF
  24. 2
      org.eclipse.jgit.junit/pom.xml
  25. 2
      org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java
  26. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml
  27. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml
  28. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml
  29. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml
  30. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/feature.xml
  31. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/pom.xml
  32. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml
  33. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml
  34. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml
  35. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml
  36. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.xml
  37. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/pom.xml
  38. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml
  39. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml
  40. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml
  41. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF
  42. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml
  43. 2
      org.eclipse.jgit.packaging/pom.xml
  44. 34
      org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF
  45. 2
      org.eclipse.jgit.pgm.test/pom.xml
  46. 156
      org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/CloneTest.java
  47. 138
      org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/LsRemoteTest.java
  48. 62
      org.eclipse.jgit.pgm/META-INF/MANIFEST.MF
  49. 4
      org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF
  50. 2
      org.eclipse.jgit.pgm/pom.xml
  51. 4
      org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties
  52. 152
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java
  53. 40
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java
  54. 2
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java
  55. 76
      org.eclipse.jgit.test/META-INF/MANIFEST.MF
  56. 2
      org.eclipse.jgit.test/pom.xml
  57. 3
      org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java
  58. 18
      org.eclipse.jgit.ui/META-INF/MANIFEST.MF
  59. 2
      org.eclipse.jgit.ui/pom.xml
  60. 70
      org.eclipse.jgit/META-INF/MANIFEST.MF
  61. 4
      org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF
  62. 2
      org.eclipse.jgit/pom.xml
  63. 18
      org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java
  64. 2
      pom.xml

12
org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF

@ -3,14 +3,14 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Bundle-SymbolicName: org.eclipse.jgit.ant.test
Bundle-Version: 3.6.0.qualifier
Bundle-Version: 3.6.1.qualifier
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Import-Package: org.apache.tools.ant,
org.eclipse.jgit.ant.tasks;version="[3.6.0,3.7.0)",
org.eclipse.jgit.internal.storage.file;version="[3.6.0,3.7.0)",
org.eclipse.jgit.junit;version="[3.6.0,3.7.0)",
org.eclipse.jgit.lib;version="[3.6.0,3.7.0)",
org.eclipse.jgit.util;version="[3.6.0,3.7.0)",
org.eclipse.jgit.ant.tasks;version="[3.6.1,3.7.0)",
org.eclipse.jgit.internal.storage.file;version="[3.6.1,3.7.0)",
org.eclipse.jgit.junit;version="[3.6.1,3.7.0)",
org.eclipse.jgit.lib;version="[3.6.1,3.7.0)",
org.eclipse.jgit.util;version="[3.6.1,3.7.0)",
org.hamcrest;version="[1.1.0,2.0.0)",
org.junit;version="[4.0.0,5.0.0)"

2
org.eclipse.jgit.ant.test/pom.xml

@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.ant.test</artifactId>

6
org.eclipse.jgit.ant/META-INF/MANIFEST.MF

@ -2,11 +2,11 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.jgit.ant
Bundle-Version: 3.6.0.qualifier
Bundle-Version: 3.6.1.qualifier
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Import-Package: org.apache.tools.ant,
org.eclipse.jgit.storage.file;version="[3.6.0,3.7.0)"
org.eclipse.jgit.storage.file;version="[3.6.1,3.7.0)"
Bundle-Localization: plugin
Bundle-Vendor: %Provider-Name
Export-Package: org.eclipse.jgit.ant.tasks;version="3.6.0";
Export-Package: org.eclipse.jgit.ant.tasks;version="3.6.1";
uses:="org.apache.tools.ant.types,org.apache.tools.ant"

2
org.eclipse.jgit.ant/pom.xml

@ -48,7 +48,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.ant</artifactId>

10
org.eclipse.jgit.archive/META-INF/MANIFEST.MF

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Bundle-SymbolicName: org.eclipse.jgit.archive
Bundle-Version: 3.6.0.qualifier
Bundle-Version: 3.6.1.qualifier
Bundle-Vendor: %provider_name
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
@ -12,13 +12,13 @@ Import-Package: org.apache.commons.compress.archivers;version="[1.4,2.0)",
org.apache.commons.compress.compressors.bzip2;version="[1.4,2.0)",
org.apache.commons.compress.compressors.gzip;version="[1.4,2.0)",
org.apache.commons.compress.compressors.xz;version="[1.4,2.0)",
org.eclipse.jgit.api;version="[3.6.0,3.7.0)",
org.eclipse.jgit.lib;version="[3.6.0,3.7.0)",
org.eclipse.jgit.nls;version="[3.6.0,3.7.0)",
org.eclipse.jgit.api;version="[3.6.1,3.7.0)",
org.eclipse.jgit.lib;version="[3.6.1,3.7.0)",
org.eclipse.jgit.nls;version="[3.6.1,3.7.0)",
org.osgi.framework;version="[1.3.0,2.0.0)"
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.eclipse.jgit.archive.FormatActivator
Export-Package: org.eclipse.jgit.archive;version="3.6.0";
Export-Package: org.eclipse.jgit.archive;version="3.6.1";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.api,
org.apache.commons.compress.archivers,

4
org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF

@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit.archive - Sources
Bundle-SymbolicName: org.eclipse.jgit.archive.source
Bundle-Vendor: Eclipse.org - JGit
Bundle-Version: 3.6.0.qualifier
Eclipse-SourceBundle: org.eclipse.jgit.archive;version="3.6.0.qualifier";roots="."
Bundle-Version: 3.6.1.qualifier
Eclipse-SourceBundle: org.eclipse.jgit.archive;version="3.6.1.qualifier";roots="."

2
org.eclipse.jgit.archive/pom.xml

@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.archive</artifactId>

12
org.eclipse.jgit.console/META-INF/MANIFEST.MF

@ -3,11 +3,11 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Bundle-SymbolicName: org.eclipse.jgit.console
Bundle-Version: 3.6.0.qualifier
Bundle-Version: 3.6.1.qualifier
Bundle-Vendor: %provider_name
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: org.eclipse.jgit.console;version="3.6.0"
Import-Package: org.eclipse.jgit.errors;version="[3.6.0,3.7.0)",
org.eclipse.jgit.nls;version="[3.6.0,3.7.0)",
org.eclipse.jgit.transport;version="[3.6.0,3.7.0)",
org.eclipse.jgit.util;version="[3.6.0,3.7.0)"
Export-Package: org.eclipse.jgit.console;version="3.6.1"
Import-Package: org.eclipse.jgit.errors;version="[3.6.1,3.7.0)",
org.eclipse.jgit.nls;version="[3.6.1,3.7.0)",
org.eclipse.jgit.transport;version="[3.6.1,3.7.0)",
org.eclipse.jgit.util;version="[3.6.1,3.7.0)"

2
org.eclipse.jgit.console/pom.xml

@ -52,7 +52,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.console</artifactId>

10
org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.jgit.http.apache
Bundle-Version: 3.6.0.qualifier
Bundle-Version: 3.6.1.qualifier
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Localization: plugin
Bundle-Vendor: %Provider-Name
@ -18,10 +18,10 @@ Import-Package: org.apache.http;version="[4.1.0,5.0.0)",
org.apache.http.impl.client;version="[4.1.0,5.0.0)",
org.apache.http.impl.client.cache;version="[4.1.0,5.0.0)",
org.apache.http.params;version="[4.1.0,5.0.0)",
org.eclipse.jgit.nls;version="[3.6.0,3.7.0)",
org.eclipse.jgit.transport.http;version="[3.6.0,3.7.0)",
org.eclipse.jgit.util;version="[3.6.0,3.7.0)"
Export-Package: org.eclipse.jgit.transport.http.apache;version="3.6.0";
org.eclipse.jgit.nls;version="[3.6.1,3.7.0)",
org.eclipse.jgit.transport.http;version="[3.6.1,3.7.0)",
org.eclipse.jgit.util;version="[3.6.1,3.7.0)"
Export-Package: org.eclipse.jgit.transport.http.apache;version="3.6.1";
uses:="org.eclipse.jgit.transport.http,
javax.net.ssl,
org.apache.http.client,

2
org.eclipse.jgit.http.apache/pom.xml

@ -48,7 +48,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.http.apache</artifactId>

25
org.eclipse.jgit.http.server/META-INF/MANIFEST.MF

@ -2,14 +2,13 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Bundle-SymbolicName: org.eclipse.jgit.http.server
Bundle-Version: 3.6.0.qualifier
Bundle-Version: 3.6.1.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %provider_name
Export-Package:
org.eclipse.jgit.http.server;version="3.6.0",
org.eclipse.jgit.http.server.glue;version="3.6.0";
Export-Package: org.eclipse.jgit.http.server;version="3.6.1",
org.eclipse.jgit.http.server.glue;version="3.6.1";
uses:="javax.servlet,javax.servlet.http",
org.eclipse.jgit.http.server.resolver;version="3.6.0";
org.eclipse.jgit.http.server.resolver;version="3.6.1";
uses:="org.eclipse.jgit.transport.resolver,
org.eclipse.jgit.lib,
org.eclipse.jgit.transport,
@ -18,11 +17,11 @@ Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Import-Package: javax.servlet;version="[2.5.0,3.0.0)",
javax.servlet.http;version="[2.5.0,3.0.0)",
org.eclipse.jgit.errors;version="[3.6.0,3.7.0)",
org.eclipse.jgit.internal.storage.file;version="[3.6.0,3.7.0)",
org.eclipse.jgit.lib;version="[3.6.0,3.7.0)",
org.eclipse.jgit.nls;version="[3.6.0,3.7.0)",
org.eclipse.jgit.revwalk;version="[3.6.0,3.7.0)",
org.eclipse.jgit.transport;version="[3.6.0,3.7.0)",
org.eclipse.jgit.transport.resolver;version="[3.6.0,3.7.0)",
org.eclipse.jgit.util;version="[3.6.0,3.7.0)"
org.eclipse.jgit.errors;version="[3.6.1,3.7.0)",
org.eclipse.jgit.internal.storage.file;version="[3.6.1,3.7.0)",
org.eclipse.jgit.lib;version="[3.6.1,3.7.0)",
org.eclipse.jgit.nls;version="[3.6.1,3.7.0)",
org.eclipse.jgit.revwalk;version="[3.6.1,3.7.0)",
org.eclipse.jgit.transport;version="[3.6.1,3.7.0)",
org.eclipse.jgit.transport.resolver;version="[3.6.1,3.7.0)",
org.eclipse.jgit.util;version="[3.6.1,3.7.0)"

2
org.eclipse.jgit.http.server/pom.xml

@ -52,7 +52,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.http.server</artifactId>

36
org.eclipse.jgit.http.test/META-INF/MANIFEST.MF

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Bundle-SymbolicName: org.eclipse.jgit.http.test
Bundle-Version: 3.6.0.qualifier
Bundle-Version: 3.6.1.qualifier
Bundle-Vendor: %provider_name
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
@ -22,23 +22,23 @@ Import-Package: javax.servlet;version="[2.5.0,3.0.0)",
org.eclipse.jetty.util.log;version="[7.6.0,8.0.0)",
org.eclipse.jetty.util.security;version="[7.6.0,8.0.0)",
org.eclipse.jetty.util.thread;version="[7.6.0,8.0.0)",
org.eclipse.jgit.errors;version="[3.6.0,3.7.0)",
org.eclipse.jgit.http.server;version="[3.6.0,3.7.0)",
org.eclipse.jgit.http.server.glue;version="[3.6.0,3.7.0)",
org.eclipse.jgit.http.server.resolver;version="[3.6.0,3.7.0)",
org.eclipse.jgit.internal;version="[3.6.0,3.7.0)",
org.eclipse.jgit.internal.storage.file;version="[3.6.0,3.7.0)",
org.eclipse.jgit.junit;version="[3.6.0,3.7.0)",
org.eclipse.jgit.junit.http;version="[3.6.0,3.7.0)",
org.eclipse.jgit.lib;version="[3.6.0,3.7.0)",
org.eclipse.jgit.nls;version="[3.6.0,3.7.0)",
org.eclipse.jgit.revwalk;version="[3.6.0,3.7.0)",
org.eclipse.jgit.storage.file;version="[3.6.0,3.7.0)",
org.eclipse.jgit.transport;version="[3.6.0,3.7.0)",
org.eclipse.jgit.transport.http;version="[3.6.0,3.7.0)",
org.eclipse.jgit.transport.http.apache;version="[3.6.0,3.7.0)",
org.eclipse.jgit.transport.resolver;version="[3.6.0,3.7.0)",
org.eclipse.jgit.util;version="[3.6.0,3.7.0)",
org.eclipse.jgit.errors;version="[3.6.1,3.7.0)",
org.eclipse.jgit.http.server;version="[3.6.1,3.7.0)",
org.eclipse.jgit.http.server.glue;version="[3.6.1,3.7.0)",
org.eclipse.jgit.http.server.resolver;version="[3.6.1,3.7.0)",
org.eclipse.jgit.internal;version="[3.6.1,3.7.0)",
org.eclipse.jgit.internal.storage.file;version="[3.6.1,3.7.0)",
org.eclipse.jgit.junit;version="[3.6.1,3.7.0)",
org.eclipse.jgit.junit.http;version="[3.6.1,3.7.0)",
org.eclipse.jgit.lib;version="[3.6.1,3.7.0)",
org.eclipse.jgit.nls;version="[3.6.1,3.7.0)",
org.eclipse.jgit.revwalk;version="[3.6.1,3.7.0)",
org.eclipse.jgit.storage.file;version="[3.6.1,3.7.0)",
org.eclipse.jgit.transport;version="[3.6.1,3.7.0)",
org.eclipse.jgit.transport.http;version="[3.6.1,3.7.0)",
org.eclipse.jgit.transport.http.apache;version="[3.6.1,3.7.0)",
org.eclipse.jgit.transport.resolver;version="[3.6.1,3.7.0)",
org.eclipse.jgit.util;version="[3.6.1,3.7.0)",
org.hamcrest.core;version="[1.1.0,2.0.0)",
org.junit;version="[4.0.0,5.0.0)",
org.junit.runner;version="[4.0.0,5.0.0)",

2
org.eclipse.jgit.http.test/pom.xml

@ -51,7 +51,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.http.test</artifactId>

22
org.eclipse.jgit.java7.test/META-INF/MANIFEST.MF

@ -2,17 +2,17 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Bundle-SymbolicName: org.eclipse.jgit.java7.test
Bundle-Version: 3.6.0.qualifier
Bundle-Version: 3.6.1.qualifier
Bundle-Vendor: %provider_name
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Import-Package: org.eclipse.jgit.api;version="[3.6.0,3.7.0)",
org.eclipse.jgit.diff;version="[3.6.0,3.7.0)",
org.eclipse.jgit.dircache;version="[3.6.0,3.7.0)",
org.eclipse.jgit.internal.storage.file;version="3.6.0",
org.eclipse.jgit.junit;version="[3.6.0,3.7.0)",
org.eclipse.jgit.lib;version="[3.6.0,3.7.0)",
org.eclipse.jgit.revwalk;version="[3.6.0,3.7.0)",
org.eclipse.jgit.storage.file;version="[3.6.0,3.7.0)",
org.eclipse.jgit.treewalk;version="[3.6.0,3.7.0)",
org.eclipse.jgit.util;version="[3.6.0,3.7.0)",
Import-Package: org.eclipse.jgit.api;version="[3.6.1,3.7.0)",
org.eclipse.jgit.diff;version="[3.6.1,3.7.0)",
org.eclipse.jgit.dircache;version="[3.6.1,3.7.0)",
org.eclipse.jgit.internal.storage.file;version="3.6.1",
org.eclipse.jgit.junit;version="[3.6.1,3.7.0)",
org.eclipse.jgit.lib;version="[3.6.1,3.7.0)",
org.eclipse.jgit.revwalk;version="[3.6.1,3.7.0)",
org.eclipse.jgit.storage.file;version="[3.6.1,3.7.0)",
org.eclipse.jgit.treewalk;version="[3.6.1,3.7.0)",
org.eclipse.jgit.util;version="[3.6.1,3.7.0)",
org.junit;version="[4.11.0,5.0.0)"

2
org.eclipse.jgit.java7.test/pom.xml

@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.java7.test</artifactId>

4
org.eclipse.jgit.java7/META-INF/MANIFEST.MF

@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
Fragment-Host: org.eclipse.jgit;bundle-version="3.1.1"
Bundle-Name: %plugin_name
Bundle-SymbolicName: org.eclipse.jgit.java7
Bundle-Version: 3.6.0.qualifier
Bundle-Version: 3.6.1.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %provider_name
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Export-Package: org.eclipse.jgit.util;version="3.6.0"
Export-Package: org.eclipse.jgit.util;version="3.6.1"

4
org.eclipse.jgit.java7/META-INF/SOURCE-MANIFEST.MF

@ -3,6 +3,6 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit.java7 - Sources
Bundle-SymbolicName: org.eclipse.jgit.java7.source
Bundle-Vendor: Eclipse.org - JGit
Bundle-Version: 3.6.0.qualifier
Eclipse-SourceBundle: org.eclipse.jgit.java7;version="3.6.0.qualifier";roots="."
Bundle-Version: 3.6.1.qualifier
Eclipse-SourceBundle: org.eclipse.jgit.java7;version="3.6.1.qualifier";roots="."

2
org.eclipse.jgit.java7/pom.xml

@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.java7</artifactId>

20
org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Bundle-SymbolicName: org.eclipse.jgit.junit.http
Bundle-Version: 3.6.0.qualifier
Bundle-Version: 3.6.1.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %provider_name
Bundle-ActivationPolicy: lazy
@ -20,13 +20,13 @@ Import-Package: javax.servlet;version="[2.5.0,3.0.0)",
org.eclipse.jetty.util.component;version="[7.6.0,8.0.0)",
org.eclipse.jetty.util.log;version="[7.6.0,8.0.0)",
org.eclipse.jetty.util.security;version="[7.6.0,8.0.0)",
org.eclipse.jgit.errors;version="[3.6.0,3.7.0)",
org.eclipse.jgit.http.server;version="[3.6.0,3.7.0)",
org.eclipse.jgit.internal.storage.file;version="[3.6.0,3.7.0)",
org.eclipse.jgit.junit;version="[3.6.0,3.7.0)",
org.eclipse.jgit.lib;version="[3.6.0,3.7.0)",
org.eclipse.jgit.revwalk;version="[3.6.0,3.7.0)",
org.eclipse.jgit.transport;version="[3.6.0,3.7.0)",
org.eclipse.jgit.transport.resolver;version="[3.6.0,3.7.0)",
org.eclipse.jgit.errors;version="[3.6.1,3.7.0)",
org.eclipse.jgit.http.server;version="[3.6.1,3.7.0)",
org.eclipse.jgit.internal.storage.file;version="[3.6.1,3.7.0)",
org.eclipse.jgit.junit;version="[3.6.1,3.7.0)",
org.eclipse.jgit.lib;version="[3.6.1,3.7.0)",
org.eclipse.jgit.revwalk;version="[3.6.1,3.7.0)",
org.eclipse.jgit.transport;version="[3.6.1,3.7.0)",
org.eclipse.jgit.transport.resolver;version="[3.6.1,3.7.0)",
org.junit;version="[4.0.0,5.0.0)"
Export-Package: org.eclipse.jgit.junit.http;version="3.6.0"
Export-Package: org.eclipse.jgit.junit.http;version="3.6.1"

2
org.eclipse.jgit.junit.http/pom.xml

@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.junit.http</artifactId>

30
org.eclipse.jgit.junit/META-INF/MANIFEST.MF

@ -2,23 +2,23 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Bundle-SymbolicName: org.eclipse.jgit.junit
Bundle-Version: 3.6.0.qualifier
Bundle-Version: 3.6.1.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %provider_name
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Import-Package: org.eclipse.jgit.api;version="[3.6.0,3.7.0)",
org.eclipse.jgit.api.errors;version="[3.6.0,3.7.0)",
org.eclipse.jgit.dircache;version="[3.6.0,3.7.0)",
org.eclipse.jgit.errors;version="[3.6.0,3.7.0)",
org.eclipse.jgit.internal.storage.file;version="[3.6.0,3.7.0)",
org.eclipse.jgit.internal.storage.pack;version="[3.6.0,3.7.0)",
org.eclipse.jgit.lib;version="[3.6.0,3.7.0)",
org.eclipse.jgit.revwalk;version="[3.6.0,3.7.0)",
org.eclipse.jgit.storage.file;version="[3.6.0,3.7.0)",
org.eclipse.jgit.treewalk;version="[3.6.0,3.7.0)",
org.eclipse.jgit.treewalk.filter;version="[3.6.0,3.7.0)",
org.eclipse.jgit.util;version="[3.6.0,3.7.0)",
org.eclipse.jgit.util.io;version="[3.6.0,3.7.0)",
Import-Package: org.eclipse.jgit.api;version="[3.6.1,3.7.0)",
org.eclipse.jgit.api.errors;version="[3.6.1,3.7.0)",
org.eclipse.jgit.dircache;version="[3.6.1,3.7.0)",
org.eclipse.jgit.errors;version="[3.6.1,3.7.0)",
org.eclipse.jgit.internal.storage.file;version="[3.6.1,3.7.0)",
org.eclipse.jgit.internal.storage.pack;version="[3.6.1,3.7.0)",
org.eclipse.jgit.lib;version="[3.6.1,3.7.0)",
org.eclipse.jgit.revwalk;version="[3.6.1,3.7.0)",
org.eclipse.jgit.storage.file;version="[3.6.1,3.7.0)",
org.eclipse.jgit.treewalk;version="[3.6.1,3.7.0)",
org.eclipse.jgit.treewalk.filter;version="[3.6.1,3.7.0)",
org.eclipse.jgit.util;version="[3.6.1,3.7.0)",
org.eclipse.jgit.util.io;version="[3.6.1,3.7.0)",
org.junit;version="[4.0.0,5.0.0)"
Export-Package: org.eclipse.jgit.junit;version="3.6.0"
Export-Package: org.eclipse.jgit.junit;version="3.6.1"

2
org.eclipse.jgit.junit/pom.xml

@ -52,7 +52,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.junit</artifactId>

2
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java

@ -184,6 +184,7 @@ public class MockSystemReader extends SystemReader {
setProperty("file.separator", "\\");
setProperty("path.separator", ";");
setProperty("line.separator", "\r\n");
setPlatformChecker();
}
/**
@ -194,5 +195,6 @@ public class MockSystemReader extends SystemReader {
setProperty("file.separator", "/");
setProperty("path.separator", ":");
setProperty("line.separator", "\n");
setPlatformChecker();
}
}

2
org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml

@ -2,7 +2,7 @@
<feature
id="org.eclipse.jgit"
label="%featureName"
version="3.6.0.qualifier"
version="3.6.1.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">

2
org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml

@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>

2
org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml

@ -2,7 +2,7 @@
<feature
id="org.eclipse.jgit.http.apache"
label="%featureName"
version="3.6.0.qualifier"
version="3.6.1.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">

2
org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml

@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>

2
org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/feature.xml

@ -2,7 +2,7 @@
<feature
id="org.eclipse.jgit.java7"
label="%featureName"
version="3.6.0.qualifier"
version="3.6.1.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">

2
org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/pom.xml

@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>

2
org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml

@ -2,7 +2,7 @@
<feature
id="org.eclipse.jgit.junit"
label="%featureName"
version="3.6.0.qualifier"
version="3.6.1.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">

2
org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml

@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>

2
org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml

@ -2,7 +2,7 @@
<feature
id="org.eclipse.jgit.pgm"
label="%featureName"
version="3.6.0.qualifier"
version="3.6.1.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">

2
org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml

@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>

2
org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/feature.xml

@ -2,7 +2,7 @@
<feature
id="org.eclipse.jgit.pgm.source"
label="%featureName"
version="3.6.0.qualifier"
version="3.6.1.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">

2
org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.source.feature/pom.xml

@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>

2
org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml

@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.repository</artifactId>

2
org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml

@ -2,7 +2,7 @@
<feature
id="org.eclipse.jgit.source"
label="%featureName"
version="3.6.0.qualifier"
version="3.6.1.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/jgit/">

2
org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml

@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jgit.feature</groupId>

2
org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF

@ -2,4 +2,4 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: JGit Target Platform Bundle
Bundle-SymbolicName: org.eclipse.jgit.target
Bundle-Version: 3.6.0.qualifier
Bundle-Version: 3.6.1.qualifier

2
org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml

@ -49,7 +49,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.target</artifactId>

2
org.eclipse.jgit.packaging/pom.xml

@ -53,7 +53,7 @@
<groupId>org.eclipse.jgit</groupId>
<artifactId>jgit.tycho.parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>JGit Tycho Parent</name>

34
org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF

@ -2,27 +2,27 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Bundle-SymbolicName: org.eclipse.jgit.pgm.test
Bundle-Version: 3.6.0.qualifier
Bundle-Version: 3.6.1.qualifier
Bundle-Vendor: %provider_name
Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Import-Package: org.eclipse.jgit.api;version="[3.6.0,3.7.0)",
org.eclipse.jgit.api.errors;version="[3.6.0,3.7.0)",
org.eclipse.jgit.diff;version="[3.6.0,3.7.0)",
org.eclipse.jgit.dircache;version="[3.6.0,3.7.0)",
org.eclipse.jgit.junit;version="[3.6.0,3.7.0)",
org.eclipse.jgit.lib;version="[3.6.0,3.7.0)",
org.eclipse.jgit.merge;version="[3.6.0,3.7.0)",
org.eclipse.jgit.pgm;version="[3.6.0,3.7.0)",
org.eclipse.jgit.pgm.internal;version="[3.6.0,3.7.0)",
org.eclipse.jgit.pgm.opt;version="[3.6.0,3.7.0)",
org.eclipse.jgit.revwalk;version="[3.6.0,3.7.0)",
org.eclipse.jgit.storage.file;version="[3.6.0,3.7.0)",
org.eclipse.jgit.transport;version="[3.6.0,3.7.0)",
org.eclipse.jgit.treewalk;version="[3.6.0,3.7.0)",
org.eclipse.jgit.util;version="[3.6.0,3.7.0)",
org.eclipse.jgit.util.io;version="[3.6.0,3.7.0)",
Import-Package: org.eclipse.jgit.api;version="[3.6.1,3.7.0)",
org.eclipse.jgit.api.errors;version="[3.6.1,3.7.0)",
org.eclipse.jgit.diff;version="[3.6.1,3.7.0)",
org.eclipse.jgit.dircache;version="[3.6.1,3.7.0)",
org.eclipse.jgit.junit;version="[3.6.1,3.7.0)",
org.eclipse.jgit.lib;version="[3.6.1,3.7.0)",
org.eclipse.jgit.merge;version="[3.6.1,3.7.0)",
org.eclipse.jgit.pgm;version="[3.6.1,3.7.0)",
org.eclipse.jgit.pgm.internal;version="[3.6.1,3.7.0)",
org.eclipse.jgit.pgm.opt;version="[3.6.1,3.7.0)",
org.eclipse.jgit.revwalk;version="[3.6.1,3.7.0)",
org.eclipse.jgit.storage.file;version="[3.6.1,3.7.0)",
org.eclipse.jgit.transport;version="[3.6.1,3.7.0)",
org.eclipse.jgit.treewalk;version="[3.6.1,3.7.0)",
org.eclipse.jgit.util;version="[3.6.1,3.7.0)",
org.eclipse.jgit.util.io;version="[3.6.1,3.7.0)",
org.hamcrest.core;bundle-version="[1.1.0,2.0.0)",
org.junit;version="[4.4.0,5.0.0)",
org.kohsuke.args4j;version="[2.0.12,2.1.0)"

2
org.eclipse.jgit.pgm.test/pom.xml

@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.pgm.test</artifactId>

156
org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/CloneTest.java

@ -0,0 +1,156 @@
/*
* Copyright (C) 2014 Matthias Sohn <matthias.sohn@sap.com>
* and other copyright owners as documented in the project's IP log.
*
* This program and the accompanying materials are made available
* under the terms of the Eclipse Distribution License v1.0 which
* accompanies this distribution, is reproduced below, and is
* available at http://www.eclipse.org/org/documents/edl-v10.php
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* - Neither the name of the Eclipse Foundation, Inc. nor the
* names of its contributors may be used to endorse or promote
* products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.eclipse.jgit.pgm;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.io.File;
import java.util.List;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.junit.JGitTestUtil;
import org.eclipse.jgit.junit.MockSystemReader;
import org.eclipse.jgit.lib.CLIRepositoryTestCase;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.transport.URIish;
import org.eclipse.jgit.util.SystemReader;
import org.junit.Before;
import org.junit.Test;
public class CloneTest extends CLIRepositoryTestCase {
private Git git;
@Override
@Before
public void setUp() throws Exception {
super.setUp();
git = new Git(db);
}
@Test
public void testClone() throws Exception {
createInitialCommit();
File gitDir = db.getDirectory();
String sourceURI = gitDir.toURI().toString();
File target = createTempDirectory("target");
StringBuilder cmd = new StringBuilder("git clone ").append(sourceURI
+ " " + target.getPath());
String[] result = execute(cmd.toString());
assertArrayEquals(new String[] {
"Cloning into '" + target.getPath() + "'...",
"", "" }, result);
Git git2 = Git.open(target);
List<Ref> branches = git2.branchList().call();
assertEquals("expected 1 branch", 1, branches.size());
}
private void createInitialCommit() throws Exception {
JGitTestUtil.writeTrashFile(db, "hello.txt", "world");
git.add().addFilepattern("hello.txt").call();
git.commit().setMessage("Initial commit").call();
}
@Test
public void testCloneEmpty() throws Exception {
File gitDir = db.getDirectory();
String sourceURI = gitDir.toURI().toString();
File target = createTempDirectory("target");
StringBuilder cmd = new StringBuilder("git clone ").append(sourceURI
+ " " + target.getPath());
String[] result = execute(cmd.toString());
assertArrayEquals(new String[] {
"Cloning into '" + target.getPath() + "'...",
"warning: You appear to have cloned an empty repository.", "",
"" }, result);
Git git2 = Git.open(target);
List<Ref> branches = git2.branchList().call();
assertEquals("expected 0 branch", 0, branches.size());
}
@Test
public void testCloneIntoCurrentDir() throws Exception {
createInitialCommit();
File target = createTempDirectory("target");
MockSystemReader sr = (MockSystemReader) SystemReader.getInstance();
sr.setProperty(Constants.OS_USER_DIR, target.getAbsolutePath());
File gitDir = db.getDirectory();
String sourceURI = gitDir.toURI().toString();
String name = new URIish(sourceURI).getHumanishName();
StringBuilder cmd = new StringBuilder("git clone ").append(sourceURI);
String[] result = execute(cmd.toString());
assertArrayEquals(new String[] {
"Cloning into '" + new File(target, name).getName() + "'...",
"", "" }, result);
Git git2 = Git.open(new File(target, name));
List<Ref> branches = git2.branchList().call();
assertEquals("expected 1 branch", 1, branches.size());
}
public void testCloneBare() throws Exception {
createInitialCommit();
File gitDir = db.getDirectory();
String sourcePath = gitDir.getAbsolutePath();
String targetPath = (new File(sourcePath)).getParentFile()
.getParentFile().getAbsolutePath()
+ "/target.git";
StringBuilder cmd = new StringBuilder("git clone --bare ")
.append(sourcePath + " " + targetPath);
String[] result = execute(cmd.toString());
assertArrayEquals(new String[] {
"Cloning into '" + targetPath + "'...", "", "" }, result);
Git git2 = Git.open(new File(targetPath));
List<Ref> branches = git2.branchList().call();
assertEquals("expected 1 branch", 1, branches.size());
assertTrue("expected bare repository", git2.getRepository().isBare());
}
}

138
org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/LsRemoteTest.java

@ -0,0 +1,138 @@
/*
* Copyright (C) 2014, Matthias Sohn <matthias.sohn@sap.com>
* and other copyright owners as documented in the project's IP log.
*
* This program and the accompanying materials are made available
* under the terms of the Eclipse Distribution License v1.0 which
* accompanies this distribution, is reproduced below, and is
* available at http://www.eclipse.org/org/documents/edl-v10.php
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* - Neither the name of the Eclipse Foundation, Inc. nor the
* names of its contributors may be used to endorse or promote
* products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.eclipse.jgit.pgm;
import static org.junit.Assert.assertArrayEquals;
import java.util.List;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.lib.CLIRepositoryTestCase;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.RefUpdate;
import org.junit.Before;
import org.junit.Test;
public class LsRemoteTest extends CLIRepositoryTestCase {
private Git git;
@Override
@Before
public void setUp() throws Exception {
super.setUp();
git = new Git(db);
// commit something
writeTrashFile("Test.txt", "Hello world");
git.add().addFilepattern("Test.txt").call();
git.commit().setMessage("Initial commit").call();
// create a master branch and switch to it
git.branchCreate().setName("test").call();
RefUpdate rup = db.updateRef(Constants.HEAD);
rup.link("refs/heads/test");
// tags
git.tag().setName("tag1").call();
git.tag().setName("tag2").call();
git.tag().setName("tag3").call();
}
@Test
public void testLsRemote() throws Exception {
final List<String> result = CLIGitCommand.execute(
"git ls-remote " + db.getDirectory(), db);
assertArrayEquals(new String[] {
"d0b1ef2b3dea02bb2ca824445c04e6def012c32c HEAD",
"d0b1ef2b3dea02bb2ca824445c04e6def012c32c refs/heads/master",
"d0b1ef2b3dea02bb2ca824445c04e6def012c32c refs/heads/test",
"efc02078d83a5226986ae917323acec7e1e8b7cb refs/tags/tag1",
"d0b1ef2b3dea02bb2ca824445c04e6def012c32c refs/tags/tag1^{}",
"4e4b837e0fd4ba83c003678b03592dc1509a4115 refs/tags/tag2",
"d0b1ef2b3dea02bb2ca824445c04e6def012c32c refs/tags/tag2^{}",
"489384bf8ace47522fe32093d2ceb85b65a6cbb1 refs/tags/tag3",
"d0b1ef2b3dea02bb2ca824445c04e6def012c32c refs/tags/tag3^{}",
"" }, result.toArray());
}
@Test
public void testLsRemoteHeads() throws Exception {
final List<String> result = CLIGitCommand.execute(
"git ls-remote --heads "
+ db.getDirectory(), db);
assertArrayEquals(new String[] {
"d0b1ef2b3dea02bb2ca824445c04e6def012c32c refs/heads/master",
"d0b1ef2b3dea02bb2ca824445c04e6def012c32c refs/heads/test",
"" }, result.toArray());
}
@Test
public void testLsRemoteTags() throws Exception {
final List<String> result = CLIGitCommand.execute(
"git ls-remote --tags " + db.getDirectory(), db);
assertArrayEquals(new String[] {
"efc02078d83a5226986ae917323acec7e1e8b7cb refs/tags/tag1",
"d0b1ef2b3dea02bb2ca824445c04e6def012c32c refs/tags/tag1^{}",
"4e4b837e0fd4ba83c003678b03592dc1509a4115 refs/tags/tag2",
"d0b1ef2b3dea02bb2ca824445c04e6def012c32c refs/tags/tag2^{}",
"489384bf8ace47522fe32093d2ceb85b65a6cbb1 refs/tags/tag3",
"d0b1ef2b3dea02bb2ca824445c04e6def012c32c refs/tags/tag3^{}",
"" }, result.toArray());
}
@Test
public void testLsRemoteHeadsTags() throws Exception {
final List<String> result = CLIGitCommand.execute(
"git ls-remote --heads --tags " + db.getDirectory(), db);
assertArrayEquals(new String[] {
"d0b1ef2b3dea02bb2ca824445c04e6def012c32c refs/heads/master",
"d0b1ef2b3dea02bb2ca824445c04e6def012c32c refs/heads/test",
"efc02078d83a5226986ae917323acec7e1e8b7cb refs/tags/tag1",
"d0b1ef2b3dea02bb2ca824445c04e6def012c32c refs/tags/tag1^{}",
"4e4b837e0fd4ba83c003678b03592dc1509a4115 refs/tags/tag2",
"d0b1ef2b3dea02bb2ca824445c04e6def012c32c refs/tags/tag2^{}",
"489384bf8ace47522fe32093d2ceb85b65a6cbb1 refs/tags/tag3",
"d0b1ef2b3dea02bb2ca824445c04e6def012c32c refs/tags/tag3^{}",
"" }, result.toArray());
}
}

62
org.eclipse.jgit.pgm/META-INF/MANIFEST.MF

@ -2,43 +2,43 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Bundle-SymbolicName: org.eclipse.jgit.pgm
Bundle-Version: 3.6.0.qualifier
Bundle-Version: 3.6.1.qualifier
Bundle-Vendor: %provider_name
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Import-Package: org.apache.commons.compress.archivers;version="[1.3,2.0)",
org.apache.commons.compress.archivers.tar;version="[1.3,2.0)",
org.apache.commons.compress.archivers.zip;version="[1.3,2.0)",
org.eclipse.jgit.api;version="[3.6.0,3.7.0)",
org.eclipse.jgit.api.errors;version="[3.6.0,3.7.0)",
org.eclipse.jgit.archive;version="[3.6.0,3.7.0)",
org.eclipse.jgit.awtui;version="[3.6.0,3.7.0)",
org.eclipse.jgit.blame;version="[3.6.0,3.7.0)",
org.eclipse.jgit.diff;version="[3.6.0,3.7.0)",
org.eclipse.jgit.dircache;version="[3.6.0,3.7.0)",
org.eclipse.jgit.errors;version="[3.6.0,3.7.0)",
org.eclipse.jgit.gitrepo;version="[3.6.0,3.7.0)",
org.eclipse.jgit.internal.storage.file;version="[3.6.0,3.7.0)",
org.eclipse.jgit.internal.storage.pack;version="[3.6.0,3.7.0)",
org.eclipse.jgit.lib;version="[3.6.0,3.7.0)",
org.eclipse.jgit.merge;version="3.6.0",
org.eclipse.jgit.nls;version="[3.6.0,3.7.0)",
org.eclipse.jgit.notes;version="[3.6.0,3.7.0)",
org.eclipse.jgit.revplot;version="[3.6.0,3.7.0)",
org.eclipse.jgit.revwalk;version="[3.6.0,3.7.0)",
org.eclipse.jgit.revwalk.filter;version="[3.6.0,3.7.0)",
org.eclipse.jgit.storage.file;version="[3.6.0,3.7.0)",
org.eclipse.jgit.storage.pack;version="[3.6.0,3.7.0)",
org.eclipse.jgit.transport;version="[3.6.0,3.7.0)",
org.eclipse.jgit.transport.resolver;version="[3.6.0,3.7.0)",
org.eclipse.jgit.treewalk;version="[3.6.0,3.7.0)",
org.eclipse.jgit.treewalk.filter;version="[3.6.0,3.7.0)",
org.eclipse.jgit.util;version="[3.6.0,3.7.0)",
org.eclipse.jgit.util.io;version="[3.6.0,3.7.0)",
org.eclipse.jgit.api;version="[3.6.1,3.7.0)",
org.eclipse.jgit.api.errors;version="[3.6.1,3.7.0)",
org.eclipse.jgit.archive;version="[3.6.1,3.7.0)",
org.eclipse.jgit.awtui;version="[3.6.1,3.7.0)",
org.eclipse.jgit.blame;version="[3.6.1,3.7.0)",
org.eclipse.jgit.diff;version="[3.6.1,3.7.0)",
org.eclipse.jgit.dircache;version="[3.6.1,3.7.0)",
org.eclipse.jgit.errors;version="[3.6.1,3.7.0)",
org.eclipse.jgit.gitrepo;version="[3.6.1,3.7.0)",
org.eclipse.jgit.internal.storage.file;version="[3.6.1,3.7.0)",
org.eclipse.jgit.internal.storage.pack;version="[3.6.1,3.7.0)",
org.eclipse.jgit.lib;version="[3.6.1,3.7.0)",
org.eclipse.jgit.merge;version="3.6.1",
org.eclipse.jgit.nls;version="[3.6.1,3.7.0)",
org.eclipse.jgit.notes;version="[3.6.1,3.7.0)",
org.eclipse.jgit.revplot;version="[3.6.1,3.7.0)",
org.eclipse.jgit.revwalk;version="[3.6.1,3.7.0)",
org.eclipse.jgit.revwalk.filter;version="[3.6.1,3.7.0)",
org.eclipse.jgit.storage.file;version="[3.6.1,3.7.0)",
org.eclipse.jgit.storage.pack;version="[3.6.1,3.7.0)",
org.eclipse.jgit.transport;version="[3.6.1,3.7.0)",
org.eclipse.jgit.transport.resolver;version="[3.6.1,3.7.0)",
org.eclipse.jgit.treewalk;version="[3.6.1,3.7.0)",
org.eclipse.jgit.treewalk.filter;version="[3.6.1,3.7.0)",
org.eclipse.jgit.util;version="[3.6.1,3.7.0)",
org.eclipse.jgit.util.io;version="[3.6.1,3.7.0)",
org.kohsuke.args4j;version="[2.0.12,2.1.0)",
org.kohsuke.args4j.spi;version="[2.0.12,2.1.0)"
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.jgit.pgm;version="3.6.0";
Export-Package: org.eclipse.jgit.pgm;version="3.6.1";
uses:="org.eclipse.jgit.revwalk,
org.eclipse.jgit.treewalk.filter,
org.eclipse.jgit.pgm.opt,
@ -49,10 +49,10 @@ Export-Package: org.eclipse.jgit.pgm;version="3.6.0";
org.eclipse.jgit.treewalk,
javax.swing,
org.eclipse.jgit.transport",
org.eclipse.jgit.pgm.debug;version="3.6.0";
org.eclipse.jgit.pgm.debug;version="3.6.1";
uses:="org.eclipse.jgit.pgm",
org.eclipse.jgit.pgm.internal;version="3.6.0";x-friends:="org.eclipse.jgit.pgm.test,org.eclipse.jgit.test",
org.eclipse.jgit.pgm.opt;version="3.6.0";
org.eclipse.jgit.pgm.internal;version="3.6.1";x-friends:="org.eclipse.jgit.pgm.test,org.eclipse.jgit.test",
org.eclipse.jgit.pgm.opt;version="3.6.1";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.revwalk,
org.kohsuke.args4j.spi,

4
org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF

@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit.pgm - Sources
Bundle-SymbolicName: org.eclipse.jgit.pgm.source
Bundle-Vendor: Eclipse.org - JGit
Bundle-Version: 3.6.0.qualifier
Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="3.6.0.qualifier";roots="."
Bundle-Version: 3.6.1.qualifier
Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="3.6.1.qualifier";roots="."

2
org.eclipse.jgit.pgm/pom.xml

@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.pgm</artifactId>

4
org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties

@ -43,6 +43,8 @@ changesNotStagedForCommit=Changes not staged for commit:
changesToBeCommitted=Changes to be committed:
checkoutConflict=error: Your local changes to the following files would be overwritten by checkout:
checkoutConflictPathLine=\t{0}
clonedEmptyRepository=warning: You appear to have cloned an empty repository.
cloningInto=Cloning into ''{0}''...
commitLabel=commit
configFileNotFound=configuration file {0} not found
conflictingUsageOf_git_dir_andArguments=conflicting usage of --git-dir and arguments
@ -203,6 +205,8 @@ usage_Gc=Cleanup unnecessary files and optimize the local repository
usage_Glog=View commit history as a graph
usage_IndexPack=Build pack index file for an existing packed archive
usage_LsRemote=List references in a remote repository
usage_lsRemoteHeads=Show only refs starting with refs/heads
usage_lsRemoteTags=Show only refs starting with refs/tags
usage_LsTree=List the contents of a tree object
usage_MakeCacheTree=Show the current cache tree structure
usage_MergeBase=Find as good common ancestors as possible for a merge

152
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java

@ -44,30 +44,15 @@
package org.eclipse.jgit.pgm;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.text.MessageFormat;
import org.eclipse.jgit.dircache.DirCache;
import org.eclipse.jgit.dircache.DirCacheCheckout;
import org.eclipse.jgit.errors.IncorrectObjectTypeException;
import org.eclipse.jgit.errors.MissingObjectException;
import org.eclipse.jgit.api.CloneCommand;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.api.errors.InvalidRemoteException;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.lib.RefUpdate;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.lib.StoredConfig;
import org.eclipse.jgit.lib.TextProgressMonitor;
import org.eclipse.jgit.pgm.internal.CLIText;
import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.revwalk.RevWalk;
import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
import org.eclipse.jgit.transport.FetchResult;
import org.eclipse.jgit.transport.RefSpec;
import org.eclipse.jgit.transport.RemoteConfig;
import org.eclipse.jgit.transport.TagOpt;
import org.eclipse.jgit.transport.Transport;
import org.eclipse.jgit.transport.URIish;
import org.eclipse.jgit.util.SystemReader;
import org.kohsuke.args4j.Argument;
import org.kohsuke.args4j.Option;
@ -82,14 +67,15 @@ class Clone extends AbstractFetchCommand {
@Option(name = "--no-checkout", aliases = { "-n" }, usage = "usage_noCheckoutAfterClone")
private boolean noCheckout;
@Option(name = "--bare", usage = "usage_bareClone")
private boolean isBare;
@Argument(index = 0, required = true, metaVar = "metaVar_uriish")
private String sourceUri;
@Argument(index = 1, metaVar = "metaVar_directory")
private String localName;
private Repository dst;
@Override
protected final boolean requiresRepository() {
return false;
@ -101,116 +87,42 @@ class Clone extends AbstractFetchCommand {
throw die(CLIText.get().conflictingUsageOf_git_dir_andArguments);
final URIish uri = new URIish(sourceUri);
File localNameF;
if (localName == null) {
try {
localName = uri.getHumanishName();
localNameF = new File(SystemReader.getInstance().getProperty(
Constants.OS_USER_DIR), localName);
} catch (IllegalArgumentException e) {
throw die(MessageFormat.format(CLIText.get().cannotGuessLocalNameFrom, sourceUri));
throw die(MessageFormat.format(
CLIText.get().cannotGuessLocalNameFrom, sourceUri));
}
}
if (gitdir == null)
gitdir = new File(localName, Constants.DOT_GIT).getAbsolutePath();
dst = new FileRepositoryBuilder().setGitDir(new File(gitdir)).build();
dst.create();
final StoredConfig dstcfg = dst.getConfig();
dstcfg.setBoolean("core", null, "bare", false); //$NON-NLS-1$ //$NON-NLS-2$
dstcfg.save();
db = dst;
outw.print(MessageFormat.format(
CLIText.get().initializedEmptyGitRepositoryIn, gitdir));
outw.println();
outw.flush();
} else
localNameF = new File(localName);
saveRemote(uri);
final FetchResult r = runFetch();
if (!noCheckout) {
final Ref checkoutRef;
if (branch == null)
checkoutRef = guessHEAD(r);
else {
checkoutRef = r.getAdvertisedRef(Constants.R_HEADS + branch);
if (checkoutRef == null)
throw die(MessageFormat.format(
CLIText.get().noSuchRemoteRef, branch));
}
doCheckout(checkoutRef);
}
}
private void saveRemote(final URIish uri) throws URISyntaxException,
IOException {
final StoredConfig dstcfg = dst.getConfig();
final RemoteConfig rc = new RemoteConfig(dstcfg, remoteName);
rc.addURI(uri);
rc.addFetchRefSpec(new RefSpec().setForceUpdate(true)
.setSourceDestination(Constants.R_HEADS + "*", //$NON-NLS-1$
Constants.R_REMOTES + remoteName + "/*")); //$NON-NLS-1$
rc.update(dstcfg);
dstcfg.save();
}
private FetchResult runFetch() throws URISyntaxException, IOException {
final Transport tn = Transport.open(db, remoteName);
final FetchResult r;
try {
tn.setTagOpt(TagOpt.FETCH_TAGS);
r = tn.fetch(new TextProgressMonitor(), null);
} finally {
tn.close();
}
showFetchResult(r);
return r;
}
private static Ref guessHEAD(final FetchResult result) {
final Ref idHEAD = result.getAdvertisedRef(Constants.HEAD);
Ref head = null;
for (final Ref r : result.getAdvertisedRefs()) {
final String n = r.getName();
if (!n.startsWith(Constants.R_HEADS))
continue;
if (idHEAD == null || head != null)
continue;
if (r.getObjectId().equals(idHEAD.getObjectId()))
head = r;
}
if (idHEAD != null && head == null)
head = idHEAD;
return head;
}
private void doCheckout(final Ref branch) throws IOException {
if (branch == null)
throw die(CLIText.get().cannotChekoutNoHeadsAdvertisedByRemote);
if (!Constants.HEAD.equals(branch.getName())) {
RefUpdate u = db.updateRef(Constants.HEAD);
u.disableRefLog();
u.link(branch.getName());
}
final RevCommit commit = parseCommit(branch);
final RefUpdate u = db.updateRef(Constants.HEAD);
u.setNewObjectId(commit);
u.forceUpdate();
branch = Constants.HEAD;
DirCache dc = db.lockDirCache();
DirCacheCheckout co = new DirCacheCheckout(db, dc, commit.getTree());
co.checkout();
}
CloneCommand command = Git.cloneRepository();
command.setURI(sourceUri).setRemote(remoteName).setBare(isBare)
.setNoCheckout(noCheckout).setBranch(branch);
private RevCommit parseCommit(final Ref branch)
throws MissingObjectException, IncorrectObjectTypeException,
IOException {
final RevWalk rw = new RevWalk(db);
final RevCommit commit;
command.setGitDir(gitdir == null ? null : new File(gitdir));
command.setDirectory(localNameF);
outw.println(MessageFormat.format(CLIText.get().cloningInto, localName));
try {
commit = rw.parseCommit(branch.getObjectId());
db = command.call().getRepository();
if (db.resolve(Constants.HEAD) == null)
outw.println(CLIText.get().clonedEmptyRepository);
} catch (InvalidRemoteException e) {
throw die(MessageFormat.format(CLIText.get().doesNotExist,
sourceUri));
} finally {
rw.release();
if (db != null)
db.close();
}
return commit;
outw.println();
outw.flush();
}
}

40
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java

@ -46,16 +46,24 @@
package org.eclipse.jgit.pgm;
import java.io.IOException;
import java.util.Comparator;
import java.util.TreeSet;
import org.kohsuke.args4j.Argument;
import org.kohsuke.args4j.Option;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.api.LsRemoteCommand;
import org.eclipse.jgit.lib.AnyObjectId;
import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.transport.FetchConnection;
import org.eclipse.jgit.transport.Transport;
import org.kohsuke.args4j.Argument;
import org.kohsuke.args4j.Option;
@Command(common = true, usage = "usage_LsRemote")
class LsRemote extends TextBuiltin {
@Option(name = "--heads", usage = "usage_lsRemoteHeads")
private boolean heads;
@Option(name = "--tags", usage = "usage_lsRemoteTags", aliases = { "-t" })
private boolean tags;
@Option(name = "--timeout", metaVar = "metaVar_service", usage = "usage_abortConnectionIfNoActivity")
int timeout = -1;
@ -64,19 +72,19 @@ class LsRemote extends TextBuiltin {
@Override
protected void run() throws Exception {
final Transport tn = Transport.open(db, remote);
if (0 <= timeout)
tn.setTimeout(timeout);
final FetchConnection c = tn.openFetch();
try {
for (final Ref r : c.getRefs()) {
show(r.getObjectId(), r.getName());
if (r.getPeeledObjectId() != null)
show(r.getPeeledObjectId(), r.getName() + "^{}"); //$NON-NLS-1$
LsRemoteCommand command = Git.lsRemoteRepository().setRemote(remote)
.setTimeout(timeout).setHeads(heads).setTags(tags);
TreeSet<Ref> refs = new TreeSet<Ref>(new Comparator<Ref>() {
public int compare(Ref r1, Ref r2) {
return r1.getName().compareTo(r2.getName());
}
} finally {
c.close();
tn.close();
});
refs.addAll(command.call());
for (final Ref r : refs) {
show(r.getObjectId(), r.getName());
if (r.getPeeledObjectId() != null)
show(r.getPeeledObjectId(), r.getName() + "^{}"); //$NON-NLS-1$
}
}

2
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java

@ -109,6 +109,8 @@ public class CLIText extends TranslationBundle {
/***/ public String changesToBeCommitted;
/***/ public String checkoutConflict;
/***/ public String checkoutConflictPathLine;
/***/ public String clonedEmptyRepository;
/***/ public String cloningInto;
/***/ public String commitLabel;
/***/ public String conflictingUsageOf_git_dir_andArguments;
/***/ public String couldNotCreateBranch;

76
org.eclipse.jgit.test/META-INF/MANIFEST.MF

@ -2,49 +2,49 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Bundle-SymbolicName: org.eclipse.jgit.test
Bundle-Version: 3.6.0.qualifier
Bundle-Version: 3.6.1.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %provider_name
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Import-Package: com.googlecode.javaewah;version="[0.7.9,0.8.0)",
org.eclipse.jgit.api;version="[3.6.0,3.7.0)",
org.eclipse.jgit.api.errors;version="[3.6.0,3.7.0)",
org.eclipse.jgit.awtui;version="[3.6.0,3.7.0)",
org.eclipse.jgit.blame;version="[3.6.0,3.7.0)",
org.eclipse.jgit.console;version="[3.6.0,3.7.0)",
org.eclipse.jgit.diff;version="[3.6.0,3.7.0)",
org.eclipse.jgit.dircache;version="[3.6.0,3.7.0)",
org.eclipse.jgit.errors;version="[3.6.0,3.7.0)",
org.eclipse.jgit.events;version="[3.6.0,3.7.0)",
org.eclipse.jgit.fnmatch;version="[3.6.0,3.7.0)",
org.eclipse.jgit.gitrepo;version="[3.6.0,3.7.0)",
org.eclipse.jgit.ignore;version="[3.6.0,3.7.0)",
org.eclipse.jgit.ignore.internal;version="[3.6.0,3.7.0)",
org.eclipse.jgit.internal;version="[3.6.0,3.7.0)",
org.eclipse.jgit.internal.storage.dfs;version="[3.6.0,3.7.0)",
org.eclipse.jgit.internal.storage.file;version="[3.6.0,3.7.0)",
org.eclipse.jgit.internal.storage.pack;version="[3.6.0,3.7.0)",
org.eclipse.jgit.junit;version="[3.6.0,3.7.0)",
org.eclipse.jgit.lib;version="[3.6.0,3.7.0)",
org.eclipse.jgit.merge;version="[3.6.0,3.7.0)",
org.eclipse.jgit.nls;version="[3.6.0,3.7.0)",
org.eclipse.jgit.notes;version="[3.6.0,3.7.0)",
org.eclipse.jgit.patch;version="[3.6.0,3.7.0)",
org.eclipse.jgit.pgm;version="[3.6.0,3.7.0)",
org.eclipse.jgit.pgm.internal;version="[3.6.0,3.7.0)",
org.eclipse.jgit.revplot;version="[3.6.0,3.7.0)",
org.eclipse.jgit.revwalk;version="[3.6.0,3.7.0)",
org.eclipse.jgit.revwalk.filter;version="[3.6.0,3.7.0)",
org.eclipse.jgit.storage.file;version="[3.6.0,3.7.0)",
org.eclipse.jgit.storage.pack;version="[3.6.0,3.7.0)",
org.eclipse.jgit.submodule;version="[3.6.0,3.7.0)",
org.eclipse.jgit.transport;version="[3.6.0,3.7.0)",
org.eclipse.jgit.transport.http;version="[3.6.0,3.7.0)",
org.eclipse.jgit.treewalk;version="[3.6.0,3.7.0)",
org.eclipse.jgit.treewalk.filter;version="[3.6.0,3.7.0)",
org.eclipse.jgit.util;version="[3.6.0,3.7.0)",
org.eclipse.jgit.util.io;version="[3.6.0,3.7.0)",
org.eclipse.jgit.api;version="[3.6.1,3.7.0)",
org.eclipse.jgit.api.errors;version="[3.6.1,3.7.0)",
org.eclipse.jgit.awtui;version="[3.6.1,3.7.0)",
org.eclipse.jgit.blame;version="[3.6.1,3.7.0)",
org.eclipse.jgit.console;version="[3.6.1,3.7.0)",
org.eclipse.jgit.diff;version="[3.6.1,3.7.0)",
org.eclipse.jgit.dircache;version="[3.6.1,3.7.0)",
org.eclipse.jgit.errors;version="[3.6.1,3.7.0)",
org.eclipse.jgit.events;version="[3.6.1,3.7.0)",
org.eclipse.jgit.fnmatch;version="[3.6.1,3.7.0)",
org.eclipse.jgit.gitrepo;version="[3.6.1,3.7.0)",
org.eclipse.jgit.ignore;version="[3.6.1,3.7.0)",
org.eclipse.jgit.ignore.internal;version="[3.6.1,3.7.0)",
org.eclipse.jgit.internal;version="[3.6.1,3.7.0)",
org.eclipse.jgit.internal.storage.dfs;version="[3.6.1,3.7.0)",
org.eclipse.jgit.internal.storage.file;version="[3.6.1,3.7.0)",
org.eclipse.jgit.internal.storage.pack;version="[3.6.1,3.7.0)",
org.eclipse.jgit.junit;version="[3.6.1,3.7.0)",
org.eclipse.jgit.lib;version="[3.6.1,3.7.0)",
org.eclipse.jgit.merge;version="[3.6.1,3.7.0)",
org.eclipse.jgit.nls;version="[3.6.1,3.7.0)",
org.eclipse.jgit.notes;version="[3.6.1,3.7.0)",
org.eclipse.jgit.patch;version="[3.6.1,3.7.0)",
org.eclipse.jgit.pgm;version="[3.6.1,3.7.0)",
org.eclipse.jgit.pgm.internal;version="[3.6.1,3.7.0)",
org.eclipse.jgit.revplot;version="[3.6.1,3.7.0)",
org.eclipse.jgit.revwalk;version="[3.6.1,3.7.0)",
org.eclipse.jgit.revwalk.filter;version="[3.6.1,3.7.0)",
org.eclipse.jgit.storage.file;version="[3.6.1,3.7.0)",
org.eclipse.jgit.storage.pack;version="[3.6.1,3.7.0)",
org.eclipse.jgit.submodule;version="[3.6.1,3.7.0)",
org.eclipse.jgit.transport;version="[3.6.1,3.7.0)",
org.eclipse.jgit.transport.http;version="[3.6.1,3.7.0)",
org.eclipse.jgit.treewalk;version="[3.6.1,3.7.0)",
org.eclipse.jgit.treewalk.filter;version="[3.6.1,3.7.0)",
org.eclipse.jgit.util;version="[3.6.1,3.7.0)",
org.eclipse.jgit.util.io;version="[3.6.1,3.7.0)",
org.hamcrest;version="[1.1.0,2.0.0)",
org.junit;version="[4.4.0,5.0.0)",
org.junit.experimental.theories;version="[4.4.0,5.0.0)",

2
org.eclipse.jgit.test/pom.xml

@ -52,7 +52,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.test</artifactId>

3
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java

@ -146,6 +146,7 @@ public class CloneCommandTest extends RepositoryTestCase {
command.setGitDir(new File(directory, ".git"));
command.setURI(fileUri());
Git git2 = command.call();
addRepoToClose(git2.getRepository());
assertEquals(directory, git2.getRepository().getWorkTree());
assertEquals(new File(directory, ".git"), git2.getRepository()
.getDirectory());
@ -161,6 +162,7 @@ public class CloneCommandTest extends RepositoryTestCase {
command.setGitDir(gDir);
command.setURI(fileUri());
Git git2 = command.call();
addRepoToClose(git2.getRepository());
assertEquals(directory, git2.getRepository().getWorkTree());
assertEquals(gDir, git2.getRepository()
.getDirectory());
@ -177,6 +179,7 @@ public class CloneCommandTest extends RepositoryTestCase {
command.setGitDir(gDir);
command.setURI(fileUri());
Git git2 = command.call();
addRepoToClose(git2.getRepository());
try {
assertNull(null, git2.getRepository().getWorkTree());
fail("Expected NoWorkTreeException");

18
org.eclipse.jgit.ui/META-INF/MANIFEST.MF

@ -3,14 +3,14 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Bundle-SymbolicName: org.eclipse.jgit.ui
Bundle-Version: 3.6.0.qualifier
Bundle-Version: 3.6.1.qualifier
Bundle-Vendor: %provider_name
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.eclipse.jgit.awtui;version="3.6.0"
Import-Package: org.eclipse.jgit.errors;version="[3.6.0,3.7.0)",
org.eclipse.jgit.lib;version="[3.6.0,3.7.0)",
org.eclipse.jgit.nls;version="[3.6.0,3.7.0)",
org.eclipse.jgit.revplot;version="[3.6.0,3.7.0)",
org.eclipse.jgit.revwalk;version="[3.6.0,3.7.0)",
org.eclipse.jgit.transport;version="[3.6.0,3.7.0)",
org.eclipse.jgit.util;version="[3.6.0,3.7.0)"
Export-Package: org.eclipse.jgit.awtui;version="3.6.1"
Import-Package: org.eclipse.jgit.errors;version="[3.6.1,3.7.0)",
org.eclipse.jgit.lib;version="[3.6.1,3.7.0)",
org.eclipse.jgit.nls;version="[3.6.1,3.7.0)",
org.eclipse.jgit.revplot;version="[3.6.1,3.7.0)",
org.eclipse.jgit.revwalk;version="[3.6.1,3.7.0)",
org.eclipse.jgit.transport;version="[3.6.1,3.7.0)",
org.eclipse.jgit.util;version="[3.6.1,3.7.0)"

2
org.eclipse.jgit.ui/pom.xml

@ -52,7 +52,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.ui</artifactId>

70
org.eclipse.jgit/META-INF/MANIFEST.MF

@ -2,10 +2,10 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Bundle-SymbolicName: org.eclipse.jgit
Bundle-Version: 3.6.0.qualifier
Bundle-Version: 3.6.1.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %provider_name
Export-Package: org.eclipse.jgit.api;version="3.6.0";
Export-Package: org.eclipse.jgit.api;version="3.6.1";
uses:="org.eclipse.jgit.revwalk,
org.eclipse.jgit.treewalk.filter,
org.eclipse.jgit.diff,
@ -18,50 +18,50 @@ Export-Package: org.eclipse.jgit.api;version="3.6.0";
org.eclipse.jgit.blame,
org.eclipse.jgit.transport,
org.eclipse.jgit.merge",
org.eclipse.jgit.api.errors;version="3.6.0";
org.eclipse.jgit.api.errors;version="3.6.1";
uses:="org.eclipse.jgit.lib,org.eclipse.jgit.errors",
org.eclipse.jgit.blame;version="3.6.0";
org.eclipse.jgit.blame;version="3.6.1";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.revwalk,
org.eclipse.jgit.treewalk.filter,
org.eclipse.jgit.diff",
org.eclipse.jgit.diff;version="3.6.0";
org.eclipse.jgit.diff;version="3.6.1";
uses:="org.eclipse.jgit.patch,
org.eclipse.jgit.lib,
org.eclipse.jgit.treewalk,
org.eclipse.jgit.revwalk,
org.eclipse.jgit.treewalk.filter,
org.eclipse.jgit.util",
org.eclipse.jgit.dircache;version="3.6.0";
org.eclipse.jgit.dircache;version="3.6.1";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.treewalk,
org.eclipse.jgit.util,
org.eclipse.jgit.events",
org.eclipse.jgit.errors;version="3.6.0";
org.eclipse.jgit.errors;version="3.6.1";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.internal.storage.pack,
org.eclipse.jgit.transport,
org.eclipse.jgit.dircache",
org.eclipse.jgit.events;version="3.6.0";
org.eclipse.jgit.events;version="3.6.1";
uses:="org.eclipse.jgit.lib",
org.eclipse.jgit.fnmatch;version="3.6.0",
org.eclipse.jgit.gitrepo;version="3.6.0";
org.eclipse.jgit.fnmatch;version="3.6.1",
org.eclipse.jgit.gitrepo;version="3.6.1";
uses:="org.eclipse.jgit.api,
org.eclipse.jgit.lib",
org.eclipse.jgit.gitrepo.internal;version="3.6.0";x-internal:=true,
org.eclipse.jgit.ignore;version="3.6.0",
org.eclipse.jgit.ignore.internal;version="3.6.0";x-friends:="org.eclipse.jgit.test",
org.eclipse.jgit.internal;version="3.6.0";x-friends:="org.eclipse.jgit.test,org.eclipse.jgit.http.test",
org.eclipse.jgit.internal.storage.dfs;version="3.6.0";x-friends:="org.eclipse.jgit.test",
org.eclipse.jgit.internal.storage.file;version="3.6.0";
org.eclipse.jgit.gitrepo.internal;version="3.6.1";x-internal:=true,
org.eclipse.jgit.ignore;version="3.6.1",
org.eclipse.jgit.ignore.internal;version="3.6.1";x-friends:="org.eclipse.jgit.test",
org.eclipse.jgit.internal;version="3.6.1";x-friends:="org.eclipse.jgit.test,org.eclipse.jgit.http.test",
org.eclipse.jgit.internal.storage.dfs;version="3.6.1";x-friends:="org.eclipse.jgit.test",
org.eclipse.jgit.internal.storage.file;version="3.6.1";
x-friends:="org.eclipse.jgit.test,
org.eclipse.jgit.junit,
org.eclipse.jgit.junit.http,
org.eclipse.jgit.http.server,
org.eclipse.jgit.java7.test,
org.eclipse.jgit.pgm",
org.eclipse.jgit.internal.storage.pack;version="3.6.0";x-friends:="org.eclipse.jgit.junit,org.eclipse.jgit.test,org.eclipse.jgit.pgm",
org.eclipse.jgit.lib;version="3.6.0";
org.eclipse.jgit.internal.storage.pack;version="3.6.1";x-friends:="org.eclipse.jgit.junit,org.eclipse.jgit.test,org.eclipse.jgit.pgm",
org.eclipse.jgit.lib;version="3.6.1";
uses:="org.eclipse.jgit.revwalk,
org.eclipse.jgit.treewalk.filter,
org.eclipse.jgit.util,
@ -70,37 +70,37 @@ Export-Package: org.eclipse.jgit.api;version="3.6.0";
org.eclipse.jgit.internal.storage.file,
org.eclipse.jgit.treewalk,
org.eclipse.jgit.transport",
org.eclipse.jgit.merge;version="3.6.0";
org.eclipse.jgit.merge;version="3.6.1";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.treewalk,
org.eclipse.jgit.revwalk,
org.eclipse.jgit.diff,
org.eclipse.jgit.dircache",
org.eclipse.jgit.nls;version="3.6.0",
org.eclipse.jgit.notes;version="3.6.0";
org.eclipse.jgit.nls;version="3.6.1",
org.eclipse.jgit.notes;version="3.6.1";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.treewalk,
org.eclipse.jgit.revwalk,
org.eclipse.jgit.merge",
org.eclipse.jgit.patch;version="3.6.0";
org.eclipse.jgit.patch;version="3.6.1";
uses:="org.eclipse.jgit.lib,org.eclipse.jgit.diff",
org.eclipse.jgit.revplot;version="3.6.0";
org.eclipse.jgit.revplot;version="3.6.1";
uses:="org.eclipse.jgit.lib,org.eclipse.jgit.revwalk",
org.eclipse.jgit.revwalk;version="3.6.0";
org.eclipse.jgit.revwalk;version="3.6.1";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.treewalk,
org.eclipse.jgit.treewalk.filter,
org.eclipse.jgit.diff,
org.eclipse.jgit.revwalk.filter",
org.eclipse.jgit.revwalk.filter;version="3.6.0";
org.eclipse.jgit.revwalk.filter;version="3.6.1";
uses:="org.eclipse.jgit.revwalk,org.eclipse.jgit.util",
org.eclipse.jgit.storage.file;version="3.6.0";
org.eclipse.jgit.storage.file;version="3.6.1";
uses:="org.eclipse.jgit.lib,org.eclipse.jgit.util",
org.eclipse.jgit.storage.pack;version="3.6.0";
org.eclipse.jgit.storage.pack;version="3.6.1";
uses:="org.eclipse.jgit.lib",
org.eclipse.jgit.submodule;version="3.6.0";
org.eclipse.jgit.submodule;version="3.6.1";
uses:="org.eclipse.jgit.lib,org.eclipse.jgit.treewalk,org.eclipse.jgit.treewalk.filter",
org.eclipse.jgit.transport;version="3.6.0";
org.eclipse.jgit.transport;version="3.6.1";
uses:="org.eclipse.jgit.transport.resolver,
org.eclipse.jgit.revwalk,
org.eclipse.jgit.internal.storage.pack,
@ -112,21 +112,21 @@ Export-Package: org.eclipse.jgit.api;version="3.6.0";
org.eclipse.jgit.transport.http,
org.eclipse.jgit.errors,
org.eclipse.jgit.storage.pack",
org.eclipse.jgit.transport.http;version="3.6.0";
org.eclipse.jgit.transport.http;version="3.6.1";
uses:="javax.net.ssl",
org.eclipse.jgit.transport.resolver;version="3.6.0";
org.eclipse.jgit.transport.resolver;version="3.6.1";
uses:="org.eclipse.jgit.lib,org.eclipse.jgit.transport",
org.eclipse.jgit.treewalk;version="3.6.0";
org.eclipse.jgit.treewalk;version="3.6.1";
uses:="org.eclipse.jgit.lib,
org.eclipse.jgit.revwalk,
org.eclipse.jgit.treewalk.filter,
org.eclipse.jgit.util,
org.eclipse.jgit.dircache",
org.eclipse.jgit.treewalk.filter;version="3.6.0";
org.eclipse.jgit.treewalk.filter;version="3.6.1";
uses:="org.eclipse.jgit.treewalk",
org.eclipse.jgit.util;version="3.6.0";
org.eclipse.jgit.util;version="3.6.1";
uses:="org.eclipse.jgit.lib,org.eclipse.jgit.transport.http,org.eclipse.jgit.storage.file",
org.eclipse.jgit.util.io;version="3.6.0"
org.eclipse.jgit.util.io;version="3.6.1"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: com.jcraft.jsch;bundle-version="[0.1.37,0.2.0)"

4
org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF

@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit - Sources
Bundle-SymbolicName: org.eclipse.jgit.source
Bundle-Vendor: Eclipse.org - JGit
Bundle-Version: 3.6.0.qualifier
Eclipse-SourceBundle: org.eclipse.jgit;version="3.6.0.qualifier";roots="."
Bundle-Version: 3.6.1.qualifier
Eclipse-SourceBundle: org.eclipse.jgit;version="3.6.1.qualifier";roots="."

2
org.eclipse.jgit/pom.xml

@ -53,7 +53,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit</artifactId>

18
org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java

@ -163,11 +163,19 @@ public abstract class SystemReader {
private void init() {
// Creating ObjectChecker must be deferred. Unit tests change
// behavior of is{Windows,MacOS} in constructor of subclass.
if (platformChecker == null) {
platformChecker = new ObjectChecker()
.setSafeForWindows(isWindows())
.setSafeForMacOS(isMacOS());
}
if (platformChecker == null)
setPlatformChecker();
}
/**
* Should be used in tests when the platform is explicitly changed.
*
* @since 3.6
*/
protected final void setPlatformChecker() {
platformChecker = new ObjectChecker()
.setSafeForWindows(isWindows())
.setSafeForMacOS(isMacOS());
}
/**

2
pom.xml

@ -51,7 +51,7 @@
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
<packaging>pom</packaging>
<version>3.6.0-SNAPSHOT</version>
<version>3.6.1-SNAPSHOT</version>
<name>JGit - Parent</name>
<url>${jgit-url}</url>

Loading…
Cancel
Save