diff options
190 files changed, 3448 insertions, 865 deletions
diff --git a/.bazelversion b/.bazelversion index 1545d96657..8faff82c7b 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -3.5.0 +4.0.0rc2 diff --git a/Documentation/config-options.md b/Documentation/config-options.md index 94ef5b9556..d463551762 100644 --- a/Documentation/config-options.md +++ b/Documentation/config-options.md @@ -11,15 +11,47 @@ | option | default | git option | description | |---------|---------|------------|-------------| -| `core.bigFileThreshold` | `52428800` (50 MiB) | ✅ | Maximum file size that will be delta compressed. Files larger than this size are stored deflated, without attempting delta compression. | -| `core.compression` | `-1` (default compression) | ✅ | An integer -1..9, indicating a default compression level. -1 is the zlib default. 0 means no compression, and 1..9 are various speed/size tradeoffs, 9 being slowest.| +| `core.attributesFile` | | ✅ | In addition to `.gitattributes` (per-directory) and `.git/info/attributes`, Git looks into this file for attributes . Path expansions are made the same way as for `core.excludesFile`. | +| `core.autocrlf` | `false` | ✅ | Setting this variable to `true` is the same as setting the text attribute to `auto` on all files and `core.eol` to `crlf`. Set to `true` if you want to have CRLF line endings in your working directory and the repository has LF line endings. This variable can be set to `input`, in which case no output conversion is performed. | +| `core.bare` | set automatically on init or clone | ✅ | If true this repository is assumed to be bare and has no working directory associated with it. If this is the case a number of commands that require a working directory will be disabled | +| `core.bigFileThreshold` | `50 MiB` | ✅ | Files larger than this size are stored deflated, without attempting delta compression. Storing large files without delta compression avoids excessive memory usage, at the slight expense of increased disk usage. Additionally files larger than this size are always treated as binary. | +| `core.checkstat` | | ✅ | When missing or is set to `default`, many fields in the stat structure are checked to detect if a file has been modified since Git looked at it. Checks as much of the dircache stat info as possible (in JGit limited by Java filesystem API). When set to `minimum` only checks the size and whole second part of time stamp when comparing the stat info in the dircache with actual file stat info. | +| `core.compression` | `-1` (zlib default) | ✅ | An integer `-1..9`, indicating a default compression level. `-1` is the zlib default. `0` means no compression, and `1..9` are various speed/size tradeoffs, `9` being slowest.| +| `core.deltaBaseCacheLimit` | `10 MiB` | ✅ | Maximum number of bytes to reserve for caching base objects that multiple deltafied objects reference. By storing the entire decompressed base object in a cache Git is able to avoid unpacking and decompressing frequently used base objects multiple times. | +| `core.dfs.blockLimit` | `30 MiB` | ⃞ | Maximum number bytes of heap memory to dedicate to caching pack file data in DFS block cache. | +| `core.dfs.blockSize` | `64 kiB` | ⃞ | Size in bytes of a single window read in from the pack file into the DFS block cache. | +| `core.dfs.concurrencyLevel` | `32` | ⃞ | The estimated number of threads concurrently accessing the DFS block cache. | +| `core.dfs.deltaBaseCacheLimit` | `10 MiB` | ⃞ | Maximum number of bytes to hold in per-reader DFS delta base cache. | +| `core.dfs.streamFileThreshold` | `50 MiB` | ⃞ | The size threshold beyond which objects must be streamed. | +| `core.dfs.streamBuffer` | Block size of the pack | ⃞ | Number of bytes to use for buffering when streaming a pack file during copying. If 0 the block size of the pack is used| +| `core.dfs.streamRatio` | `0.30` | ⃞ | Ratio of DFS block cache to occupy with a copied pack. Values between `0` and `1.0`. | +| `core.dirNoGitLinks` | `false` | ⃞ | If set to `true` avoid checking for submodules. See [bug 436200](https://bugs.eclipse.org/bugs/show_bug.cgi?id=436200). | +| `core.eol` | `native` | ✅ | Sets the line ending type to use in the working directory for files that are marked as text (either by having the text attribute set, or by having `text=auto` and Git auto-detecting the contents as text). Alternatives are `lf`, `crlf` and `native`, which uses the platform’s native line ending. | +| `core.excludesFile` | | ✅ | Specifies the pathname to the file that contains patterns to describe paths that are not meant to be tracked, in addition to `.gitignore` (per-directory) and `.git/info/exclude`. | +| `core.fileMode` | Auto detects if file modes are supported | ✅ | Tells Git if the executable bit of files in the working tree is to be honored. | +| `core.hideDotFiles` | `dotGitOnly` | ✅ | Windows only. If `true`, mark newly-created directories and files whose name starts with a dot as hidden. If `dotGitOnly`, only the `.git/` directory is hidden, but no other files starting with a dot. | +| `core.hooksPath` | `$GIT_DIR/hooks` | ✅ | Path to look for hooks. | +| `core.logAllRefUpdates` | `true` in a repository with working tree, `false` in bare repository | ✅ | Enable the reflog. | +| `core.packedGitLimit` | `10 MiB` | ✅ | Maximum number of bytes to cache in memory from pack files. | +| `core.packedGitMmap` | `false` | ✅ | Whether to use Java NIO virtual memory mapping for JGit buffer cache. When set to `true` enables use of Java NIO virtual memory mapping for cache windows, `false` reads entire window into a `byte[]` with standard read calls. `true` is experimental and may cause instabilities and crashes since Java doesn't support explicit unmapping of file regions mapped to virtual memory. | +| `core.packedGitOpenFiles` | `128` | ⃞ | Maximum number of streams to open at a time. Open packs count against the process limits. | +| `core.packedGitUseStrongRefs` | `false` | ⃞ | Whether the window cache should use strong references (`true`) or SoftReferences (`false`). When `false` the JVM will drop data cached in the JGit block cache when heap usage comes close to the maximum heap size. | +| `core.packedGitWindowSize` | `8 kiB` | ✅ | Number of bytes of a pack file to load into memory in a single read operation. This is the "page size" of the JGit buffer cache, used for all pack access operations. All disk IO occurs as single window reads. Setting this too large may cause the process to load more data than is required; setting this too small may increase the frequency of read() system calls. | +| `core.precomposeUnicode` | `true` on Mac OS | ✅ | MacOS only. When `true`, JGit reverts the unicode decomposition of filenames done by Mac OS. | +| `core.quotePath` | `true` | ✅ | Commands that output paths (e.g. ls-files, diff), will quote "unusual" characters in the pathname by enclosing the pathname in double-quotes and escaping those characters with backslashes in the same way C escapes control characters (e.g. `\t` for TAB, `\n` for LF, `\\` for backslash) or bytes with values larger than `0x80` (e.g. octal `\302\265` for "micro" in UTF-8). | +| `core.repositoryFormatVersion` | `1` | ⃞ | Internal version identifying the repository format and layout version. Don't set manually. | +| `core.streamFileThreshold` | `50 MiB` | ⃞ | The size threshold beyond which objects must be streamed. | +| `core.supportsAtomicFileCreation` | `true` | ⃞ | Whether the filesystem supports atomic file creation. | +| `core.symlinks` | Auto detect if filesystem supports symlinks| ✅ | If false, symbolic links are checked out as small plain files that contain the link text. | +| `core.trustFolderStat` | `true` | ⃞ | Whether to trust the pack folder's modification time. If `false` JGit will always scan the `.git/objects/pack` folder to check for new pack files. This can help to workaround caching issues on NFS, but reduces performance. If set to `true` it uses the `lastmodified` attribute of the folder and assumes that no new pack files can be in this folder if its modification time has not changed. | +| `core.worktree` | Root directory of the working tree if it is not the parent directory of the `.git` directory | ✅ | The path to the root of the working tree. | ## __gc__ options | option | default | git option | description | |---------|---------|------------|-------------| -| `gc.aggressiveDepth` | 50 | ✅ | The depth parameter used in the delta compression algorithm used by aggressive garbage collection. | -| `gc.aggressiveWindow` | 250 | ✅ | The window size parameter used in the delta compression algorithm used by aggressive garbage collection. | +| `gc.aggressiveDepth` | `50` | ✅ | The depth parameter used in the delta compression algorithm used by aggressive garbage collection. | +| `gc.aggressiveWindow` | `250` | ✅ | The window size parameter used in the delta compression algorithm used by aggressive garbage collection. | | `gc.auto` | `6700` | ✅ | Number of loose objects until auto gc combines all loose objects into a pack and consolidates all existing packs into one. Setting to 0 disables automatic packing of loose objects. | | `gc.autoDetach` | `true` | ✅ | Make auto gc return immediately and run in background. | | `gc.autoPackLimit` | `50` | ✅ | Number of packs until auto gc consolidates existing packs (except those marked with a .keep file) into a single pack. Setting `gc.autoPackLimit` to 0 disables automatic consolidation of packs. | @@ -41,11 +73,11 @@ | `pack.compression` | `core.compression` | ✅ | Compression level applied to objects in the pack. | | `pack.cutDeltaChains` | `false` | ⃞ | Whether existing delta chains should be cut at {@link #getMaxDeltaDepth() | | `pack.deltaCacheLimit` | `100` | ✅ | Maximum size in bytes of a delta to cache. | -| `pack.deltaCacheSize` | `52428800` (50 MiB) | ✅ | Size of the in-memory delta cache. | +| `pack.deltaCacheSize` | `50 MiB` | ✅ | Size of the in-memory delta cache. | | `pack.deltaCompression` | `true` | ⃞ | Whether the writer will create new deltas on the fly. `true` if the pack writer will create a new delta when either `pack.reuseDeltas` is false, or no suitable delta is available for reuse. | | `pack.depth` | `50` | ✅ | Maximum depth of delta chain set up for the pack writer. | | `pack.indexVersion` | `2` | ✅ | Pack index file format version. | -| `pack.minSizePreventRacyPack` | `104857600` (100 MiB) | ⃞ | Minimum packfile size for which we wait before opening a newly written pack to prevent its lastModified timestamp could be racy if `pack.waitPreventRacyPack` is `true`. | +| `pack.minSizePreventRacyPack` | `100 MiB` | ⃞ | Minimum packfile size for which we wait before opening a newly written pack to prevent its lastModified timestamp could be racy if `pack.waitPreventRacyPack` is `true`. | | `pack.preserveOldPacks` | `false` | ⃞ | Whether to preserve old packs in a preserved directory. | | `prunePreserved`, only via API of PackConfig | `false` | ⃞ | Whether to remove preserved pack files in a preserved directory. | | `pack.reuseDeltas` | `true` |⃞ | Whether to reuse deltas existing in repository. | @@ -27,6 +27,34 @@ load( "maven_jar", ) +http_archive( + name = "openjdk15_linux_archive", + build_file_content = """ +java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public']) +exports_files(["WORKSPACE"], visibility = ["//visibility:public"]) +""", + sha256 = "0a38f1138c15a4f243b75eb82f8ef40855afcc402e3c2a6de97ce8235011b1ad", + strip_prefix = "zulu15.27.17-ca-jdk15.0.0-linux_x64", + urls = [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-linux_x64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-linux_x64.tar.gz", + ], +) + +http_archive( + name = "openjdk15_darwin_archive", + build_file_content = """ +java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public']) +exports_files(["WORKSPACE"], visibility = ["//visibility:public"]) +""", + sha256 = "f80b2e0512d9d8a92be24497334c974bfecc8c898fc215ce0e76594f00437482", + strip_prefix = "zulu15.27.17-ca-jdk15.0.0-macosx_x64", + urls = [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-macosx_x64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-macosx_x64.tar.gz", + ], +) + JMH_VERS = "1.21" maven_jar( @@ -119,14 +147,14 @@ maven_jar( maven_jar( name = "log-api", - artifact = "org.slf4j:slf4j-api:1.7.2", - sha1 = "0081d61b7f33ebeab314e07de0cc596f8e858d97", + artifact = "org.slf4j:slf4j-api:1.7.30", + sha1 = "b5a4b6d16ab13e34a88fae84c35cd5d68cac922c", ) maven_jar( name = "slf4j-simple", - artifact = "org.slf4j:slf4j-simple:1.7.2", - sha1 = "760055906d7353ba4f7ce1b8908bc6b2e91f39fa", + artifact = "org.slf4j:slf4j-simple:1.7.30", + sha1 = "e606eac955f55ecf1d8edcccba04eb8ac98088dd", ) maven_jar( diff --git a/org.eclipse.jgit.ant.test/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.ant.test/.settings/org.eclipse.jdt.core.prefs index 3dd5840397..b853c6a7ed 100644 --- a/org.eclipse.jgit.ant.test/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.ant.test/.settings/org.eclipse.jdt.core.prefs @@ -51,8 +51,8 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=no_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF index d660518ff5..0147f22fc7 100644 --- a/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF @@ -5,13 +5,13 @@ Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.ant.test Bundle-SymbolicName: org.eclipse.jgit.ant.test Bundle-Vendor: %Bundle-Vendor -Bundle-Version: 5.9.1.qualifier +Bundle-Version: 5.10.0.qualifier Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Import-Package: org.apache.tools.ant, - org.eclipse.jgit.ant.tasks;version="[5.9.1,5.10.0)", - org.eclipse.jgit.junit;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lib;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util;version="[5.9.1,5.10.0)", + org.eclipse.jgit.ant.tasks;version="[5.10.0,5.11.0)", + org.eclipse.jgit.junit;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lib;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util;version="[5.10.0,5.11.0)", org.hamcrest.core;version="[1.1.0,2.0.0)", org.junit;version="[4.13,5.0.0)" diff --git a/org.eclipse.jgit.ant.test/pom.xml b/org.eclipse.jgit.ant.test/pom.xml index d2dd5a1922..dc76aa2248 100644 --- a/org.eclipse.jgit.ant.test/pom.xml +++ b/org.eclipse.jgit.ant.test/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.ant.test</artifactId> diff --git a/org.eclipse.jgit.ant/META-INF/MANIFEST.MF b/org.eclipse.jgit.ant/META-INF/MANIFEST.MF index bd021e962d..e26c2c8192 100644 --- a/org.eclipse.jgit.ant/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ant/META-INF/MANIFEST.MF @@ -3,13 +3,13 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.ant Bundle-SymbolicName: org.eclipse.jgit.ant -Bundle-Version: 5.9.1.qualifier +Bundle-Version: 5.10.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Import-Package: org.apache.tools.ant, - org.eclipse.jgit.storage.file;version="[5.9.1,5.10.0)" + org.eclipse.jgit.storage.file;version="[5.10.0,5.11.0)" Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor -Export-Package: org.eclipse.jgit.ant;version="5.9.1", - org.eclipse.jgit.ant.tasks;version="5.9.1"; +Export-Package: org.eclipse.jgit.ant;version="5.10.0", + org.eclipse.jgit.ant.tasks;version="5.10.0"; uses:="org.apache.tools.ant, org.apache.tools.ant.types" diff --git a/org.eclipse.jgit.ant/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.ant/META-INF/SOURCE-MANIFEST.MF index d10feaade6..ea0fd23854 100644 --- a/org.eclipse.jgit.ant/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.ant/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.ant - Sources Bundle-SymbolicName: org.eclipse.jgit.ant.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 5.9.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.ant;version="5.9.1.qualifier";roots="." +Bundle-Version: 5.10.0.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.ant;version="5.10.0.qualifier";roots="." diff --git a/org.eclipse.jgit.ant/pom.xml b/org.eclipse.jgit.ant/pom.xml index 342e84dd0a..042030b8fe 100644 --- a/org.eclipse.jgit.ant/pom.xml +++ b/org.eclipse.jgit.ant/pom.xml @@ -15,7 +15,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.ant</artifactId> diff --git a/org.eclipse.jgit.archive/META-INF/MANIFEST.MF b/org.eclipse.jgit.archive/META-INF/MANIFEST.MF index 96be945302..a9e6d0a0dc 100644 --- a/org.eclipse.jgit.archive/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.archive/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.archive Bundle-SymbolicName: org.eclipse.jgit.archive -Bundle-Version: 5.9.1.qualifier +Bundle-Version: 5.10.0.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-1.8 @@ -13,17 +13,17 @@ 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="[5.9.1,5.10.0)", - org.eclipse.jgit.lib;version="[5.9.1,5.10.0)", - org.eclipse.jgit.nls;version="[5.9.1,5.10.0)", - org.eclipse.jgit.revwalk;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util;version="[5.9.1,5.10.0)", + org.eclipse.jgit.api;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lib;version="[5.10.0,5.11.0)", + org.eclipse.jgit.nls;version="[5.10.0,5.11.0)", + org.eclipse.jgit.revwalk;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util;version="[5.10.0,5.11.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="5.9.1"; +Export-Package: org.eclipse.jgit.archive;version="5.10.0"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.api, org.apache.commons.compress.archivers, org.osgi.framework", - org.eclipse.jgit.archive.internal;version="5.9.1";x-internal:=true + org.eclipse.jgit.archive.internal;version="5.10.0";x-internal:=true diff --git a/org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF index aa31f3215d..93f614fe3e 100644 --- a/org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF +++ b/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: 5.9.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.archive;version="5.9.1.qualifier";roots="." +Bundle-Version: 5.10.0.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.archive;version="5.10.0.qualifier";roots="." diff --git a/org.eclipse.jgit.archive/pom.xml b/org.eclipse.jgit.archive/pom.xml index 1277f452f2..076c693014 100644 --- a/org.eclipse.jgit.archive/pom.xml +++ b/org.eclipse.jgit.archive/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.archive</artifactId> diff --git a/org.eclipse.jgit.benchmarks/pom.xml b/org.eclipse.jgit.benchmarks/pom.xml index e4d8703e08..9910e833ec 100644 --- a/org.eclipse.jgit.benchmarks/pom.xml +++ b/org.eclipse.jgit.benchmarks/pom.xml @@ -14,7 +14,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.eclipse.jgit</groupId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> <artifactId>org.eclipse.jgit.benchmarks</artifactId> <packaging>jar</packaging> @@ -179,7 +179,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-project-info-reports-plugin</artifactId> - <version>3.0.0</version> + <version>3.1.1</version> </plugin> </plugins> </pluginManagement> diff --git a/org.eclipse.jgit.coverage/pom.xml b/org.eclipse.jgit.coverage/pom.xml index 14a22f553e..db9c735a9f 100644 --- a/org.eclipse.jgit.coverage/pom.xml +++ b/org.eclipse.jgit.coverage/pom.xml @@ -14,7 +14,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> @@ -27,88 +27,88 @@ <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.ant</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.archive</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.http.apache</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.http.server</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.lfs</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.lfs.server</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.pgm</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.ui</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.ssh.apache</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.test</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.ant.test</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.http.test</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.pgm.test</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.lfs.test</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.lfs.server.test</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.ssh.apache.test</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </dependency> </dependencies> diff --git a/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.jdt.core.prefs index 822846c4d0..cba893f04e 100644 --- a/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.jdt.core.prefs @@ -51,8 +51,8 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=no_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF index 22ff017adb..02dbf8e951 100644 --- a/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF @@ -3,11 +3,11 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.gpg.bc.test Bundle-SymbolicName: org.eclipse.jgit.gpg.bc.test -Bundle-Version: 5.9.1.qualifier +Bundle-Version: 5.10.0.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Import-Package: org.eclipse.jgit.gpg.bc.internal;version="[5.9.1,5.10.0)", +Import-Package: org.eclipse.jgit.gpg.bc.internal;version="[5.10.0,5.11.0)", org.junit;version="[4.13,5.0.0)" Export-Package: org.eclipse.jgit.gpg.bc.internal;x-internal:=true Require-Bundle: org.hamcrest.core;bundle-version="[1.1.0,2.0.0)", diff --git a/org.eclipse.jgit.gpg.bc.test/pom.xml b/org.eclipse.jgit.gpg.bc.test/pom.xml index 780a273193..e0ee7f90dd 100644 --- a/org.eclipse.jgit.gpg.bc.test/pom.xml +++ b/org.eclipse.jgit.gpg.bc.test/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.gpg.bc.test</artifactId> diff --git a/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF b/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF index 544cf6fb43..e4bca93d45 100644 --- a/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF @@ -3,10 +3,10 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.gpg.bc Bundle-SymbolicName: org.eclipse.jgit.gpg.bc;singleton:=true -Fragment-Host: org.eclipse.jgit;bundle-version="[5.9.1,5.10.0)" +Fragment-Host: org.eclipse.jgit;bundle-version="[5.10.0,5.11.0)" Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin -Bundle-Version: 5.9.1.qualifier +Bundle-Version: 5.10.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Import-Package: org.bouncycastle.bcpg;version="[1.65.0,2.0.0)", org.bouncycastle.gpg;version="[1.65.0,2.0.0)", @@ -17,13 +17,13 @@ Import-Package: org.bouncycastle.bcpg;version="[1.65.0,2.0.0)", org.bouncycastle.openpgp.operator;version="[1.65.0,2.0.0)", org.bouncycastle.openpgp.operator.jcajce;version="[1.65.0,2.0.0)", org.bouncycastle.util.encoders;version="[1.65.0,2.0.0)", - org.eclipse.jgit.annotations;version="[5.9.1,5.10.0)", - org.eclipse.jgit.api.errors;version="[5.9.1,5.10.0)", - org.eclipse.jgit.errors;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lib;version="[5.9.1,5.10.0)", - org.eclipse.jgit.nls;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util;version="[5.9.1,5.10.0)", + org.eclipse.jgit.annotations;version="[5.10.0,5.11.0)", + org.eclipse.jgit.api.errors;version="[5.10.0,5.11.0)", + org.eclipse.jgit.errors;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lib;version="[5.10.0,5.11.0)", + org.eclipse.jgit.nls;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util;version="[5.10.0,5.11.0)", org.slf4j;version="[1.7.0,2.0.0)" -Export-Package: org.eclipse.jgit.gpg.bc.internal;version="5.9.1"; +Export-Package: org.eclipse.jgit.gpg.bc.internal;version="5.10.0"; x-friends:="org.eclipse.jgit.gpg.bc.test" diff --git a/org.eclipse.jgit.gpg.bc/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.gpg.bc/META-INF/SOURCE-MANIFEST.MF index 5a44e2a0f5..e504a8c729 100644 --- a/org.eclipse.jgit.gpg.bc/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.gpg.bc/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.gpg.bc - Sources Bundle-SymbolicName: org.eclipse.jgit.gpg.bc.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 5.9.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.gpg.bc;version="5.9.1.qualifier";roots="." +Bundle-Version: 5.10.0.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.gpg.bc;version="5.10.0.qualifier";roots="." diff --git a/org.eclipse.jgit.gpg.bc/pom.xml b/org.eclipse.jgit.gpg.bc/pom.xml index 9b09db5507..8da8d39ce6 100644 --- a/org.eclipse.jgit.gpg.bc/pom.xml +++ b/org.eclipse.jgit.gpg.bc/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.gpg.bc</artifactId> diff --git a/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF index 944d27aaa2..ead8e9c0c3 100644 --- a/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.http.apache Bundle-SymbolicName: org.eclipse.jgit.http.apache -Bundle-Version: 5.9.1.qualifier +Bundle-Version: 5.10.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor @@ -25,11 +25,11 @@ Import-Package: org.apache.http;version="[4.3.0,5.0.0)", org.apache.http.impl.conn;version="[4.3.0,5.0.0)", org.apache.http.params;version="[4.3.0,5.0.0)", org.apache.http.ssl;version="[4.3.0,5.0.0)", - org.eclipse.jgit.annotations;version="[5.9.1,5.10.0)", - org.eclipse.jgit.nls;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport.http;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util;version="[5.9.1,5.10.0)" -Export-Package: org.eclipse.jgit.transport.http.apache;version="5.9.1"; + org.eclipse.jgit.annotations;version="[5.10.0,5.11.0)", + org.eclipse.jgit.nls;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport.http;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util;version="[5.10.0,5.11.0)" +Export-Package: org.eclipse.jgit.transport.http.apache;version="5.10.0"; uses:="org.apache.http.client, org.eclipse.jgit.transport.http, org.apache.http.entity, diff --git a/org.eclipse.jgit.http.apache/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.http.apache/META-INF/SOURCE-MANIFEST.MF index 1569ae754b..577d5065b4 100644 --- a/org.eclipse.jgit.http.apache/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.http.apache/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.http.apache - Sources Bundle-SymbolicName: org.eclipse.jgit.http.apache.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 5.9.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.http.apache;version="5.9.1.qualifier";roots="." +Bundle-Version: 5.10.0.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.http.apache;version="5.10.0.qualifier";roots="." diff --git a/org.eclipse.jgit.http.apache/pom.xml b/org.eclipse.jgit.http.apache/pom.xml index 26d0eae4b2..e6761c4ffa 100644 --- a/org.eclipse.jgit.http.apache/pom.xml +++ b/org.eclipse.jgit.http.apache/pom.xml @@ -15,7 +15,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.http.apache</artifactId> diff --git a/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF index c966c4580b..9dcc3efc3b 100644 --- a/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF @@ -3,13 +3,13 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.http.server Bundle-SymbolicName: org.eclipse.jgit.http.server -Bundle-Version: 5.9.1.qualifier +Bundle-Version: 5.10.0.qualifier Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor -Export-Package: org.eclipse.jgit.http.server;version="5.9.1", - org.eclipse.jgit.http.server.glue;version="5.9.1"; +Export-Package: org.eclipse.jgit.http.server;version="5.10.0", + org.eclipse.jgit.http.server.glue;version="5.10.0"; uses:="javax.servlet,javax.servlet.http", - org.eclipse.jgit.http.server.resolver;version="5.9.1"; + org.eclipse.jgit.http.server.resolver;version="5.10.0"; uses:="org.eclipse.jgit.transport.resolver, org.eclipse.jgit.lib, org.eclipse.jgit.transport, @@ -18,14 +18,14 @@ Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Import-Package: javax.servlet;version="[2.5.0,3.2.0)", javax.servlet.http;version="[2.5.0,3.2.0)", - org.eclipse.jgit.annotations;version="[5.9.1,5.10.0)", - org.eclipse.jgit.errors;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.storage.dfs;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.storage.file;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.transport.parser;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lib;version="[5.9.1,5.10.0)", - org.eclipse.jgit.nls;version="[5.9.1,5.10.0)", - org.eclipse.jgit.revwalk;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport.resolver;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util;version="[5.9.1,5.10.0)" + org.eclipse.jgit.annotations;version="[5.10.0,5.11.0)", + org.eclipse.jgit.errors;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.storage.dfs;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.storage.file;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.transport.parser;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lib;version="[5.10.0,5.11.0)", + org.eclipse.jgit.nls;version="[5.10.0,5.11.0)", + org.eclipse.jgit.revwalk;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport.resolver;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util;version="[5.10.0,5.11.0)" diff --git a/org.eclipse.jgit.http.server/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.http.server/META-INF/SOURCE-MANIFEST.MF index bdbbf89748..82fb3a90a2 100644 --- a/org.eclipse.jgit.http.server/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.http.server/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.http.server - Sources Bundle-SymbolicName: org.eclipse.jgit.http.server.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 5.9.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.http.server;version="5.9.1.qualifier";roots="." +Bundle-Version: 5.10.0.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.http.server;version="5.10.0.qualifier";roots="." diff --git a/org.eclipse.jgit.http.server/pom.xml b/org.eclipse.jgit.http.server/pom.xml index 572fd4b9e8..929eba660f 100644 --- a/org.eclipse.jgit.http.server/pom.xml +++ b/org.eclipse.jgit.http.server/pom.xml @@ -19,7 +19,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.http.server</artifactId> diff --git a/org.eclipse.jgit.http.test/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.http.test/.settings/org.eclipse.jdt.core.prefs index 3dd5840397..b853c6a7ed 100644 --- a/org.eclipse.jgit.http.test/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.http.test/.settings/org.eclipse.jdt.core.prefs @@ -51,8 +51,8 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=no_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF index 52e4bed276..b5dc5801e2 100644 --- a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.http.test Bundle-SymbolicName: org.eclipse.jgit.http.test -Bundle-Version: 5.9.1.qualifier +Bundle-Version: 5.10.0.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-1.8 @@ -28,25 +28,25 @@ Import-Package: javax.servlet;version="[2.5.0,3.2.0)", org.eclipse.jetty.util.log;version="[9.4.5,10.0.0)", org.eclipse.jetty.util.security;version="[9.4.5,10.0.0)", org.eclipse.jetty.util.thread;version="[9.4.5,10.0.0)", - org.eclipse.jgit.errors;version="[5.9.1,5.10.0)", - org.eclipse.jgit.http.server;version="[5.9.1,5.10.0)", - org.eclipse.jgit.http.server.glue;version="[5.9.1,5.10.0)", - org.eclipse.jgit.http.server.resolver;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.storage.dfs;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.storage.file;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.storage.reftable;version="[5.9.1,5.10.0)", - org.eclipse.jgit.junit;version="[5.9.1,5.10.0)", - org.eclipse.jgit.junit.http;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lib;version="[5.9.1,5.10.0)", - org.eclipse.jgit.nls;version="[5.9.1,5.10.0)", - org.eclipse.jgit.revwalk;version="[5.9.1,5.10.0)", - org.eclipse.jgit.storage.file;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport.http;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport.http.apache;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport.resolver;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util;version="[5.9.1,5.10.0)", + org.eclipse.jgit.errors;version="[5.10.0,5.11.0)", + org.eclipse.jgit.http.server;version="[5.10.0,5.11.0)", + org.eclipse.jgit.http.server.glue;version="[5.10.0,5.11.0)", + org.eclipse.jgit.http.server.resolver;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.storage.dfs;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.storage.file;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.storage.reftable;version="[5.10.0,5.11.0)", + org.eclipse.jgit.junit;version="[5.10.0,5.11.0)", + org.eclipse.jgit.junit.http;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lib;version="[5.10.0,5.11.0)", + org.eclipse.jgit.nls;version="[5.10.0,5.11.0)", + org.eclipse.jgit.revwalk;version="[5.10.0,5.11.0)", + org.eclipse.jgit.storage.file;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport.http;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport.http.apache;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport.resolver;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util;version="[5.10.0,5.11.0)", org.hamcrest;version="[1.1.0,2.0.0)", org.hamcrest.core;version="[1.1.0,2.0.0)", org.junit;version="[4.13,5.0.0)", diff --git a/org.eclipse.jgit.http.test/pom.xml b/org.eclipse.jgit.http.test/pom.xml index 6c259e69bc..b619f8f7ac 100644 --- a/org.eclipse.jgit.http.test/pom.xml +++ b/org.eclipse.jgit.http.test/pom.xml @@ -18,7 +18,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.http.test</artifactId> diff --git a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF index 9654c91ff9..0130f3cba0 100644 --- a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.junit.http Bundle-SymbolicName: org.eclipse.jgit.junit.http -Bundle-Version: 5.9.1.qualifier +Bundle-Version: 5.10.0.qualifier Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor Bundle-ActivationPolicy: lazy @@ -22,16 +22,16 @@ Import-Package: javax.servlet;version="[2.5.0,3.2.0)", org.eclipse.jetty.util.log;version="[9.4.5,10.0.0)", org.eclipse.jetty.util.security;version="[9.4.5,10.0.0)", org.eclipse.jetty.util.ssl;version="[9.4.5,10.0.0)", - org.eclipse.jgit.errors;version="[5.9.1,5.10.0)", - org.eclipse.jgit.http.server;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.storage.file;version="[5.9.1,5.10.0)", - org.eclipse.jgit.junit;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lib;version="[5.9.1,5.10.0)", - org.eclipse.jgit.revwalk;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport.resolver;version="[5.9.1,5.10.0)", + org.eclipse.jgit.errors;version="[5.10.0,5.11.0)", + org.eclipse.jgit.http.server;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.storage.file;version="[5.10.0,5.11.0)", + org.eclipse.jgit.junit;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lib;version="[5.10.0,5.11.0)", + org.eclipse.jgit.revwalk;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport.resolver;version="[5.10.0,5.11.0)", org.junit;version="[4.13,5.0.0)" -Export-Package: org.eclipse.jgit.junit.http;version="5.9.1"; +Export-Package: org.eclipse.jgit.junit.http;version="5.10.0"; uses:="org.eclipse.jgit.transport, org.eclipse.jgit.junit, javax.servlet.http, diff --git a/org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF index 873228348a..e3eae5b61c 100644 --- a/org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.junit.http - Sources Bundle-SymbolicName: org.eclipse.jgit.junit.http.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 5.9.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.junit.http;version="5.9.1.qualifier";roots="." +Bundle-Version: 5.10.0.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.junit.http;version="5.10.0.qualifier";roots="." diff --git a/org.eclipse.jgit.junit.http/pom.xml b/org.eclipse.jgit.junit.http/pom.xml index e7193e6b6f..a0e24fe280 100644 --- a/org.eclipse.jgit.junit.http/pom.xml +++ b/org.eclipse.jgit.junit.http/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.junit.http</artifactId> diff --git a/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF index 4e78d61f48..839ff268b4 100644 --- a/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.junit.ssh Bundle-SymbolicName: org.eclipse.jgit.junit.ssh -Bundle-Version: 5.9.1.qualifier +Bundle-Version: 5.10.0.qualifier Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor Bundle-ActivationPolicy: lazy @@ -30,16 +30,16 @@ Import-Package: org.apache.sshd.common;version="[2.4.0,2.5.0)", org.apache.sshd.server.shell;version="[2.4.0,2.5.0)", org.apache.sshd.server.subsystem;version="[2.4.0,2.5.0)", org.apache.sshd.server.subsystem.sftp;version="[2.4.0,2.5.0)", - org.eclipse.jgit.annotations;version="[5.9.1,5.10.0)", - org.eclipse.jgit.api;version="[5.9.1,5.10.0)", - org.eclipse.jgit.api.errors;version="[5.9.1,5.10.0)", - org.eclipse.jgit.errors;version="[5.9.1,5.10.0)", - org.eclipse.jgit.junit;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lib;version="[5.9.1,5.10.0)", - org.eclipse.jgit.revwalk;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util;version="[5.9.1,5.10.0)", + org.eclipse.jgit.annotations;version="[5.10.0,5.11.0)", + org.eclipse.jgit.api;version="[5.10.0,5.11.0)", + org.eclipse.jgit.api.errors;version="[5.10.0,5.11.0)", + org.eclipse.jgit.errors;version="[5.10.0,5.11.0)", + org.eclipse.jgit.junit;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lib;version="[5.10.0,5.11.0)", + org.eclipse.jgit.revwalk;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util;version="[5.10.0,5.11.0)", org.junit;version="[4.13,5.0.0)", org.junit.experimental.theories;version="[4.13,5.0.0)", org.slf4j;version="[1.7.0,2.0.0)" -Export-Package: org.eclipse.jgit.junit.ssh;version="5.9.1" +Export-Package: org.eclipse.jgit.junit.ssh;version="5.10.0" diff --git a/org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF index 7ec99eb757..cc66754eed 100644 --- a/org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.junit.ssh - Sources Bundle-SymbolicName: org.eclipse.jgit.junit.ssh.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 5.9.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.junit.ssh;version="5.9.1.qualifier";roots="." +Bundle-Version: 5.10.0.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.junit.ssh;version="5.10.0.qualifier";roots="." diff --git a/org.eclipse.jgit.junit.ssh/pom.xml b/org.eclipse.jgit.junit.ssh/pom.xml index a1e635b558..5c8110eb55 100644 --- a/org.eclipse.jgit.junit.ssh/pom.xml +++ b/org.eclipse.jgit.junit.ssh/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.junit.ssh</artifactId> diff --git a/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestHarness.java b/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestHarness.java index 7970685436..90d981b772 100644 --- a/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestHarness.java +++ b/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestHarness.java @@ -76,6 +76,8 @@ public abstract class SshTestHarness extends RepositoryTestCase { protected File publicKey1; + protected File publicKey2; + protected SshTestGitServer server; private SshSessionFactory factory; @@ -110,7 +112,7 @@ public abstract class SshTestHarness extends RepositoryTestCase { privateKey1 = new File(sshDir, "first_key"); privateKey2 = new File(sshDir, "second_key"); publicKey1 = createKeyPair(generator.generateKeyPair(), privateKey1); - createKeyPair(generator.generateKeyPair(), privateKey2); + publicKey2 = createKeyPair(generator.generateKeyPair(), privateKey2); // Create a host key KeyPair hostKey = generator.generateKeyPair(); // Start a server with our test user and the first key. diff --git a/org.eclipse.jgit.junit/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit/META-INF/MANIFEST.MF index 993dc7279e..3fed43b911 100644 --- a/org.eclipse.jgit.junit/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.junit/META-INF/MANIFEST.MF @@ -3,35 +3,35 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.junit Bundle-SymbolicName: org.eclipse.jgit.junit -Bundle-Version: 5.9.1.qualifier +Bundle-Version: 5.10.0.qualifier Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Import-Package: org.eclipse.jgit.annotations;version="[5.9.1,5.10.0)", - org.eclipse.jgit.api;version="[5.9.1,5.10.0)", - org.eclipse.jgit.api.errors;version="[5.9.1,5.10.0)", - org.eclipse.jgit.dircache;version="[5.9.1,5.10.0)", - org.eclipse.jgit.errors;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.storage.file;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.storage.pack;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lib;version="[5.9.1,5.10.0)", - org.eclipse.jgit.merge;version="[5.9.1,5.10.0)", - org.eclipse.jgit.revwalk;version="[5.9.1,5.10.0)", - org.eclipse.jgit.storage.file;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport;version="5.9.1", - org.eclipse.jgit.treewalk;version="[5.9.1,5.10.0)", - org.eclipse.jgit.treewalk.filter;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util.io;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util.time;version="[5.9.1,5.10.0)", +Import-Package: org.eclipse.jgit.annotations;version="[5.10.0,5.11.0)", + org.eclipse.jgit.api;version="[5.10.0,5.11.0)", + org.eclipse.jgit.api.errors;version="[5.10.0,5.11.0)", + org.eclipse.jgit.dircache;version="[5.10.0,5.11.0)", + org.eclipse.jgit.errors;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.storage.file;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.storage.pack;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lib;version="[5.10.0,5.11.0)", + org.eclipse.jgit.merge;version="[5.10.0,5.11.0)", + org.eclipse.jgit.revwalk;version="[5.10.0,5.11.0)", + org.eclipse.jgit.storage.file;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport;version="5.10.0", + org.eclipse.jgit.treewalk;version="[5.10.0,5.11.0)", + org.eclipse.jgit.treewalk.filter;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util.io;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util.time;version="[5.10.0,5.11.0)", org.junit;version="[4.13,5.0.0)", org.junit.rules;version="[4.13,5.0.0)", org.junit.runner;version="[4.13,5.0.0)", org.junit.runners;version="[4.13,5.0.0)", org.junit.runners.model;version="[4.13,5.0.0)", org.slf4j;version="[1.7.0,2.0.0)" -Export-Package: org.eclipse.jgit.junit;version="5.9.1"; +Export-Package: org.eclipse.jgit.junit;version="5.10.0"; uses:="org.eclipse.jgit.dircache, org.eclipse.jgit.lib, org.eclipse.jgit.revwalk, @@ -44,4 +44,4 @@ Export-Package: org.eclipse.jgit.junit;version="5.9.1"; org.junit.runners.model, org.junit.runner, org.eclipse.jgit.util.time", - org.eclipse.jgit.junit.time;version="5.9.1";uses:="org.eclipse.jgit.util.time" + org.eclipse.jgit.junit.time;version="5.10.0";uses:="org.eclipse.jgit.util.time" diff --git a/org.eclipse.jgit.junit/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.junit/META-INF/SOURCE-MANIFEST.MF index 0f204a3bac..cc88d53183 100644 --- a/org.eclipse.jgit.junit/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.junit/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.junit - Sources Bundle-SymbolicName: org.eclipse.jgit.junit.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 5.9.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.junit;version="5.9.1.qualifier";roots="." +Bundle-Version: 5.10.0.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.junit;version="5.10.0.qualifier";roots="." diff --git a/org.eclipse.jgit.junit/pom.xml b/org.eclipse.jgit.junit/pom.xml index c6c7c4fd38..c08a73a394 100644 --- a/org.eclipse.jgit.junit/pom.xml +++ b/org.eclipse.jgit.junit/pom.xml @@ -19,7 +19,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.junit</artifactId> diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java index cc84f197aa..64556acc1c 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java @@ -46,6 +46,7 @@ import org.eclipse.jgit.revwalk.RevWalk; import org.eclipse.jgit.treewalk.FileTreeIterator; import org.eclipse.jgit.util.FS; import org.eclipse.jgit.util.FileUtils; +import org.junit.After; import org.junit.Before; /** @@ -187,6 +188,13 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { trash = db.getWorkTree(); } + @Override + @After + public void tearDown() throws Exception { + db.close(); + super.tearDown(); + } + /** * Represent the state of the index in one String. This representation is * useful when writing tests which do assertions on the state of the index. diff --git a/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF index 2f398a0b85..db6d6a701f 100644 --- a/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.lfs.server.test Bundle-SymbolicName: org.eclipse.jgit.lfs.server.test -Bundle-Version: 5.9.1.qualifier +Bundle-Version: 5.10.0.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-1.8 @@ -28,24 +28,24 @@ Import-Package: javax.servlet;version="[3.1.0,4.0.0)", org.eclipse.jetty.util.log;version="[9.4.5,10.0.0)", org.eclipse.jetty.util.security;version="[9.4.5,10.0.0)", org.eclipse.jetty.util.thread;version="[9.4.5,10.0.0)", - org.eclipse.jgit.api;version="[5.9.1,5.10.0)", - org.eclipse.jgit.api.errors;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.storage.file;version="[5.9.1,5.10.0)", - org.eclipse.jgit.junit;version="[5.9.1,5.10.0)", - org.eclipse.jgit.junit.http;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lfs;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lfs.errors;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lfs.lib;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lfs.server;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lfs.server.fs;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lfs.test;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lib;version="[5.9.1,5.10.0)", - org.eclipse.jgit.revwalk;version="[5.9.1,5.10.0)", - org.eclipse.jgit.storage.file;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport;version="[5.9.1,5.10.0)", - org.eclipse.jgit.treewalk;version="[5.9.1,5.10.0)", - org.eclipse.jgit.treewalk.filter;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util;version="[5.9.1,5.10.0)", + org.eclipse.jgit.api;version="[5.10.0,5.11.0)", + org.eclipse.jgit.api.errors;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.storage.file;version="[5.10.0,5.11.0)", + org.eclipse.jgit.junit;version="[5.10.0,5.11.0)", + org.eclipse.jgit.junit.http;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lfs;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lfs.errors;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lfs.lib;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lfs.server;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lfs.server.fs;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lfs.test;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lib;version="[5.10.0,5.11.0)", + org.eclipse.jgit.revwalk;version="[5.10.0,5.11.0)", + org.eclipse.jgit.storage.file;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport;version="[5.10.0,5.11.0)", + org.eclipse.jgit.treewalk;version="[5.10.0,5.11.0)", + org.eclipse.jgit.treewalk.filter;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util;version="[5.10.0,5.11.0)", org.hamcrest.core;version="[1.1.0,2.0.0)", org.junit;version="[4.13,5.0.0)", org.junit.rules;version="[4.13,5.0.0)", diff --git a/org.eclipse.jgit.lfs.server.test/pom.xml b/org.eclipse.jgit.lfs.server.test/pom.xml index a4f7bd1f56..c98a0dd032 100644 --- a/org.eclipse.jgit.lfs.server.test/pom.xml +++ b/org.eclipse.jgit.lfs.server.test/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.lfs.server.test</artifactId> diff --git a/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF index cfb413c519..20dd5f1702 100644 --- a/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF @@ -3,19 +3,19 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.lfs.server Bundle-SymbolicName: org.eclipse.jgit.lfs.server -Bundle-Version: 5.9.1.qualifier +Bundle-Version: 5.10.0.qualifier Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor -Export-Package: org.eclipse.jgit.lfs.server;version="5.9.1"; +Export-Package: org.eclipse.jgit.lfs.server;version="5.10.0"; uses:="javax.servlet.http, org.eclipse.jgit.lfs.lib", - org.eclipse.jgit.lfs.server.fs;version="5.9.1"; + org.eclipse.jgit.lfs.server.fs;version="5.10.0"; uses:="javax.servlet, javax.servlet.http, org.eclipse.jgit.lfs.server, org.eclipse.jgit.lfs.lib", - org.eclipse.jgit.lfs.server.internal;version="5.9.1";x-internal:=true, - org.eclipse.jgit.lfs.server.s3;version="5.9.1"; + org.eclipse.jgit.lfs.server.internal;version="5.10.0";x-internal:=true, + org.eclipse.jgit.lfs.server.s3;version="5.10.0"; uses:="org.eclipse.jgit.lfs.server, org.eclipse.jgit.lfs.lib" Bundle-RequiredExecutionEnvironment: JavaSE-1.8 @@ -25,15 +25,15 @@ Import-Package: com.google.gson;version="[2.8.0,3.0.0)", javax.servlet.http;version="[3.1.0,4.0.0)", org.apache.http;version="[4.3.0,5.0.0)", org.apache.http.client;version="[4.3.0,5.0.0)", - org.eclipse.jgit.annotations;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.storage.file;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lfs.errors;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lfs.internal;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lfs.lib;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lib;version="[5.9.1,5.10.0)", - org.eclipse.jgit.nls;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport.http;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport.http.apache;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util;version="[5.9.1,5.10.0)", + org.eclipse.jgit.annotations;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.storage.file;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lfs.errors;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lfs.internal;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lfs.lib;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lib;version="[5.10.0,5.11.0)", + org.eclipse.jgit.nls;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport.http;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport.http.apache;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util;version="[5.10.0,5.11.0)", org.slf4j;version="[1.7.0,2.0.0)" diff --git a/org.eclipse.jgit.lfs.server/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.lfs.server/META-INF/SOURCE-MANIFEST.MF index 708a62d2b2..9fbafd2d83 100644 --- a/org.eclipse.jgit.lfs.server/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.lfs.server/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.lfs.server - Sources Bundle-SymbolicName: org.eclipse.jgit.lfs.server.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 5.9.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.lfs.server;version="5.9.1.qualifier";roots="." +Bundle-Version: 5.10.0.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.lfs.server;version="5.10.0.qualifier";roots="." diff --git a/org.eclipse.jgit.lfs.server/pom.xml b/org.eclipse.jgit.lfs.server/pom.xml index abb2891246..39f59b41ad 100644 --- a/org.eclipse.jgit.lfs.server/pom.xml +++ b/org.eclipse.jgit.lfs.server/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.lfs.server</artifactId> diff --git a/org.eclipse.jgit.lfs.test/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.lfs.test/.settings/org.eclipse.jdt.core.prefs index 3dd5840397..b853c6a7ed 100644 --- a/org.eclipse.jgit.lfs.test/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.lfs.test/.settings/org.eclipse.jdt.core.prefs @@ -51,8 +51,8 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=no_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF index 0d02971be9..e9affdb41a 100644 --- a/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF @@ -3,22 +3,22 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.lfs.test Bundle-SymbolicName: org.eclipse.jgit.lfs.test -Bundle-Version: 5.9.1.qualifier +Bundle-Version: 5.10.0.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Import-Package: org.eclipse.jgit.internal.storage.dfs;version="[5.9.1,5.10.0)", - org.eclipse.jgit.junit;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lfs;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lfs.errors;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lfs.lib;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lib;version="[5.9.1,5.10.0)", - org.eclipse.jgit.revwalk;version="[5.9.1,5.10.0)", - org.eclipse.jgit.treewalk;version="[5.9.1,5.10.0)", - org.eclipse.jgit.treewalk.filter;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util;version="[5.9.1,5.10.0)", +Import-Package: org.eclipse.jgit.internal.storage.dfs;version="[5.10.0,5.11.0)", + org.eclipse.jgit.junit;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lfs;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lfs.errors;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lfs.lib;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lib;version="[5.10.0,5.11.0)", + org.eclipse.jgit.revwalk;version="[5.10.0,5.11.0)", + org.eclipse.jgit.treewalk;version="[5.10.0,5.11.0)", + org.eclipse.jgit.treewalk.filter;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util;version="[5.10.0,5.11.0)", org.hamcrest.core;version="[1.1.0,2.0.0)", org.junit;version="[4.13,5.0.0)", org.junit.runner;version="[4.13,5.0.0)", org.junit.runners;version="[4.13,5.0.0)" -Export-Package: org.eclipse.jgit.lfs.test;version="5.9.1";x-friends:="org.eclipse.jgit.lfs.server.test" +Export-Package: org.eclipse.jgit.lfs.test;version="5.10.0";x-friends:="org.eclipse.jgit.lfs.server.test" diff --git a/org.eclipse.jgit.lfs.test/pom.xml b/org.eclipse.jgit.lfs.test/pom.xml index 22fd3a7a60..ce520c759c 100644 --- a/org.eclipse.jgit.lfs.test/pom.xml +++ b/org.eclipse.jgit.lfs.test/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.lfs.test</artifactId> diff --git a/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF index c7a3b84db8..e9a396a969 100644 --- a/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF @@ -3,33 +3,33 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.lfs Bundle-SymbolicName: org.eclipse.jgit.lfs -Bundle-Version: 5.9.1.qualifier +Bundle-Version: 5.10.0.qualifier Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor -Export-Package: org.eclipse.jgit.lfs;version="5.9.1", - org.eclipse.jgit.lfs.errors;version="5.9.1", - org.eclipse.jgit.lfs.internal;version="5.9.1";x-friends:="org.eclipse.jgit.lfs.test,org.eclipse.jgit.lfs.server.fs,org.eclipse.jgit.lfs.server", - org.eclipse.jgit.lfs.lib;version="5.9.1" +Export-Package: org.eclipse.jgit.lfs;version="5.10.0", + org.eclipse.jgit.lfs.errors;version="5.10.0", + org.eclipse.jgit.lfs.internal;version="5.10.0";x-friends:="org.eclipse.jgit.lfs.test,org.eclipse.jgit.lfs.server.fs,org.eclipse.jgit.lfs.server", + org.eclipse.jgit.lfs.lib;version="5.10.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Import-Package: com.google.gson;version="[2.8.2,3.0.0)", com.google.gson.stream;version="[2.8.2,3.0.0)", org.apache.http.impl.client;version="[4.2.6,5.0.0)", org.apache.http.impl.conn;version="[4.2.6,5.0.0)", - org.eclipse.jgit.annotations;version="[5.9.1,5.10.0)";resolution:=optional, - org.eclipse.jgit.api.errors;version="[5.9.1,5.10.0)", - org.eclipse.jgit.attributes;version="[5.9.1,5.10.0)", - org.eclipse.jgit.diff;version="[5.9.1,5.10.0)", - org.eclipse.jgit.errors;version="[5.9.1,5.10.0)", - org.eclipse.jgit.hooks;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.storage.file;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lib;version="[5.9.1,5.10.0)", - org.eclipse.jgit.nls;version="[5.9.1,5.10.0)", - org.eclipse.jgit.revwalk;version="[5.9.1,5.10.0)", - org.eclipse.jgit.storage.file;version="[5.9.1,5.10.0)", - org.eclipse.jgit.storage.pack;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport.http;version="[5.9.1,5.10.0)", - org.eclipse.jgit.treewalk;version="[5.9.1,5.10.0)", - org.eclipse.jgit.treewalk.filter;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util.io;version="[5.9.1,5.10.0)" + org.eclipse.jgit.annotations;version="[5.10.0,5.11.0)";resolution:=optional, + org.eclipse.jgit.api.errors;version="[5.10.0,5.11.0)", + org.eclipse.jgit.attributes;version="[5.10.0,5.11.0)", + org.eclipse.jgit.diff;version="[5.10.0,5.11.0)", + org.eclipse.jgit.errors;version="[5.10.0,5.11.0)", + org.eclipse.jgit.hooks;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.storage.file;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lib;version="[5.10.0,5.11.0)", + org.eclipse.jgit.nls;version="[5.10.0,5.11.0)", + org.eclipse.jgit.revwalk;version="[5.10.0,5.11.0)", + org.eclipse.jgit.storage.file;version="[5.10.0,5.11.0)", + org.eclipse.jgit.storage.pack;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport.http;version="[5.10.0,5.11.0)", + org.eclipse.jgit.treewalk;version="[5.10.0,5.11.0)", + org.eclipse.jgit.treewalk.filter;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util.io;version="[5.10.0,5.11.0)" diff --git a/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF index 59d2b7f57e..249793a466 100644 --- a/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.lfs - Sources Bundle-SymbolicName: org.eclipse.jgit.lfs.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 5.9.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.lfs;version="5.9.1.qualifier";roots="." +Bundle-Version: 5.10.0.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.lfs;version="5.10.0.qualifier";roots="." diff --git a/org.eclipse.jgit.lfs/pom.xml b/org.eclipse.jgit.lfs/pom.xml index 2ee2f343cd..b6480bd686 100644 --- a/org.eclipse.jgit.lfs/pom.xml +++ b/org.eclipse.jgit.lfs/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.lfs</artifactId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml index 040e56477c..c05f29c7a8 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.jgit" label="%featureName" - version="5.9.1.qualifier" + version="5.10.0.qualifier" provider-name="%providerName"> <description url="http://www.eclipse.org/jgit/"> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml index 3959f9e114..f3686fd1b2 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <groupId>org.eclipse.jgit.feature</groupId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.xml index 19f9c44945..383287a851 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.jgit.gpg.bc" label="%featureName" - version="5.9.1.qualifier" + version="5.10.0.qualifier" provider-name="%providerName"> <description url="http://www.eclipse.org/jgit/"> @@ -23,7 +23,7 @@ </url> <requires> - <import plugin="org.eclipse.jgit" version="5.9.1" match="equivalent"/> + <import plugin="org.eclipse.jgit" version="5.10.0" match="equivalent"/> </requires> <plugin diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/pom.xml index 0e48821bce..22b4f48a7a 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <groupId>org.eclipse.jgit.feature</groupId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml index cb41fc536e..067436f0e1 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml +++ b/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="5.9.1.qualifier" + version="5.10.0.qualifier" provider-name="%providerName"> <description url="http://www.eclipse.org/jgit/"> @@ -23,7 +23,7 @@ </url> <requires> - <import plugin="org.eclipse.jgit" version="5.9.1" match="equivalent"/> + <import plugin="org.eclipse.jgit" version="5.10.0" match="equivalent"/> </requires> <plugin diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml index 277e1f539a..97831468ad 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <groupId>org.eclipse.jgit.feature</groupId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml index 7ccc89441a..3d79878c86 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.jgit.junit" label="%featureName" - version="5.9.1.qualifier" + version="5.10.0.qualifier" provider-name="%providerName"> <description url="http://www.eclipse.org/jgit/"> @@ -24,7 +24,7 @@ <requires> <import plugin="com.jcraft.jsch"/> - <import plugin="org.eclipse.jgit" version="5.9.1" match="equivalent"/> + <import plugin="org.eclipse.jgit" version="5.10.0" match="equivalent"/> </requires> <plugin diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml index 21bb3c8443..2354bf232f 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <groupId>org.eclipse.jgit.feature</groupId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml index 807779316e..cfdb6aa200 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.jgit.lfs" label="%featureName" - version="5.9.1.qualifier" + version="5.10.0.qualifier" provider-name="%providerName"> <description url="http://www.eclipse.org/jgit/"> @@ -23,7 +23,7 @@ </url> <requires> - <import feature="org.eclipse.jgit" version="5.9.1" match="equivalent"/> + <import feature="org.eclipse.jgit" version="5.10.0" match="equivalent"/> </requires> <plugin diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/pom.xml index a104305112..90d56d3d56 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <groupId>org.eclipse.jgit.feature</groupId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml index fa24b8239b..be73583867 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.jgit.pgm" label="%featureName" - version="5.9.1.qualifier" + version="5.10.0.qualifier" provider-name="%providerName"> <description url="http://www.eclipse.org/jgit/"> @@ -35,9 +35,9 @@ version="0.0.0"/> <requires> - <import feature="org.eclipse.jgit" version="5.9.1" match="equivalent"/> - <import feature="org.eclipse.jgit.lfs" version="5.9.1" match="equivalent"/> - <import feature="org.eclipse.jgit.ssh.apache" version="5.9.1" match="equivalent"/> + <import feature="org.eclipse.jgit" version="5.10.0" match="equivalent"/> + <import feature="org.eclipse.jgit.lfs" version="5.10.0" match="equivalent"/> + <import feature="org.eclipse.jgit.ssh.apache" version="5.10.0" match="equivalent"/> </requires> <plugin diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml index 804057ebd0..8fcfcc3fde 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <groupId>org.eclipse.jgit.feature</groupId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml index 7cb65b358f..b2d2d96232 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.repository</artifactId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml index 1cf7eeff97..f4061c949d 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.jgit.source" label="%featureName" - version="5.9.1.qualifier" + version="5.10.0.qualifier" provider-name="%providerName"> <description url="http://www.eclipse.org/jgit/"> @@ -23,7 +23,7 @@ </url> <requires> - <import feature="org.eclipse.jgit" version="5.9.1" match="equivalent"/> + <import feature="org.eclipse.jgit" version="5.10.0" match="equivalent"/> </requires> <plugin diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml index 4f63e6a170..6b53b70c57 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <groupId>org.eclipse.jgit.feature</groupId> @@ -30,7 +30,7 @@ <dependency> <groupId>org.eclipse.jgit.feature</groupId> <artifactId>org.eclipse.jgit</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </dependency> </dependencies> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml index 4bd9e968f0..c1c251a268 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.jgit.ssh.apache" label="%featureName" - version="5.9.1.qualifier" + version="5.10.0.qualifier" provider-name="%providerName"> <description url="http://www.eclipse.org/jgit/"> @@ -23,7 +23,7 @@ </url> <requires> - <import feature="org.eclipse.jgit" version="5.9.1" match="equivalent"/> + <import feature="org.eclipse.jgit" version="5.10.0" match="equivalent"/> </requires> <plugin diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/pom.xml index 0d1e81a3e8..84d46f7143 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <groupId>org.eclipse.jgit.feature</groupId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.xml index ed5c6a7c07..8edf546a50 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.xml @@ -2,7 +2,7 @@ <feature id="org.eclipse.jgit.ssh.jsch" label="%featureName" - version="5.9.1.qualifier" + version="5.10.0.qualifier" provider-name="%providerName"> <description url="http://www.eclipse.org/jgit/"> @@ -23,7 +23,7 @@ </url> <requires> - <import plugin="org.eclipse.jgit" version="5.9.1" match="equivalent"/> + <import plugin="org.eclipse.jgit" version="5.10.0" match="equivalent"/> </requires> <plugin diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/pom.xml index 3b2a45dab0..1c37253ee5 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <groupId>org.eclipse.jgit.feature</groupId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF index fd90f99839..62a9ccb82a 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF +++ b/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: 5.9.1.qualifier +Bundle-Version: 5.10.0.qualifier diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target index ad0816c047..931e196cf6 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.10" sequenceNumber="1598915260"> +<target name="jgit-4.10" sequenceNumber="1605866255"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> @@ -39,8 +39,8 @@ <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> - <unit id="org.apache.ant" version="1.10.8.v20200515-1239"/> - <unit id="org.apache.ant.source" version="1.10.8.v20200515-1239"/> + <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/> + <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/> <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/> <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/> @@ -78,13 +78,13 @@ <unit id="org.mockito.source" version="2.23.0.v20200310-1642"/> <unit id="org.objenesis" version="2.6.0.v20180420-1519"/> <unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/> - <unit id="org.slf4j.api" version="1.7.2.v20121108-1250"/> - <unit id="org.slf4j.api.source" version="1.7.2.v20121108-1250"/> - <unit id="org.slf4j.impl.log4j12" version="1.7.2.v20131105-2200"/> - <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> + <unit id="org.slf4j.api" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.api.source" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.binding.log4j12" version="1.7.30.v20201108-2042"/> + <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200831200620/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd index c0a2db8402..b87917b8ab 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd @@ -1,7 +1,7 @@ target "jgit-4.10" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20200831200620-2020-09.tpd" +include "orbit/S20201118210000.tpd" location "https://download.eclipse.org/releases/2018-12/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target index 75f893f01a..8090999601 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.11" sequenceNumber="1598915260"> +<target name="jgit-4.11" sequenceNumber="1605866333"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> @@ -39,8 +39,8 @@ <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> - <unit id="org.apache.ant" version="1.10.8.v20200515-1239"/> - <unit id="org.apache.ant.source" version="1.10.8.v20200515-1239"/> + <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/> + <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/> <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/> <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/> @@ -78,13 +78,13 @@ <unit id="org.mockito.source" version="2.23.0.v20200310-1642"/> <unit id="org.objenesis" version="2.6.0.v20180420-1519"/> <unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/> - <unit id="org.slf4j.api" version="1.7.2.v20121108-1250"/> - <unit id="org.slf4j.api.source" version="1.7.2.v20121108-1250"/> - <unit id="org.slf4j.impl.log4j12" version="1.7.2.v20131105-2200"/> - <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> + <unit id="org.slf4j.api" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.api.source" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.binding.log4j12" version="1.7.30.v20201108-2042"/> + <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200831200620/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd index de349bdb08..844a1d791f 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd @@ -1,7 +1,7 @@ target "jgit-4.11" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20200831200620-2020-09.tpd" +include "orbit/S20201118210000.tpd" location "https://download.eclipse.org/releases/2019-03/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target index 2afbcb63a9..69eb639726 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.12" sequenceNumber="1598915260"> +<target name="jgit-4.12" sequenceNumber="1605866333"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> @@ -39,8 +39,8 @@ <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> - <unit id="org.apache.ant" version="1.10.8.v20200515-1239"/> - <unit id="org.apache.ant.source" version="1.10.8.v20200515-1239"/> + <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/> + <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/> <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/> <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/> @@ -78,13 +78,13 @@ <unit id="org.mockito.source" version="2.23.0.v20200310-1642"/> <unit id="org.objenesis" version="2.6.0.v20180420-1519"/> <unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/> - <unit id="org.slf4j.api" version="1.7.2.v20121108-1250"/> - <unit id="org.slf4j.api.source" version="1.7.2.v20121108-1250"/> - <unit id="org.slf4j.impl.log4j12" version="1.7.2.v20131105-2200"/> - <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> + <unit id="org.slf4j.api" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.api.source" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.binding.log4j12" version="1.7.30.v20201108-2042"/> + <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200831200620/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd index 42430734e3..afbf79d531 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd @@ -1,7 +1,7 @@ target "jgit-4.12" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20200831200620-2020-09.tpd" +include "orbit/S20201118210000.tpd" location "https://download.eclipse.org/releases/2019-06/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target index 34c497a375..fdbed2d2a4 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.13" sequenceNumber="1598915260"> +<target name="jgit-4.13" sequenceNumber="1605866333"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> @@ -39,8 +39,8 @@ <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> - <unit id="org.apache.ant" version="1.10.8.v20200515-1239"/> - <unit id="org.apache.ant.source" version="1.10.8.v20200515-1239"/> + <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/> + <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/> <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/> <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/> @@ -78,13 +78,13 @@ <unit id="org.mockito.source" version="2.23.0.v20200310-1642"/> <unit id="org.objenesis" version="2.6.0.v20180420-1519"/> <unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/> - <unit id="org.slf4j.api" version="1.7.2.v20121108-1250"/> - <unit id="org.slf4j.api.source" version="1.7.2.v20121108-1250"/> - <unit id="org.slf4j.impl.log4j12" version="1.7.2.v20131105-2200"/> - <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> + <unit id="org.slf4j.api" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.api.source" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.binding.log4j12" version="1.7.30.v20201108-2042"/> + <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200831200620/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd index d886fd48ef..d83e338460 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd @@ -1,7 +1,7 @@ target "jgit-4.13" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20200831200620-2020-09.tpd" +include "orbit/S20201118210000.tpd" location "https://download.eclipse.org/releases/2019-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target index 33bfc43e8d..c2ef9d24a1 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.14" sequenceNumber="1598915258"> +<target name="jgit-4.14" sequenceNumber="1605866331"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> @@ -39,8 +39,8 @@ <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> - <unit id="org.apache.ant" version="1.10.8.v20200515-1239"/> - <unit id="org.apache.ant.source" version="1.10.8.v20200515-1239"/> + <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/> + <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/> <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/> <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/> @@ -78,13 +78,13 @@ <unit id="org.mockito.source" version="2.23.0.v20200310-1642"/> <unit id="org.objenesis" version="2.6.0.v20180420-1519"/> <unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/> - <unit id="org.slf4j.api" version="1.7.2.v20121108-1250"/> - <unit id="org.slf4j.api.source" version="1.7.2.v20121108-1250"/> - <unit id="org.slf4j.impl.log4j12" version="1.7.2.v20131105-2200"/> - <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> + <unit id="org.slf4j.api" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.api.source" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.binding.log4j12" version="1.7.30.v20201108-2042"/> + <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200831200620/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd index eb92809bb4..f357ccd24c 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd @@ -1,7 +1,7 @@ target "jgit-4.14" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20200831200620-2020-09.tpd" +include "orbit/S20201118210000.tpd" location "https://download.eclipse.org/releases/2019-12/201912181000/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target index 03b5cb78fc..4034d2a362 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.15" sequenceNumber="1598915258"> +<target name="jgit-4.15" sequenceNumber="1605866331"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> @@ -39,8 +39,8 @@ <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> - <unit id="org.apache.ant" version="1.10.8.v20200515-1239"/> - <unit id="org.apache.ant.source" version="1.10.8.v20200515-1239"/> + <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/> + <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/> <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/> <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/> @@ -78,13 +78,13 @@ <unit id="org.mockito.source" version="2.23.0.v20200310-1642"/> <unit id="org.objenesis" version="2.6.0.v20180420-1519"/> <unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/> - <unit id="org.slf4j.api" version="1.7.2.v20121108-1250"/> - <unit id="org.slf4j.api.source" version="1.7.2.v20121108-1250"/> - <unit id="org.slf4j.impl.log4j12" version="1.7.2.v20131105-2200"/> - <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> + <unit id="org.slf4j.api" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.api.source" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.binding.log4j12" version="1.7.30.v20201108-2042"/> + <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200831200620/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd index 95249b45d9..881fe37e73 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd @@ -1,7 +1,7 @@ target "jgit-4.15" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20200831200620-2020-09.tpd" +include "orbit/S20201118210000.tpd" location "https://download.eclipse.org/releases/2020-03/202003181000/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target index a7470c111b..34d872cdd5 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.16" sequenceNumber="1598915255"> +<target name="jgit-4.16" sequenceNumber="1605866333"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> @@ -39,8 +39,8 @@ <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> - <unit id="org.apache.ant" version="1.10.8.v20200515-1239"/> - <unit id="org.apache.ant.source" version="1.10.8.v20200515-1239"/> + <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/> + <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/> <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/> <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/> @@ -78,13 +78,13 @@ <unit id="org.mockito.source" version="2.23.0.v20200310-1642"/> <unit id="org.objenesis" version="2.6.0.v20180420-1519"/> <unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/> - <unit id="org.slf4j.api" version="1.7.2.v20121108-1250"/> - <unit id="org.slf4j.api.source" version="1.7.2.v20121108-1250"/> - <unit id="org.slf4j.impl.log4j12" version="1.7.2.v20131105-2200"/> - <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> + <unit id="org.slf4j.api" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.api.source" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.binding.log4j12" version="1.7.30.v20201108-2042"/> + <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200831200620/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd index 7e6caac500..9a07597119 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd @@ -1,7 +1,7 @@ target "jgit-4.16" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20200831200620-2020-09.tpd" +include "orbit/S20201118210000.tpd" location "https://download.eclipse.org/releases/2020-06/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17-staging.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17-staging.tpd deleted file mode 100644 index 07745cb15a..0000000000 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17-staging.tpd +++ /dev/null @@ -1,8 +0,0 @@ -target "jgit-4.17-staging" with source configurePhase - -include "projects/jetty-9.4.x.tpd" -include "orbit/R20200831200620-2020-09.tpd" - -location "https://download.eclipse.org/staging/2020-09/" { - org.eclipse.osgi lazy -} diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target new file mode 100644 index 0000000000..3384c23563 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target @@ -0,0 +1,94 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<?pde?> +<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> +<target name="jgit-4.17" sequenceNumber="1605866541"> + <locations> + <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> + <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> + <unit id="org.eclipse.jetty.client.source" version="9.4.30.v20200611"/> + <unit id="org.eclipse.jetty.continuation" version="9.4.30.v20200611"/> + <unit id="org.eclipse.jetty.continuation.source" version="9.4.30.v20200611"/> + <unit id="org.eclipse.jetty.http" version="9.4.30.v20200611"/> + <unit id="org.eclipse.jetty.http.source" version="9.4.30.v20200611"/> + <unit id="org.eclipse.jetty.io" version="9.4.30.v20200611"/> + <unit id="org.eclipse.jetty.io.source" version="9.4.30.v20200611"/> + <unit id="org.eclipse.jetty.security" version="9.4.30.v20200611"/> + <unit id="org.eclipse.jetty.security.source" version="9.4.30.v20200611"/> + <unit id="org.eclipse.jetty.server" version="9.4.30.v20200611"/> + <unit id="org.eclipse.jetty.server.source" version="9.4.30.v20200611"/> + <unit id="org.eclipse.jetty.servlet" version="9.4.30.v20200611"/> + <unit id="org.eclipse.jetty.servlet.source" version="9.4.30.v20200611"/> + <unit id="org.eclipse.jetty.util" version="9.4.30.v20200611"/> + <unit id="org.eclipse.jetty.util.source" version="9.4.30.v20200611"/> + <repository id="jetty-9.4.30" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.30.v20200611/"/> + </location> + <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> + <unit id="com.google.gson" version="2.8.2.v20180104-1110"/> + <unit id="com.google.gson.source" version="2.8.2.v20180104-1110"/> + <unit id="com.jcraft.jsch" version="0.1.55.v20190404-1902"/> + <unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/> + <unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/> + <unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/> + <unit id="javaewah" version="1.1.7.v20200107-0831"/> + <unit id="javaewah.source" version="1.1.7.v20200107-0831"/> + <unit id="javax.servlet" version="3.1.0.v201410161800"/> + <unit id="javax.servlet.source" version="3.1.0.v201410161800"/> + <unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/> + <unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/> + <unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/> + <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/> + <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/> + <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> + <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/> + <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/> + <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/> + <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/> + <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/> + <unit id="org.apache.commons.compress.source" version="1.19.0.v20200106-2343"/> + <unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/> + <unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/> + <unit id="org.apache.httpcomponents.httpclient" version="4.5.10.v20200830-2311"/> + <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.10.v20200830-2311"/> + <unit id="org.apache.httpcomponents.httpcore" version="4.4.12.v20200108-1212"/> + <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.12.v20200108-1212"/> + <unit id="org.apache.log4j" version="1.2.15.v201012070815"/> + <unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/> + <unit id="org.apache.sshd.osgi" version="2.4.0.v20200318-1614"/> + <unit id="org.apache.sshd.osgi.source" version="2.4.0.v20200318-1614"/> + <unit id="org.apache.sshd.sftp" version="2.4.0.v20200319-1547"/> + <unit id="org.apache.sshd.sftp.source" version="2.4.0.v20200319-1547"/> + <unit id="org.assertj" version="3.14.0.v20200120-1926"/> + <unit id="org.assertj.source" version="3.14.0.v20200120-1926"/> + <unit id="org.bouncycastle.bcpg" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpg.source" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpkix" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpkix.source" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcprov" version="1.65.1.v20200529-1514"/> + <unit id="org.bouncycastle.bcprov.source" version="1.65.1.v20200529-1514"/> + <unit id="org.hamcrest" version="1.1.0.v20090501071000"/> + <unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/> + <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> + <unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/> + <unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/> + <unit id="org.junit" version="4.13.0.v20200204-1500"/> + <unit id="org.junit.source" version="4.13.0.v20200204-1500"/> + <unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/> + <unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/> + <unit id="org.mockito" version="2.23.0.v20200310-1642"/> + <unit id="org.mockito.source" version="2.23.0.v20200310-1642"/> + <unit id="org.objenesis" version="2.6.0.v20180420-1519"/> + <unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/> + <unit id="org.slf4j.api" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.api.source" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.binding.log4j12" version="1.7.30.v20201108-2042"/> + <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> + <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> + <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> + </location> + <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> + <unit id="org.eclipse.osgi" version="0.0.0"/> + <repository location="https://download.eclipse.org/releases/2020-09/"/> + </location> + </locations> +</target> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd new file mode 100644 index 0000000000..ce79cf45e8 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd @@ -0,0 +1,8 @@ +target "jgit-4.17" with source configurePhase + +include "projects/jetty-9.4.x.tpd" +include "orbit/S20201118210000.tpd" + +location "https://download.eclipse.org/releases/2020-09/" { + org.eclipse.osgi lazy +} diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17-staging.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18-staging.target index 79e0211782..5eeab9534a 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17-staging.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18-staging.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.17-staging" sequenceNumber="1598916122"> +<target name="jgit-4.18-staging" sequenceNumber="1605866541"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> @@ -39,8 +39,8 @@ <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> - <unit id="org.apache.ant" version="1.10.8.v20200515-1239"/> - <unit id="org.apache.ant.source" version="1.10.8.v20200515-1239"/> + <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/> + <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/> <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/> <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/> @@ -78,17 +78,17 @@ <unit id="org.mockito.source" version="2.23.0.v20200310-1642"/> <unit id="org.objenesis" version="2.6.0.v20180420-1519"/> <unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/> - <unit id="org.slf4j.api" version="1.7.2.v20121108-1250"/> - <unit id="org.slf4j.api.source" version="1.7.2.v20121108-1250"/> - <unit id="org.slf4j.impl.log4j12" version="1.7.2.v20131105-2200"/> - <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> + <unit id="org.slf4j.api" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.api.source" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.binding.log4j12" version="1.7.30.v20201108-2042"/> + <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200831200620/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> - <repository location="https://download.eclipse.org/staging/2020-09/"/> + <repository location="https://download.eclipse.org/staging/2020-12/"/> </location> </locations> </target> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18-staging.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18-staging.tpd new file mode 100644 index 0000000000..0669490bb0 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18-staging.tpd @@ -0,0 +1,8 @@ +target "jgit-4.18-staging" with source configurePhase + +include "projects/jetty-9.4.x.tpd" +include "orbit/S20201118210000.tpd" + +location "https://download.eclipse.org/staging/2020-12/" { + org.eclipse.osgi lazy +} diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target index 566ef3389a..a66fcc0821 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.6" sequenceNumber="1598915275"> +<target name="jgit-4.6" sequenceNumber="1605866347"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> @@ -39,8 +39,8 @@ <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> - <unit id="org.apache.ant" version="1.10.8.v20200515-1239"/> - <unit id="org.apache.ant.source" version="1.10.8.v20200515-1239"/> + <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/> + <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/> <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/> <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/> @@ -78,13 +78,13 @@ <unit id="org.mockito.source" version="2.23.0.v20200310-1642"/> <unit id="org.objenesis" version="2.6.0.v20180420-1519"/> <unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/> - <unit id="org.slf4j.api" version="1.7.2.v20121108-1250"/> - <unit id="org.slf4j.api.source" version="1.7.2.v20121108-1250"/> - <unit id="org.slf4j.impl.log4j12" version="1.7.2.v20131105-2200"/> - <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> + <unit id="org.slf4j.api" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.api.source" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.binding.log4j12" version="1.7.30.v20201108-2042"/> + <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200831200620/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd index d0024b6897..aa58b68577 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd @@ -1,7 +1,7 @@ target "jgit-4.6" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20200831200620-2020-09.tpd" +include "orbit/S20201118210000.tpd" location "https://download.eclipse.org/releases/neon/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target index 5a690e89ef..4b5410a3d7 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.7" sequenceNumber="1598915265"> +<target name="jgit-4.7" sequenceNumber="1605866338"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> @@ -39,8 +39,8 @@ <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> - <unit id="org.apache.ant" version="1.10.8.v20200515-1239"/> - <unit id="org.apache.ant.source" version="1.10.8.v20200515-1239"/> + <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/> + <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/> <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/> <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/> @@ -78,13 +78,13 @@ <unit id="org.mockito.source" version="2.23.0.v20200310-1642"/> <unit id="org.objenesis" version="2.6.0.v20180420-1519"/> <unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/> - <unit id="org.slf4j.api" version="1.7.2.v20121108-1250"/> - <unit id="org.slf4j.api.source" version="1.7.2.v20121108-1250"/> - <unit id="org.slf4j.impl.log4j12" version="1.7.2.v20131105-2200"/> - <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> + <unit id="org.slf4j.api" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.api.source" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.binding.log4j12" version="1.7.30.v20201108-2042"/> + <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200831200620/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd index ee9253fec5..e2264e0038 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd @@ -1,7 +1,7 @@ target "jgit-4.7" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20200831200620-2020-09.tpd" +include "orbit/S20201118210000.tpd" location "https://download.eclipse.org/releases/oxygen/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target index fe237d01ca..d776427455 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.8" sequenceNumber="1598915261"> +<target name="jgit-4.8" sequenceNumber="1605866333"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> @@ -39,8 +39,8 @@ <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> - <unit id="org.apache.ant" version="1.10.8.v20200515-1239"/> - <unit id="org.apache.ant.source" version="1.10.8.v20200515-1239"/> + <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/> + <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/> <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/> <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/> @@ -78,13 +78,13 @@ <unit id="org.mockito.source" version="2.23.0.v20200310-1642"/> <unit id="org.objenesis" version="2.6.0.v20180420-1519"/> <unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/> - <unit id="org.slf4j.api" version="1.7.2.v20121108-1250"/> - <unit id="org.slf4j.api.source" version="1.7.2.v20121108-1250"/> - <unit id="org.slf4j.impl.log4j12" version="1.7.2.v20131105-2200"/> - <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> + <unit id="org.slf4j.api" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.api.source" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.binding.log4j12" version="1.7.30.v20201108-2042"/> + <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200831200620/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd index 36c42f84c6..c92ce53963 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd @@ -1,7 +1,7 @@ target "jgit-4.8" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20200831200620-2020-09.tpd" +include "orbit/S20201118210000.tpd" location "https://download.eclipse.org/releases/photon/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target index a812e7a57c..56002b78a8 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.9" sequenceNumber="1598915260"> +<target name="jgit-4.9" sequenceNumber="1605866333"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.jetty.client" version="9.4.30.v20200611"/> @@ -39,8 +39,8 @@ <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> - <unit id="org.apache.ant" version="1.10.8.v20200515-1239"/> - <unit id="org.apache.ant.source" version="1.10.8.v20200515-1239"/> + <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/> + <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/> <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/> <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/> @@ -78,13 +78,13 @@ <unit id="org.mockito.source" version="2.23.0.v20200310-1642"/> <unit id="org.objenesis" version="2.6.0.v20180420-1519"/> <unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/> - <unit id="org.slf4j.api" version="1.7.2.v20121108-1250"/> - <unit id="org.slf4j.api.source" version="1.7.2.v20121108-1250"/> - <unit id="org.slf4j.impl.log4j12" version="1.7.2.v20131105-2200"/> - <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> + <unit id="org.slf4j.api" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.api.source" version="1.7.30.v20200204-2150"/> + <unit id="org.slf4j.binding.log4j12" version="1.7.30.v20201108-2042"/> + <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200831200620/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd index da2ea7ece5..06ccecbd5d 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd @@ -1,7 +1,7 @@ target "jgit-4.9" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20200831200620-2020-09.tpd" +include "orbit/S20201118210000.tpd" location "https://download.eclipse.org/releases/2018-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20201118210000.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20201118210000.tpd new file mode 100644 index 0000000000..a00a5e7c87 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20201118210000.tpd @@ -0,0 +1,66 @@ +target "S20201118210000" with source configurePhase +// see https://download.eclipse.org/tools/orbit/downloads/ + +location "https://download.eclipse.org/tools/orbit/downloads/drops/S20201118210000/repository" { + com.google.gson [2.8.2.v20180104-1110,2.8.2.v20180104-1110] + com.google.gson.source [2.8.2.v20180104-1110,2.8.2.v20180104-1110] + com.jcraft.jsch [0.1.55.v20190404-1902,0.1.55.v20190404-1902] + com.jcraft.jsch.source [0.1.55.v20190404-1902,0.1.55.v20190404-1902] + com.jcraft.jzlib [1.1.1.v201205102305,1.1.1.v201205102305] + com.jcraft.jzlib.source [1.1.1.v201205102305,1.1.1.v201205102305] + javaewah [1.1.7.v20200107-0831,1.1.7.v20200107-0831] + javaewah.source [1.1.7.v20200107-0831,1.1.7.v20200107-0831] + javax.servlet [3.1.0.v201410161800,3.1.0.v201410161800] + javax.servlet.source [3.1.0.v201410161800,3.1.0.v201410161800] + net.bytebuddy.byte-buddy [1.9.0.v20181107-1410,1.9.0.v20181107-1410] + net.bytebuddy.byte-buddy-agent [1.9.0.v20181106-1534,1.9.0.v20181106-1534] + net.bytebuddy.byte-buddy-agent.source [1.9.0.v20181106-1534,1.9.0.v20181106-1534] + net.bytebuddy.byte-buddy.source [1.9.0.v20181107-1410,1.9.0.v20181107-1410] + net.i2p.crypto.eddsa [0.3.0.v20181102-1323,0.3.0.v20181102-1323] + net.i2p.crypto.eddsa.source [0.3.0.v20181102-1323,0.3.0.v20181102-1323] + org.apache.ant [1.10.9.v20201106-1946,1.10.9.v20201106-1946] + org.apache.ant.source [1.10.9.v20201106-1946,1.10.9.v20201106-1946] + org.apache.commons.codec [1.14.0.v20200818-1422,1.14.0.v20200818-1422] + org.apache.commons.codec.source [1.14.0.v20200818-1422,1.14.0.v20200818-1422] + org.apache.commons.compress [1.19.0.v20200106-2343,1.19.0.v20200106-2343] + org.apache.commons.compress.source [1.19.0.v20200106-2343,1.19.0.v20200106-2343] + org.apache.commons.logging [1.2.0.v20180409-1502,1.2.0.v20180409-1502] + org.apache.commons.logging.source [1.2.0.v20180409-1502,1.2.0.v20180409-1502] + org.apache.httpcomponents.httpclient [4.5.10.v20200830-2311,4.5.10.v20200830-2311] + org.apache.httpcomponents.httpclient.source [4.5.10.v20200830-2311,4.5.10.v20200830-2311] + org.apache.httpcomponents.httpcore [4.4.12.v20200108-1212,4.4.12.v20200108-1212] + org.apache.httpcomponents.httpcore.source [4.4.12.v20200108-1212,4.4.12.v20200108-1212] + org.apache.log4j [1.2.15.v201012070815,1.2.15.v201012070815] + org.apache.log4j.source [1.2.15.v201012070815,1.2.15.v201012070815] + org.apache.sshd.osgi [2.4.0.v20200318-1614,2.4.0.v20200318-1614] + org.apache.sshd.osgi.source [2.4.0.v20200318-1614,2.4.0.v20200318-1614] + org.apache.sshd.sftp [2.4.0.v20200319-1547,2.4.0.v20200319-1547] + org.apache.sshd.sftp.source [2.4.0.v20200319-1547,2.4.0.v20200319-1547] + org.assertj [3.14.0.v20200120-1926,3.14.0.v20200120-1926] + org.assertj.source [3.14.0.v20200120-1926,3.14.0.v20200120-1926] + org.bouncycastle.bcpg [1.65.0.v20200527-1955,1.65.0.v20200527-1955] + org.bouncycastle.bcpg.source [1.65.0.v20200527-1955,1.65.0.v20200527-1955] + org.bouncycastle.bcpkix [1.65.0.v20200527-1955,1.65.0.v20200527-1955] + org.bouncycastle.bcpkix.source [1.65.0.v20200527-1955,1.65.0.v20200527-1955] + org.bouncycastle.bcprov [1.65.1.v20200529-1514,1.65.1.v20200529-1514] + org.bouncycastle.bcprov.source [1.65.1.v20200529-1514,1.65.1.v20200529-1514] + org.hamcrest [1.1.0.v20090501071000,1.1.0.v20090501071000] + org.hamcrest.core [1.3.0.v20180420-1519,1.3.0.v20180420-1519] + org.hamcrest.core.source [1.3.0.v20180420-1519,1.3.0.v20180420-1519] + org.hamcrest.library [1.3.0.v20180524-2246,1.3.0.v20180524-2246] + org.hamcrest.library.source [1.3.0.v20180524-2246,1.3.0.v20180524-2246] + org.junit [4.13.0.v20200204-1500,4.13.0.v20200204-1500] + org.junit.source [4.13.0.v20200204-1500,4.13.0.v20200204-1500] + org.kohsuke.args4j [2.33.0.v20160323-2218,2.33.0.v20160323-2218] + org.kohsuke.args4j.source [2.33.0.v20160323-2218,2.33.0.v20160323-2218] + org.mockito [2.23.0.v20200310-1642,2.23.0.v20200310-1642] + org.mockito.source [2.23.0.v20200310-1642,2.23.0.v20200310-1642] + org.objenesis [2.6.0.v20180420-1519,2.6.0.v20180420-1519] + org.objenesis.source [2.6.0.v20180420-1519,2.6.0.v20180420-1519] + org.slf4j.api [1.7.30.v20200204-2150,1.7.30.v20200204-2150] + org.slf4j.api.source [1.7.30.v20200204-2150,1.7.30.v20200204-2150] + org.slf4j.binding.log4j12 [1.7.30.v20201108-2042,1.7.30.v20201108-2042] + org.slf4j.binding.log4j12.source [1.7.30.v20201108-2042,1.7.30.v20201108-2042] + org.tukaani.xz [1.8.0.v20180207-1613,1.8.0.v20180207-1613] + org.tukaani.xz.source [1.8.0.v20180207-1613,1.8.0.v20180207-1613] +} diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml index 020580d44f..640ce318c4 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml @@ -16,7 +16,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.target</artifactId> diff --git a/org.eclipse.jgit.packaging/pom.xml b/org.eclipse.jgit.packaging/pom.xml index 935d9c5786..8fcfae3e7a 100644 --- a/org.eclipse.jgit.packaging/pom.xml +++ b/org.eclipse.jgit.packaging/pom.xml @@ -16,7 +16,7 @@ <groupId>org.eclipse.jgit</groupId> <artifactId>jgit.tycho.parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> <packaging>pom</packaging> <name>JGit Tycho Parent</name> diff --git a/org.eclipse.jgit.pgm.test/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.pgm.test/.settings/org.eclipse.jdt.core.prefs index 3dd5840397..b853c6a7ed 100644 --- a/org.eclipse.jgit.pgm.test/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.pgm.test/.settings/org.eclipse.jdt.core.prefs @@ -51,8 +51,8 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=no_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF index 5ad5180285..1027a9435c 100644 --- a/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF @@ -3,28 +3,28 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.pgm.test Bundle-SymbolicName: org.eclipse.jgit.pgm.test -Bundle-Version: 5.9.1.qualifier +Bundle-Version: 5.10.0.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Import-Package: org.eclipse.jgit.api;version="[5.9.1,5.10.0)", - org.eclipse.jgit.api.errors;version="[5.9.1,5.10.0)", - org.eclipse.jgit.diff;version="[5.9.1,5.10.0)", - org.eclipse.jgit.dircache;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.storage.file;version="5.9.1", - org.eclipse.jgit.junit;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lib;version="[5.9.1,5.10.0)", - org.eclipse.jgit.merge;version="[5.9.1,5.10.0)", - org.eclipse.jgit.pgm;version="[5.9.1,5.10.0)", - org.eclipse.jgit.pgm.internal;version="[5.9.1,5.10.0)", - org.eclipse.jgit.pgm.opt;version="[5.9.1,5.10.0)", - org.eclipse.jgit.revwalk;version="[5.9.1,5.10.0)", - org.eclipse.jgit.storage.file;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport;version="[5.9.1,5.10.0)", - org.eclipse.jgit.treewalk;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util.io;version="[5.9.1,5.10.0)", +Import-Package: org.eclipse.jgit.api;version="[5.10.0,5.11.0)", + org.eclipse.jgit.api.errors;version="[5.10.0,5.11.0)", + org.eclipse.jgit.diff;version="[5.10.0,5.11.0)", + org.eclipse.jgit.dircache;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.storage.file;version="5.10.0", + org.eclipse.jgit.junit;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lib;version="[5.10.0,5.11.0)", + org.eclipse.jgit.merge;version="[5.10.0,5.11.0)", + org.eclipse.jgit.pgm;version="[5.10.0,5.11.0)", + org.eclipse.jgit.pgm.internal;version="[5.10.0,5.11.0)", + org.eclipse.jgit.pgm.opt;version="[5.10.0,5.11.0)", + org.eclipse.jgit.revwalk;version="[5.10.0,5.11.0)", + org.eclipse.jgit.storage.file;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport;version="[5.10.0,5.11.0)", + org.eclipse.jgit.treewalk;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util.io;version="[5.10.0,5.11.0)", org.hamcrest.core;bundle-version="[1.1.0,2.0.0)", org.junit;version="[4.13,5.0.0)", org.junit.rules;version="[4.13,5.0.0)", diff --git a/org.eclipse.jgit.pgm.test/pom.xml b/org.eclipse.jgit.pgm.test/pom.xml index db4e93e175..4713e2dd06 100644 --- a/org.eclipse.jgit.pgm.test/pom.xml +++ b/org.eclipse.jgit.pgm.test/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.pgm.test</artifactId> diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/LsRemoteTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/LsRemoteTest.java index 4ecaeb604a..46eec7436e 100644 --- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/LsRemoteTest.java +++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/LsRemoteTest.java @@ -33,7 +33,7 @@ public class LsRemoteTest extends CLIRepositoryTestCase { git.add().addFilepattern("Test.txt").call(); git.commit().setMessage("Initial commit").call(); - // create a master branch and switch to it + // create a test branch and switch to it git.branchCreate().setName("test").call(); RefUpdate rup = db.updateRef(Constants.HEAD); rup.link("refs/heads/test"); @@ -104,4 +104,22 @@ public class LsRemoteTest extends CLIRepositoryTestCase { "" }, result.toArray()); } + @Test + public void testLsRemoteSymRefs() throws Exception { + final List<String> result = CLIGitCommand.execute( + "git ls-remote --symref " + shellQuote(db.getDirectory()), db); + assertArrayEquals(new String[] { + "ref: refs/heads/test HEAD", + "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()); + } + } diff --git a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF index 218f56880a..23191accf9 100644 --- a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.pgm Bundle-SymbolicName: org.eclipse.jgit.pgm -Bundle-Version: 5.9.1.qualifier +Bundle-Version: 5.10.0.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-1.8 @@ -13,48 +13,48 @@ Import-Package: javax.servlet;version="[3.1.0,4.0.0)", org.eclipse.jetty.servlet;version="[9.4.5,10.0.0)", org.eclipse.jetty.util;version="[9.4.5,10.0.0)", org.eclipse.jetty.util.component;version="[9.4.5,10.0.0)", - org.eclipse.jgit.api;version="[5.9.1,5.10.0)", - org.eclipse.jgit.api.errors;version="[5.9.1,5.10.0)", - org.eclipse.jgit.archive;version="[5.9.1,5.10.0)", - org.eclipse.jgit.awtui;version="[5.9.1,5.10.0)", - org.eclipse.jgit.blame;version="[5.9.1,5.10.0)", - org.eclipse.jgit.diff;version="[5.9.1,5.10.0)", - org.eclipse.jgit.dircache;version="[5.9.1,5.10.0)", - org.eclipse.jgit.errors;version="[5.9.1,5.10.0)", - org.eclipse.jgit.gitrepo;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.ketch;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.storage.file;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.storage.io;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.storage.pack;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.storage.reftable;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.storage.reftree;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lfs;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lfs.server;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lfs.server.fs;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lfs.server.s3;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lib;version="[5.9.1,5.10.0)", - org.eclipse.jgit.merge;version="[5.9.1,5.10.0)", - org.eclipse.jgit.nls;version="[5.9.1,5.10.0)", - org.eclipse.jgit.notes;version="[5.9.1,5.10.0)", - org.eclipse.jgit.revplot;version="[5.9.1,5.10.0)", - org.eclipse.jgit.revwalk;version="[5.9.1,5.10.0)", - org.eclipse.jgit.revwalk.filter;version="[5.9.1,5.10.0)", - org.eclipse.jgit.storage.file;version="[5.9.1,5.10.0)", - org.eclipse.jgit.storage.pack;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport.http.apache;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport.resolver;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport.sshd;version="[5.9.1,5.10.0)", - org.eclipse.jgit.treewalk;version="[5.9.1,5.10.0)", - org.eclipse.jgit.treewalk.filter;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util.io;version="[5.9.1,5.10.0)", + org.eclipse.jgit.api;version="[5.10.0,5.11.0)", + org.eclipse.jgit.api.errors;version="[5.10.0,5.11.0)", + org.eclipse.jgit.archive;version="[5.10.0,5.11.0)", + org.eclipse.jgit.awtui;version="[5.10.0,5.11.0)", + org.eclipse.jgit.blame;version="[5.10.0,5.11.0)", + org.eclipse.jgit.diff;version="[5.10.0,5.11.0)", + org.eclipse.jgit.dircache;version="[5.10.0,5.11.0)", + org.eclipse.jgit.errors;version="[5.10.0,5.11.0)", + org.eclipse.jgit.gitrepo;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.ketch;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.storage.file;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.storage.io;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.storage.pack;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.storage.reftable;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.storage.reftree;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lfs;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lfs.server;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lfs.server.fs;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lfs.server.s3;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lib;version="[5.10.0,5.11.0)", + org.eclipse.jgit.merge;version="[5.10.0,5.11.0)", + org.eclipse.jgit.nls;version="[5.10.0,5.11.0)", + org.eclipse.jgit.notes;version="[5.10.0,5.11.0)", + org.eclipse.jgit.revplot;version="[5.10.0,5.11.0)", + org.eclipse.jgit.revwalk;version="[5.10.0,5.11.0)", + org.eclipse.jgit.revwalk.filter;version="[5.10.0,5.11.0)", + org.eclipse.jgit.storage.file;version="[5.10.0,5.11.0)", + org.eclipse.jgit.storage.pack;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport.http.apache;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport.resolver;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport.sshd;version="[5.10.0,5.11.0)", + org.eclipse.jgit.treewalk;version="[5.10.0,5.11.0)", + org.eclipse.jgit.treewalk.filter;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util.io;version="[5.10.0,5.11.0)", org.kohsuke.args4j;version="[2.33.0,3.0.0)", org.kohsuke.args4j.spi;version="[2.33.0,3.0.0)" -Export-Package: org.eclipse.jgit.console;version="5.9.1"; +Export-Package: org.eclipse.jgit.console;version="5.10.0"; uses:="org.eclipse.jgit.transport, org.eclipse.jgit.util", - org.eclipse.jgit.pgm;version="5.9.1"; + org.eclipse.jgit.pgm;version="5.10.0"; uses:="org.eclipse.jgit.transport, org.eclipse.jgit.util.io, org.eclipse.jgit.awtui, @@ -66,14 +66,14 @@ Export-Package: org.eclipse.jgit.console;version="5.9.1"; org.eclipse.jgit.treewalk, org.eclipse.jgit.api, javax.swing", - org.eclipse.jgit.pgm.debug;version="5.9.1"; + org.eclipse.jgit.pgm.debug;version="5.10.0"; uses:="org.eclipse.jgit.util.io, org.eclipse.jgit.pgm, org.eclipse.jetty.servlet", - org.eclipse.jgit.pgm.internal;version="5.9.1"; + org.eclipse.jgit.pgm.internal;version="5.10.0"; x-friends:="org.eclipse.jgit.pgm.test, org.eclipse.jgit.test", - org.eclipse.jgit.pgm.opt;version="5.9.1"; + org.eclipse.jgit.pgm.opt;version="5.10.0"; uses:="org.kohsuke.args4j, org.eclipse.jgit.lib, org.eclipse.jgit.revwalk, diff --git a/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF index 4df8f9071a..1dc6f2020c 100644 --- a/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF +++ b/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: 5.9.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="5.9.1.qualifier";roots="." +Bundle-Version: 5.10.0.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="5.10.0.qualifier";roots="." diff --git a/org.eclipse.jgit.pgm/pom.xml b/org.eclipse.jgit.pgm/pom.xml index 0c265056d0..a3ff9a0722 100644 --- a/org.eclipse.jgit.pgm/pom.xml +++ b/org.eclipse.jgit.pgm/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.pgm</artifactId> diff --git a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties index f3e1fe31ba..6112a272e4 100644 --- a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties +++ b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties @@ -256,6 +256,7 @@ usage_LsFiles=Show information about files in the index and the working tree 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_lsRemoteSymref=In addition to the object pointed at, show the underlying ref pointed at when showing a symbolic ref. usage_LsTree=List the contents of a tree object usage_MakeCacheTree=Show the current cache tree structure usage_Match=Only consider tags matching the given glob(7) pattern or patterns, excluding the "refs/tags/" prefix. @@ -294,6 +295,7 @@ usage_Status=Show the working tree status usage_StopTrackingAFile=Stop tracking a file usage_TextHashFunctions=Scan repository to compute maximum number of collisions for hash functions usage_UpdateRemoteRepositoryFromLocalRefs=Update remote repository from local refs +usage_UseAll=Use all refs found in refs/ usage_UseTags=Use any tag including lightweight tags usage_WriteDirCache=Write the DirCache usage_abbrevCommits=abbreviate commits to N + 1 digits diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java index 610b6472a5..8aa119a358 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java @@ -32,6 +32,9 @@ class Describe extends TextBuiltin { @Option(name = "--long", usage = "usage_LongFormat") private boolean longDesc; + @Option(name = "--all", usage = "usage_UseTags") + private boolean useAll; + @Option(name = "--tags", usage = "usage_UseTags") private boolean useTags; @@ -50,6 +53,7 @@ class Describe extends TextBuiltin { cmd.setTarget(tree); } cmd.setLong(longDesc); + cmd.setAll(useAll); cmd.setTags(useTags); cmd.setAlways(always); cmd.setMatch(patterns.toArray(new String[0])); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java index 36812c03a4..055b48a157 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java @@ -34,6 +34,9 @@ class LsRemote extends TextBuiltin { @Option(name = "--timeout", metaVar = "metaVar_service", usage = "usage_abortConnectionIfNoActivity") int timeout = -1; + @Option(name = "--symref", usage = "usage_lsRemoteSymref") + private boolean symref; + @Argument(index = 0, metaVar = "metaVar_uriish", required = true) private String remote; @@ -47,6 +50,9 @@ class LsRemote extends TextBuiltin { try { refs.addAll(command.call()); for (Ref r : refs) { + if (symref && r.isSymbolic()) { + show(r.getTarget(), r.getName()); + } show(r.getObjectId(), r.getName()); if (r.getPeeledObjectId() != null) { show(r.getPeeledObjectId(), r.getName() + "^{}"); //$NON-NLS-1$ @@ -70,4 +76,13 @@ class LsRemote extends TextBuiltin { outw.print(name); outw.println(); } + + private void show(Ref ref, String name) + throws IOException { + outw.print("ref: "); + outw.print(ref.getName()); + outw.print('\t'); + outw.print(name); + outw.println(); + } } diff --git a/org.eclipse.jgit.ssh.apache.test/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.ssh.apache.test/.settings/org.eclipse.jdt.core.prefs index 822846c4d0..cba893f04e 100644 --- a/org.eclipse.jgit.ssh.apache.test/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.ssh.apache.test/.settings/org.eclipse.jdt.core.prefs @@ -51,8 +51,8 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=no_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF index 5c9ce9c7e8..60f7d41a62 100644 --- a/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.ssh.apache.test Bundle-SymbolicName: org.eclipse.jgit.ssh.apache.test -Bundle-Version: 5.9.1.qualifier +Bundle-Version: 5.10.0.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-1.8 @@ -11,20 +11,22 @@ Import-Package: org.apache.sshd.client.config.hosts;version="[2.4.0,2.5.0)", org.apache.sshd.common;version="[2.4.0,2.5.0)", org.apache.sshd.common.auth;version="[2.4.0,2.5.0)", org.apache.sshd.common.config.keys;version="[2.4.0,2.5.0)", + org.apache.sshd.common.helpers;version="[2.4.0,2.5.0)", org.apache.sshd.common.keyprovider;version="[2.4.0,2.5.0)", org.apache.sshd.common.session;version="[2.4.0,2.5.0)", org.apache.sshd.common.util.net;version="[2.4.0,2.5.0)", org.apache.sshd.common.util.security;version="[2.4.0,2.5.0)", org.apache.sshd.server;version="[2.4.0,2.5.0)", - org.eclipse.jgit.api;version="[5.9.1,5.10.0)", - org.eclipse.jgit.api.errors;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.transport.sshd.proxy;version="[5.9.1,5.10.0)", - org.eclipse.jgit.junit;version="[5.9.1,5.10.0)", - org.eclipse.jgit.junit.ssh;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lib;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport.sshd;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util;version="[5.9.1,5.10.0)", + org.apache.sshd.server.forward;version="[2.4.0,2.5.0)", + org.eclipse.jgit.api;version="[5.10.0,5.11.0)", + org.eclipse.jgit.api.errors;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.transport.sshd.proxy;version="[5.10.0,5.11.0)", + org.eclipse.jgit.junit;version="[5.10.0,5.11.0)", + org.eclipse.jgit.junit.ssh;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lib;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport.sshd;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util;version="[5.10.0,5.11.0)", org.junit;version="[4.13,5.0.0)", org.junit.experimental.theories;version="[4.13,5.0.0)", org.junit.runner;version="[4.13,5.0.0)" diff --git a/org.eclipse.jgit.ssh.apache.test/pom.xml b/org.eclipse.jgit.ssh.apache.test/pom.xml index df319ad83d..fb28377fd0 100644 --- a/org.eclipse.jgit.ssh.apache.test/pom.xml +++ b/org.eclipse.jgit.ssh.apache.test/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.ssh.apache.test</artifactId> diff --git a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java index 651ae7dec1..3427da667d 100644 --- a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java +++ b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018, Thomas Wolf <thomas.wolf@paranor.ch> and others + * Copyright (C) 2018, 2020 Thomas Wolf <thomas.wolf@paranor.ch> and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -11,19 +11,39 @@ package org.eclipse.jgit.transport.sshd; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; +import java.io.BufferedWriter; import java.io.File; import java.io.IOException; import java.io.UncheckedIOException; +import java.net.URISyntaxException; +import java.nio.charset.StandardCharsets; import java.nio.file.Files; +import java.nio.file.StandardOpenOption; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.PublicKey; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.stream.Collectors; + import org.apache.sshd.client.config.hosts.KnownHostEntry; +import org.apache.sshd.client.config.hosts.KnownHostHashValue; import org.apache.sshd.common.PropertyResolverUtils; +import org.apache.sshd.common.config.keys.AuthorizedKeyEntry; +import org.apache.sshd.common.config.keys.KeyUtils; +import org.apache.sshd.common.config.keys.PublicKeyEntry; +import org.apache.sshd.common.config.keys.PublicKeyEntryResolver; +import org.apache.sshd.common.session.Session; +import org.apache.sshd.common.util.net.SshdSocketAddress; +import org.apache.sshd.server.ServerAuthenticationManager; import org.apache.sshd.server.ServerFactoryManager; +import org.apache.sshd.server.SshServer; +import org.apache.sshd.server.forward.StaticDecisionForwardingFilter; import org.eclipse.jgit.api.Git; import org.eclipse.jgit.api.errors.TransportException; import org.eclipse.jgit.junit.ssh.SshTestBase; @@ -211,4 +231,380 @@ public class ApacheSshTest extends SshTestBase { git.fetch().call(); } } + + /** + * Creates a simple proxy server. Accepts only publickey authentication from + * the given user with the given key, allows all forwardings. Adds the + * proxy's host key to {@link #knownHosts}. + * + * @param user + * to accept + * @param userKey + * public key of that user at this server + * @param report + * single-element array to report back the forwarded address. + * @return the started server + * @throws Exception + */ + private SshServer createProxy(String user, File userKey, + SshdSocketAddress[] report) throws Exception { + SshServer proxy = SshServer.setUpDefaultServer(); + // Give the server its own host key + KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA"); + generator.initialize(2048); + KeyPair proxyHostKey = generator.generateKeyPair(); + proxy.setKeyPairProvider( + session -> Collections.singletonList(proxyHostKey)); + // Allow (only) publickey authentication + proxy.setUserAuthFactories(Collections.singletonList( + ServerAuthenticationManager.DEFAULT_USER_AUTH_PUBLIC_KEY_FACTORY)); + // Install the user's public key + PublicKey userProxyKey = AuthorizedKeyEntry + .readAuthorizedKeys(userKey.toPath()).get(0) + .resolvePublicKey(null, PublicKeyEntryResolver.IGNORING); + proxy.setPublickeyAuthenticator( + (userName, publicKey, session) -> user.equals(userName) + && KeyUtils.compareKeys(userProxyKey, publicKey)); + // Allow forwarding + proxy.setForwardingFilter(new StaticDecisionForwardingFilter(true) { + + @Override + protected boolean checkAcceptance(String request, Session session, + SshdSocketAddress target) { + report[0] = target; + return super.checkAcceptance(request, session, target); + } + }); + proxy.start(); + // Add the proxy's host key to knownhosts + try (BufferedWriter writer = Files.newBufferedWriter( + knownHosts.toPath(), StandardCharsets.US_ASCII, + StandardOpenOption.WRITE, StandardOpenOption.APPEND)) { + writer.append('\n'); + KnownHostHashValue.appendHostPattern(writer, "localhost", + proxy.getPort()); + writer.append(','); + KnownHostHashValue.appendHostPattern(writer, "127.0.0.1", + proxy.getPort()); + writer.append(' '); + PublicKeyEntry.appendPublicKeyEntry(writer, + proxyHostKey.getPublic()); + writer.append('\n'); + } + return proxy; + } + + @Test + public void testJumpHost() throws Exception { + SshdSocketAddress[] forwarded = { null }; + try (SshServer proxy = createProxy(TEST_USER + 'X', publicKey2, + forwarded)) { + try { + // Now try to clone via the proxy + cloneWith("ssh://server/doesntmatter", defaultCloneDir, null, // + "Host server", // + "HostName localhost", // + "Port " + testPort, // + "User " + TEST_USER, // + "IdentityFile " + privateKey1.getAbsolutePath(), // + "ProxyJump " + TEST_USER + "X@proxy:" + proxy.getPort(), // + "", // + "Host proxy", // + "Hostname localhost", // + "IdentityFile " + privateKey2.getAbsolutePath()); + assertNotNull(forwarded[0]); + assertEquals(testPort, forwarded[0].getPort()); + } finally { + proxy.stop(); + } + } + } + + @Test + public void testJumpHostWrongKeyAtProxy() throws Exception { + // Test that we find the proxy server's URI in the exception message + SshdSocketAddress[] forwarded = { null }; + try (SshServer proxy = createProxy(TEST_USER + 'X', publicKey2, + forwarded)) { + try { + // Now try to clone via the proxy + TransportException e = assertThrows(TransportException.class, + () -> cloneWith("ssh://server/doesntmatter", + defaultCloneDir, null, // + "Host server", // + "HostName localhost", // + "Port " + testPort, // + "User " + TEST_USER, // + "IdentityFile " + privateKey1.getAbsolutePath(), + "ProxyJump " + TEST_USER + "X@proxy:" + + proxy.getPort(), // + "", // + "Host proxy", // + "Hostname localhost", // + "IdentityFile " + + privateKey1.getAbsolutePath())); + String message = e.getMessage(); + assertTrue(message.contains("localhost:" + proxy.getPort())); + assertTrue(message.contains("proxy:" + proxy.getPort())); + } finally { + proxy.stop(); + } + } + } + + @Test + public void testJumpHostWrongKeyAtServer() throws Exception { + // Test that we find the target server's URI in the exception message + SshdSocketAddress[] forwarded = { null }; + try (SshServer proxy = createProxy(TEST_USER + 'X', publicKey2, + forwarded)) { + try { + // Now try to clone via the proxy + TransportException e = assertThrows(TransportException.class, + () -> cloneWith("ssh://server/doesntmatter", + defaultCloneDir, null, // + "Host server", // + "HostName localhost", // + "Port " + testPort, // + "User " + TEST_USER, // + "IdentityFile " + privateKey2.getAbsolutePath(), + "ProxyJump " + TEST_USER + "X@proxy:" + + proxy.getPort(), // + "", // + "Host proxy", // + "Hostname localhost", // + "IdentityFile " + + privateKey2.getAbsolutePath())); + String message = e.getMessage(); + assertTrue(message.contains("localhost:" + testPort)); + assertTrue(message.contains("ssh://server")); + } finally { + proxy.stop(); + } + } + } + + @Test + public void testJumpHostNonSsh() throws Exception { + SshdSocketAddress[] forwarded = { null }; + try (SshServer proxy = createProxy(TEST_USER + 'X', publicKey2, + forwarded)) { + try { + TransportException e = assertThrows(TransportException.class, + () -> cloneWith("ssh://server/doesntmatter", + defaultCloneDir, null, // + "Host server", // + "HostName localhost", // + "Port " + testPort, // + "User " + TEST_USER, // + "IdentityFile " + privateKey1.getAbsolutePath(), // + "ProxyJump http://" + TEST_USER + "X@proxy:" + + proxy.getPort(), // + "", // + "Host proxy", // + "Hostname localhost", // + "IdentityFile " + + privateKey2.getAbsolutePath())); + // Find the expected message + Throwable t = e; + while (t != null) { + if (t instanceof URISyntaxException) { + break; + } + t = t.getCause(); + } + assertNotNull(t); + assertTrue(t.getMessage().contains("Non-ssh")); + } finally { + proxy.stop(); + } + } + } + + @Test + public void testJumpHostWithPath() throws Exception { + SshdSocketAddress[] forwarded = { null }; + try (SshServer proxy = createProxy(TEST_USER + 'X', publicKey2, + forwarded)) { + try { + TransportException e = assertThrows(TransportException.class, + () -> cloneWith("ssh://server/doesntmatter", + defaultCloneDir, null, // + "Host server", // + "HostName localhost", // + "Port " + testPort, // + "User " + TEST_USER, // + "IdentityFile " + privateKey1.getAbsolutePath(), // + "ProxyJump ssh://" + TEST_USER + "X@proxy:" + + proxy.getPort() + "/wrongPath", // + "", // + "Host proxy", // + "Hostname localhost", // + "IdentityFile " + + privateKey2.getAbsolutePath())); + // Find the expected message + Throwable t = e; + while (t != null) { + if (t instanceof URISyntaxException) { + break; + } + t = t.getCause(); + } + assertNotNull(t); + assertTrue(t.getMessage().contains("wrongPath")); + } finally { + proxy.stop(); + } + } + } + + @Test + public void testJumpHostWithPathShort() throws Exception { + SshdSocketAddress[] forwarded = { null }; + try (SshServer proxy = createProxy(TEST_USER + 'X', publicKey2, + forwarded)) { + try { + TransportException e = assertThrows(TransportException.class, + () -> cloneWith("ssh://server/doesntmatter", + defaultCloneDir, null, // + "Host server", // + "HostName localhost", // + "Port " + testPort, // + "User " + TEST_USER, // + "IdentityFile " + privateKey1.getAbsolutePath(), // + "ProxyJump " + TEST_USER + "X@proxy:wrongPath", // + "", // + "Host proxy", // + "Hostname localhost", // + "Port " + proxy.getPort(), // + "IdentityFile " + + privateKey2.getAbsolutePath())); + // Find the expected message + Throwable t = e; + while (t != null) { + if (t instanceof URISyntaxException) { + break; + } + t = t.getCause(); + } + assertNotNull(t); + assertTrue(t.getMessage().contains("wrongPath")); + } finally { + proxy.stop(); + } + } + } + + @Test + public void testJumpHostChain() throws Exception { + SshdSocketAddress[] forwarded1 = { null }; + SshdSocketAddress[] forwarded2 = { null }; + try (SshServer proxy1 = createProxy(TEST_USER + 'X', publicKey2, + forwarded1); + SshServer proxy2 = createProxy("foo", publicKey1, forwarded2)) { + try { + // Clone proxy1 -> proxy2 -> server + cloneWith("ssh://server/doesntmatter", defaultCloneDir, null, // + "Host server", // + "HostName localhost", // + "Port " + testPort, // + "User " + TEST_USER, // + "IdentityFile " + privateKey1.getAbsolutePath(), // + "ProxyJump proxy2," + TEST_USER + "X@proxy:" + + proxy1.getPort(), // + "", // + "Host proxy", // + "Hostname localhost", // + "IdentityFile " + privateKey2.getAbsolutePath(), // + "", // + "Host proxy2", // + "Hostname localhost", // + "User foo", // + "Port " + proxy2.getPort(), // + "IdentityFile " + privateKey1.getAbsolutePath()); + assertNotNull(forwarded1[0]); + assertEquals(proxy2.getPort(), forwarded1[0].getPort()); + assertNotNull(forwarded2[0]); + assertEquals(testPort, forwarded2[0].getPort()); + } finally { + proxy1.stop(); + proxy2.stop(); + } + } + } + + @Test + public void testJumpHostCascade() throws Exception { + SshdSocketAddress[] forwarded1 = { null }; + SshdSocketAddress[] forwarded2 = { null }; + try (SshServer proxy1 = createProxy(TEST_USER + 'X', publicKey2, + forwarded1); + SshServer proxy2 = createProxy("foo", publicKey1, forwarded2)) { + try { + // Clone proxy2 -> proxy1 -> server + cloneWith("ssh://server/doesntmatter", defaultCloneDir, null, // + "Host server", // + "HostName localhost", // + "Port " + testPort, // + "User " + TEST_USER, // + "IdentityFile " + privateKey1.getAbsolutePath(), // + "ProxyJump " + TEST_USER + "X@proxy", // + "", // + "Host proxy", // + "Hostname localhost", // + "Port " + proxy1.getPort(), // + "ProxyJump ssh://proxy2:" + proxy2.getPort(), // + "IdentityFile " + privateKey2.getAbsolutePath(), // + "", // + "Host proxy2", // + "Hostname localhost", // + "User foo", // + "IdentityFile " + privateKey1.getAbsolutePath()); + assertNotNull(forwarded1[0]); + assertEquals(testPort, forwarded1[0].getPort()); + assertNotNull(forwarded2[0]); + assertEquals(proxy1.getPort(), forwarded2[0].getPort()); + } finally { + proxy1.stop(); + proxy2.stop(); + } + } + } + + @Test + public void testJumpHostRecursion() throws Exception { + SshdSocketAddress[] forwarded1 = { null }; + SshdSocketAddress[] forwarded2 = { null }; + try (SshServer proxy1 = createProxy(TEST_USER + 'X', publicKey2, + forwarded1); + SshServer proxy2 = createProxy("foo", publicKey1, forwarded2)) { + try { + TransportException e = assertThrows(TransportException.class, + () -> cloneWith( + "ssh://server/doesntmatter", defaultCloneDir, null, // + "Host server", // + "HostName localhost", // + "Port " + testPort, // + "User " + TEST_USER, // + "IdentityFile " + privateKey1.getAbsolutePath(), // + "ProxyJump " + TEST_USER + "X@proxy", // + "", // + "Host proxy", // + "Hostname localhost", // + "Port " + proxy1.getPort(), // + "ProxyJump ssh://proxy2:" + proxy2.getPort(), // + "IdentityFile " + privateKey2.getAbsolutePath(), // + "", // + "Host proxy2", // + "Hostname localhost", // + "User foo", // + "ProxyJump " + TEST_USER + "X@proxy", // + "IdentityFile " + privateKey1.getAbsolutePath())); + assertTrue(e.getMessage().contains("proxy")); + } finally { + proxy1.stop(); + proxy2.stop(); + } + } + } } diff --git a/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF index 44265b33eb..c5c64fcd9a 100644 --- a/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF @@ -6,9 +6,9 @@ Bundle-SymbolicName: org.eclipse.jgit.ssh.apache Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-ActivationPolicy: lazy -Bundle-Version: 5.9.1.qualifier +Bundle-Version: 5.10.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Export-Package: org.eclipse.jgit.internal.transport.sshd;version="5.9.1";x-internal:=true; +Export-Package: org.eclipse.jgit.internal.transport.sshd;version="5.10.0";x-internal:=true; uses:="org.apache.sshd.client, org.apache.sshd.client.auth, org.apache.sshd.client.auth.keyboard, @@ -23,9 +23,9 @@ Export-Package: org.eclipse.jgit.internal.transport.sshd;version="5.9.1";x-inter org.apache.sshd.common.signature, org.apache.sshd.common.util.buffer, org.eclipse.jgit.transport", - org.eclipse.jgit.internal.transport.sshd.auth;version="5.9.1";x-internal:=true, - org.eclipse.jgit.internal.transport.sshd.proxy;version="5.9.1";x-friends:="org.eclipse.jgit.ssh.apache.test", - org.eclipse.jgit.transport.sshd;version="5.9.1"; + org.eclipse.jgit.internal.transport.sshd.auth;version="5.10.0";x-internal:=true, + org.eclipse.jgit.internal.transport.sshd.proxy;version="5.10.0";x-friends:="org.eclipse.jgit.ssh.apache.test", + org.eclipse.jgit.transport.sshd;version="5.10.0"; uses:="org.eclipse.jgit.transport, org.apache.sshd.client.config.hosts, org.apache.sshd.common.keyprovider, @@ -45,6 +45,7 @@ Import-Package: net.i2p.crypto.eddsa;version="[0.3.0,0.4.0)", org.apache.sshd.client.future;version="[2.4.0,2.5.0)", org.apache.sshd.client.keyverifier;version="[2.4.0,2.5.0)", org.apache.sshd.client.session;version="[2.4.0,2.5.0)", + org.apache.sshd.client.session.forward;version="[2.4.0,2.5.0)", org.apache.sshd.client.subsystem.sftp;version="[2.4.0,2.5.0)", org.apache.sshd.common;version="[2.4.0,2.5.0)", org.apache.sshd.common.auth;version="[2.4.0,2.5.0)", @@ -75,12 +76,12 @@ Import-Package: net.i2p.crypto.eddsa;version="[0.3.0,0.4.0)", org.apache.sshd.common.util.net;version="[2.4.0,2.5.0)", org.apache.sshd.common.util.security;version="[2.4.0,2.5.0)", org.apache.sshd.server.auth;version="[2.4.0,2.5.0)", - org.eclipse.jgit.annotations;version="[5.9.1,5.10.0)", - org.eclipse.jgit.errors;version="[5.9.1,5.10.0)", - org.eclipse.jgit.fnmatch;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.storage.file;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.transport.ssh;version="[5.9.1,5.10.0)", - org.eclipse.jgit.nls;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util;version="[5.9.1,5.10.0)", + org.eclipse.jgit.annotations;version="[5.10.0,5.11.0)", + org.eclipse.jgit.errors;version="[5.10.0,5.11.0)", + org.eclipse.jgit.fnmatch;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.storage.file;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.transport.ssh;version="[5.10.0,5.11.0)", + org.eclipse.jgit.nls;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util;version="[5.10.0,5.11.0)", org.slf4j;version="[1.7.0,2.0.0)" diff --git a/org.eclipse.jgit.ssh.apache/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.ssh.apache/META-INF/SOURCE-MANIFEST.MF index c05bd953be..808476458b 100644 --- a/org.eclipse.jgit.ssh.apache/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.ssh.apache/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.ssh.apache - Sources Bundle-SymbolicName: org.eclipse.jgit.ssh.apache.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 5.9.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.ssh.apache;version="5.9.1.qualifier";roots="." +Bundle-Version: 5.10.0.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.ssh.apache;version="5.10.0.qualifier";roots="." diff --git a/org.eclipse.jgit.ssh.apache/pom.xml b/org.eclipse.jgit.ssh.apache/pom.xml index e9952003cb..4eb9cc747a 100644 --- a/org.eclipse.jgit.ssh.apache/pom.xml +++ b/org.eclipse.jgit.ssh.apache/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.ssh.apache</artifactId> diff --git a/org.eclipse.jgit.ssh.apache/resources/org/eclipse/jgit/internal/transport/sshd/SshdText.properties b/org.eclipse.jgit.ssh.apache/resources/org/eclipse/jgit/internal/transport/sshd/SshdText.properties index b89bc606a7..f810fd40e4 100644 --- a/org.eclipse.jgit.ssh.apache/resources/org/eclipse/jgit/internal/transport/sshd/SshdText.properties +++ b/org.eclipse.jgit.ssh.apache/resources/org/eclipse/jgit/internal/transport/sshd/SshdText.properties @@ -1,11 +1,14 @@ -authenticationCanceled=Authentication canceled: no password +authenticationCanceled=SSH authentication canceled: no password given authenticationOnClosedSession=Authentication canceled: session is already closing or closed closeListenerFailed=Ssh session close listener failed configInvalidPath=Invalid path in ssh config key {0}: {1} configInvalidPattern=Invalid pattern in ssh config key {0}: {1} configInvalidPositive=Ssh config entry {0} must be a strictly positive number but is ''{1}'' +configInvalidProxyJump=Ssh config, host ''{0}'': Cannot parse ProxyJump ''{1}'' configNoKnownHostKeyAlgorithms=No implementations for any of the algorithms ''{0}'' given in HostKeyAlgorithms in the ssh config; using the default. configNoRemainingHostKeyAlgorithms=Ssh config removed all host key algorithms: HostKeyAlgorithms ''{0}'' +configProxyJumpNotSsh=Non-ssh URI in ProxyJump ssh config +configProxyJumpWithPath=ProxyJump ssh config: jump host specification must not have a path ftpCloseFailed=Closing the SFTP channel failed gssapiFailure=GSS-API error for mechanism OID {0} gssapiInitFailure=GSS-API initialization failure for mechanism {0} @@ -46,12 +49,14 @@ knownHostsUnknownKeyPrompt=Accept and store this key, and continue connecting? knownHostsUnknownKeyType=Cannot read server key from known hosts file {0}; line {1} knownHostsUserAskCreationMsg=File {0} does not exist. knownHostsUserAskCreationPrompt=Create file {0} ? +loginDenied=Cannot log in at {0}:{1} passwordPrompt=Password proxyCannotAuthenticate=Cannot authenticate to proxy {0} proxyHttpFailure=HTTP Proxy connection to {0} failed with code {1}: {2} proxyHttpInvalidUserName=HTTP proxy connection {0} with invalid user name; must not contain colons: {1} proxyHttpUnexpectedReply=Unexpected HTTP proxy response from {0}: {1} proxyHttpUnspecifiedFailureReason=unspecified reason +proxyJumpAbort=ProxyJump chain too long at {0} proxyPasswordPrompt=Proxy password proxySocksAuthenticationFailed=Authentication to SOCKS5 proxy {0} failed proxySocksFailureForbidden=SOCKS5 proxy {0}: connection to {1} not allowed by ruleset @@ -80,4 +85,5 @@ sessionWithoutUsername=SSH session created without user name; cannot authenticat sshClosingDown=Apache MINA sshd session factory is closing down; cannot create new ssh sessions on this factory sshCommandTimeout={0} timed out after {1} seconds while opening the channel sshProcessStillRunning={0} is not yet completed, cannot get exit code +sshProxySessionCloseFailed=Error while closing proxy session {0} unknownProxyProtocol=Ignoring unknown proxy protocol {0}
\ No newline at end of file diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/AuthenticationCanceledException.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/AuthenticationCanceledException.java new file mode 100644 index 0000000000..aa4623571d --- /dev/null +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/AuthenticationCanceledException.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2020, Thomas Wolf <thomas.wolf@paranor.ch> and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.internal.transport.sshd; + +import java.util.concurrent.CancellationException; + +/** + * An exception to report that the user canceled the SSH authentication. + */ +public class AuthenticationCanceledException extends CancellationException { + + // If this is not a CancellationException sshd will try other authentication + // mechanisms. + + private static final long serialVersionUID = 1L; + + /** + * Creates a new {@link AuthenticationCanceledException}. + */ + public AuthenticationCanceledException() { + super(SshdText.get().authenticationCanceled); + } +} diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPasswordAuthentication.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPasswordAuthentication.java index 0a7082cefe..4abd6e901a 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPasswordAuthentication.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPasswordAuthentication.java @@ -9,8 +9,6 @@ */ package org.eclipse.jgit.internal.transport.sshd; -import java.util.concurrent.CancellationException; - import org.apache.sshd.client.ClientAuthenticationManager; import org.apache.sshd.client.auth.keyboard.UserInteraction; import org.apache.sshd.client.auth.password.UserAuthPassword; @@ -49,7 +47,7 @@ public class JGitPasswordAuthentication extends UserAuthPassword { } String password = getPassword(session, interaction); if (password == null) { - throw new CancellationException(); + throw new AuthenticationCanceledException(); } // sendPassword takes a buffer as first argument, but actually doesn't // use it and creates its own buffer... diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshClient.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshClient.java index 1825fb37b2..beaaecaac9 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshClient.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshClient.java @@ -49,6 +49,7 @@ import org.apache.sshd.common.keyprovider.KeyIdentityProvider; import org.apache.sshd.common.session.SessionContext; import org.apache.sshd.common.session.helpers.AbstractSession; import org.apache.sshd.common.util.ValidateUtils; +import org.apache.sshd.common.util.net.SshdSocketAddress; import org.eclipse.jgit.internal.transport.sshd.JGitClientSession.ChainingAttributes; import org.eclipse.jgit.internal.transport.sshd.JGitClientSession.SessionAttributes; import org.eclipse.jgit.internal.transport.sshd.proxy.HttpClientConnector; @@ -82,6 +83,16 @@ public class JGitSshClient extends SshClient { */ public static final AttributeKey<String> PREFERRED_AUTHENTICATIONS = new AttributeKey<>(); + /** + * An attribute key for storing an alternate local address to connect to if + * a local forward from a ProxyJump ssh config is present. If set, + * {@link #connect(HostConfigEntry, AttributeRepository, SocketAddress)} + * will not connect to the address obtained from the {@link HostConfigEntry} + * but to the address stored in this key (which is assumed to forward the + * {@code HostConfigEntry} address). + */ + public static final AttributeKey<SshdSocketAddress> LOCAL_FORWARD_ADDRESS = new AttributeKey<>(); + private KeyCache keyCache; private CredentialsProvider credentialsProvider; @@ -102,25 +113,37 @@ public class JGitSshClient extends SshClient { throw new IllegalStateException("SshClient not started."); //$NON-NLS-1$ } Objects.requireNonNull(hostConfig, "No host configuration"); //$NON-NLS-1$ - String host = ValidateUtils.checkNotNullAndNotEmpty( + String originalHost = ValidateUtils.checkNotNullAndNotEmpty( hostConfig.getHostName(), "No target host"); //$NON-NLS-1$ - int port = hostConfig.getPort(); - ValidateUtils.checkTrue(port > 0, "Invalid port: %d", port); //$NON-NLS-1$ + int originalPort = hostConfig.getPort(); + ValidateUtils.checkTrue(originalPort > 0, "Invalid port: %d", //$NON-NLS-1$ + originalPort); + InetSocketAddress originalAddress = new InetSocketAddress(originalHost, + originalPort); + InetSocketAddress targetAddress = originalAddress; String userName = hostConfig.getUsername(); + String id = userName + '@' + originalAddress; AttributeRepository attributes = chain(context, this); - InetSocketAddress address = new InetSocketAddress(host, port); - ConnectFuture connectFuture = new DefaultConnectFuture( - userName + '@' + address, null); + SshdSocketAddress localForward = attributes + .resolveAttribute(LOCAL_FORWARD_ADDRESS); + if (localForward != null) { + targetAddress = new InetSocketAddress(localForward.getHostName(), + localForward.getPort()); + id += '/' + targetAddress.toString(); + } + ConnectFuture connectFuture = new DefaultConnectFuture(id, null); SshFutureListener<IoConnectFuture> listener = createConnectCompletionListener( - connectFuture, userName, address, hostConfig); - attributes = sessionAttributes(attributes, hostConfig, address); + connectFuture, userName, originalAddress, hostConfig); + attributes = sessionAttributes(attributes, hostConfig, originalAddress); // Proxy support - ProxyData proxy = getProxyData(address); - if (proxy != null) { - address = configureProxy(proxy, address); - proxy.clearPassword(); + if (localForward == null) { + ProxyData proxy = getProxyData(targetAddress); + if (proxy != null) { + targetAddress = configureProxy(proxy, targetAddress); + proxy.clearPassword(); + } } - connector.connect(address, attributes, localAddress) + connector.connect(targetAddress, attributes, localAddress) .addListener(listener); return connectFuture; } diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/SshdText.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/SshdText.java index 22966f956e..13bb3ebe75 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/SshdText.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/SshdText.java @@ -24,8 +24,11 @@ public final class SshdText extends TranslationBundle { /***/ public String configInvalidPath; /***/ public String configInvalidPattern; /***/ public String configInvalidPositive; + /***/ public String configInvalidProxyJump; /***/ public String configNoKnownHostKeyAlgorithms; /***/ public String configNoRemainingHostKeyAlgorithms; + /***/ public String configProxyJumpNotSsh; + /***/ public String configProxyJumpWithPath; /***/ public String ftpCloseFailed; /***/ public String gssapiFailure; /***/ public String gssapiInitFailure; @@ -58,12 +61,14 @@ public final class SshdText extends TranslationBundle { /***/ public String knownHostsUnknownKeyType; /***/ public String knownHostsUserAskCreationMsg; /***/ public String knownHostsUserAskCreationPrompt; + /***/ public String loginDenied; /***/ public String passwordPrompt; /***/ public String proxyCannotAuthenticate; /***/ public String proxyHttpFailure; /***/ public String proxyHttpInvalidUserName; /***/ public String proxyHttpUnexpectedReply; /***/ public String proxyHttpUnspecifiedFailureReason; + /***/ public String proxyJumpAbort; /***/ public String proxyPasswordPrompt; /***/ public String proxySocksAuthenticationFailed; /***/ public String proxySocksFailureForbidden; @@ -92,6 +97,7 @@ public final class SshdText extends TranslationBundle { /***/ public String sshClosingDown; /***/ public String sshCommandTimeout; /***/ public String sshProcessStillRunning; + /***/ public String sshProxySessionCloseFailed; /***/ public String unknownProxyProtocol; } diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/HttpParser.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/HttpParser.java index d5b80374cb..0500a63428 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/HttpParser.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/HttpParser.java @@ -13,6 +13,8 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import org.eclipse.jgit.util.HttpSupport; + /** * A basic parser for HTTP response headers. Handles status lines and * authentication headers (WWW-Authenticate, Proxy-Authenticate). @@ -135,7 +137,7 @@ public final class HttpParser { int length = header.length(); for (int i = 0; i < length;) { int start = skipWhiteSpace(header, i); - int end = scanToken(header, start); + int end = HttpSupport.scanToken(header, start); if (end <= start) { break; } @@ -156,7 +158,7 @@ public final class HttpParser { // optional legacy whitespace around the equals sign), where the // value can be either a token or a quoted string. start = skipWhiteSpace(header, start); - int end = scanToken(header, start); + int end = HttpSupport.scanToken(header, start); if (end == start) { // Nothing found. Either at end or on a comma. if (start < header.length() && header.charAt(start) == ',') { @@ -222,7 +224,7 @@ public final class HttpParser { challenge.addArgument(header.substring(start, end), value); start = nextEnd[0]; } else { - int nextEnd = scanToken(header, nextStart); + int nextEnd = HttpSupport.scanToken(header, nextStart); challenge.addArgument(header.substring(start, end), header.substring(nextStart, nextEnd)); start = nextEnd; @@ -244,49 +246,6 @@ public final class HttpParser { return i; } - private static int scanToken(String header, int from) { - int length = header.length(); - int i = from; - while (i < length) { - char c = header.charAt(i); - switch (c) { - case '!': - case '#': - case '$': - case '%': - case '&': - case '\'': - case '*': - case '+': - case '-': - case '.': - case '^': - case '_': - case '`': - case '|': - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - i++; - break; - default: - if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z') { - i++; - break; - } - return i; - } - } - return i; - } - private static String scanQuotedString(String header, int from, int[] to) { StringBuilder result = new StringBuilder(); int length = header.length(); diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/IdentityPasswordProvider.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/IdentityPasswordProvider.java index 004d3f8361..dd6894b662 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/IdentityPasswordProvider.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/IdentityPasswordProvider.java @@ -19,13 +19,14 @@ import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.concurrent.CancellationException; import org.eclipse.jgit.annotations.NonNull; +import org.eclipse.jgit.internal.transport.sshd.AuthenticationCanceledException; import org.eclipse.jgit.internal.transport.sshd.SshdText; import org.eclipse.jgit.transport.CredentialItem; import org.eclipse.jgit.transport.CredentialsProvider; import org.eclipse.jgit.transport.URIish; +import org.eclipse.jgit.util.StringUtils; /** * A {@link KeyPasswordProvider} based on a {@link CredentialsProvider}. @@ -155,35 +156,84 @@ public class IdentityPasswordProvider implements KeyPasswordProvider { state.incCount(); String message = state.count == 1 ? SshdText.get().keyEncryptedMsg : SshdText.get().keyEncryptedRetry; - char[] pass = getPassword(uri, message); + char[] pass = getPassword(uri, format(message, uri)); state.setPassword(pass); return pass; } - private char[] getPassword(URIish uri, String message) { + /** + * Retrieves the JGit {@link CredentialsProvider} to use for user + * interaction. + * + * @return the {@link CredentialsProvider} or {@code null} if none + * configured + * @since 5.10 + */ + protected CredentialsProvider getCredentialsProvider() { + return provider; + } + + /** + * Obtains the passphrase/password for an encrypted private key via the + * {@link #getCredentialsProvider() configured CredentialsProvider}. + * + * @param uri + * identifying the resource to obtain a password for + * @param message + * optional message text to display; may be {@code null} or empty + * if none + * @return the password entered, or {@code null}Â if no + * {@link CredentialsProvider} is configured or none was entered + * @throws java.util.concurrent.CancellationException + * if the user canceled the operation + * @since 5.10 + */ + protected char[] getPassword(URIish uri, String message) { if (provider == null) { return null; } - List<CredentialItem> items = new ArrayList<>(2); - items.add(new CredentialItem.InformationalMessage( - format(message, uri))); + boolean haveMessage = !StringUtils.isEmptyOrNull(message); + List<CredentialItem> items = new ArrayList<>(haveMessage ? 2 : 1); + if (haveMessage) { + items.add(new CredentialItem.InformationalMessage(message)); + } CredentialItem.Password password = new CredentialItem.Password( SshdText.get().keyEncryptedPrompt); items.add(password); try { - provider.get(uri, items); + boolean completed = provider.get(uri, items); char[] pass = password.getValue(); - if (pass == null) { - throw new CancellationException( - SshdText.get().authenticationCanceled); + if (!completed) { + cancelAuthentication(); + return null; } - return pass.clone(); + return pass == null ? null : pass.clone(); } finally { password.clear(); } } /** + * Cancels the authentication process. Called by + * {@link #getPassword(URIish, String)} when the user interaction has been + * canceled. If this throws a + * {@link java.util.concurrent.CancellationException}, the authentication + * process is aborted; otherwise it may continue with the next configured + * authentication mechanism, if any. + * <p> + * This default implementation always throws a + * {@link java.util.concurrent.CancellationException}. + * </p> + * + * @throws java.util.concurrent.CancellationException + * always + * @since 5.10 + */ + protected void cancelAuthentication() { + throw new AuthenticationCanceledException(); + } + + /** * Invoked to inform the password provider about the decoding result. * * @param uri diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSession.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSession.java index dfd7cca1b4..0fb0610b99 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSession.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSession.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018, Thomas Wolf <thomas.wolf@paranor.ch> and others + * Copyright (C) 2018, 2020 Thomas Wolf <thomas.wolf@paranor.ch> and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -10,36 +10,53 @@ package org.eclipse.jgit.transport.sshd; import static java.text.MessageFormat.format; +import static org.apache.sshd.common.SshConstants.SSH2_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE; +import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.net.URISyntaxException; import java.time.Duration; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.EnumSet; +import java.util.LinkedList; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Supplier; +import java.util.regex.Pattern; import org.apache.sshd.client.SshClient; import org.apache.sshd.client.channel.ChannelExec; import org.apache.sshd.client.channel.ClientChannelEvent; +import org.apache.sshd.client.config.hosts.HostConfigEntry; +import org.apache.sshd.client.future.ConnectFuture; import org.apache.sshd.client.session.ClientSession; +import org.apache.sshd.client.session.forward.PortForwardingTracker; import org.apache.sshd.client.subsystem.sftp.SftpClient; import org.apache.sshd.client.subsystem.sftp.SftpClient.CloseableHandle; import org.apache.sshd.client.subsystem.sftp.SftpClient.CopyMode; import org.apache.sshd.client.subsystem.sftp.SftpClientFactory; -import org.apache.sshd.common.session.Session; -import org.apache.sshd.common.session.SessionListener; +import org.apache.sshd.common.AttributeRepository; +import org.apache.sshd.common.SshException; +import org.apache.sshd.common.future.CloseFuture; +import org.apache.sshd.common.future.SshFutureListener; import org.apache.sshd.common.subsystem.sftp.SftpException; +import org.apache.sshd.common.util.io.IoUtils; +import org.apache.sshd.common.util.net.SshdSocketAddress; import org.eclipse.jgit.annotations.NonNull; +import org.eclipse.jgit.errors.TransportException; +import org.eclipse.jgit.internal.transport.sshd.JGitSshClient; import org.eclipse.jgit.internal.transport.sshd.SshdText; import org.eclipse.jgit.transport.FtpChannel; import org.eclipse.jgit.transport.RemoteSession; +import org.eclipse.jgit.transport.SshConstants; import org.eclipse.jgit.transport.URIish; +import org.eclipse.jgit.util.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -53,6 +70,11 @@ public class SshdSession implements RemoteSession { private static final Logger LOG = LoggerFactory .getLogger(SshdSession.class); + private static final Pattern SHORT_SSH_FORMAT = Pattern + .compile("[-\\w.]+(?:@[-\\w.]+)?(?::\\d+)?"); //$NON-NLS-1$ + + private static final int MAX_DEPTH = 10; + private final CopyOnWriteArrayList<SessionCloseListener> listeners = new CopyOnWriteArrayList<>(); private final URIish uri; @@ -71,32 +93,169 @@ public class SshdSession implements RemoteSession { client.start(); } try { - String username = uri.getUser(); - String host = uri.getHost(); - int port = uri.getPort(); - long t = timeout.toMillis(); - if (t <= 0) { - session = client.connect(username, host, port).verify() - .getSession(); - } else { - session = client.connect(username, host, port) - .verify(timeout.toMillis()).getSession(); - } - session.addSessionListener(new SessionListener() { + session = connect(uri, Collections.emptyList(), + future -> notifyCloseListeners(), timeout, MAX_DEPTH); + } catch (IOException e) { + disconnect(e); + throw e; + } + } - @Override - public void sessionClosed(Session s) { - notifyCloseListeners(); + private ClientSession connect(URIish target, List<URIish> jumps, + SshFutureListener<CloseFuture> listener, Duration timeout, + int depth) throws IOException { + if (--depth < 0) { + throw new IOException( + format(SshdText.get().proxyJumpAbort, target)); + } + HostConfigEntry hostConfig = getHostConfig(target.getUser(), + target.getHost(), target.getPort()); + String host = hostConfig.getHostName(); + int port = hostConfig.getPort(); + List<URIish> hops = determineHops(jumps, hostConfig, target.getHost()); + ClientSession resultSession = null; + ClientSession proxySession = null; + PortForwardingTracker portForward = null; + try { + if (!hops.isEmpty()) { + URIish hop = hops.remove(0); + if (LOG.isDebugEnabled()) { + LOG.debug("Connecting to jump host {}", hop); //$NON-NLS-1$ } - }); + proxySession = connect(hop, hops, null, timeout, depth); + } + AttributeRepository context = null; + if (proxySession != null) { + SshdSocketAddress remoteAddress = new SshdSocketAddress(host, + port); + portForward = proxySession.createLocalPortForwardingTracker( + SshdSocketAddress.LOCALHOST_ADDRESS, remoteAddress); + // We must connect to the locally bound address, not the one + // from the host config. + context = AttributeRepository.ofKeyValuePair( + JGitSshClient.LOCAL_FORWARD_ADDRESS, + portForward.getBoundAddress()); + } + resultSession = connect(hostConfig, context, timeout); + if (proxySession != null) { + final PortForwardingTracker tracker = portForward; + final ClientSession pSession = proxySession; + resultSession.addCloseFutureListener(future -> { + IoUtils.closeQuietly(tracker); + String sessionName = pSession.toString(); + try { + pSession.close(); + } catch (IOException e) { + LOG.error(format( + SshdText.get().sshProxySessionCloseFailed, + sessionName), e); + } + }); + portForward = null; + proxySession = null; + } + if (listener != null) { + resultSession.addCloseFutureListener(listener); + } // Authentication timeout is by default 2 minutes. - session.auth().verify(session.getAuthTimeout()); + resultSession.auth().verify(resultSession.getAuthTimeout()); + return resultSession; } catch (IOException e) { - disconnect(e); + close(portForward, e); + close(proxySession, e); + close(resultSession, e); + if (e instanceof SshException && ((SshException) e) + .getDisconnectCode() == SSH2_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE) { + // Ensure the user gets to know on which URI the authentication + // was denied. + throw new TransportException(target, + format(SshdText.get().loginDenied, host, + Integer.toString(port)), + e); + } throw e; } } + private ClientSession connect(HostConfigEntry config, + AttributeRepository context, Duration timeout) + throws IOException { + ConnectFuture connected = client.connect(config, context, null); + long timeoutMillis = timeout.toMillis(); + if (timeoutMillis <= 0) { + connected = connected.verify(); + } else { + connected = connected.verify(timeoutMillis); + } + return connected.getSession(); + } + + private void close(Closeable toClose, Throwable error) { + if (toClose != null) { + try { + toClose.close(); + } catch (IOException e) { + error.addSuppressed(e); + } + } + } + + private HostConfigEntry getHostConfig(String username, String host, + int port) throws IOException { + HostConfigEntry entry = client.getHostConfigEntryResolver() + .resolveEffectiveHost(host, port, null, username, null); + if (entry == null) { + if (SshdSocketAddress.isIPv6Address(host)) { + return new HostConfigEntry("", host, port, username); //$NON-NLS-1$ + } + return new HostConfigEntry(host, host, port, username); + } + return entry; + } + + private List<URIish> determineHops(List<URIish> currentHops, + HostConfigEntry hostConfig, String host) throws IOException { + if (currentHops.isEmpty()) { + String jumpHosts = hostConfig.getProperty(SshConstants.PROXY_JUMP); + if (!StringUtils.isEmptyOrNull(jumpHosts)) { + try { + return parseProxyJump(jumpHosts); + } catch (URISyntaxException e) { + throw new IOException( + format(SshdText.get().configInvalidProxyJump, host, + jumpHosts), + e); + } + } + } + return currentHops; + } + + private List<URIish> parseProxyJump(String proxyJump) + throws URISyntaxException { + String[] hops = proxyJump.split(","); //$NON-NLS-1$ + List<URIish> result = new LinkedList<>(); + for (String hop : hops) { + // There shouldn't be any whitespace, but let's be lenient + hop = hop.trim(); + if (SHORT_SSH_FORMAT.matcher(hop).matches()) { + // URIish doesn't understand the short SSH format + // user@host:port, only user@host:path + hop = SshConstants.SSH_SCHEME + "://" + hop; //$NON-NLS-1$ + } + URIish to = new URIish(hop); + if (!SshConstants.SSH_SCHEME.equalsIgnoreCase(to.getScheme())) { + throw new URISyntaxException(hop, + SshdText.get().configProxyJumpNotSsh); + } else if (!StringUtils.isEmptyOrNull(to.getPath())) { + throw new URISyntaxException(hop, + SshdText.get().configProxyJumpWithPath); + } + result.add(to); + } + return result; + } + /** * Adds a {@link SessionCloseListener} to this session. Has no effect if the * given {@code listener} is already registered with this session. diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java index 0f7ab849f5..df0e1d28a4 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java @@ -34,6 +34,7 @@ import org.apache.sshd.client.auth.UserAuthFactory; import org.apache.sshd.client.auth.keyboard.UserAuthKeyboardInteractiveFactory; import org.apache.sshd.client.auth.pubkey.UserAuthPublicKeyFactory; import org.apache.sshd.client.config.hosts.HostConfigEntryResolver; +import org.apache.sshd.common.SshException; import org.apache.sshd.common.compression.BuiltinCompressions; import org.apache.sshd.common.config.keys.FilePasswordProvider; import org.apache.sshd.common.config.keys.loader.openssh.kdf.BCryptKdfOptions; @@ -41,6 +42,7 @@ import org.apache.sshd.common.keyprovider.KeyIdentityProvider; import org.eclipse.jgit.annotations.NonNull; import org.eclipse.jgit.errors.TransportException; import org.eclipse.jgit.internal.transport.ssh.OpenSshConfigFile; +import org.eclipse.jgit.internal.transport.sshd.AuthenticationCanceledException; import org.eclipse.jgit.internal.transport.sshd.CachingKeyPairProvider; import org.eclipse.jgit.internal.transport.sshd.GssApiWithMicAuthFactory; import org.eclipse.jgit.internal.transport.sshd.JGitPasswordAuthFactory; @@ -230,7 +232,16 @@ public class SshdSessionFactory extends SshSessionFactory implements Closeable { return session; } catch (Exception e) { unregister(session); - throw new TransportException(uri, e.getMessage(), e); + if (e instanceof TransportException) { + throw (TransportException) e; + } + Throwable cause = e; + if (e instanceof SshException && e + .getCause() instanceof AuthenticationCanceledException) { + // Results in a nicer error message + cause = e.getCause(); + } + throw new TransportException(uri, cause.getMessage(), cause); } } diff --git a/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.core.prefs index 2bc2cf30de..c16c986285 100644 --- a/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.core.prefs @@ -52,8 +52,8 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=no_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF index 345c3cfac6..5b6defa86a 100644 --- a/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF @@ -3,21 +3,21 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.ssh.jsch.test Bundle-SymbolicName: org.eclipse.jgit.ssh.jsch.test -Bundle-Version: 5.9.1.qualifier +Bundle-Version: 5.10.0.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Import-Package: com.jcraft.jsch;version="[0.1.54,0.2.0)", - org.eclipse.jgit.errors;version="[5.9.1,5.10.0)", - org.eclipse.jgit.junit;version="[5.9.1,5.10.0)", - org.eclipse.jgit.junit.ssh;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lib;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util;version="[5.9.1,5.10.0)", + org.eclipse.jgit.errors;version="[5.10.0,5.11.0)", + org.eclipse.jgit.junit;version="[5.10.0,5.11.0)", + org.eclipse.jgit.junit.ssh;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lib;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util;version="[5.10.0,5.11.0)", org.junit;version="[4.13,5.0.0)", org.junit.experimental.theories;version="[4.13,5.0.0)", org.junit.runner;version="[4.13,5.0.0)" -Export-Package: org.eclipse.jgit.transport;version="5.9.1"; +Export-Package: org.eclipse.jgit.transport;version="5.10.0"; uses:="org.eclipse.jgit.transport, org.eclipse.jgit.junit, org.eclipse.jgit.junit.ssh" diff --git a/org.eclipse.jgit.ssh.jsch.test/pom.xml b/org.eclipse.jgit.ssh.jsch.test/pom.xml index 24e1109be5..559e92ccec 100644 --- a/org.eclipse.jgit.ssh.jsch.test/pom.xml +++ b/org.eclipse.jgit.ssh.jsch.test/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.ssh.jsch.test</artifactId> diff --git a/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF index 715495a9a2..9e81eebc05 100644 --- a/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF @@ -3,24 +3,24 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.ssh.jsch Bundle-SymbolicName: org.eclipse.jgit.ssh.jsch;singleton:=true -Fragment-Host: org.eclipse.jgit;bundle-version="[5.9.1,5.10.0)" +Fragment-Host: org.eclipse.jgit;bundle-version="[5.10.0,5.11.0)" Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-ActivationPolicy: lazy -Bundle-Version: 5.9.1.qualifier +Bundle-Version: 5.10.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Export-Package: org.eclipse.jgit.internal.transport.jsch;version="5.9.1";x-friends:="org.eclipse.egit.core", - org.eclipse.jgit.transport;version="5.9.1"; +Export-Package: org.eclipse.jgit.internal.transport.jsch;version="5.10.0";x-friends:="org.eclipse.egit.core", + org.eclipse.jgit.transport;version="5.10.0"; uses:="org.eclipse.jgit.transport, org.eclipse.jgit.internal.transport.ssh, org.eclipse.jgit.util, com.jcraft.jsch" Import-Package: com.jcraft.jsch;version="[0.1.37,0.2.0)", - org.eclipse.jgit.errors;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.transport.ssh;version="[5.9.1,5.10.0)", - org.eclipse.jgit.nls;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util.io;version="[5.9.1,5.10.0)", + org.eclipse.jgit.errors;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.transport.ssh;version="[5.10.0,5.11.0)", + org.eclipse.jgit.nls;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util.io;version="[5.10.0,5.11.0)", org.slf4j;version="[1.7.0,2.0.0)" diff --git a/org.eclipse.jgit.ssh.jsch/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.ssh.jsch/META-INF/SOURCE-MANIFEST.MF index aaf7c2d241..dd42333744 100644 --- a/org.eclipse.jgit.ssh.jsch/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.ssh.jsch/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.ssh.jsch - Sources Bundle-SymbolicName: org.eclipse.jgit.ssh.jsch.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 5.9.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.ssh.jsch;version="5.9.1.qualifier";roots="." +Bundle-Version: 5.10.0.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.ssh.jsch;version="5.10.0.qualifier";roots="." diff --git a/org.eclipse.jgit.ssh.jsch/pom.xml b/org.eclipse.jgit.ssh.jsch/pom.xml index 5916157907..aab4dbe69d 100644 --- a/org.eclipse.jgit.ssh.jsch/pom.xml +++ b/org.eclipse.jgit.ssh.jsch/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.ssh.jsch</artifactId> diff --git a/org.eclipse.jgit.test/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.test/.settings/org.eclipse.jdt.core.prefs index 3dd5840397..b853c6a7ed 100644 --- a/org.eclipse.jgit.test/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.test/.settings/org.eclipse.jdt.core.prefs @@ -51,8 +51,8 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=no_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jgit.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.test/META-INF/MANIFEST.MF index 1ce4c2b25f..65da04ba59 100644 --- a/org.eclipse.jgit.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.test/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.test Bundle-SymbolicName: org.eclipse.jgit.test -Bundle-Version: 5.9.1.qualifier +Bundle-Version: 5.10.0.qualifier Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor Bundle-RequiredExecutionEnvironment: JavaSE-1.8 @@ -16,58 +16,59 @@ Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)", org.apache.commons.compress.compressors.gzip;version="[1.15.0,2.0)", org.apache.commons.compress.compressors.xz;version="[1.15.0,2.0)", org.assertj.core.api;version="[3.14.0,4.0.0)", - org.eclipse.jgit.annotations;version="[5.9.1,5.10.0)", - org.eclipse.jgit.api;version="[5.9.1,5.10.0)", - org.eclipse.jgit.api.errors;version="[5.9.1,5.10.0)", - org.eclipse.jgit.archive;version="[5.9.1,5.10.0)", - org.eclipse.jgit.attributes;version="[5.9.1,5.10.0)", - org.eclipse.jgit.awtui;version="[5.9.1,5.10.0)", - org.eclipse.jgit.blame;version="[5.9.1,5.10.0)", - org.eclipse.jgit.diff;version="[5.9.1,5.10.0)", - org.eclipse.jgit.dircache;version="[5.9.1,5.10.0)", - org.eclipse.jgit.errors;version="[5.9.1,5.10.0)", - org.eclipse.jgit.events;version="[5.9.1,5.10.0)", - org.eclipse.jgit.fnmatch;version="[5.9.1,5.10.0)", - org.eclipse.jgit.gitrepo;version="[5.9.1,5.10.0)", - org.eclipse.jgit.hooks;version="[5.9.1,5.10.0)", - org.eclipse.jgit.ignore;version="[5.9.1,5.10.0)", - org.eclipse.jgit.ignore.internal;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.fsck;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.storage.dfs;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.storage.file;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.storage.io;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.storage.pack;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.storage.reftable;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.storage.reftree;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.transport.connectivity;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.transport.http;version="[5.9.1,5.10.0)", - org.eclipse.jgit.internal.transport.parser;version="[5.9.1,5.10.0)", - org.eclipse.jgit.junit;version="[5.9.1,5.10.0)", - org.eclipse.jgit.junit.time;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lfs;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lib;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lib.internal;version="[5.9.1,5.10.0)", - org.eclipse.jgit.merge;version="[5.9.1,5.10.0)", - org.eclipse.jgit.nls;version="[5.9.1,5.10.0)", - org.eclipse.jgit.notes;version="[5.9.1,5.10.0)", - org.eclipse.jgit.patch;version="[5.9.1,5.10.0)", - org.eclipse.jgit.pgm;version="[5.9.1,5.10.0)", - org.eclipse.jgit.pgm.internal;version="[5.9.1,5.10.0)", - org.eclipse.jgit.revplot;version="[5.9.1,5.10.0)", - org.eclipse.jgit.revwalk;version="[5.9.1,5.10.0)", - org.eclipse.jgit.revwalk.filter;version="[5.9.1,5.10.0)", - org.eclipse.jgit.storage.file;version="[5.9.1,5.10.0)", - org.eclipse.jgit.storage.pack;version="[5.9.1,5.10.0)", - org.eclipse.jgit.submodule;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport.http;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport.resolver;version="[5.9.1,5.10.0)", - org.eclipse.jgit.treewalk;version="[5.9.1,5.10.0)", - org.eclipse.jgit.treewalk.filter;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util.io;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util.sha1;version="[5.9.1,5.10.0)", + org.eclipse.jgit.annotations;version="[5.10.0,5.11.0)", + org.eclipse.jgit.api;version="[5.10.0,5.11.0)", + org.eclipse.jgit.api.errors;version="[5.10.0,5.11.0)", + org.eclipse.jgit.archive;version="[5.10.0,5.11.0)", + org.eclipse.jgit.attributes;version="[5.10.0,5.11.0)", + org.eclipse.jgit.awtui;version="[5.10.0,5.11.0)", + org.eclipse.jgit.blame;version="[5.10.0,5.11.0)", + org.eclipse.jgit.diff;version="[5.10.0,5.11.0)", + org.eclipse.jgit.dircache;version="[5.10.0,5.11.0)", + org.eclipse.jgit.errors;version="[5.10.0,5.11.0)", + org.eclipse.jgit.events;version="[5.10.0,5.11.0)", + org.eclipse.jgit.fnmatch;version="[5.10.0,5.11.0)", + org.eclipse.jgit.gitrepo;version="[5.10.0,5.11.0)", + org.eclipse.jgit.hooks;version="[5.10.0,5.11.0)", + org.eclipse.jgit.ignore;version="[5.10.0,5.11.0)", + org.eclipse.jgit.ignore.internal;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.fsck;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.storage.dfs;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.storage.file;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.storage.io;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.storage.pack;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.storage.reftable;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.storage.reftree;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.transport.connectivity;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.transport.http;version="[5.10.0,5.11.0)", + org.eclipse.jgit.internal.transport.parser;version="[5.10.0,5.11.0)", + org.eclipse.jgit.junit;version="[5.10.0,5.11.0)", + org.eclipse.jgit.junit.time;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lfs;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lib;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lib.internal;version="[5.10.0,5.11.0)", + org.eclipse.jgit.logging;version="[5.10.0,5.11.0)", + org.eclipse.jgit.merge;version="[5.10.0,5.11.0)", + org.eclipse.jgit.nls;version="[5.10.0,5.11.0)", + org.eclipse.jgit.notes;version="[5.10.0,5.11.0)", + org.eclipse.jgit.patch;version="[5.10.0,5.11.0)", + org.eclipse.jgit.pgm;version="[5.10.0,5.11.0)", + org.eclipse.jgit.pgm.internal;version="[5.10.0,5.11.0)", + org.eclipse.jgit.revplot;version="[5.10.0,5.11.0)", + org.eclipse.jgit.revwalk;version="[5.10.0,5.11.0)", + org.eclipse.jgit.revwalk.filter;version="[5.10.0,5.11.0)", + org.eclipse.jgit.storage.file;version="[5.10.0,5.11.0)", + org.eclipse.jgit.storage.pack;version="[5.10.0,5.11.0)", + org.eclipse.jgit.submodule;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport.http;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport.resolver;version="[5.10.0,5.11.0)", + org.eclipse.jgit.treewalk;version="[5.10.0,5.11.0)", + org.eclipse.jgit.treewalk.filter;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util.io;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util.sha1;version="[5.10.0,5.11.0)", org.junit;version="[4.13,5.0.0)", org.junit.experimental.theories;version="[4.13,5.0.0)", org.junit.function;version="[4.13.0,5.0.0)", diff --git a/org.eclipse.jgit.test/build.properties b/org.eclipse.jgit.test/build.properties index 7dc26c0b0d..b527a74790 100644 --- a/org.eclipse.jgit.test/build.properties +++ b/org.eclipse.jgit.test/build.properties @@ -8,4 +8,4 @@ bin.includes = META-INF/,\ bin-tst/,\ bin/ additional.bundles = org.apache.log4j,\ - org.slf4j.impl.log4j12 + org.slf4j.binding.log4j12 diff --git a/org.eclipse.jgit.test/pom.xml b/org.eclipse.jgit.test/pom.xml index d9c9a3da6a..100bd11e14 100644 --- a/org.eclipse.jgit.test/pom.xml +++ b/org.eclipse.jgit.test/pom.xml @@ -19,7 +19,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.test</artifactId> diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java index b737bbec0e..de25870bd0 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java @@ -92,7 +92,6 @@ public class CloneCommandTest extends RepositoryTestCase { command.setURI(fileUri()); Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); ObjectId id = git2.getRepository().resolve("tag-for-blob"); assertNotNull(id); assertEquals(git2.getRepository().getFullBranch(), "refs/heads/test"); @@ -277,8 +276,7 @@ public class CloneCommandTest extends RepositoryTestCase { Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); - assertEquals(git2.getRepository().getFullBranch(), "refs/heads/master"); + assertEquals("refs/heads/master", git2.getRepository().getFullBranch()); assertEquals( "refs/heads/master, refs/remotes/origin/master, refs/remotes/origin/test", allRefNames(git2.branchList().setListMode(ListMode.ALL).call())); @@ -293,7 +291,6 @@ public class CloneCommandTest extends RepositoryTestCase { git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); assertEquals(git2.getRepository().getFullBranch(), "refs/heads/master"); assertEquals("refs/remotes/origin/master, refs/remotes/origin/test", allRefNames(git2.branchList().setListMode(ListMode.ALL).call())); @@ -308,8 +305,7 @@ public class CloneCommandTest extends RepositoryTestCase { git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); - assertEquals(git2.getRepository().getFullBranch(), "refs/heads/master"); + assertEquals("refs/heads/master", git2.getRepository().getFullBranch()); assertEquals("refs/heads/master, refs/heads/test", allRefNames(git2 .branchList().setListMode(ListMode.ALL).call())); } @@ -324,7 +320,6 @@ public class CloneCommandTest extends RepositoryTestCase { Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); assertEquals("refs/heads/test", git2.getRepository().getFullBranch()); } @@ -338,7 +333,6 @@ public class CloneCommandTest extends RepositoryTestCase { Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); ObjectId taggedCommit = db.resolve("tag-initial^{commit}"); assertEquals(taggedCommit.name(), git2 .getRepository().getFullBranch()); @@ -355,10 +349,9 @@ public class CloneCommandTest extends RepositoryTestCase { command.setURI(fileUri()); Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); assertNull(git2.getRepository().resolve("tag-for-blob")); assertNotNull(git2.getRepository().resolve("tag-initial")); - assertEquals(git2.getRepository().getFullBranch(), "refs/heads/master"); + assertEquals("refs/heads/master", git2.getRepository().getFullBranch()); assertEquals("refs/remotes/origin/master", allRefNames(git2 .branchList().setListMode(ListMode.REMOTE).call())); RemoteConfig cfg = new RemoteConfig(git2.getRepository().getConfig(), @@ -383,10 +376,9 @@ public class CloneCommandTest extends RepositoryTestCase { command.setBare(true); Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); assertNull(git2.getRepository().resolve("tag-for-blob")); assertNotNull(git2.getRepository().resolve("tag-initial")); - assertEquals(git2.getRepository().getFullBranch(), "refs/heads/master"); + assertEquals("refs/heads/master", git2.getRepository().getFullBranch()); assertEquals("refs/heads/master", allRefNames(git2.branchList() .setListMode(ListMode.ALL).call())); RemoteConfig cfg = new RemoteConfig(git2.getRepository().getConfig(), @@ -409,11 +401,10 @@ public class CloneCommandTest extends RepositoryTestCase { command.setURI(fileUri()); Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); assertTrue(git2.getRepository().isBare()); assertNotNull(git2.getRepository().resolve("tag-for-blob")); assertNotNull(git2.getRepository().resolve("tag-initial")); - assertEquals(git2.getRepository().getFullBranch(), "refs/heads/master"); + assertEquals("refs/heads/master", git2.getRepository().getFullBranch()); assertEquals("refs/heads/master, refs/heads/test", allRefNames( git2.branchList().setListMode(ListMode.ALL).call())); assertNotNull(git2.getRepository().exactRef("refs/meta/foo/bar")); @@ -436,7 +427,6 @@ public class CloneCommandTest extends RepositoryTestCase { command.setURI(fileUri()); Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); assertNull(git2.getRepository().resolve("tag-for-blob")); assertNull(git2.getRepository().resolve("refs/heads/master")); assertNotNull(git2.getRepository().resolve("tag-initial")); @@ -464,8 +454,7 @@ public class CloneCommandTest extends RepositoryTestCase { command.setURI(fileUri()); Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); - assertEquals(git2.getRepository().getFullBranch(), "refs/heads/test"); + assertEquals("refs/heads/test", git2.getRepository().getFullBranch()); // Expect both remote branches to exist; setCloneAllBranches(true) // should override any setBranchesToClone(). assertNotNull( @@ -492,8 +481,7 @@ public class CloneCommandTest extends RepositoryTestCase { command.setURI(fileUri()); Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); - assertEquals(git2.getRepository().getFullBranch(), "refs/heads/test"); + assertEquals("refs/heads/test", git2.getRepository().getFullBranch()); // Expect only the test branch; allBranches was re-set to false assertNull(git2.getRepository().resolve("refs/remotes/origin/master")); assertNotNull(git2.getRepository().resolve("refs/remotes/origin/test")); @@ -525,7 +513,6 @@ public class CloneCommandTest extends RepositoryTestCase { command.setURI(fileUri()); Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); // clone again command = Git.cloneRepository(); command.setDirectory(directory); @@ -551,7 +538,6 @@ public class CloneCommandTest extends RepositoryTestCase { clone.setURI(fileUri()); Git git2 = clone.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); assertEquals(Constants.MASTER, git2.getRepository().getBranch()); } @@ -595,7 +581,6 @@ public class CloneCommandTest extends RepositoryTestCase { clone.setURI(fileUri()); Git git2 = clone.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); assertEquals(Constants.MASTER, git2.getRepository().getBranch()); assertTrue(new File(git2.getRepository().getWorkTree(), path @@ -683,7 +668,6 @@ public class CloneCommandTest extends RepositoryTestCase { clone.setURI(git.getRepository().getDirectory().toURI().toString()); Git git2 = clone.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); assertEquals(Constants.MASTER, git2.getRepository().getBranch()); assertTrue(new File(git2.getRepository().getWorkTree(), path @@ -813,7 +797,6 @@ public class CloneCommandTest extends RepositoryTestCase { command.setNoTags(); Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); assertNotNull(git2.getRepository().resolve("refs/heads/test")); assertNull(git2.getRepository().resolve("tag-initial")); assertNull(git2.getRepository().resolve("tag-for-blob")); @@ -833,13 +816,41 @@ public class CloneCommandTest extends RepositoryTestCase { command.setTagOption(TagOpt.FETCH_TAGS); Git git2 = command.call(); addRepoToClose(git2.getRepository()); - assertNotNull(git2); assertNull(git2.getRepository().resolve("refs/heads/test")); assertNotNull(git2.getRepository().resolve("tag-initial")); assertNotNull(git2.getRepository().resolve("tag-for-blob")); assertTagOption(git2.getRepository(), TagOpt.FETCH_TAGS); } + @Test + public void testCloneWithHeadSymRefIsMasterCopy() throws IOException, GitAPIException { + // create a branch with the same head as master and switch to it + git.checkout().setStartPoint("master").setCreateBranch(true).setName("master-copy").call(); + + // when we clone the HEAD symref->master-copy means we start on master-copy and not master + File directory = createTempDirectory("testCloneRepositorySymRef_master-copy"); + CloneCommand command = Git.cloneRepository(); + command.setDirectory(directory); + command.setURI(fileUri()); + Git git2 = command.call(); + addRepoToClose(git2.getRepository()); + assertEquals("refs/heads/master-copy", git2.getRepository().getFullBranch()); + } + + @Test + public void testCloneWithHeadSymRefIsNonMasterCopy() throws IOException, GitAPIException { + // create a branch with the same head as test and switch to it + git.checkout().setStartPoint("test").setCreateBranch(true).setName("test-copy").call(); + + File directory = createTempDirectory("testCloneRepositorySymRef_test-copy"); + CloneCommand command = Git.cloneRepository(); + command.setDirectory(directory); + command.setURI(fileUri()); + Git git2 = command.call(); + addRepoToClose(git2.getRepository()); + assertEquals("refs/heads/test-copy", git2.getRepository().getFullBranch()); + } + private void assertTagOption(Repository repo, TagOpt expectedTagOption) throws URISyntaxException { RemoteConfig remoteConfig = new RemoteConfig( diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/DescribeCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/DescribeCommandTest.java index 7ba7c8d2be..b460e3f52e 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/DescribeCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/DescribeCommandTest.java @@ -310,7 +310,7 @@ public class DescribeCommandTest extends RepositoryTestCase { assertEquals( "2 commits for describe commit increment expected since lightweight tag: c4 and c3", "t2-2-g119892b", describe(c4)); // 2 commits: c4 and c3 - } else if (!useAnnotatedTags && !describeUseAllTags) { + } else if (!useAnnotatedTags) { assertEquals("no matching commits expected", null, describe(c4)); } else { assertEquals( @@ -405,6 +405,46 @@ public class DescribeCommandTest extends RepositoryTestCase { } } + @Test + public void testDescribeUseAllRefsMaster() throws Exception { + final ObjectId c1 = modify("aaa"); + tag("t1"); + + if (useAnnotatedTags || describeUseAllTags) { + assertEquals("t1", describe(c1)); + } else { + assertEquals(null, describe(c1)); + } + assertEquals("heads/master", describeAll(c1)); + } + + /** + * Branch off from master and then tag + * + * <pre> + * c1 -+ -> c2 + * | + * +-> t1 + * </pre> + * @throws Exception + * */ + @Test + public void testDescribeUseAllRefsBranch() throws Exception { + final ObjectId c1 = modify("aaa"); + modify("bbb"); + + branch("b", c1); + final ObjectId c3 = modify("ccc"); + tag("t1"); + + if (!useAnnotatedTags && !describeUseAllTags) { + assertEquals(null, describe(c3)); + } else { + assertEquals("t1", describe(c3)); + } + assertEquals("heads/b", describeAll(c3)); + } + private ObjectId merge(ObjectId c2) throws GitAPIException { return git.merge().include(c2).call().getNewHead(); } @@ -444,6 +484,11 @@ public class DescribeCommandTest extends RepositoryTestCase { return describe(c1, false, false); } + private String describeAll(ObjectId c1) throws GitAPIException, IOException { + return git.describe().setTarget(c1).setTags(describeUseAllTags) + .setLong(false).setAlways(false).setAll(true).call(); + } + private String describe(ObjectId c1, String... patterns) throws Exception { return git.describe().setTarget(c1).setTags(describeUseAllTags) .setMatch(patterns).call(); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/LsRemoteCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/LsRemoteCommandTest.java index 00f84e9aea..12ec2aae57 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/LsRemoteCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/LsRemoteCommandTest.java @@ -11,9 +11,11 @@ package org.eclipse.jgit.api; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; import java.io.File; import java.util.Collection; +import java.util.Optional; import org.eclipse.jgit.junit.RepositoryTestCase; import org.eclipse.jgit.lib.Constants; @@ -34,7 +36,7 @@ public class LsRemoteCommandTest extends RepositoryTestCase { git.add().addFilepattern("Test.txt").call(); git.commit().setMessage("Initial commit").call(); - // create a master branch and switch to it + // create a test branch and switch to it git.branchCreate().setName("test").call(); RefUpdate rup = db.updateRef(Constants.HEAD); rup.link("refs/heads/test"); @@ -104,6 +106,28 @@ public class LsRemoteCommandTest extends RepositoryTestCase { assertEquals(2, refs.size()); } + @Test + public void testLsRemoteWithSymRefs() throws Exception { + File directory = createTempDirectory("testRepository"); + CloneCommand command = Git.cloneRepository(); + command.setDirectory(directory); + command.setURI(fileUri()); + command.setCloneAllBranches(true); + Git git2 = command.call(); + addRepoToClose(git2.getRepository()); + + + LsRemoteCommand lsRemoteCommand = git2.lsRemote(); + Collection<Ref> refs = lsRemoteCommand.call(); + assertNotNull(refs); + assertEquals(6, refs.size()); + + Optional<Ref> headRef = refs.stream().filter(ref -> ref.getName().equals(Constants.HEAD)).findFirst(); + assertTrue("expected a HEAD Ref", headRef.isPresent()); + assertTrue("expected HEAD Ref to be a Symbolic", headRef.get().isSymbolic()); + assertEquals("refs/heads/test", headRef.get().getTarget().getName()); + } + private String fileUri() { return "file://" + git.getRepository().getWorkTree().getAbsolutePath(); } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PathCheckoutCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PathCheckoutCommandTest.java index e0a1c1d61b..f52b715d39 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PathCheckoutCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PathCheckoutCommandTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011, Kevin Sawicki <kevin@github.com> and others + * Copyright (C) 2011, 2020 Kevin Sawicki <kevin@github.com> and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -24,6 +24,7 @@ import org.eclipse.jgit.dircache.DirCacheEntry; import org.eclipse.jgit.errors.NoWorkTreeException; import org.eclipse.jgit.junit.RepositoryTestCase; import org.eclipse.jgit.lib.ConfigConstants; +import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.ObjectReader; import org.eclipse.jgit.lib.RepositoryState; import org.eclipse.jgit.lib.StoredConfig; @@ -310,6 +311,16 @@ public class PathCheckoutCommandTest extends RepositoryTestCase { } @Test + public void testCheckoutFileWithConflict() throws Exception { + setupConflictingState(); + assertEquals('[' + FILE1 + ']', + git.status().call().getConflicting().toString()); + git.checkout().setStartPoint(Constants.HEAD).addPath(FILE1).call(); + assertEquals("3", read(FILE1)); + assertTrue(git.status().call().isClean()); + } + + @Test public void testCheckoutOursWhenNoBase() throws Exception { String file = "added.txt"; diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StatusCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StatusCommandTest.java index 7e0de82d82..5311edb0eb 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StatusCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StatusCommandTest.java @@ -160,4 +160,25 @@ public class StatusCommandTest extends RepositoryTestCase { assertTrue("Expected no differences", status.isClean()); } } + + @Test + public void testFolderPrefix() throws Exception { + // "audio" is a prefix of "audio-new" and "audio.new". + try (Git git = new Git(db)) { + // Order here is the git order, but that doesn't really matter. + // They are processed by StatusCommand in this order even if written + // in a different order. Bug 566799 would, when having processed + // audio/foo, remove previously recorded untracked folders that have + // "audio" as a prefix: audio-new and audio.new. + writeTrashFile("audi", "foo", "foo"); + writeTrashFile("audio-new", "foo", "foo"); + writeTrashFile("audio.new", "foo", "foo"); + writeTrashFile("audio", "foo", "foo"); + writeTrashFile("audio_new", "foo", "foo"); + Status stat = git.status().call(); + assertEquals(Sets.of("audi", "audio-new", "audio.new", "audio", + "audio_new"), stat.getUntrackedFolders()); + } + } + } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheEntryTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheEntryTest.java index 5477f565f4..8e84dfa318 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheEntryTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheEntryTest.java @@ -242,6 +242,46 @@ public class DirCacheEntryTest { } @Test + public void testSetStage() { + DirCacheEntry e = new DirCacheEntry("some/path", DirCacheEntry.STAGE_1); + e.setAssumeValid(true); + e.setCreationTime(2L); + e.setFileMode(FileMode.EXECUTABLE_FILE); + e.setLastModified(EPOCH.plusMillis(3L)); + e.setLength(100L); + e.setObjectId(ObjectId + .fromString("0123456789012345678901234567890123456789")); + e.setUpdateNeeded(true); + e.setStage(DirCacheEntry.STAGE_2); + + assertTrue(e.isAssumeValid()); + assertEquals(2L, e.getCreationTime()); + assertEquals( + ObjectId.fromString("0123456789012345678901234567890123456789"), + e.getObjectId()); + assertEquals(FileMode.EXECUTABLE_FILE, e.getFileMode()); + assertEquals(EPOCH.plusMillis(3L), e.getLastModifiedInstant()); + assertEquals(100L, e.getLength()); + assertEquals(DirCacheEntry.STAGE_2, e.getStage()); + assertTrue(e.isUpdateNeeded()); + assertEquals("some/path", e.getPathString()); + + e.setStage(DirCacheEntry.STAGE_0); + + assertTrue(e.isAssumeValid()); + assertEquals(2L, e.getCreationTime()); + assertEquals( + ObjectId.fromString("0123456789012345678901234567890123456789"), + e.getObjectId()); + assertEquals(FileMode.EXECUTABLE_FILE, e.getFileMode()); + assertEquals(EPOCH.plusMillis(3L), e.getLastModifiedInstant()); + assertEquals(100L, e.getLength()); + assertEquals(DirCacheEntry.STAGE_0, e.getStage()); + assertTrue(e.isUpdateNeeded()); + assertEquals("some/path", e.getPathString()); + } + + @Test public void testCopyMetaDataWithStage() { copyMetaDataHelper(false); } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCachePathEditTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCachePathEditTest.java index 39a1f01803..5778d28d6f 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCachePathEditTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCachePathEditTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011, Robin Rosenberg and others + * Copyright (C) 2011, 2020 Robin Rosenberg and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -124,6 +124,32 @@ public class DirCachePathEditTest { } @Test + public void testPathEditWithStagesAndReset() throws Exception { + DirCache dc = DirCache.newInCore(); + DirCacheBuilder builder = new DirCacheBuilder(dc, 3); + builder.add(createEntry("a", DirCacheEntry.STAGE_1)); + builder.add(createEntry("a", DirCacheEntry.STAGE_2)); + builder.add(createEntry("a", DirCacheEntry.STAGE_3)); + builder.finish(); + + DirCacheEditor editor = dc.editor(); + PathEdit edit = new PathEdit("a") { + + @Override + public void apply(DirCacheEntry ent) { + ent.setStage(DirCacheEntry.STAGE_0); + } + }; + editor.add(edit); + editor.finish(); + + assertEquals(1, dc.getEntryCount()); + DirCacheEntry entry = dc.getEntry(0); + assertEquals("a", entry.getPathString()); + assertEquals(DirCacheEntry.STAGE_0, entry.getStage()); + } + + @Test public void testFileReplacesTree() throws Exception { DirCache dc = DirCache.newInCore(); DirCacheEditor editor = dc.editor(); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcBasicPackingTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcBasicPackingTest.java index e8d1cd3d7e..d007dd4511 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcBasicPackingTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcBasicPackingTest.java @@ -80,6 +80,29 @@ public class GcBasicPackingTest extends GcTestCase { } @Theory + public void testPack2Commits_noPackFolder(boolean aggressive) throws Exception { + File packDir = repo.getObjectDatabase().getPackDirectory(); + assertTrue(packDir.delete()); + + BranchBuilder bb = tr.branch("refs/heads/master"); + bb.commit().add("A", "A").add("B", "B").create(); + bb.commit().add("A", "A2").add("B", "B2").create(); + + stats = gc.getStatistics(); + assertEquals(8, stats.numberOfLooseObjects); + assertEquals(0, stats.numberOfPackedObjects); + configureGc(gc, aggressive); + gc.gc(); + stats = gc.getStatistics(); + assertEquals(0, stats.numberOfLooseObjects); + assertEquals(8, stats.numberOfPackedObjects); + assertEquals(1, stats.numberOfPackFiles); + assertEquals(2, stats.numberOfBitmaps); + + assertTrue(packDir.exists()); + } + + @Theory public void testPackAllObjectsInOnePack(boolean aggressive) throws Exception { tr.branch("refs/heads/master").commit().add("A", "A").add("B", "B") diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/logging/PerformanceLogContextTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/logging/PerformanceLogContextTest.java new file mode 100644 index 0000000000..f3c1ddec8a --- /dev/null +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/logging/PerformanceLogContextTest.java @@ -0,0 +1,95 @@ +package org.eclipse.jgit.logging; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; +import java.util.List; + +/** + * Tests for performance log context utilities. + */ +public class PerformanceLogContextTest { + + @Test + public void testAddEvent() { + PerformanceLogRecord record = new PerformanceLogRecord("record", 0); + PerformanceLogContext.getInstance().addEvent(record); + + List<PerformanceLogRecord> eventRecords = PerformanceLogContext + .getInstance().getEventRecords(); + assertTrue(eventRecords.contains(record)); + assertEquals(1, eventRecords.size()); + } + + @Test + public void testCleanEvents() { + PerformanceLogRecord record1 = new PerformanceLogRecord("record1", 0); + PerformanceLogContext.getInstance().addEvent(record1); + + PerformanceLogRecord record2 = new PerformanceLogRecord("record2", 0); + PerformanceLogContext.getInstance().addEvent(record2); + + PerformanceLogContext.getInstance().cleanEvents(); + List<PerformanceLogRecord> eventRecords = PerformanceLogContext + .getInstance().getEventRecords(); + assertEquals(0, eventRecords.size()); + } + + @Test + public void testAddEventsTwoThreads() throws InterruptedException { + TestRunnable runnable1 = new TestRunnable("record1", 1); + TestRunnable runnable2 = new TestRunnable("record2", 2); + + Thread thread1 = new Thread(runnable1); + Thread thread2 = new Thread(runnable2); + + thread1.start(); + thread2.start(); + + thread1.join(); + thread2.join(); + assertEquals(1, runnable1.getEventRecordsCount()); + assertEquals(1, runnable2.getEventRecordsCount()); + assertFalse(runnable1.isThrown()); + assertFalse(runnable2.isThrown()); + } + + private static class TestRunnable implements Runnable { + private String name; + + private long durationMs; + + private long eventRecordsCount; + + private boolean thrown = false; + + public TestRunnable(String name, long durationMs) { + this.name = name; + this.durationMs = durationMs; + } + + public boolean isThrown() { + return thrown; + } + + public long getEventRecordsCount() { + return eventRecordsCount; + } + + @Override + public void run() { + PerformanceLogRecord record = new PerformanceLogRecord(name, + durationMs); + try { + PerformanceLogContext.getInstance().addEvent(record); + eventRecordsCount = PerformanceLogContext.getInstance() + .getEventRecords().size(); + PerformanceLogContext.getInstance().cleanEvents(); + } catch (Exception e) { + thrown = true; + } + } + } +} diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/submodule/SubmoduleWalkTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/submodule/SubmoduleWalkTest.java index 70175c8205..ea994f06aa 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/submodule/SubmoduleWalkTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/submodule/SubmoduleWalkTest.java @@ -455,6 +455,7 @@ public class SubmoduleWalkTest extends RepositoryTestCase { final CanonicalTreeParser p = new CanonicalTreeParser(); p.reset(testDb.getRevWalk().getObjectReader(), commit.getTree()); try (SubmoduleWalk gen = SubmoduleWalk.forPath(db, p, "sub")) { + assertEquals(arbitraryName, gen.getModuleName()); assertEquals(path, gen.getPath()); assertEquals(subId, gen.getObjectId()); assertEquals(new File(db.getWorkTree(), path), gen.getDirectory()); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/BasePackConnectionTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/BasePackConnectionTest.java new file mode 100644 index 0000000000..64b16f659a --- /dev/null +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/BasePackConnectionTest.java @@ -0,0 +1,233 @@ +/* + * Copyright (C) 2020, Lee Worrall and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.transport; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.hasKey; +import static org.hamcrest.Matchers.instanceOf; +import static org.hamcrest.Matchers.not; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertSame; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; + +import org.eclipse.jgit.lib.ObjectId; +import org.eclipse.jgit.lib.ObjectIdRef; +import org.eclipse.jgit.lib.Ref; +import org.eclipse.jgit.lib.SymbolicRef; +import org.junit.Test; + +public class BasePackConnectionTest { + + @Test + public void testExtractSymRefsFromCapabilities() { + final Map<String, String> symRefs = BasePackConnection + .extractSymRefsFromCapabilities( + Arrays.asList("symref=HEAD:refs/heads/main", + "symref=refs/heads/sym:refs/heads/other")); + + assertEquals(2, symRefs.size()); + assertEquals("refs/heads/main", symRefs.get("HEAD")); + assertEquals("refs/heads/other", symRefs.get("refs/heads/sym")); + } + + @Test + public void testUpdateWithSymRefsAdds() { + final Ref mainRef = new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, + "refs/heads/main", ObjectId.fromString( + "0000000000000000000000000000000000000001")); + + final Map<String, Ref> refMap = new HashMap<>(); + refMap.put(mainRef.getName(), mainRef); + refMap.put("refs/heads/other", + new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, "refs/heads/other", + ObjectId.fromString( + "0000000000000000000000000000000000000002"))); + + final Map<String, String> symRefs = new HashMap<>(); + symRefs.put("HEAD", "refs/heads/main"); + + BasePackConnection.updateWithSymRefs(refMap, symRefs); + + assertThat(refMap, hasKey("HEAD")); + final Ref headRef = refMap.get("HEAD"); + assertThat(headRef, instanceOf(SymbolicRef.class)); + final SymbolicRef headSymRef = (SymbolicRef) headRef; + assertEquals("HEAD", headSymRef.getName()); + assertSame(mainRef, headSymRef.getTarget()); + } + + @Test + public void testUpdateWithSymRefsReplaces() { + final Ref mainRef = new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, + "refs/heads/main", ObjectId.fromString( + "0000000000000000000000000000000000000001")); + + final Map<String, Ref> refMap = new HashMap<>(); + refMap.put(mainRef.getName(), mainRef); + refMap.put("HEAD", new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, "HEAD", + mainRef.getObjectId())); + refMap.put("refs/heads/other", + new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, "refs/heads/other", + ObjectId.fromString( + "0000000000000000000000000000000000000002"))); + + final Map<String, String> symRefs = new HashMap<>(); + symRefs.put("HEAD", "refs/heads/main"); + + BasePackConnection.updateWithSymRefs(refMap, symRefs); + + assertThat(refMap, hasKey("HEAD")); + final Ref headRef = refMap.get("HEAD"); + assertThat(headRef, instanceOf(SymbolicRef.class)); + final SymbolicRef headSymRef = (SymbolicRef) headRef; + assertEquals("HEAD", headSymRef.getName()); + assertSame(mainRef, headSymRef.getTarget()); + } + + @Test + public void testUpdateWithSymRefsWithIndirectsAdds() { + final Ref mainRef = new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, + "refs/heads/main", ObjectId.fromString( + "0000000000000000000000000000000000000001")); + + final Map<String, Ref> refMap = new HashMap<>(); + refMap.put(mainRef.getName(), mainRef); + refMap.put("refs/heads/other", + new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, "refs/heads/other", + ObjectId.fromString( + "0000000000000000000000000000000000000002"))); + + final Map<String, String> symRefs = new LinkedHashMap<>(); // Ordered + symRefs.put("refs/heads/sym3", "refs/heads/sym2"); // Forward reference + symRefs.put("refs/heads/sym1", "refs/heads/main"); + symRefs.put("refs/heads/sym2", "refs/heads/sym1"); // Backward reference + + BasePackConnection.updateWithSymRefs(refMap, symRefs); + + assertThat(refMap, hasKey("refs/heads/sym1")); + final Ref sym1Ref = refMap.get("refs/heads/sym1"); + assertThat(sym1Ref, instanceOf(SymbolicRef.class)); + final SymbolicRef sym1SymRef = (SymbolicRef) sym1Ref; + assertEquals("refs/heads/sym1", sym1SymRef.getName()); + assertSame(mainRef, sym1SymRef.getTarget()); + + assertThat(refMap, hasKey("refs/heads/sym2")); + final Ref sym2Ref = refMap.get("refs/heads/sym2"); + assertThat(sym2Ref, instanceOf(SymbolicRef.class)); + final SymbolicRef sym2SymRef = (SymbolicRef) sym2Ref; + assertEquals("refs/heads/sym2", sym2SymRef.getName()); + assertSame(sym1SymRef, sym2SymRef.getTarget()); + + assertThat(refMap, hasKey("refs/heads/sym3")); + final Ref sym3Ref = refMap.get("refs/heads/sym3"); + assertThat(sym3Ref, instanceOf(SymbolicRef.class)); + final SymbolicRef sym3SymRef = (SymbolicRef) sym3Ref; + assertEquals("refs/heads/sym3", sym3SymRef.getName()); + assertSame(sym2SymRef, sym3SymRef.getTarget()); + } + + @Test + public void testUpdateWithSymRefsWithIndirectsReplaces() { + final Ref mainRef = new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, + "refs/heads/main", ObjectId.fromString( + "0000000000000000000000000000000000000001")); + + final Map<String, Ref> refMap = new HashMap<>(); + refMap.put(mainRef.getName(), mainRef); + refMap.put("refs/heads/sym1", new ObjectIdRef.Unpeeled( + Ref.Storage.LOOSE, "refs/heads/sym1", mainRef.getObjectId())); + refMap.put("refs/heads/sym2", new ObjectIdRef.Unpeeled( + Ref.Storage.LOOSE, "refs/heads/sym2", mainRef.getObjectId())); + refMap.put("refs/heads/sym3", new ObjectIdRef.Unpeeled( + Ref.Storage.LOOSE, "refs/heads/sym3", mainRef.getObjectId())); + refMap.put("refs/heads/other", + new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, "refs/heads/other", + ObjectId.fromString( + "0000000000000000000000000000000000000002"))); + + final Map<String, String> symRefs = new LinkedHashMap<>(); // Ordered + symRefs.put("refs/heads/sym3", "refs/heads/sym2"); // Forward reference + symRefs.put("refs/heads/sym1", "refs/heads/main"); + symRefs.put("refs/heads/sym2", "refs/heads/sym1"); // Backward reference + + BasePackConnection.updateWithSymRefs(refMap, symRefs); + + assertThat(refMap, hasKey("refs/heads/sym1")); + final Ref sym1Ref = refMap.get("refs/heads/sym1"); + assertThat(sym1Ref, instanceOf(SymbolicRef.class)); + final SymbolicRef sym1SymRef = (SymbolicRef) sym1Ref; + assertEquals("refs/heads/sym1", sym1SymRef.getName()); + assertSame(mainRef, sym1SymRef.getTarget()); + + assertThat(refMap, hasKey("refs/heads/sym2")); + final Ref sym2Ref = refMap.get("refs/heads/sym2"); + assertThat(sym2Ref, instanceOf(SymbolicRef.class)); + final SymbolicRef sym2SymRef = (SymbolicRef) sym2Ref; + assertEquals("refs/heads/sym2", sym2SymRef.getName()); + assertSame(sym1SymRef, sym2SymRef.getTarget()); + + assertThat(refMap, hasKey("refs/heads/sym3")); + final Ref sym3Ref = refMap.get("refs/heads/sym3"); + assertThat(sym3Ref, instanceOf(SymbolicRef.class)); + final SymbolicRef sym3SymRef = (SymbolicRef) sym3Ref; + assertEquals("refs/heads/sym3", sym3SymRef.getName()); + assertSame(sym2SymRef, sym3SymRef.getTarget()); + } + + @Test + public void testUpdateWithSymRefsIgnoresSelfReference() { + final Ref mainRef = new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, + "refs/heads/main", ObjectId.fromString( + "0000000000000000000000000000000000000001")); + + final Map<String, Ref> refMap = new HashMap<>(); + refMap.put(mainRef.getName(), mainRef); + refMap.put("refs/heads/other", + new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, "refs/heads/other", + ObjectId.fromString( + "0000000000000000000000000000000000000002"))); + + final Map<String, String> symRefs = new LinkedHashMap<>(); + symRefs.put("refs/heads/sym1", "refs/heads/sym1"); + + BasePackConnection.updateWithSymRefs(refMap, symRefs); + + assertEquals(2, refMap.size()); + assertThat(refMap, not(hasKey("refs/heads/sym1"))); + } + + @Test + public void testUpdateWithSymRefsIgnoreCircularReference() { + final Ref mainRef = new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, + "refs/heads/main", ObjectId.fromString( + "0000000000000000000000000000000000000001")); + + final Map<String, Ref> refMap = new HashMap<>(); + refMap.put(mainRef.getName(), mainRef); + refMap.put("refs/heads/other", + new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, "refs/heads/other", + ObjectId.fromString( + "0000000000000000000000000000000000000002"))); + + final Map<String, String> symRefs = new LinkedHashMap<>(); + symRefs.put("refs/heads/sym2", "refs/heads/sym1"); + symRefs.put("refs/heads/sym1", "refs/heads/sym2"); + + BasePackConnection.updateWithSymRefs(refMap, symRefs); + + assertEquals(2, refMap.size()); + assertThat(refMap, not(hasKey("refs/heads/sym1"))); + assertThat(refMap, not(hasKey("refs/heads/sym2"))); + } +}
\ No newline at end of file diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/HttpConfigTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/HttpConfigTest.java index fcbec52a54..5336dd73c6 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/HttpConfigTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/HttpConfigTest.java @@ -13,7 +13,9 @@ package org.eclipse.jgit.transport; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; +import org.eclipse.jgit.junit.MockSystemReader; import org.eclipse.jgit.lib.Config; +import org.eclipse.jgit.util.SystemReader; import org.junit.Before; import org.junit.Test; @@ -25,6 +27,7 @@ public class HttpConfigTest { private static final String DEFAULT = "[http]\n" + "\tpostBuffer = 1\n" + "\tsslVerify= true\n" + "\tfollowRedirects = true\n" + + "\textraHeader = x: y\n" + "\tuserAgent = Test/0.1\n" + "\tmaxRedirects = 5\n\n"; private Config config; @@ -95,7 +98,8 @@ public class HttpConfigTest { @Test public void testMatchWithInvalidUriInConfig() throws Exception { config.fromText( - DEFAULT + "[http \"///\"]\n" + "\tpostBuffer = 1024\n"); + DEFAULT + "[http \"///#expectedWarning\"]\n" + + "\tpostBuffer = 1024\n"); HttpConfig http = new HttpConfig(config, new URIish("http://example.com/path/repo.git")); assertEquals(1, http.getPostBuffer()); @@ -103,7 +107,8 @@ public class HttpConfigTest { @Test public void testMatchWithInvalidAndValidUriInConfig() throws Exception { - config.fromText(DEFAULT + "[http \"///\"]\n" + "\tpostBuffer = 1024\n" + config.fromText(DEFAULT + "[http \"///#expectedWarning\"]\n" + + "\tpostBuffer = 1024\n" + "[http \"http://example.com\"]\n" + "\tpostBuffer = 2048\n"); HttpConfig http = new HttpConfig(config, new URIish("http://example.com/path/repo.git")); @@ -174,4 +179,93 @@ public class HttpConfigTest { new URIish("http://user@example.com/path")); assertEquals(1024, http.getPostBuffer()); } + + @Test + public void testExtraHeaders() throws Exception { + config.fromText(DEFAULT + "[http \"http://example.com\"]\n" + + "\textraHeader=foo: bar\n"); + HttpConfig http = new HttpConfig(config, + new URIish("http://example.com/")); + assertEquals(1, http.getExtraHeaders().size()); + assertEquals("foo: bar", http.getExtraHeaders().get(0)); + } + + @Test + public void testExtraHeadersMultiple() throws Exception { + config.fromText(DEFAULT + "[http \"http://example.com\"]\n" + + "\textraHeader=foo: bar\n" // + + "\textraHeader=bar: foo\n"); + HttpConfig http = new HttpConfig(config, + new URIish("http://example.com/")); + assertEquals(2, http.getExtraHeaders().size()); + assertEquals("foo: bar", http.getExtraHeaders().get(0)); + assertEquals("bar: foo", http.getExtraHeaders().get(1)); + } + + @Test + public void testExtraHeadersReset() throws Exception { + config.fromText(DEFAULT + "[http \"http://example.com\"]\n" + + "\textraHeader=foo: bar\n" // + + "\textraHeader=bar: foo\n" // + + "\textraHeader=\n"); + HttpConfig http = new HttpConfig(config, + new URIish("http://example.com/")); + assertTrue(http.getExtraHeaders().isEmpty()); + } + + @Test + public void testExtraHeadersResetAndMore() throws Exception { + config.fromText(DEFAULT + "[http \"http://example.com\"]\n" + + "\textraHeader=foo: bar\n" // + + "\textraHeader=bar: foo\n" // + + "\textraHeader=\n" // + + "\textraHeader=baz: something\n"); + HttpConfig http = new HttpConfig(config, + new URIish("http://example.com/")); + assertEquals(1, http.getExtraHeaders().size()); + assertEquals("baz: something", http.getExtraHeaders().get(0)); + } + + @Test + public void testUserAgent() throws Exception { + config.fromText(DEFAULT + "[http \"http://example.com\"]\n" + + "\tuserAgent=DummyAgent/4.0\n"); + HttpConfig http = new HttpConfig(config, + new URIish("http://example.com/")); + assertEquals("DummyAgent/4.0", http.getUserAgent()); + } + + @Test + public void testUserAgentEnvOverride() throws Exception { + String mockAgent = "jgit-test/5.10.0"; + SystemReader originalReader = SystemReader.getInstance(); + SystemReader.setInstance(new MockSystemReader() { + + @Override + public String getenv(String variable) { + if ("GIT_HTTP_USER_AGENT".equals(variable)) { + return mockAgent; + } + return super.getenv(variable); + } + }); + try { + config.fromText(DEFAULT + "[http \"http://example.com\"]\n" + + "\tuserAgent=DummyAgent/4.0\n"); + HttpConfig http = new HttpConfig(config, + new URIish("http://example.com/")); + assertEquals(mockAgent, http.getUserAgent()); + } finally { + SystemReader.setInstance(originalReader); + } + } + + @Test + public void testUserAgentNonAscii() throws Exception { + config.fromText(DEFAULT + "[http \"http://example.com\"]\n" + + "\tuserAgent= d ümmy Agent -5.10\n"); + HttpConfig http = new HttpConfig(config, + new URIish("http://example.com/")); + assertEquals("d.mmy.Agent.-5.10", http.getUserAgent()); + } } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PacketLineInTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PacketLineInTest.java index 5d7f881ab9..7f03357e9c 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PacketLineInTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PacketLineInTest.java @@ -12,8 +12,8 @@ package org.eclipse.jgit.transport; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertSame; +import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.io.ByteArrayInputStream; @@ -111,20 +111,25 @@ public class PacketLineInTest { final String act = in.readString(); assertEquals("", act); assertFalse(PacketLineIn.isEnd(act)); + assertFalse(PacketLineIn.isDelimiter(act)); assertEOF(); } @Test public void testReadString_End() throws IOException { init("0000"); - assertTrue(PacketLineIn.isEnd(in.readString())); + String act = in.readString(); + assertTrue(PacketLineIn.isEnd(act)); + assertFalse(PacketLineIn.isDelimiter(act)); assertEOF(); } @Test public void testReadString_Delim() throws IOException { init("0001"); - assertTrue(PacketLineIn.isDelimiter(in.readString())); + String act = in.readString(); + assertTrue(PacketLineIn.isDelimiter(act)); + assertFalse(PacketLineIn.isEnd(act)); assertEOF(); } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TransportHttpTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TransportHttpTest.java index b84b6b2e0b..029b45e1e6 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TransportHttpTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TransportHttpTest.java @@ -18,7 +18,9 @@ import java.time.Instant; import java.util.Arrays; import java.util.Collections; import java.util.Date; +import java.util.LinkedHashMap; import java.util.LinkedHashSet; +import java.util.Map; import java.util.Set; import org.eclipse.jgit.internal.transport.http.NetscapeCookieFile; @@ -155,4 +157,50 @@ public class TransportHttpTest extends SampleDataRepositoryTestCase { cookieFile.exists()); } } + + private void assertHeaders(String expected, String... headersToAdd) { + HttpConnection fake = Mockito.mock(HttpConnection.class); + Map<String, String> headers = new LinkedHashMap<>(); + Mockito.doAnswer(invocation -> { + Object[] args = invocation.getArguments(); + headers.put(args[0].toString(), args[1].toString()); + return null; + }).when(fake).setRequestProperty(ArgumentMatchers.anyString(), + ArgumentMatchers.anyString()); + TransportHttp.addHeaders(fake, Arrays.asList(headersToAdd)); + Assert.assertEquals(expected, headers.toString()); + } + + @Test + public void testAddHeaders() { + assertHeaders("{a=b, c=d}", "a: b", "c :d"); + } + + @Test + public void testAddHeaderEmptyValue() { + assertHeaders("{a-x=b, c=, d=e}", "a-x: b", "c:", "d:e"); + } + + @Test + public void testSkipHeaderWithEmptyKey() { + assertHeaders("{a=b, c=d}", "a: b", " : x", "c :d"); + assertHeaders("{a=b, c=d}", "a: b", ": x", "c :d"); + } + + @Test + public void testSkipHeaderWithoutKey() { + assertHeaders("{a=b, c=d}", "a: b", "x", "c :d"); + } + + @Test + public void testSkipHeaderWithInvalidKey() { + assertHeaders("{a=b, c=d}", "a: b", "q/p: x", "c :d"); + assertHeaders("{a=b, c=d}", "a: b", "ä: x", "c :d"); + } + + @Test + public void testSkipHeaderWithNonAsciiValue() { + assertHeaders("{a=b, c=d}", "a: b", "q/p: x", "c :d"); + assertHeaders("{a=b, c=d}", "a: b", "x: ä", "c :d"); + } } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java index 46ba3aa5d4..cdf9d661d0 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java @@ -362,23 +362,22 @@ public class UploadPackTest { } /* - * Invokes UploadPack with protocol v2 and sends it the given lines, + * Invokes UploadPack with specified protocol version and sends it the given lines, * and returns UploadPack's output stream. */ - private ByteArrayInputStream uploadPackV2Setup( + private ByteArrayInputStream uploadPackSetup(String version, Consumer<UploadPack> postConstructionSetup, String... inputLines) throws Exception { ByteArrayInputStream send = linesAsInputStream(inputLines); server.getConfig().setString(ConfigConstants.CONFIG_PROTOCOL_SECTION, - null, ConfigConstants.CONFIG_KEY_VERSION, - TransferConfig.ProtocolVersion.V2.version()); + null, ConfigConstants.CONFIG_KEY_VERSION, version); UploadPack up = new UploadPack(server); if (postConstructionSetup != null) { postConstructionSetup.accept(up); } - up.setExtraParameters(Sets.of("version=2")); + up.setExtraParameters(Sets.of("version=".concat(version))); ByteArrayOutputStream recv = new ByteArrayOutputStream(); up.upload(send, recv, null); @@ -406,6 +405,30 @@ public class UploadPackTest { } /* + * Invokes UploadPack with protocol v1 and sends it the given lines. + * Returns UploadPack's output stream, not including the capability + * advertisement by the server. + */ + private ByteArrayInputStream uploadPackV1( + Consumer<UploadPack> postConstructionSetup, + String... inputLines) + throws Exception { + ByteArrayInputStream recvStream = + uploadPackSetup("1", postConstructionSetup, inputLines); + PacketLineIn pckIn = new PacketLineIn(recvStream); + + // drain capabilities + while (!PacketLineIn.isEnd(pckIn.readString())) { + // do nothing + } + return recvStream; + } + + private ByteArrayInputStream uploadPackV1(String... inputLines) throws Exception { + return uploadPackV1(null, inputLines); + } + + /* * Invokes UploadPack with protocol v2 and sends it the given lines. * Returns UploadPack's output stream, not including the capability * advertisement by the server. @@ -415,7 +438,7 @@ public class UploadPackTest { String... inputLines) throws Exception { ByteArrayInputStream recvStream = - uploadPackV2Setup(postConstructionSetup, inputLines); + uploadPackSetup("2", postConstructionSetup, inputLines); PacketLineIn pckIn = new PacketLineIn(recvStream); // drain capabilities @@ -455,7 +478,7 @@ public class UploadPackTest { @Test public void testV2Capabilities() throws Exception { TestV2Hook hook = new TestV2Hook(); - ByteArrayInputStream recvStream = uploadPackV2Setup( + ByteArrayInputStream recvStream = uploadPackSetup( "2", (UploadPack up) -> {up.setProtocolV2Hook(hook);}, PacketLineIn.end()); PacketLineIn pckIn = new PacketLineIn(recvStream); @@ -478,7 +501,7 @@ public class UploadPackTest { String fetchCapability) throws Exception { server.getConfig().setBoolean(configSection, null, configName, true); ByteArrayInputStream recvStream = - uploadPackV2Setup(null, PacketLineIn.end()); + uploadPackSetup("2", null, PacketLineIn.end()); PacketLineIn pckIn = new PacketLineIn(recvStream); assertThat(pckIn.readString(), is("version 2")); @@ -502,7 +525,7 @@ public class UploadPackTest { String configName, String fetchCapability) throws Exception { server.getConfig().setBoolean(configSection, null, configName, false); ByteArrayInputStream recvStream = - uploadPackV2Setup(null, PacketLineIn.end()); + uploadPackSetup("2", null, PacketLineIn.end()); PacketLineIn pckIn = new PacketLineIn(recvStream); assertThat(pckIn.readString(), is("version 2")); @@ -554,7 +577,7 @@ public class UploadPackTest { server.getConfig().setBoolean("uploadpack", null, "allowrefinwant", true); server.getConfig().setBoolean("uploadpack", null, "advertiserefinwant", false); ByteArrayInputStream recvStream = - uploadPackV2Setup(null, PacketLineIn.end()); + uploadPackSetup("2", null, PacketLineIn.end()); PacketLineIn pckIn = new PacketLineIn(recvStream); assertThat(pckIn.readString(), is("version 2")); @@ -718,7 +741,7 @@ public class UploadPackTest { PacketLineIn.end() }; TestV2Hook testHook = new TestV2Hook(); - uploadPackV2Setup((UploadPack up) -> {up.setProtocolV2Hook(testHook);}, lines); + uploadPackSetup("2", (UploadPack up) -> {up.setProtocolV2Hook(testHook);}, lines); LsRefsV2Request req = testHook.lsRefsRequest; assertEquals(2, req.getServerOptions().size()); @@ -1063,6 +1086,70 @@ public class UploadPackTest { } @Test + public void testUploadNewBytes() throws Exception { + String commonInBlob = "abcdefghijklmnopqrstuvwx"; + + RevBlob parentBlob = remote.blob(commonInBlob + "a"); + RevCommit parent = remote.commit(remote.tree(remote.file("foo", parentBlob))); + RevBlob childBlob = remote.blob(commonInBlob + "b"); + RevCommit child = remote.commit(remote.tree(remote.file("foo", childBlob)), parent); + remote.update("branch1", child); + + ByteArrayInputStream recvStream = uploadPackV2( + "command=fetch\n", + PacketLineIn.delimiter(), + "want " + child.toObjectId().getName() + "\n", + "ofs-delta\n", + "done\n", + PacketLineIn.end()); + PacketLineIn pckIn = new PacketLineIn(recvStream); + assertThat(pckIn.readString(), is("packfile")); + ReceivedPackStatistics receivedStats = parsePack(recvStream); + assertTrue(receivedStats.getNumBytesDuplicated() == 0); + assertTrue(receivedStats.getNumObjectsDuplicated() == 0); + } + + @Test + public void testUploadRedundantBytes() throws Exception { + String commonInBlob = "abcdefghijklmnopqrstuvwxyz"; + + RevBlob parentBlob = remote.blob(commonInBlob + "a"); + RevCommit parent = remote.commit(remote.tree(remote.file("foo", parentBlob))); + RevBlob childBlob = remote.blob(commonInBlob + "b"); + RevCommit child = remote.commit(remote.tree(remote.file("foo", childBlob)), parent); + remote.update("branch1", child); + + try (TestRepository<InMemoryRepository> local = new TestRepository<>( + client)) { + RevBlob localParentBlob = local.blob(commonInBlob + "a"); + RevCommit localParent = local + .commit(local.tree(local.file("foo", localParentBlob))); + RevBlob localChildBlob = local.blob(commonInBlob + "b"); + RevCommit localChild = local.commit( + local.tree(local.file("foo", localChildBlob)), localParent); + local.update("branch1", localChild); + } + + ByteArrayInputStream recvStream = uploadPackV2( + "command=fetch\n", + PacketLineIn.delimiter(), + "want " + child.toObjectId().getName() + "\n", + "ofs-delta\n", + "done\n", + PacketLineIn.end()); + PacketLineIn pckIn = new PacketLineIn(recvStream); + assertThat(pckIn.readString(), is("packfile")); + ReceivedPackStatistics receivedStats = parsePack(recvStream); + + long sizeOfHeader = 12; + long sizeOfTrailer = 20; + long expectedSize = receivedStats.getNumBytesRead() - sizeOfHeader + - sizeOfTrailer; + assertTrue(receivedStats.getNumBytesDuplicated() == expectedSize); + assertTrue(receivedStats.getNumObjectsDuplicated() == 6); + } + + @Test public void testV2FetchOfsDelta() throws Exception { String commonInBlob = "abcdefghijklmnopqrstuvwxyz"; @@ -1474,7 +1561,7 @@ public class UploadPackTest { PacketLineIn.end() }; TestV2Hook testHook = new TestV2Hook(); - uploadPackV2Setup((UploadPack up) -> {up.setProtocolV2Hook(testHook);}, lines); + uploadPackSetup("2", (UploadPack up) -> {up.setProtocolV2Hook(testHook);}, lines); FetchV2Request req = testHook.fetchRequest; assertNotNull(req); @@ -2329,6 +2416,93 @@ public class UploadPackTest { assertEquals(1, ((RefCallsCountingRepository)server).numRefCalls()); } + @Test + public void testNotAdvertisedWantsV1Fetch() throws Exception { + String commonInBlob = "abcdefghijklmnopqrstuvwxyz"; + + RevBlob parentBlob = remote.blob(commonInBlob + "a"); + RevCommit parent = remote + .commit(remote.tree(remote.file("foo", parentBlob))); + RevBlob childBlob = remote.blob(commonInBlob + "b"); + RevCommit child = remote + .commit(remote.tree(remote.file("foo", childBlob)), parent); + remote.update("branch1", child); + + uploadPackV1("want " + child.toObjectId().getName() + "\n", + PacketLineIn.end(), + "have " + parent.toObjectId().getName() + "\n", + "done\n", PacketLineIn.end()); + + assertEquals(0, stats.getNotAdvertisedWants()); + } + + @Test + public void testNotAdvertisedWantsV1FetchRequestPolicyReachableCommit() throws Exception { + String commonInBlob = "abcdefghijklmnopqrstuvwxyz"; + + RevBlob parentBlob = remote.blob(commonInBlob + "a"); + RevCommit parent = remote + .commit(remote.tree(remote.file("foo", parentBlob))); + RevBlob childBlob = remote.blob(commonInBlob + "b"); + RevCommit child = remote + .commit(remote.tree(remote.file("foo", childBlob)), parent); + + remote.update("branch1", child); + + uploadPackV1((UploadPack up) -> {up.setRequestPolicy(RequestPolicy.REACHABLE_COMMIT);}, + "want " + parent.toObjectId().getName() + "\n", + PacketLineIn.end(), + "done\n", PacketLineIn.end()); + + assertEquals(1, stats.getNotAdvertisedWants()); + } + + @Test + public void testNotAdvertisedWantsV2FetchThinPack() throws Exception { + String commonInBlob = "abcdefghijklmnopqrstuvwxyz"; + + RevBlob parentBlob = remote.blob(commonInBlob + "a"); + RevCommit parent = remote + .commit(remote.tree(remote.file("foo", parentBlob))); + RevBlob childBlob = remote.blob(commonInBlob + "b"); + RevCommit child = remote + .commit(remote.tree(remote.file("foo", childBlob)), parent); + remote.update("branch1", child); + + ByteArrayInputStream recvStream = uploadPackV2("command=fetch\n", + PacketLineIn.delimiter(), + "want " + child.toObjectId().getName() + "\n", + "have " + parent.toObjectId().getName() + "\n", "thin-pack\n", + "done\n", PacketLineIn.end()); + PacketLineIn pckIn = new PacketLineIn(recvStream); + + assertThat(pckIn.readString(), is("packfile")); + + assertEquals(0, stats.getNotAdvertisedWants()); + } + + @Test + public void testNotAdvertisedWantsV2FetchRequestPolicyReachableCommit() throws Exception { + String commonInBlob = "abcdefghijklmnopqrstuvwxyz"; + + RevBlob parentBlob = remote.blob(commonInBlob + "a"); + RevCommit parent = remote + .commit(remote.tree(remote.file("foo", parentBlob))); + RevBlob childBlob = remote.blob(commonInBlob + "b"); + RevCommit child = remote + .commit(remote.tree(remote.file("foo", childBlob)), parent); + + remote.update("branch1", child); + + uploadPackV2((UploadPack up) -> {up.setRequestPolicy(RequestPolicy.REACHABLE_COMMIT);}, + "command=fetch\n", + PacketLineIn.delimiter(), + "want " + parent.toObjectId().getName() + "\n", "thin-pack\n", + "done\n", PacketLineIn.end()); + + assertEquals(1, stats.getNotAdvertisedWants()); + } + private class RefCallsCountingRepository extends InMemoryRepository { private final InMemoryRepository.MemRefDatabase refdb; private int numRefCalls; diff --git a/org.eclipse.jgit.ui/META-INF/MANIFEST.MF b/org.eclipse.jgit.ui/META-INF/MANIFEST.MF index d9b263f24c..ec74460e76 100644 --- a/org.eclipse.jgit.ui/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ui/META-INF/MANIFEST.MF @@ -4,14 +4,14 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit.ui Bundle-SymbolicName: org.eclipse.jgit.ui -Bundle-Version: 5.9.1.qualifier +Bundle-Version: 5.10.0.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Export-Package: org.eclipse.jgit.awtui;version="5.9.1" -Import-Package: org.eclipse.jgit.errors;version="[5.9.1,5.10.0)", - org.eclipse.jgit.lib;version="[5.9.1,5.10.0)", - org.eclipse.jgit.nls;version="[5.9.1,5.10.0)", - org.eclipse.jgit.revplot;version="[5.9.1,5.10.0)", - org.eclipse.jgit.revwalk;version="[5.9.1,5.10.0)", - org.eclipse.jgit.transport;version="[5.9.1,5.10.0)", - org.eclipse.jgit.util;version="[5.9.1,5.10.0)" +Export-Package: org.eclipse.jgit.awtui;version="5.10.0" +Import-Package: org.eclipse.jgit.errors;version="[5.10.0,5.11.0)", + org.eclipse.jgit.lib;version="[5.10.0,5.11.0)", + org.eclipse.jgit.nls;version="[5.10.0,5.11.0)", + org.eclipse.jgit.revplot;version="[5.10.0,5.11.0)", + org.eclipse.jgit.revwalk;version="[5.10.0,5.11.0)", + org.eclipse.jgit.transport;version="[5.10.0,5.11.0)", + org.eclipse.jgit.util;version="[5.10.0,5.11.0)" diff --git a/org.eclipse.jgit.ui/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.ui/META-INF/SOURCE-MANIFEST.MF index 52de82696d..b2e8c253d1 100644 --- a/org.eclipse.jgit.ui/META-INF/SOURCE-MANIFEST.MF +++ b/org.eclipse.jgit.ui/META-INF/SOURCE-MANIFEST.MF @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.jgit.ui - Sources Bundle-SymbolicName: org.eclipse.jgit.ui.source Bundle-Vendor: Eclipse.org - JGit -Bundle-Version: 5.9.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit.ui;version="5.9.1.qualifier";roots="." +Bundle-Version: 5.10.0.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.ui;version="5.10.0.qualifier";roots="." diff --git a/org.eclipse.jgit.ui/pom.xml b/org.eclipse.jgit.ui/pom.xml index 3c5c1371f5..56b22d69fd 100644 --- a/org.eclipse.jgit.ui/pom.xml +++ b/org.eclipse.jgit.ui/pom.xml @@ -19,7 +19,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit.ui</artifactId> diff --git a/org.eclipse.jgit/.settings/.api_filters b/org.eclipse.jgit/.settings/.api_filters new file mode 100644 index 0000000000..035ed37c10 --- /dev/null +++ b/org.eclipse.jgit/.settings/.api_filters @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<component id="org.eclipse.jgit" version="2"> + <resource path="src/org/eclipse/jgit/lib/ConfigConstants.java" type="org.eclipse.jgit.lib.ConfigConstants"> + <filter id="1141899266"> + <message_arguments> + <message_argument value="5.9"/> + <message_argument value="5.10"/> + <message_argument value="CONFIG_PROTOCOL_SECTION"/> + </message_arguments> + </filter> + </resource> + <resource path="src/org/eclipse/jgit/lib/TypedConfigGetter.java" type="org.eclipse.jgit.lib.TypedConfigGetter"> + <filter id="404000815"> + <message_arguments> + <message_argument value="org.eclipse.jgit.lib.TypedConfigGetter"/> + <message_argument value="getPath(Config, String, String, String, FS, File, Path)"/> + </message_arguments> + </filter> + </resource> + <resource path="src/org/eclipse/jgit/storage/pack/PackStatistics.java" type="org.eclipse.jgit.storage.pack.PackStatistics$Accumulator"> + <filter id="336658481"> + <message_arguments> + <message_argument value="org.eclipse.jgit.storage.pack.PackStatistics.Accumulator"/> + <message_argument value="notAdvertisedWants"/> + </message_arguments> + </filter> + <filter id="336658481"> + <message_arguments> + <message_argument value="org.eclipse.jgit.storage.pack.PackStatistics.Accumulator"/> + <message_argument value="reachabilityCheckDuration"/> + </message_arguments> + </filter> + </resource> + <resource path="src/org/eclipse/jgit/transport/HttpConfig.java" type="org.eclipse.jgit.transport.HttpConfig"> + <filter id="336658481"> + <message_arguments> + <message_argument value="org.eclipse.jgit.transport.HttpConfig"/> + <message_argument value="EXTRA_HEADER"/> + </message_arguments> + </filter> + <filter id="336658481"> + <message_arguments> + <message_argument value="org.eclipse.jgit.transport.HttpConfig"/> + <message_argument value="USER_AGENT"/> + </message_arguments> + </filter> + </resource> + <resource path="src/org/eclipse/jgit/transport/TransferConfig.java" type="org.eclipse.jgit.transport.TransferConfig$ProtocolVersion"> + <filter id="1175453698"> + <message_arguments> + <message_argument value="5.9"/> + <message_argument value="5.10"/> + <message_argument value="org.eclipse.jgit.transport.TransferConfig.ProtocolVersion"/> + </message_arguments> + </filter> + </resource> +</component> diff --git a/org.eclipse.jgit/META-INF/MANIFEST.MF b/org.eclipse.jgit/META-INF/MANIFEST.MF index 1348bde29e..1a91f06d44 100644 --- a/org.eclipse.jgit/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit/META-INF/MANIFEST.MF @@ -3,12 +3,12 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Automatic-Module-Name: org.eclipse.jgit Bundle-SymbolicName: org.eclipse.jgit -Bundle-Version: 5.9.1.qualifier +Bundle-Version: 5.10.0.qualifier Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor Eclipse-ExtensibleAPI: true -Export-Package: org.eclipse.jgit.annotations;version="5.9.1", - org.eclipse.jgit.api;version="5.9.1"; +Export-Package: org.eclipse.jgit.annotations;version="5.10.0", + org.eclipse.jgit.api;version="5.10.0"; uses:="org.eclipse.jgit.transport, org.eclipse.jgit.notes, org.eclipse.jgit.dircache, @@ -23,18 +23,18 @@ Export-Package: org.eclipse.jgit.annotations;version="5.9.1", org.eclipse.jgit.revwalk.filter, org.eclipse.jgit.blame, org.eclipse.jgit.merge", - org.eclipse.jgit.api.errors;version="5.9.1"; + org.eclipse.jgit.api.errors;version="5.10.0"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.errors", - org.eclipse.jgit.attributes;version="5.9.1"; + org.eclipse.jgit.attributes;version="5.10.0"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.treewalk", - org.eclipse.jgit.blame;version="5.9.1"; + org.eclipse.jgit.blame;version="5.10.0"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.revwalk, org.eclipse.jgit.treewalk.filter, org.eclipse.jgit.diff", - org.eclipse.jgit.diff;version="5.9.1"; + org.eclipse.jgit.diff;version="5.10.0"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.attributes, org.eclipse.jgit.revwalk, @@ -42,47 +42,47 @@ Export-Package: org.eclipse.jgit.annotations;version="5.9.1", org.eclipse.jgit.treewalk.filter, org.eclipse.jgit.treewalk, org.eclipse.jgit.util", - org.eclipse.jgit.dircache;version="5.9.1"; + org.eclipse.jgit.dircache;version="5.10.0"; uses:="org.eclipse.jgit.events, org.eclipse.jgit.lib, org.eclipse.jgit.attributes, org.eclipse.jgit.treewalk, org.eclipse.jgit.util", - org.eclipse.jgit.errors;version="5.9.1"; + org.eclipse.jgit.errors;version="5.10.0"; uses:="org.eclipse.jgit.transport, org.eclipse.jgit.dircache, org.eclipse.jgit.lib, org.eclipse.jgit.internal.storage.pack", - org.eclipse.jgit.events;version="5.9.1"; + org.eclipse.jgit.events;version="5.10.0"; uses:="org.eclipse.jgit.lib", - org.eclipse.jgit.fnmatch;version="5.9.1", - org.eclipse.jgit.gitrepo;version="5.9.1"; + org.eclipse.jgit.fnmatch;version="5.10.0", + org.eclipse.jgit.gitrepo;version="5.10.0"; uses:="org.xml.sax.helpers, org.eclipse.jgit.api, org.eclipse.jgit.lib, org.eclipse.jgit.revwalk, org.xml.sax", - org.eclipse.jgit.gitrepo.internal;version="5.9.1";x-internal:=true, - org.eclipse.jgit.hooks;version="5.9.1";uses:="org.eclipse.jgit.lib", - org.eclipse.jgit.ignore;version="5.9.1", - org.eclipse.jgit.ignore.internal;version="5.9.1"; + org.eclipse.jgit.gitrepo.internal;version="5.10.0";x-internal:=true, + org.eclipse.jgit.hooks;version="5.10.0";uses:="org.eclipse.jgit.lib", + org.eclipse.jgit.ignore;version="5.10.0", + org.eclipse.jgit.ignore.internal;version="5.10.0"; x-friends:="org.eclipse.jgit.test", - org.eclipse.jgit.internal;version="5.9.1"; + org.eclipse.jgit.internal;version="5.10.0"; x-friends:="org.eclipse.jgit.test, org.eclipse.jgit.http.test", - org.eclipse.jgit.internal.fsck;version="5.9.1"; + org.eclipse.jgit.internal.fsck;version="5.10.0"; x-friends:="org.eclipse.jgit.test", - org.eclipse.jgit.internal.ketch;version="5.9.1"; + org.eclipse.jgit.internal.ketch;version="5.10.0"; x-friends:="org.eclipse.jgit.junit, org.eclipse.jgit.test, org.eclipse.jgit.pgm", - org.eclipse.jgit.internal.revwalk;version="5.9.1";x-internal:=true, - org.eclipse.jgit.internal.storage.dfs;version="5.9.1"; + org.eclipse.jgit.internal.revwalk;version="5.10.0";x-internal:=true, + org.eclipse.jgit.internal.storage.dfs;version="5.10.0"; x-friends:="org.eclipse.jgit.test, org.eclipse.jgit.http.server, org.eclipse.jgit.http.test, org.eclipse.jgit.lfs.test", - org.eclipse.jgit.internal.storage.file;version="5.9.1"; + org.eclipse.jgit.internal.storage.file;version="5.10.0"; x-friends:="org.eclipse.jgit.test, org.eclipse.jgit.junit, org.eclipse.jgit.junit.http, @@ -91,35 +91,35 @@ Export-Package: org.eclipse.jgit.annotations;version="5.9.1", org.eclipse.jgit.pgm, org.eclipse.jgit.pgm.test, org.eclipse.jgit.ssh.apache", - org.eclipse.jgit.internal.storage.io;version="5.9.1"; + org.eclipse.jgit.internal.storage.io;version="5.10.0"; x-friends:="org.eclipse.jgit.junit, org.eclipse.jgit.test, org.eclipse.jgit.pgm", - org.eclipse.jgit.internal.storage.pack;version="5.9.1"; + org.eclipse.jgit.internal.storage.pack;version="5.10.0"; x-friends:="org.eclipse.jgit.junit, org.eclipse.jgit.test, org.eclipse.jgit.pgm", - org.eclipse.jgit.internal.storage.reftable;version="5.9.1"; + org.eclipse.jgit.internal.storage.reftable;version="5.10.0"; x-friends:="org.eclipse.jgit.http.test, org.eclipse.jgit.junit, org.eclipse.jgit.test, org.eclipse.jgit.pgm", - org.eclipse.jgit.internal.storage.reftree;version="5.9.1"; + org.eclipse.jgit.internal.storage.reftree;version="5.10.0"; x-friends:="org.eclipse.jgit.junit, org.eclipse.jgit.test, org.eclipse.jgit.pgm", - org.eclipse.jgit.internal.submodule;version="5.9.1";x-internal:=true, - org.eclipse.jgit.internal.transport.connectivity;version="5.9.1"; + org.eclipse.jgit.internal.submodule;version="5.10.0";x-internal:=true, + org.eclipse.jgit.internal.transport.connectivity;version="5.10.0"; x-friends:="org.eclipse.jgit.test", - org.eclipse.jgit.internal.transport.http;version="5.9.1"; + org.eclipse.jgit.internal.transport.http;version="5.10.0"; x-friends:="org.eclipse.jgit.test", - org.eclipse.jgit.internal.transport.parser;version="5.9.1"; + org.eclipse.jgit.internal.transport.parser;version="5.10.0"; x-friends:="org.eclipse.jgit.http.server, org.eclipse.jgit.test", - org.eclipse.jgit.internal.transport.ssh;version="5.9.1"; + org.eclipse.jgit.internal.transport.ssh;version="5.10.0"; x-friends:="org.eclipse.jgit.ssh.apache, org.eclipse.jgit.ssh.jsch", - org.eclipse.jgit.lib;version="5.9.1"; + org.eclipse.jgit.lib;version="5.10.0"; uses:="org.eclipse.jgit.transport, org.eclipse.jgit.util.sha1, org.eclipse.jgit.dircache, @@ -133,9 +133,10 @@ Export-Package: org.eclipse.jgit.annotations;version="5.9.1", org.eclipse.jgit.util, org.eclipse.jgit.submodule, org.eclipse.jgit.util.time", - org.eclipse.jgit.lib.internal;version="5.9.1"; + org.eclipse.jgit.lib.internal;version="5.10.0"; x-friends:="org.eclipse.jgit.test", - org.eclipse.jgit.merge;version="5.9.1"; + org.eclipse.jgit.logging;version="5.10.0", + org.eclipse.jgit.merge;version="5.10.0"; uses:="org.eclipse.jgit.dircache, org.eclipse.jgit.lib, org.eclipse.jgit.revwalk, @@ -144,40 +145,40 @@ Export-Package: org.eclipse.jgit.annotations;version="5.9.1", org.eclipse.jgit.util, org.eclipse.jgit.api, org.eclipse.jgit.attributes", - org.eclipse.jgit.nls;version="5.9.1", - org.eclipse.jgit.notes;version="5.9.1"; + org.eclipse.jgit.nls;version="5.10.0", + org.eclipse.jgit.notes;version="5.10.0"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.revwalk, org.eclipse.jgit.treewalk, org.eclipse.jgit.merge", - org.eclipse.jgit.patch;version="5.9.1"; + org.eclipse.jgit.patch;version="5.10.0"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.diff", - org.eclipse.jgit.revplot;version="5.9.1"; + org.eclipse.jgit.revplot;version="5.10.0"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.revwalk", - org.eclipse.jgit.revwalk;version="5.9.1"; + org.eclipse.jgit.revwalk;version="5.10.0"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.diff, org.eclipse.jgit.treewalk.filter, org.eclipse.jgit.revwalk.filter, org.eclipse.jgit.treewalk", - org.eclipse.jgit.revwalk.filter;version="5.9.1"; + org.eclipse.jgit.revwalk.filter;version="5.10.0"; uses:="org.eclipse.jgit.revwalk, org.eclipse.jgit.lib, org.eclipse.jgit.util", - org.eclipse.jgit.storage.file;version="5.9.1"; + org.eclipse.jgit.storage.file;version="5.10.0"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.util", - org.eclipse.jgit.storage.pack;version="5.9.1"; + org.eclipse.jgit.storage.pack;version="5.10.0"; uses:="org.eclipse.jgit.lib", - org.eclipse.jgit.submodule;version="5.9.1"; + org.eclipse.jgit.submodule;version="5.10.0"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.diff, org.eclipse.jgit.treewalk.filter, org.eclipse.jgit.treewalk, org.eclipse.jgit.util", - org.eclipse.jgit.transport;version="5.9.1"; + org.eclipse.jgit.transport;version="5.10.0"; uses:="javax.crypto, org.eclipse.jgit.util.io, org.eclipse.jgit.lib, @@ -190,21 +191,21 @@ Export-Package: org.eclipse.jgit.annotations;version="5.9.1", org.eclipse.jgit.transport.resolver, org.eclipse.jgit.storage.pack, org.eclipse.jgit.errors", - org.eclipse.jgit.transport.http;version="5.9.1"; + org.eclipse.jgit.transport.http;version="5.10.0"; uses:="javax.net.ssl", - org.eclipse.jgit.transport.resolver;version="5.9.1"; + org.eclipse.jgit.transport.resolver;version="5.10.0"; uses:="org.eclipse.jgit.transport, org.eclipse.jgit.lib", - org.eclipse.jgit.treewalk;version="5.9.1"; + org.eclipse.jgit.treewalk;version="5.10.0"; uses:="org.eclipse.jgit.dircache, org.eclipse.jgit.lib, org.eclipse.jgit.attributes, org.eclipse.jgit.revwalk, org.eclipse.jgit.treewalk.filter, org.eclipse.jgit.util", - org.eclipse.jgit.treewalk.filter;version="5.9.1"; + org.eclipse.jgit.treewalk.filter;version="5.10.0"; uses:="org.eclipse.jgit.treewalk", - org.eclipse.jgit.util;version="5.9.1"; + org.eclipse.jgit.util;version="5.10.0"; uses:="org.eclipse.jgit.transport, org.eclipse.jgit.hooks, org.eclipse.jgit.revwalk, @@ -217,12 +218,12 @@ Export-Package: org.eclipse.jgit.annotations;version="5.9.1", org.eclipse.jgit.treewalk, javax.net.ssl, org.eclipse.jgit.util.time", - org.eclipse.jgit.util.io;version="5.9.1"; + org.eclipse.jgit.util.io;version="5.10.0"; uses:="org.eclipse.jgit.attributes, org.eclipse.jgit.lib, org.eclipse.jgit.treewalk", - org.eclipse.jgit.util.sha1;version="5.9.1", - org.eclipse.jgit.util.time;version="5.9.1" + org.eclipse.jgit.util.sha1;version="5.10.0", + org.eclipse.jgit.util.time;version="5.10.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)", javax.crypto, diff --git a/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF index c561b7ede1..97dbca5810 100644 --- a/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF +++ b/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: 5.9.1.qualifier -Eclipse-SourceBundle: org.eclipse.jgit;version="5.9.1.qualifier";roots="." +Bundle-Version: 5.10.0.qualifier +Eclipse-SourceBundle: org.eclipse.jgit;version="5.10.0.qualifier";roots="." diff --git a/org.eclipse.jgit/pom.xml b/org.eclipse.jgit/pom.xml index c899dfd293..1d2aac0bca 100644 --- a/org.eclipse.jgit/pom.xml +++ b/org.eclipse.jgit/pom.xml @@ -20,7 +20,7 @@ <parent> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> </parent> <artifactId>org.eclipse.jgit</artifactId> diff --git a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties index 0e51eb45cb..12902b9004 100644 --- a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties +++ b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties @@ -348,6 +348,9 @@ invalidFilter=Invalid filter: {0} invalidGitdirRef = Invalid .git reference in file ''{0}'' invalidGitModules=Invalid .gitmodules file invalidGitType=invalid git type: {0} +invalidHeaderFormat=Invalid header from git config http.extraHeader ignored: no colon or empty key in header ''{0}'' +invalidHeaderKey=Invalid header from git config http.extraHeader ignored: key contains illegal characters; see RFC 7230: ''{0}'' +invalidHeaderValue=Invalid header from git config http.extraHeader ignored: value should be 7bit-ASCII characters only: ''{0}'' invalidHexString=Invalid hex string: {0} invalidHomeDirectory=Invalid home directory: {0} invalidHooksPath=Invalid git config core.hooksPath = {0} diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java index 0dc5d5e7f7..847ab0a9a8 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java @@ -1,6 +1,6 @@ /* * Copyright (C) 2010, Chris Aniszczyk <caniszczyk@gmail.com> - * Copyright (C) 2011, Matthias Sohn <matthias.sohn@sap.com> and others + * Copyright (C) 2011, 2020 Matthias Sohn <matthias.sohn@sap.com> and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -503,6 +503,11 @@ public class CheckoutCommand extends GitCommand<Ref> { editor.add(new PathEdit(path) { @Override public void apply(DirCacheEntry ent) { + if (ent.getStage() != DirCacheEntry.STAGE_0) { + // A checkout on a conflicting file stages the checked + // out file and resolves the conflict. + ent.setStage(DirCacheEntry.STAGE_0); + } ent.setObjectId(blobId); ent.setFileMode(mode); checkoutPath(ent, r, diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java index 30d7f9adc4..aba86fc361 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java @@ -413,6 +413,10 @@ public class CloneCommand extends TransportCommand<CloneCommand, Git> { return null; } + if (idHEAD != null && idHEAD.isSymbolic()) { + return idHEAD.getTarget(); + } + Ref master = result.getAdvertisedRef(Constants.R_HEADS + Constants.MASTER); ObjectId objectId = master != null ? master.getObjectId() : null; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java index 8d427385d4..6a9fbd4f63 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java @@ -9,6 +9,7 @@ */ package org.eclipse.jgit.api; +import static org.eclipse.jgit.lib.Constants.R_REFS; import static org.eclipse.jgit.lib.Constants.R_TAGS; import java.io.IOException; @@ -73,6 +74,11 @@ public class DescribeCommand extends GitCommand<String> { private List<FileNameMatcher> matchers = new ArrayList<>(); /** + * Whether to use all refs in the refs/ namespace + */ + private boolean useAll; + + /** * Whether to use all tags (incl. lightweight) or not. */ private boolean useTags; @@ -153,6 +159,22 @@ public class DescribeCommand extends GitCommand<String> { } /** + * Instead of using only the annotated tags, use any ref found in refs/ + * namespace. This option enables matching any known branch, + * remote-tracking branch, or lightweight tag. + * + * @param all + * <code>true</code> enables matching any ref found in refs/ + * like setting option --all in c git + * @return {@code this} + * @since 5.10 + */ + public DescribeCommand setAll(boolean all) { + this.useAll = all; + return this; + } + + /** * Instead of using only the annotated tags, use any tag found in refs/tags * namespace. This option enables matching lightweight (non-annotated) tags * or not. @@ -186,7 +208,7 @@ public class DescribeCommand extends GitCommand<String> { private String longDescription(Ref tag, int depth, ObjectId tip) throws IOException { return String.format( - "%s-%d-g%s", tag.getName().substring(R_TAGS.length()), //$NON-NLS-1$ + "%s-%d-g%s", formatRefName(tag.getName()), //$NON-NLS-1$ Integer.valueOf(depth), w.getObjectReader().abbreviate(tip) .name()); } @@ -244,8 +266,7 @@ public class DescribeCommand extends GitCommand<String> { for (FileNameMatcher matcher : matchers) { Stream<Ref> m = tags.stream().filter( tag -> { - matcher.append( - tag.getName().substring(R_TAGS.length())); + matcher.append(formatRefName(tag.getName())); boolean result = matcher.isMatch(); matcher.reset(); return result; @@ -283,7 +304,7 @@ public class DescribeCommand extends GitCommand<String> { } Collection<Ref> tagList = repo.getRefDatabase() - .getRefsByPrefix(R_TAGS); + .getRefsByPrefix(useAll ? R_REFS : R_TAGS); Map<ObjectId, List<Ref>> tags = tagList.stream() .filter(this::filterLightweightTags) .collect(Collectors.groupingBy(this::getObjectIdFromRef)); @@ -336,7 +357,7 @@ public class DescribeCommand extends GitCommand<String> { Optional<Ref> bestMatch = getBestMatch(tags.get(target)); if (bestMatch.isPresent()) { return longDesc ? longDescription(bestMatch.get(), 0, target) : - bestMatch.get().getName().substring(R_TAGS.length()); + formatRefName(bestMatch.get().getName()); } w.markStart(target); @@ -408,6 +429,16 @@ public class DescribeCommand extends GitCommand<String> { } /** + * Removes the refs/ or refs/tags prefix from tag names + * @param name the name of the tag + * @return the tag name with its prefix removed + */ + private String formatRefName(String name) { + return name.startsWith(R_TAGS) ? name.substring(R_TAGS.length()) : + name.substring(R_REFS.length()); + } + + /** * Whether we use lightweight tags or not for describe Candidates * * @param ref @@ -419,7 +450,7 @@ public class DescribeCommand extends GitCommand<String> { private boolean filterLightweightTags(Ref ref) { ObjectId id = ref.getObjectId(); try { - return this.useTags || (id != null && (w.parseTag(id) != null)); + return this.useAll || this.useTags || (id != null && (w.parseTag(id) != null)); } catch (IOException e) { return false; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleDeinitCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleDeinitCommand.java index ac17d3a642..f4b8ac2e07 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleDeinitCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleDeinitCommand.java @@ -20,8 +20,10 @@ import java.util.Collections; import java.util.List; import org.eclipse.jgit.api.errors.GitAPIException; +import org.eclipse.jgit.api.errors.InvalidConfigurationException; import org.eclipse.jgit.api.errors.JGitInternalException; import org.eclipse.jgit.api.errors.NoHeadException; +import org.eclipse.jgit.errors.ConfigInvalidException; import org.eclipse.jgit.internal.JGitText; import org.eclipse.jgit.lib.ConfigConstants; import org.eclipse.jgit.lib.ObjectId; @@ -119,6 +121,8 @@ public class SubmoduleDeinitCommand } } return results; + } catch (ConfigInvalidException e) { + throw new InvalidConfigurationException(e.getMessage(), e); } catch (IOException e) { throw new JGitInternalException(e.getMessage(), e); } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEditor.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEditor.java index 73d2807eaf..8c342e267d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEditor.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEditor.java @@ -1,6 +1,6 @@ /* - * Copyright (C) 2008-2009, Google Inc. - * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org> and others + * Copyright (C) 2008, 2009, Google Inc. + * Copyright (C) 2008, 2020 Shawn O. Pearce <spearce@spearce.org> and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -139,10 +139,28 @@ public class DirCacheEditor extends BaseDirCacheEditor { : eIdx; fastAdd(ent); } else { - // Apply to all entries of the current path (different stages) lastIdx = cache.nextEntry(eIdx); - for (int i = eIdx; i < lastIdx; i++) { - final DirCacheEntry ent = cache.getEntry(i); + if (lastIdx > eIdx + 1) { + // Apply to all entries of the current path (different + // stages). If any apply() resets the stage to STAGE_0, take + // only that entry and omit all others. + DirCacheEntry[] tmp = new DirCacheEntry[lastIdx - eIdx]; + int n = 0; + for (int i = eIdx; i < lastIdx; i++) { + DirCacheEntry ent = cache.getEntry(i); + e.apply(ent); + if (ent.getStage() == DirCacheEntry.STAGE_0) { + fastAdd(ent); + n = 0; + break; + } + tmp[n++] = ent; + } + for (int i = 0; i < n; i++) { + fastAdd(tmp[i]); + } + } else { + DirCacheEntry ent = cache.getEntry(eIdx); e.apply(ent); fastAdd(ent); } @@ -257,7 +275,9 @@ public class DirCacheEditor extends BaseDirCacheEditor { * {@link #apply(DirCacheEntry)} method. The editor will invoke apply once * for each record in the index which matches the path name. If there are * multiple records (for example in stages 1, 2 and 3), the edit instance - * will be called multiple times, once for each stage. + * will be called multiple times, once for each stage. If any of these calls + * resets the stage to 0, only this entry will be taken and entries for + * other stages are discarded. */ public abstract static class PathEdit { final byte[] path; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java index dcb84825fe..67edf50f44 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java @@ -542,6 +542,24 @@ public class DirCacheEntry { } /** + * Sets the stage of an entry. + * + * @param stage + * to set, in the range [0..3] + * @throws IllegalArgumentException + * if the stage is outside the range [0..3] + * @since 5.10 + */ + public void setStage(int stage) { + if ((stage & ~0x3) != 0) { + throw new IllegalArgumentException( + "Invalid stage, must be in range [0..3]"); //$NON-NLS-1$ + } + byte flags = info[infoOffset + P_FLAGS]; + info[infoOffset + P_FLAGS] = (byte) ((flags & 0xCF) | (stage << 4)); + } + + /** * Returns whether this entry should be skipped from the working tree. * * @return true if this entry should be skipepd. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java index 7ec5eaea10..892657d5d3 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java @@ -376,6 +376,9 @@ public class JGitText extends TranslationBundle { /***/ public String invalidGitdirRef; /***/ public String invalidGitModules; /***/ public String invalidGitType; + /***/ public String invalidHeaderFormat; + /***/ public String invalidHeaderKey; + /***/ public String invalidHeaderValue; /***/ public String invalidHexString; /***/ public String invalidHomeDirectory; /***/ public String invalidHooksPath; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java index c18a1895c3..1f2fe1057f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java @@ -985,7 +985,8 @@ public class GC { if (base == null || !n.startsWith(base)) { try { Path delete = packDir.resolve(n); - Files.delete(delete); + FileUtils.delete(delete.toFile(), + FileUtils.RETRY | FileUtils.SKIP_MISSING); LOG.warn(JGitText.get().deletedOrphanInPackDir, delete); } catch (IOException e) { LOG.error(e.getMessage(), e); @@ -1173,6 +1174,7 @@ public class GC { // create temporary files String id = pw.computeName().getName(); File packdir = repo.getObjectDatabase().getPackDirectory(); + packdir.mkdirs(); tmpPack = File.createTempFile("gc_", ".pack_tmp", packdir); //$NON-NLS-1$ //$NON-NLS-2$ final String tmpBase = tmpPack.getName() .substring(0, tmpPack.getName().lastIndexOf('.')); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java index 265b71dd2a..d32182864a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java @@ -580,7 +580,7 @@ public class ObjectDirectory extends FileObjectDatabase { @Override void selectObjectRepresentation(PackWriter packer, ObjectToPack otp, - WindowCursor curs) throws IOException { + WindowCursor curs) throws IOException { selectObjectRepresentation(packer, otp, curs, null); } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java index a51593b509..a369026c97 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java @@ -20,6 +20,9 @@ package org.eclipse.jgit.lib; import static java.nio.charset.StandardCharsets.UTF_8; +import java.io.File; +import java.nio.file.InvalidPathException; +import java.nio.file.Path; import java.text.MessageFormat; import java.util.ArrayList; import java.util.Collections; @@ -29,6 +32,7 @@ import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; +import org.eclipse.jgit.annotations.NonNull; import org.eclipse.jgit.errors.ConfigInvalidException; import org.eclipse.jgit.events.ConfigChangedEvent; import org.eclipse.jgit.events.ConfigChangedListener; @@ -36,6 +40,7 @@ import org.eclipse.jgit.events.ListenerHandle; import org.eclipse.jgit.events.ListenerList; import org.eclipse.jgit.internal.JGitText; import org.eclipse.jgit.transport.RefSpec; +import org.eclipse.jgit.util.FS; import org.eclipse.jgit.util.RawParseUtils; /** @@ -475,6 +480,37 @@ public class Config { } /** + * Parse a string value and treat it as a file path, replacing a ~/ prefix + * by the user's home directory. + * <p> + * <b>Note:</b> this may throw {@link InvalidPathException} if the string is + * not a valid path. + * </p> + * + * @param section + * section the key is in. + * @param subsection + * subsection the key is in, or null if not in a subsection. + * @param name + * the key name. + * @param fs + * to use to convert the string into a path. + * @param resolveAgainst + * directory to resolve the path against if it is a relative + * path; {@code null} to use the Java process's current + * directory. + * @param defaultValue + * to return if no value was present + * @return the {@link Path}, or {@code defaultValue} if not set + * @since 5.10 + */ + public Path getPath(String section, String subsection, String name, + @NonNull FS fs, File resolveAgainst, Path defaultValue) { + return typedGetter.getPath(this, section, subsection, name, fs, + resolveAgainst, defaultValue); + } + + /** * Parse a list of {@link org.eclipse.jgit.transport.RefSpec}s from the * configuration. * diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/TypedConfigGetter.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/TypedConfigGetter.java index dd4be345e7..0f2f6cff8a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/TypedConfigGetter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/TypedConfigGetter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017, Thomas Wolf <thomas.wolf@paranor.ch> and others + * Copyright (C) 2017, 2020 Thomas Wolf <thomas.wolf@paranor.ch> and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -10,22 +10,26 @@ package org.eclipse.jgit.lib; +import java.io.File; +import java.nio.file.InvalidPathException; +import java.nio.file.Path; import java.util.List; import java.util.concurrent.TimeUnit; import org.eclipse.jgit.annotations.NonNull; import org.eclipse.jgit.transport.RefSpec; +import org.eclipse.jgit.util.FS; /** - * Something that knows how to convert plain strings from a git - * {@link org.eclipse.jgit.lib.Config} to typed values. + * Something that knows how to convert plain strings from a git {@link Config} + * to typed values. * * @since 4.9 */ public interface TypedConfigGetter { /** - * Get a boolean value from a git {@link org.eclipse.jgit.lib.Config}. + * Get a boolean value from a git {@link Config}. * * @param config * to get the value from @@ -44,7 +48,7 @@ public interface TypedConfigGetter { String name, boolean defaultValue); /** - * Parse an enumeration from a git {@link org.eclipse.jgit.lib.Config}. + * Parse an enumeration from a git {@link Config}. * * @param config * to get the value from @@ -65,7 +69,7 @@ public interface TypedConfigGetter { String subsection, String name, T defaultValue); /** - * Obtain an integer value from a git {@link org.eclipse.jgit.lib.Config}. + * Obtain an integer value from a git {@link Config}. * * @param config * to get the value from @@ -83,7 +87,7 @@ public interface TypedConfigGetter { int defaultValue); /** - * Obtain a long value from a git {@link org.eclipse.jgit.lib.Config}. + * Obtain a long value from a git {@link Config}. * * @param config * to get the value from @@ -102,7 +106,7 @@ public interface TypedConfigGetter { /** * Parse a numerical time unit, such as "1 minute", from a git - * {@link org.eclipse.jgit.lib.Config}. + * {@link Config}. * * @param config * to get the value from @@ -124,10 +128,50 @@ public interface TypedConfigGetter { long getTimeUnit(Config config, String section, String subsection, String name, long defaultValue, TimeUnit wantUnit); + /** + * Parse a string value from a git {@link Config} and treat it as a file + * path, replacing a ~/ prefix by the user's home directory. + * <p> + * <b>Note:</b> this may throw {@link InvalidPathException} if the string is + * not a valid path. + * </p> + * + * @param config + * to get the path from. + * @param section + * section the key is in. + * @param subsection + * subsection the key is in, or null if not in a subsection. + * @param name + * the key name. + * @param fs + * to use to convert the string into a path. + * @param resolveAgainst + * directory to resolve the path against if it is a relative + * path. + * @param defaultValue + * to return if no value was present + * @return the {@link Path}, or {@code defaultValue} if not set + * @since 5.10 + */ + default Path getPath(Config config, String section, String subsection, + String name, @NonNull FS fs, File resolveAgainst, + Path defaultValue) { + String value = config.getString(section, subsection, name); + if (value == null) { + return defaultValue; + } + File file; + if (value.startsWith("~/")) { //$NON-NLS-1$ + file = fs.resolve(fs.userHome(), value.substring(2)); + } else { + file = fs.resolve(resolveAgainst, value); + } + return file.toPath(); + } /** - * Parse a list of {@link org.eclipse.jgit.transport.RefSpec}s from a git - * {@link org.eclipse.jgit.lib.Config}. + * Parse a list of {@link RefSpec}s from a git {@link Config}. * * @param config * to get the list from diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/logging/PerformanceLogContext.java b/org.eclipse.jgit/src/org/eclipse/jgit/logging/PerformanceLogContext.java new file mode 100644 index 0000000000..fab0dd102a --- /dev/null +++ b/org.eclipse.jgit/src/org/eclipse/jgit/logging/PerformanceLogContext.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2020, Google LLC and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +package org.eclipse.jgit.logging; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * Singleton that collects performance logs. + * + * @since 5.10 + */ +public class PerformanceLogContext { + /** Singleton instance that stores the statistics. */ + private static final PerformanceLogContext INSTANCE = new PerformanceLogContext(); + + /** List that stores events as performance logs. */ + private static final ThreadLocal<List<PerformanceLogRecord>> eventRecords = ThreadLocal + .withInitial(ArrayList::new); + + private PerformanceLogContext() { + } + + /** + * Get the instance of the context. + * + * @return instance of performance log context. + */ + public static PerformanceLogContext getInstance() { + return INSTANCE; + } + + /** + * Get the unmodifiable list of events as performance records. + * + * @return unmodifiable list of events as performance logs. + */ + public List<PerformanceLogRecord> getEventRecords() { + return Collections.unmodifiableList(eventRecords.get()); + } + + /** + * Adds a performance log record to the current list of events. + * + * @param record + * performance log record that is going to be added. + */ + public void addEvent(PerformanceLogRecord record) { + eventRecords.get().add(record); + } + + /** + * Removes all of the existing records from the current list of events. + */ + public void cleanEvents() { + eventRecords.remove(); + } +}
\ No newline at end of file diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/logging/PerformanceLogRecord.java b/org.eclipse.jgit/src/org/eclipse/jgit/logging/PerformanceLogRecord.java new file mode 100644 index 0000000000..3dc5f20156 --- /dev/null +++ b/org.eclipse.jgit/src/org/eclipse/jgit/logging/PerformanceLogRecord.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2020, Google LLC and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +package org.eclipse.jgit.logging; + +/** + * Class to register a performance log record. + * + * @since 5.10 + */ +public class PerformanceLogRecord { + /** Name of the recorded event. */ + private String name; + + /** Duration of the recorded event in milliseconds. */ + private long durationMs; + + /** + * Create a new performance log record for an event. + * + * @param name + * name of the event. + * @param durationMs + * duration in milliseconds of the event. + */ + public PerformanceLogRecord(String name, long durationMs) { + this.name = name; + this.durationMs = durationMs; + } + + /** + * Get the name of the recorded event. + * + * @return name of the recorded event. + */ + public String getName() { + return name; + } + + /** + * Get the duration in milliseconds of the recorded event. + * + * @return duration in milliseconds of the recorded event. + */ + public long getDurationMs() { + return durationMs; + } +}
\ No newline at end of file diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackStatistics.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackStatistics.java index 645da0a068..4d18337fae 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackStatistics.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackStatistics.java @@ -188,6 +188,13 @@ public class PackStatistics { public long haves; /** + * The count of wants that were not advertised by the server. + * + * @since 5.10 + */ + public long notAdvertisedWants; + + /** * Time in ms spent in the negotiation phase. For non-bidirectional * transports (e.g., HTTP), this is only for the final request that * sends back the pack file. @@ -266,8 +273,16 @@ public class PackStatistics { /** Time in ms spent writing the pack. */ public long timeWriting; + /** Time in ms spent checking reachability. + * + * @since 5.10 + */ + public long reachabilityCheckDuration; + /** Number of trees traversed in the walk when writing the pack. - * @since 5.4*/ + * + * @since 5.4 + */ public long treesTraversed; /** @@ -349,6 +364,16 @@ public class PackStatistics { } /** + * Get the count of client wants that were not advertised by the server. + * + * @return count of client wants that were not advertised by the server. + * @since 5.10 + */ + public long getNotAdvertisedWants() { + return statistics.notAdvertisedWants; + } + + /** * Time in ms spent in the negotiation phase. For non-bidirectional * transports (e.g., HTTP), this is only for the final request that sends * back the pack file. @@ -604,6 +629,18 @@ public class PackStatistics { } /** + * Get time in milliseconds spent checking if the client has access to the + * commits they are requesting. + * + * @return time in milliseconds spent checking if the client has access to the + * commits they are requesting. + * @since 5.10 + */ + public long getReachabilityCheckDuration() { + return statistics.reachabilityCheckDuration; + } + + /** * @return number of trees traversed in the walk when writing the pack. * @since 5.4 */ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/submodule/SubmoduleWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/submodule/SubmoduleWalk.java index 0ba5eb542d..bf77021b0c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/submodule/SubmoduleWalk.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/submodule/SubmoduleWalk.java @@ -657,8 +657,11 @@ public class SubmoduleWalk implements AutoCloseable { * * @since 4.10 * @return name + * @throws ConfigInvalidException + * @throws IOException */ - public String getModuleName() { + public String getModuleName() throws IOException, ConfigInvalidException { + lazyLoadModulesConfig(); return getModuleName(path); } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java index 1417faee80..3a36398629 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java @@ -21,8 +21,11 @@ import java.io.InputStream; import java.io.OutputStream; import java.text.MessageFormat; import java.util.Arrays; +import java.util.Collection; import java.util.HashSet; +import java.util.Iterator; import java.util.LinkedHashMap; +import java.util.Map; import java.util.Set; import org.eclipse.jgit.errors.InvalidObjectIdException; @@ -35,6 +38,7 @@ import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.ObjectIdRef; import org.eclipse.jgit.lib.Ref; import org.eclipse.jgit.lib.Repository; +import org.eclipse.jgit.lib.SymbolicRef; import org.eclipse.jgit.util.io.InterruptTimer; import org.eclipse.jgit.util.io.TimeoutInputStream; import org.eclipse.jgit.util.io.TimeoutOutputStream; @@ -49,6 +53,8 @@ import org.eclipse.jgit.util.io.TimeoutOutputStream; */ abstract class BasePackConnection extends BaseConnection { + protected static final String CAPABILITY_SYMREF_PREFIX = "symref="; //$NON-NLS-1$ + /** The repository this transport fetches into, or pushes out of. */ protected final Repository local; @@ -228,10 +234,109 @@ abstract class BasePackConnection extends BaseConnection { throw duplicateAdvertisement(name); } } + updateWithSymRefs(avail, extractSymRefsFromCapabilities(remoteCapablities)); available(avail); } /** + * Finds values in the given capabilities of the form: + * + * <pre> + * symref=<em>source</em>:<em>target</em> + * </pre> + * + * And returns a Map of source->target entries. + * + * @param capabilities + * the capabilities lines + * @return a Map of the symref entries from capabilities + * @throws NullPointerException + * if capabilities, or any entry in it, is null + */ + static Map<String, String> extractSymRefsFromCapabilities(Collection<String> capabilities) { + final Map<String, String> symRefs = new LinkedHashMap<>(); + for (String option : capabilities) { + if (option.startsWith(CAPABILITY_SYMREF_PREFIX)) { + String[] symRef = option + .substring(CAPABILITY_SYMREF_PREFIX.length()) + .split(":", 2); //$NON-NLS-1$ + if (symRef.length == 2) { + symRefs.put(symRef[0], symRef[1]); + } + } + } + return symRefs; + } + + /** + * Updates the given refMap with {@link SymbolicRef}s defined by the given + * symRefs. + * <p> + * For each entry, symRef, in symRefs, whose value is a key in refMap, adds + * a new entry to refMap with that same key and value of a new + * {@link SymbolicRef} with source=symRef.key and + * target=refMap.get(symRef.value), then removes that entry from symRefs. + * <p> + * If refMap already contains an entry for symRef.key, it is replaced. + * </p> + * </p> + * <p> + * For example, given: + * </p> + * + * <pre> + * refMap.put("refs/heads/main", ref); + * symRefs.put("HEAD", "refs/heads/main"); + * </pre> + * + * then: + * + * <pre> + * updateWithSymRefs(refMap, symRefs); + * </pre> + * + * has the <em>effect</em> of: + * + * <pre> + * refMap.put("HEAD", + * new SymbolicRef("HEAD", refMap.get(symRefs.remove("HEAD")))) + * </pre> + * <p> + * Any entry in symRefs whose value is not a key in refMap is ignored. Any + * circular symRefs are ignored. + * </p> + * <p> + * Upon completion, symRefs will contain only any unresolvable entries. + * </p> + * + * @param refMap + * a non-null, modifiable, Map to update, and the provider of + * symref targets. + * @param symRefs + * a non-null, modifiable, Map of symrefs. + * @throws NullPointerException + * if refMap or symRefs is null + */ + static void updateWithSymRefs(Map<String, Ref> refMap, Map<String, String> symRefs) { + boolean haveNewRefMapEntries = !refMap.isEmpty(); + while (!symRefs.isEmpty() && haveNewRefMapEntries) { + haveNewRefMapEntries = false; + final Iterator<Map.Entry<String, String>> iterator = symRefs.entrySet().iterator(); + while (iterator.hasNext()) { + final Map.Entry<String, String> symRef = iterator.next(); + if (!symRefs.containsKey(symRef.getValue())) { // defer forward reference + final Ref r = refMap.get(symRef.getValue()); + if (r != null) { + refMap.put(symRef.getKey(), new SymbolicRef(symRef.getKey(), r)); + haveNewRefMapEntries = true; + iterator.remove(); + } + } + } + } + } + + /** * Create an exception to indicate problems finding a remote repository. The * caller is expected to throw the returned exception. * diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpConfig.java index 79cba80e11..dc82f46197 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpConfig.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpConfig.java @@ -14,9 +14,13 @@ package org.eclipse.jgit.transport; import java.io.IOException; import java.net.URISyntaxException; import java.text.MessageFormat; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; import java.util.Set; import java.util.function.Supplier; +import org.eclipse.jgit.annotations.NonNull; import org.eclipse.jgit.errors.ConfigInvalidException; import org.eclipse.jgit.internal.JGitText; import org.eclipse.jgit.lib.Config; @@ -56,6 +60,20 @@ public class HttpConfig { public static final String SSL_VERIFY_KEY = "sslVerify"; //$NON-NLS-1$ /** + * git config key for the "userAgent" setting. + * + * @since 5.10 + */ + public static final String USER_AGENT = "userAgent"; //$NON-NLS-1$ + + /** + * git config key for the "extraHeader" setting. + * + * @since 5.10 + */ + public static final String EXTRA_HEADER = "extraHeader"; //$NON-NLS-1$ + + /** * git config key for the "cookieFile" setting. * * @since 5.4 @@ -103,6 +121,8 @@ public class HttpConfig { } }).get().intValue(); + private static final String ENV_HTTP_USER_AGENT = "GIT_HTTP_USER_AGENT"; //$NON-NLS-1$ + /** * Config values for http.followRedirect. */ @@ -143,6 +163,10 @@ public class HttpConfig { private int maxRedirects; + private String userAgent; + + private List<String> extraHeaders; + private String cookieFile; private boolean saveCookies; @@ -186,6 +210,27 @@ public class HttpConfig { } /** + * Get the "http.userAgent" setting + * + * @return the value of the "http.userAgent" setting + * @since 5.10 + */ + public String getUserAgent() { + return userAgent; + } + + /** + * Get the "http.extraHeader" setting + * + * @return the value of the "http.extraHeader" setting + * @since 5.10 + */ + @NonNull + public List<String> getExtraHeaders() { + return extraHeaders == null ? Collections.emptyList() : extraHeaders; + } + + /** * Get the "http.cookieFile" setting * * @return the value of the "http.cookieFile" setting @@ -265,11 +310,25 @@ public class HttpConfig { if (redirectLimit < 0) { redirectLimit = MAX_REDIRECTS; } + String agent = config.getString(HTTP, null, USER_AGENT); + if (agent != null) { + agent = UserAgent.clean(agent); + } + userAgent = agent; + String[] headers = config.getStringList(HTTP, null, EXTRA_HEADER); + // https://git-scm.com/docs/git-config#Documentation/git-config.txt-httpextraHeader + // "an empty value will reset the extra headers to the empty list." + int start = findLastEmpty(headers) + 1; + if (start > 0) { + headers = Arrays.copyOfRange(headers, start, headers.length); + } + extraHeaders = Arrays.asList(headers); cookieFile = config.getString(HTTP, null, COOKIE_FILE_KEY); saveCookies = config.getBoolean(HTTP, SAVE_COOKIES_KEY, false); cookieFileCacheLimit = config.getInt(HTTP, COOKIE_FILE_CACHE_LIMIT_KEY, DEFAULT_COOKIE_FILE_CACHE_LIMIT); String match = findMatch(config.getSubsections(HTTP), uri); + if (match != null) { // Override with more specific items postBufferSize = config.getInt(HTTP, match, POST_BUFFER_KEY, @@ -283,6 +342,22 @@ public class HttpConfig { if (newMaxRedirects >= 0) { redirectLimit = newMaxRedirects; } + String uriSpecificUserAgent = config.getString(HTTP, match, + USER_AGENT); + if (uriSpecificUserAgent != null) { + userAgent = UserAgent.clean(uriSpecificUserAgent); + } + String[] uriSpecificExtraHeaders = config.getStringList(HTTP, match, + EXTRA_HEADER); + if (uriSpecificExtraHeaders.length > 0) { + start = findLastEmpty(uriSpecificExtraHeaders) + 1; + if (start > 0) { + uriSpecificExtraHeaders = Arrays.copyOfRange( + uriSpecificExtraHeaders, start, + uriSpecificExtraHeaders.length); + } + extraHeaders = Arrays.asList(uriSpecificExtraHeaders); + } String urlSpecificCookieFile = config.getString(HTTP, match, COOKIE_FILE_KEY); if (urlSpecificCookieFile != null) { @@ -291,12 +366,26 @@ public class HttpConfig { saveCookies = config.getBoolean(HTTP, match, SAVE_COOKIES_KEY, saveCookies); } + // Environment overrides config + agent = SystemReader.getInstance().getenv(ENV_HTTP_USER_AGENT); + if (!StringUtils.isEmptyOrNull(agent)) { + userAgent = UserAgent.clean(agent); + } postBuffer = postBufferSize; sslVerify = sslVerifyFlag; followRedirects = followRedirectsMode; maxRedirects = redirectLimit; } + private int findLastEmpty(String[] values) { + for (int i = values.length - 1; i >= 0; i--) { + if (values[i] == null) { + return i; + } + } + return -1; + } + /** * Determines the best match from a set of subsection names (representing * prefix URLs) for the given {@link URIish}. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java index 0801b8a86a..715cbb48fb 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java @@ -679,7 +679,8 @@ public abstract class PackParser { verifySafeObject(tempObjectId, type, visit.data); if (isCheckObjectCollisions() && readCurs.has(tempObjectId)) { - checkObjectCollision(tempObjectId, type, visit.data); + checkObjectCollision(tempObjectId, type, visit.data, + visit.delta.sizeBeforeInflating); } PackedObjectInfo oe; @@ -999,6 +1000,7 @@ public abstract class PackParser { UnresolvedDelta n = onEndDelta(); n.position = streamPosition; n.next = baseByPos.put(base, n); + n.sizeBeforeInflating = streamPosition() - streamPosition; deltaCount++; break; } @@ -1020,6 +1022,7 @@ public abstract class PackParser { inflateAndSkip(Source.INPUT, sz); UnresolvedDelta n = onEndDelta(); n.position = streamPosition; + n.sizeBeforeInflating = streamPosition() - streamPosition; r.add(n); deltaCount++; break; @@ -1071,9 +1074,11 @@ public abstract class PackParser { verifySafeObject(tempObjectId, type, data); } + long sizeBeforeInflating = streamPosition() - pos; PackedObjectInfo obj = newInfo(tempObjectId, null, null); obj.setOffset(pos); obj.setType(type); + obj.setSize(sizeBeforeInflating); onEndWholeObject(obj); if (data != null) onInflatedObjectData(obj, type, data); @@ -1148,6 +1153,8 @@ public abstract class PackParser { sz -= n; } } + stats.incrementObjectsDuplicated(); + stats.incrementNumBytesDuplicated(obj.getSize()); } catch (MissingObjectException notLocal) { // This is OK, we don't have a copy of the object locally // but the API throws when we try to read it as usually it's @@ -1155,15 +1162,17 @@ public abstract class PackParser { } } - private void checkObjectCollision(AnyObjectId obj, int type, byte[] data) - throws IOException { + private void checkObjectCollision(AnyObjectId obj, int type, byte[] data, + long sizeBeforeInflating) throws IOException { try { final ObjectLoader ldr = readCurs.open(obj, type); final byte[] existingData = ldr.getCachedBytes(data.length); if (!Arrays.equals(data, existingData)) { - throw new IOException(MessageFormat.format( - JGitText.get().collisionOn, obj.name())); + throw new IOException(MessageFormat + .format(JGitText.get().collisionOn, obj.name())); } + stats.incrementObjectsDuplicated(); + stats.incrementNumBytesDuplicated(sizeBeforeInflating); } catch (MissingObjectException notLocal) { // This is OK, we don't have a copy of the object locally // but the API throws when we try to read it as usually its @@ -1653,6 +1662,8 @@ public abstract class PackParser { UnresolvedDelta next; + long sizeBeforeInflating; + /** @return offset within the input stream. */ public long getOffset() { return position; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackedObjectInfo.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackedObjectInfo.java index fc906de2a8..fe1209b6af 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackedObjectInfo.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackedObjectInfo.java @@ -29,6 +29,8 @@ public class PackedObjectInfo extends ObjectIdOwnerMap.Entry { private int type = Constants.OBJ_BAD; + private long sizeBeforeInflating; + PackedObjectInfo(final long headerOffset, final int packedCRC, final AnyObjectId id) { super(id); @@ -108,4 +110,12 @@ public class PackedObjectInfo extends ObjectIdOwnerMap.Entry { public void setType(int type) { this.type = type; } + + void setSize(long sizeBeforeInflating) { + this.sizeBeforeInflating = sizeBeforeInflating; + } + + long getSize() { + return sizeBeforeInflating; + } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivedPackStatistics.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivedPackStatistics.java index bd8f5585d2..d7bc40006b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivedPackStatistics.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivedPackStatistics.java @@ -19,6 +19,7 @@ import org.eclipse.jgit.lib.Constants; */ public class ReceivedPackStatistics { private long numBytesRead; + private long numBytesDuplicated; private long numWholeCommit; private long numWholeTree; @@ -26,6 +27,7 @@ public class ReceivedPackStatistics { private long numWholeTag; private long numOfsDelta; private long numRefDelta; + private long numObjectsDuplicated; private long numDeltaCommit; private long numDeltaTree; @@ -42,6 +44,17 @@ public class ReceivedPackStatistics { } /** + * Get number of bytes of objects already in the local database + * + * @return number of bytes of objects appeared in both the pack sent by the + * client and the local database + * @since 5.10 + */ + public long getNumBytesDuplicated() { + return numBytesDuplicated; + } + + /** * Get number of whole commit objects in the pack * * @return number of whole commit objects in the pack @@ -96,6 +109,17 @@ public class ReceivedPackStatistics { } /** + * Get number of objects already in the local database + * + * @return number of objects appeared in both the pack sent by the client + * and the local database + * @since 5.10 + */ + public long getNumObjectsDuplicated() { + return numObjectsDuplicated; + } + + /** * Get number of delta commit objects in the pack * * @return number of delta commit objects in the pack @@ -134,6 +158,7 @@ public class ReceivedPackStatistics { /** A builder for {@link ReceivedPackStatistics}. */ public static class Builder { private long numBytesRead; + private long numBytesDuplicated; private long numWholeCommit; private long numWholeTree; @@ -141,6 +166,7 @@ public class ReceivedPackStatistics { private long numWholeTag; private long numOfsDelta; private long numRefDelta; + private long numObjectsDuplicated; private long numDeltaCommit; private long numDeltaTree; @@ -157,6 +183,17 @@ public class ReceivedPackStatistics { } /** + * @param size + * additional bytes already in the local database + * @return this + * @since 5.10 + */ + Builder incrementNumBytesDuplicated(long size) { + numBytesDuplicated += size; + return this; + } + + /** * Increment a whole object count. * * @param type OBJ_COMMIT, OBJ_TREE, OBJ_BLOB, or OBJ_TAG @@ -196,6 +233,17 @@ public class ReceivedPackStatistics { } /** + * Increment the duplicated object count. + * + * @return this + * @since 5.10 + */ + Builder incrementObjectsDuplicated() { + numObjectsDuplicated++; + return this; + } + + /** * Increment a delta object count. * * @param type OBJ_COMMIT, OBJ_TREE, OBJ_BLOB, or OBJ_TAG @@ -226,6 +274,7 @@ public class ReceivedPackStatistics { ReceivedPackStatistics build() { ReceivedPackStatistics s = new ReceivedPackStatistics(); s.numBytesRead = numBytesRead; + s.numBytesDuplicated = numBytesDuplicated; s.numWholeCommit = numWholeCommit; s.numWholeTree = numWholeTree; s.numWholeBlob = numWholeBlob; @@ -236,6 +285,7 @@ public class ReceivedPackStatistics { s.numDeltaTree = numDeltaTree; s.numDeltaBlob = numDeltaBlob; s.numDeltaTag = numDeltaTag; + s.numObjectsDuplicated = numObjectsDuplicated; return s; } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConstants.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConstants.java index b1fac2cffb..fff2938e5d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConstants.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 Thomas Wolf <thomas.wolf@paranor.ch> and others + * Copyright (C) 2018, 2020 Thomas Wolf <thomas.wolf@paranor.ch> and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -117,6 +117,34 @@ public final class SshConstants { /** Key in an ssh config file. */ public static final String PROXY_COMMAND = "ProxyCommand"; + /** + * Comma-separated list of jump hosts, defining a jump host chain <em>in + * reverse order</em>. Each jump host is a SSH URI or "[user@]host[:port]". + * <p> + * Reverse order means: to connect A->B->target, one can do in + * {@code ~/.ssh/config} either of: + * </p> + * + * <pre> + * Host target + * ProxyJump B,A + * </pre> + * <p> + * <em>or</em> + * </p> + * + * <pre> + * Host target + * ProxyJump B + * + * Host B + * ProxyJump A + * </pre> + * + * @since 5.10 + */ + public static final String PROXY_JUMP = "ProxyJump"; + /** Key in an ssh config file. */ public static final String REMOTE_COMMAND = "RemoteCommand"; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java index 16169f028b..6768387e65 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java @@ -49,6 +49,7 @@ import java.net.SocketException; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; +import java.nio.charset.StandardCharsets; import java.nio.file.InvalidPathException; import java.nio.file.Path; import java.nio.file.Paths; @@ -900,7 +901,9 @@ public class TransportHttp extends HttpTransport implements WalkTransport, conn.setRequestProperty(HDR_ACCEPT_ENCODING, ENCODING_GZIP); } conn.setRequestProperty(HDR_PRAGMA, "no-cache"); //$NON-NLS-1$ - if (UserAgent.get() != null) { + if (http.getUserAgent() != null) { + conn.setRequestProperty(HDR_USER_AGENT, http.getUserAgent()); + } else if (UserAgent.get() != null) { conn.setRequestProperty(HDR_USER_AGENT, UserAgent.get()); } int timeOut = getTimeout(); @@ -909,6 +912,7 @@ public class TransportHttp extends HttpTransport implements WalkTransport, conn.setConnectTimeout(effTimeOut); conn.setReadTimeout(effTimeOut); } + addHeaders(conn, http.getExtraHeaders()); // set cookie header if necessary if (!relevantCookies.isEmpty()) { setCookieHeader(conn); @@ -923,6 +927,44 @@ public class TransportHttp extends HttpTransport implements WalkTransport, return conn; } + /** + * Adds a list of header strings to the connection. Headers are expected to + * separate keys from values, i.e. "Key: Value". Headers without colon or + * key are ignored (and logged), as are headers with keys that are not RFC + * 7230 tokens or with non-ASCII values. + * + * @param conn + * The target HttpConnection + * @param headersToAdd + * A list of header strings + */ + static void addHeaders(HttpConnection conn, List<String> headersToAdd) { + for (String header : headersToAdd) { + // Empty values are allowed according to + // https://tools.ietf.org/html/rfc7230 + int colon = header.indexOf(':'); + String key = null; + if (colon > 0) { + key = header.substring(0, colon).trim(); + } + if (key == null || key.isEmpty()) { + LOG.warn(MessageFormat.format( + JGitText.get().invalidHeaderFormat, header)); + } else if (HttpSupport.scanToken(key, 0) != key.length()) { + LOG.warn(MessageFormat.format(JGitText.get().invalidHeaderKey, + header)); + } else { + String value = header.substring(colon + 1).trim(); + if (!StandardCharsets.US_ASCII.newEncoder().canEncode(value)) { + LOG.warn(MessageFormat + .format(JGitText.get().invalidHeaderValue, header)); + } else { + conn.setRequestProperty(key, value); + } + } + } + } + private void setCookieHeader(HttpConnection conn) { StringBuilder cookieHeaderValue = new StringBuilder(); for (HttpCookie cookie : relevantCookies) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java index 9889015261..1242ef1b4a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java @@ -42,6 +42,8 @@ import java.io.InputStream; import java.io.OutputStream; import java.io.UncheckedIOException; import java.text.MessageFormat; +import java.time.Duration; +import java.time.Instant; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -1008,7 +1010,7 @@ public class UploadPack { else advertised = refIdSet(getAdvertisedOrDefaultRefs().values()); - long negotiateStart = System.currentTimeMillis(); + Instant negotiateStart = Instant.now(); accumulator.advertised = advertised.size(); ProtocolV0Parser parser = new ProtocolV0Parser(transferConfig); @@ -1050,8 +1052,8 @@ public class UploadPack { if (!req.getClientShallowCommits().isEmpty()) walk.assumeShallow(req.getClientShallowCommits()); sendPack = negotiate(req, accumulator, pckOut); - accumulator.timeNegotiating += System.currentTimeMillis() - - negotiateStart; + accumulator.timeNegotiating = Duration + .between(negotiateStart, Instant.now()).toMillis(); if (sendPack && !biDirectionalPipe) { // Ensure the request was fully consumed. Any remaining input must @@ -1137,6 +1139,9 @@ public class UploadPack { advertised = refIdSet(getAdvertisedOrDefaultRefs().values()); } + PackStatistics.Accumulator accumulator = new PackStatistics.Accumulator(); + Instant negotiateStart = Instant.now(); + ProtocolV2Parser parser = new ProtocolV2Parser(transferConfig); FetchV2Request req = parser.parseFetchRequest(pckIn); currentRequest = req; @@ -1186,7 +1191,8 @@ public class UploadPack { if (req.wasDoneReceived()) { processHaveLines(req.getPeerHas(), ObjectId.zeroId(), - new PacketLineOut(NullOutputStream.INSTANCE)); + new PacketLineOut(NullOutputStream.INSTANCE), + accumulator); } else { pckOut.writeString("acknowledgments\n"); //$NON-NLS-1$ for (ObjectId id : req.getPeerHas()) { @@ -1195,7 +1201,8 @@ public class UploadPack { } } processHaveLines(req.getPeerHas(), ObjectId.zeroId(), - new PacketLineOut(NullOutputStream.INSTANCE)); + new PacketLineOut(NullOutputStream.INSTANCE), + accumulator); if (okToGiveUp()) { pckOut.writeString("ready\n"); //$NON-NLS-1$ } else if (commonBase.isEmpty()) { @@ -1238,7 +1245,11 @@ public class UploadPack { // But sideband-all is not used, so we have to write it ourselves. pckOut.writeString("packfile\n"); //$NON-NLS-1$ } - sendPack(new PackStatistics.Accumulator(), + + accumulator.timeNegotiating = Duration + .between(negotiateStart, Instant.now()).toMillis(); + + sendPack(accumulator, req, req.getClientCapabilities().contains(OPTION_INCLUDE_TAG) ? db.getRefDatabase().getRefsByPrefix(R_TAGS) @@ -1641,7 +1652,7 @@ public class UploadPack { } if (PacketLineIn.isEnd(line)) { - last = processHaveLines(peerHas, last, pckOut); + last = processHaveLines(peerHas, last, pckOut, accumulator); if (commonBase.isEmpty() || multiAck != MultiAck.OFF) pckOut.writeString("NAK\n"); //$NON-NLS-1$ if (noDone && sentReady) { @@ -1656,7 +1667,7 @@ public class UploadPack { peerHas.add(ObjectId.fromString(line.substring(5))); accumulator.haves++; } else if (line.equals("done")) { //$NON-NLS-1$ - last = processHaveLines(peerHas, last, pckOut); + last = processHaveLines(peerHas, last, pckOut, accumulator); if (commonBase.isEmpty()) pckOut.writeString("NAK\n"); //$NON-NLS-1$ @@ -1672,11 +1683,12 @@ public class UploadPack { } } - private ObjectId processHaveLines(List<ObjectId> peerHas, ObjectId last, PacketLineOut out) + private ObjectId processHaveLines(List<ObjectId> peerHas, ObjectId last, + PacketLineOut out, PackStatistics.Accumulator accumulator) throws IOException { preUploadHook.onBeginNegotiateRound(this, wantIds, peerHas.size()); if (wantAll.isEmpty() && !wantIds.isEmpty()) - parseWants(); + parseWants(accumulator); if (peerHas.isEmpty()) return last; @@ -1773,7 +1785,7 @@ public class UploadPack { return last; } - private void parseWants() throws IOException { + private void parseWants(PackStatistics.Accumulator accumulator) throws IOException { List<ObjectId> notAdvertisedWants = null; for (ObjectId obj : wantIds) { if (!advertised.contains(obj)) { @@ -1782,9 +1794,18 @@ public class UploadPack { notAdvertisedWants.add(obj); } } - if (notAdvertisedWants != null) + if (notAdvertisedWants != null) { + accumulator.notAdvertisedWants = notAdvertisedWants.size(); + + Instant startReachabilityChecking = Instant.now(); + requestValidator.checkWants(this, notAdvertisedWants); + accumulator.reachabilityCheckDuration = Duration + .between(startReachabilityChecking, Instant.now()) + .toMillis(); + } + AsyncRevObjectQueue q = walk.parseAny(wantIds, true); try { RevObject obj; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UserAgent.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UserAgent.java index 5b63635e5a..604eb3a66c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UserAgent.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UserAgent.java @@ -46,7 +46,7 @@ public class UserAgent { return "unknown"; //$NON-NLS-1$ } - private static String clean(String s) { + static String clean(String s) { s = s.trim(); StringBuilder b = new StringBuilder(s.length()); for (int i = 0; i < s.length(); i++) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java index 4c26dd0c40..72278dc9c3 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java @@ -25,6 +25,7 @@ import java.nio.ByteBuffer; import java.nio.CharBuffer; import java.nio.charset.CharacterCodingException; import java.nio.charset.CharsetEncoder; +import java.nio.file.Path; import java.text.MessageFormat; import java.time.Instant; import java.util.Arrays; @@ -48,8 +49,8 @@ import org.eclipse.jgit.errors.NoWorkTreeException; import org.eclipse.jgit.ignore.FastIgnoreRule; import org.eclipse.jgit.ignore.IgnoreNode; import org.eclipse.jgit.internal.JGitText; +import org.eclipse.jgit.lib.ConfigConstants; import org.eclipse.jgit.lib.Constants; -import org.eclipse.jgit.lib.CoreConfig; import org.eclipse.jgit.lib.CoreConfig.CheckStat; import org.eclipse.jgit.lib.CoreConfig.EolStreamType; import org.eclipse.jgit.lib.CoreConfig.SymLinks; @@ -1308,15 +1309,11 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator { } FS fs = repository.getFS(); - String path = repository.getConfig().get(CoreConfig.KEY) - .getExcludesFile(); + Path path = repository.getConfig().getPath( + ConfigConstants.CONFIG_CORE_SECTION, null, + ConfigConstants.CONFIG_KEY_EXCLUDESFILE, fs, null, null); if (path != null) { - File excludesfile; - if (path.startsWith("~/")) //$NON-NLS-1$ - excludesfile = fs.resolve(fs.userHome(), path.substring(2)); - else - excludesfile = fs.resolve(null, path); - loadRulesFromFile(r, excludesfile); + loadRulesFromFile(r, path.toFile()); } File exclude = fs.resolve(repository.getDirectory(), diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/IndexDiffFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/IndexDiffFilter.java index 19cda42485..4731f345bc 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/IndexDiffFilter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/IndexDiffFilter.java @@ -217,14 +217,15 @@ public class IndexDiffFilter extends TreeFilter { */ private void copyUntrackedFolders(String currentPath) { String pathToBeSaved = null; - while (!untrackedParentFolders.isEmpty() - && !currentPath.startsWith(untrackedParentFolders.getFirst() - + "/")) //$NON-NLS-1$ + while (!untrackedParentFolders.isEmpty() && !currentPath + .startsWith(untrackedParentFolders.getFirst() + '/')) { pathToBeSaved = untrackedParentFolders.removeFirst(); + } if (pathToBeSaved != null) { - while (!untrackedFolders.isEmpty() - && untrackedFolders.getLast().startsWith(pathToBeSaved)) + while (!untrackedFolders.isEmpty() && untrackedFolders.getLast() + .startsWith(pathToBeSaved + '/')) { untrackedFolders.removeLast(); + } untrackedFolders.addLast(pathToBeSaved); } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java index bf7b753693..d8cab358e7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java @@ -1080,8 +1080,9 @@ public abstract class FS { } /** - * Set the last modified time of a file system object. If the OS/JRE support - * symbolic links, the link is modified, not the target, + * Set the last modified time of a file system object. + * <p> + * For symlinks it sets the modified time of the link target. * * @param f * a {@link java.io.File} object. @@ -1097,8 +1098,9 @@ public abstract class FS { } /** - * Set the last modified time of a file system object. If the OS/JRE support - * symbolic links, the link is modified, not the target, + * Set the last modified time of a file system object. + * <p> + * For symlinks it sets the modified time of the link target. * * @param p * a {@link Path} object. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java index c43956e53d..aa39a44642 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java @@ -710,6 +710,8 @@ public class FileUtils { } /** + * Set the last modified time of a file system object. + * * @param file * @param time * @throws IOException @@ -720,6 +722,8 @@ public class FileUtils { } /** + * Set the last modified time of a file system object. + * * @param path * @param time * @throws IOException diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/HttpSupport.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/HttpSupport.java index 8ff649bccc..04b3eab504 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/HttpSupport.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/HttpSupport.java @@ -424,6 +424,69 @@ public class HttpSupport { } } + /** + * Scan a RFC 7230 token as it appears in HTTP headers. + * + * @param header + * to scan in + * @param from + * index in {@code header} to start scanning at + * @return the index after the token, that is, on the first non-token + * character or {@code header.length} + * @throws IndexOutOfBoundsException + * if {@code from < 0} or {@code from > header.length()} + * + * @see <a href="https://tools.ietf.org/html/rfc7230#appendix-B">RFC 7230, + * Appendix B: Collected Grammar; "token" production</a> + * @since 5.10 + */ + public static int scanToken(String header, int from) { + int length = header.length(); + int i = from; + if (i < 0 || i > length) { + throw new IndexOutOfBoundsException(); + } + while (i < length) { + char c = header.charAt(i); + switch (c) { + case '!': + case '#': + case '$': + case '%': + case '&': + case '\'': + case '*': + case '+': + case '-': + case '.': + case '^': + case '_': + case '`': + case '|': + case '~': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + i++; + break; + default: + if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) { + i++; + break; + } + return i; + } + } + return i; + } + private HttpSupport() { // Utility class only. } @@ -18,7 +18,7 @@ <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit-parent</artifactId> <packaging>pom</packaging> - <version>5.9.1-SNAPSHOT</version> + <version>5.10.0-SNAPSHOT</version> <name>JGit - Parent</name> <url>${jgit-url}</url> @@ -151,7 +151,7 @@ <maven.compiler.target>1.8</maven.compiler.target> <bundle-manifest>${project.build.directory}/META-INF/MANIFEST.MF</bundle-manifest> - <jgit-last-release-version>5.8.0.202006091008-r</jgit-last-release-version> + <jgit-last-release-version>5.9.0.202009080501-r</jgit-last-release-version> <apache-sshd-version>2.4.0</apache-sshd-version> <jsch-version>0.1.55</jsch-version> <jzlib-version>1.1.1</jzlib-version> @@ -166,14 +166,14 @@ <japicmp-version>0.14.3</japicmp-version> <httpclient-version>4.5.10</httpclient-version> <httpcore-version>4.4.12</httpcore-version> - <slf4j-version>1.7.2</slf4j-version> + <slf4j-version>1.7.30</slf4j-version> <log4j-version>1.2.15</log4j-version> <maven-javadoc-plugin-version>3.2.0</maven-javadoc-plugin-version> <tycho-extras-version>1.7.0</tycho-extras-version> <gson-version>2.8.2</gson-version> <bouncycastle-version>1.65</bouncycastle-version> - <spotbugs-maven-plugin-version>4.0.4</spotbugs-maven-plugin-version> - <maven-project-info-reports-plugin-version>3.1.0</maven-project-info-reports-plugin-version> + <spotbugs-maven-plugin-version>4.1.3</spotbugs-maven-plugin-version> + <maven-project-info-reports-plugin-version>3.1.1</maven-project-info-reports-plugin-version> <maven-jxr-plugin-version>3.0.0</maven-jxr-plugin-version> <maven-surefire-plugin-version>3.0.0-M4</maven-surefire-plugin-version> <maven-surefire-report-plugin-version>${maven-surefire-plugin-version}</maven-surefire-report-plugin-version> @@ -337,7 +337,7 @@ <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> - <version>0.8.5</version> + <version>0.8.6</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -896,7 +896,7 @@ <dependency> <groupId>org.eclipse.jdt</groupId> <artifactId>ecj</artifactId> - <version>3.22.0</version> + <version>3.23.0</version> </dependency> </dependencies> </plugin> |