Commit Graph

7271 Commits

Author SHA1 Message Date
Matthias Sohn ad5339a6b0 Merge branch 'stable-5.4'
* stable-5.4:
  Prepare 5.4.3-SNAPSHOT builds
  JGit v5.4.2.201908231537-r
  Prepare 5.3.5-SNAPSHOT builds
  JGit v5.3.4.201908231101-r
  Prepare 5.1.11-SNAPSHOT builds
  JGit v5.1.10.201908230655-r
  Use AtomicReferences to cache user and system level configs
  Fix copy-paste typo in CloneCommand#cleanup
  SystemReader: Use correct constructor of FileBasedConfig

Change-Id: I241dd1314f5535147ad641576a25f49cae6fe62d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-23 22:31:46 +02:00
Matthias Sohn 85a1d8bcf8 Prepare 5.4.3-SNAPSHOT builds
Change-Id: Iaf5140446dcf86a50bdb1a30860dfd624d3ec337
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-23 22:10:41 +02:00
Matthias Sohn 2c0f02244c JGit v5.4.2.201908231537-r
Change-Id: I1d808c63db81435173987c399c90bda7bc5c8d9d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-23 21:36:24 +02:00
Matthias Sohn e6619980ed Merge branch 'stable-5.3' into stable-5.4
* stable-5.3:
  Prepare 5.3.5-SNAPSHOT builds
  JGit v5.3.4.201908231101-r
  Prepare 5.1.11-SNAPSHOT builds
  JGit v5.1.10.201908230655-r
  Use AtomicReferences to cache user and system level configs
  Fix copy-paste typo in CloneCommand#cleanup
  SystemReader: Use correct constructor of FileBasedConfig

Change-Id: I4422632766fc5554a20f75346c5480b7fb611484
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-23 17:59:49 +02:00
Matthias Sohn f30382b191 Prepare 5.3.5-SNAPSHOT builds
Change-Id: Ic0b9dfcac814ac7584e5eb19105f46344a10465a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-23 17:44:04 +02:00
Matthias Sohn 06309fdc43 JGit v5.3.4.201908231101-r
Change-Id: Ia98f47d9a10d6b8cccca6b697230dad4f350d720
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-23 17:01:29 +02:00
Matthias Sohn 6dfdfe1f67 Merge branch 'stable-5.2' into stable-5.3
* stable-5.2:
  Prepare 5.1.11-SNAPSHOT builds
  JGit v5.1.10.201908230655-r
  Use AtomicReferences to cache user and system level configs
  Fix copy-paste typo in CloneCommand#cleanup

Change-Id: I3ababc0f9b540cf1785925395d32a85d30aed40d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-23 17:00:11 +02:00
Matthias Sohn d999d12ad0 Merge branch 'stable-5.1' into stable-5.2
* stable-5.1:
  Prepare 5.1.11-SNAPSHOT builds
  JGit v5.1.10.201908230655-r
  Use AtomicReferences to cache user and system level configs
  Fix copy-paste typo in CloneCommand#cleanup

Change-Id: Ie383633de334e65901ed4c6deb2d59cfcce98e16
2019-08-23 16:00:38 +02:00
Matthias Sohn 418722df34 Prepare 5.1.11-SNAPSHOT builds
Change-Id: I8608580424d0e523dcace63f83ae530ba78dbb15
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-23 15:55:45 +02:00
Matthias Sohn 1c44bf8caf JGit v5.1.10.201908230655-r
Change-Id: I68d15ebd6054bdeaf62e14cddb87724828db7943
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-23 13:38:56 +02:00
Matthias Sohn d67fe38915 Use AtomicReferences to cache user and system level configs
This ensures that only one instance of user and one instance of system
config is set.

Change-Id: Idd00150f91d2d40af79499dd7bf8ad5940f87c4e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-23 05:07:05 -04:00
Adrien Bustany 28553c189c Fix copy-paste typo in CloneCommand#cleanup
deleteChildren was called on directory instead of gitDir, leading to a
potential null pointer exception if the git directory existed initially.

Bug: 550340
Change-Id: Iafc3b2961253a99862a59e81c7371f7bc564b412
Signed-off-by: Adrien Bustany <adrien-xx-eclipse@bustany.org>
2019-08-23 08:45:55 +09:00
David Pursehouse c2a5b7fdcf SystemReader: Use correct constructor of FileBasedConfig
The merge done in change If0c5010a2 resolved a conflict incorrectly
and reverted the fix that was done in change Id0bcdc93b.

Change-Id: I0f5fde33d1f366817f2b966eb42535f7bd3b063e
Reported-by: Thomas Wolf <thomas.wolf@paranor.ch>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-08-22 19:23:55 +09:00
Matthias Sohn 1553c94223 Merge branch 'stable-5.4'
* stable-5.4:
  Prepare 5.4.2-SNAPSHOT builds
  JGit v5.4.1.201908211225-r
  Prepare 5.3.4-SNAPSHOT builds
  JGit v5.3.3.201908210735-r
  Add missing @since tag on FileTreeIterator#getLastModifiedInstant
  Prepare 5.1.10-SNAPSHOT builds
  JGit v5.1.9.201908210455-r
  Avoid sign extension when comparing mtime with Instant#getEpochSecond
  Fix deprecation in DirCache caused by Instant based DirCacheEntry

Change-Id: I63156d6b73044d5d8820869a397a0aa94e607b50
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-21 22:39:47 +02:00
Matthias Sohn 2eb83f4b4a Prepare 5.4.2-SNAPSHOT builds
Change-Id: I5b2fde2d69ef1cc11b085874ab783ba48e070470
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-21 18:26:36 +02:00
Matthias Sohn 0af59e1212 JGit v5.4.1.201908211225-r
Change-Id: Ifa99b930bd20a9bc10696c414c73ebde0cd4b0c8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-21 18:17:59 +02:00
Matthias Sohn 5c93bbd344 Merge branch 'stable-5.3' into stable-5.4
* stable-5.3:
  Prepare 5.3.4-SNAPSHOT builds
  JGit v5.3.3.201908210735-r
  Add missing @since tag on FileTreeIterator#getLastModifiedInstant
  Prepare 5.1.10-SNAPSHOT builds
  JGit v5.1.9.201908210455-r
  Avoid sign extension when comparing mtime with Instant#getEpochSecond
  Fix deprecation in DirCache caused by Instant based DirCacheEntry

Change-Id: Ic3c8d3adf522b73f87c713538a14697eb690f508
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-21 18:16:23 +02:00
Matthias Sohn bbf3da1aac Prepare 5.3.4-SNAPSHOT builds
Change-Id: I1ccfeb28e87d13b25a8892947e62f1151130b6a6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-21 17:45:59 +02:00
Matthias Sohn e9fcf1932e JGit v5.3.3.201908210735-r
Change-Id: I799859e47616af0ac5ee3a982cb9350d141681d7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-21 13:30:43 +02:00
Matthias Sohn 48498fd3e6 Merge branch 'stable-5.2' into stable-5.3
* stable-5.2:
  Add missing @since tag on FileTreeIterator#getLastModifiedInstant
  Prepare 5.1.10-SNAPSHOT builds
  JGit v5.1.9.201908210455-r
  Avoid sign extension when comparing mtime with Instant#getEpochSecond
  Fix deprecation in DirCache caused by Instant based DirCacheEntry

Change-Id: If6d5f4dfd9fc8e8c09e29aa11b1004057eafeb9f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-21 12:13:27 +02:00
Matthias Sohn 7ac3a63e7f Merge branch 'stable-5.1' into stable-5.2
* stable-5.1:
  Add missing @since tag on FileTreeIterator#getLastModifiedInstant
  Prepare 5.1.10-SNAPSHOT builds
  JGit v5.1.9.201908210455-r
  Avoid sign extension when comparing mtime with Instant#getEpochSecond
  Fix deprecation in DirCache caused by Instant based DirCacheEntry

Change-Id: Id824c0b8b14dad5947ae9da1f90c3471e07b400f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-21 12:02:33 +02:00
Matthias Sohn e80a62e226 Add missing @since tag on FileTreeIterator#getLastModifiedInstant
Change-Id: I809399e6a71e0079d2f0007b0d3f00b531d451bb
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-21 11:52:20 +02:00
Matthias Sohn edc67125b7 Prepare 5.1.10-SNAPSHOT builds
Change-Id: If10afc8e663299a15db8c5fd0574fb51bf7e7ae9
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-21 11:51:41 +02:00
Matthias Sohn 38adb548c3 JGit v5.1.9.201908210455-r
Change-Id: Iaade207292acb8b27e01aca7e1af97ad7db1e854
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-21 10:52:10 +02:00
Matthias Sohn c130e5e708 Avoid sign extension when comparing mtime with Instant#getEpochSecond
Ensure we use the same type when comparing seconds since the epoch.

This does not prevent that in 2038 timestamps in seconds since the epoch
stored in a 32 bit integer will overflow. Integer.MAX_VALUE translates
to 2038-01-19T03:14:07Z. After this date we'll have an issue since we
store seconds since the epoch in a 32 bit integer in some places.

Bug: 319142
Change-Id: If0c03003d40b480f044686e2f7a2f62c9f4e2fe1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-21 00:29:45 +02:00
Michael Keppler 6cb21049d7 Fix deprecation in DirCache caused by Instant based DirCacheEntry
Replace the two int variables smudge_s and smudge_ns by an Instant and
use the new method DirCacheEntry.mightBeRacilyClean(Instant).

Change-Id: Id70adbb0856a64909617acf65da1bae8e2ae934a
Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-21 00:07:49 +02:00
Jonathan Tan 2d0f1c1dc1 Merge "UploadPack: support custom packfile-to-URI mapping" 2019-08-20 14:47:35 -04:00
Jonathan Tan a004820858 UploadPack: support custom packfile-to-URI mapping
Teach UploadPack to take a provider of URIs corresponding to cached
packs. When fetching, if the client supports the packfile-uri feature,
and if such a cached pack were to be streamed, instead send the
corresponding URI.

This packfile-uri feature is implemented in the jt/fetch-cdn-offload
branch of Git. There is interest in this feature [1], but it is not yet
merged.

[1] https://public-inbox.org/git/cover.1552073690.git.jonathantanmy@google.com/

Change-Id: I9a32dae131c9c56ad2ff4a8a9638ae3b5e44dc15
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
2019-08-20 10:54:20 -07:00
Matthias Sohn 53160ee12b Externalize error message in ReftableWriter#throwIllegalEntry
Also use MessageFormat as done elsewhere.

Change-Id: I36a4df9002310fa28321de9d325ee213f3cbd433
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-20 00:35:51 +02:00
Matthias Sohn 3e2c88199f Merge branch 'stable-5.4'
* stable-5.4:
  Fix NPE in RebaseTodoFile#parseComments
  Fix NPE in ObjectIdOwnerMap#get
  Fix NPE in CommitOnlyTest#getHead
  FileUtils#lastModifiedInstant should not log error if path doesn't exist
  Cache user global and system-wide git configurations
  Avoid setup and saving FileStoreAttributes compete for ~/.gitconfig lock
  Add missing dependencies for running FS_POSIXTest in Eclipse
  Fix javadoc for SystemReader#getInstance
  Upgrade tycho-extras to 1.4.0
  Improve retry handling when saving FileStoreAttributes fails
  Ensure FSTest uses MockSystemReader
  Make supportsAtomicCreateNewFile return true as default
  Update orbit to R20190602212107-2019-06 to enable backports from master
  Handle InvalidPathException in FS_POSIX#createNewFileAtomic
  Ensure root cause of lock creation failures is logged
  Implement toString in MockSystemReader and MockConfig
  LocalDiskRefTreeDatabaseTest shall use MockSystemReader
  Ensure LocalDiskRepositoryTestCase#setup fully uses MockSystemReader
  Ensure we use MockSystemReader in tests
  Override FileBasedConfig's save method in MockConfig
  Remove FileBasedConfig.load(boolean) introduced in d45219ba
  Disable debug log for FS in org.eclipse.jgit.test
  Bazel: enable logging for tests in org.eclipse.jgit.test
  LockFile: log exception if creation of lock file failed
  Stop using deprecated Constants.CHARACTER_ENCODING

Change-Id: I709de5edb626536529a99220aae7751b127c9bff
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-20 00:16:11 +02:00
Matthias Sohn 35d99477b8 Merge branch 'stable-5.3' into stable-5.4
* stable-5.3:
  Fix NPE in RebaseTodoFile#parseComments
  Fix NPE in ObjectIdOwnerMap#get
  Fix NPE in CommitOnlyTest#getHead
  FileUtils#lastModifiedInstant should not log error if path doesn't exist
  Cache user global and system-wide git configurations
  Avoid setup and saving FileStoreAttributes compete for ~/.gitconfig lock
  Add missing dependencies for running FS_POSIXTest in Eclipse
  Fix javadoc for SystemReader#getInstance
  Improve retry handling when saving FileStoreAttributes fails
  Ensure FSTest uses MockSystemReader
  Make supportsAtomicCreateNewFile return true as default
  Update orbit to R20190602212107-2019-06 to enable backports from master
  Handle InvalidPathException in FS_POSIX#createNewFileAtomic
  Ensure root cause of lock creation failures is logged
  Implement toString in MockSystemReader and MockConfig
  LocalDiskRefTreeDatabaseTest shall use MockSystemReader
  Ensure LocalDiskRepositoryTestCase#setup fully uses MockSystemReader
  Ensure we use MockSystemReader in tests
  Override FileBasedConfig's save method in MockConfig
  Remove FileBasedConfig.load(boolean) introduced in d45219ba
  Disable debug log for FS in org.eclipse.jgit.test
  Bazel: enable logging for tests in org.eclipse.jgit.test
  LockFile: log exception if creation of lock file failed
  Stop using deprecated Constants.CHARACTER_ENCODING

Change-Id: I43c2ab8b44c3e87d48e4072907ad169c81e3ffe0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-20 00:10:15 +02:00
Matthias Sohn 18fb58ae05 Merge branch 'stable-5.2' into stable-5.3
* stable-5.2:
  Fix NPE in RebaseTodoFile#parseComments
  Fix NPE in ObjectIdOwnerMap#get
  Fix NPE in CommitOnlyTest#getHead
  FileUtils#lastModifiedInstant should not log error if path doesn't exist
  Cache user global and system-wide git configurations
  Avoid setup and saving FileStoreAttributes compete for ~/.gitconfig lock
  Add missing dependencies for running FS_POSIXTest in Eclipse
  Fix javadoc for SystemReader#getInstance
  Improve retry handling when saving FileStoreAttributes fails
  Ensure FSTest uses MockSystemReader
  Make supportsAtomicCreateNewFile return true as default
  Update orbit to R20190602212107-2019-06 to enable backports from master
  Handle InvalidPathException in FS_POSIX#createNewFileAtomic
  Ensure root cause of lock creation failures is logged
  Implement toString in MockSystemReader and MockConfig
  LocalDiskRefTreeDatabaseTest shall use MockSystemReader
  Ensure LocalDiskRepositoryTestCase#setup fully uses MockSystemReader
  Ensure we use MockSystemReader in tests
  Override FileBasedConfig's save method in MockConfig
  Remove FileBasedConfig.load(boolean) introduced in d45219ba
  Disable debug log for FS in org.eclipse.jgit.test
  Bazel: enable logging for tests in org.eclipse.jgit.test
  LockFile: log exception if creation of lock file failed
  Stop using deprecated Constants.CHARACTER_ENCODING

Change-Id: If0c5010a2cf151ebebb2f2088fac3ee02c5007b9
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-19 23:41:17 +02:00
Matthias Sohn 0eea7368e2 Merge branch 'stable-5.1' into stable-5.2
* stable-5.1:
  Fix NPE in RebaseTodoFile#parseComments
  Fix NPE in ObjectIdOwnerMap#get
  Fix NPE in CommitOnlyTest#getHead
  FileUtils#lastModifiedInstant should not log error if path doesn't exist
  Cache user global and system-wide git configurations
  Avoid setup and saving FileStoreAttributes compete for ~/.gitconfig lock
  Add missing dependencies for running FS_POSIXTest in Eclipse
  Fix javadoc for SystemReader#getInstance
  Improve retry handling when saving FileStoreAttributes fails
  Ensure FSTest uses MockSystemReader
  Make supportsAtomicCreateNewFile return true as default
  Update orbit to R20190602212107-2019-06 to enable backports from master
  Handle InvalidPathException in FS_POSIX#createNewFileAtomic
  Ensure root cause of lock creation failures is logged
  Implement toString in MockSystemReader and MockConfig
  LocalDiskRefTreeDatabaseTest shall use MockSystemReader
  Ensure LocalDiskRepositoryTestCase#setup fully uses MockSystemReader
  Ensure we use MockSystemReader in tests
  Override FileBasedConfig's save method in MockConfig
  Remove FileBasedConfig.load(boolean) introduced in d45219ba
  Disable debug log for FS in org.eclipse.jgit.test
  Bazel: enable logging for tests in org.eclipse.jgit.test
  LockFile: log exception if creation of lock file failed
  Stop using deprecated Constants.CHARACTER_ENCODING

Change-Id: I48c585f3c9287be7d6ddb6b01a1955444e13fa31
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-19 18:30:35 +02:00
Han-Wen Nienhuys d7ee5aafee reftable: increment pointer *after* reading uint16
This fixes timezone reads out of the reflog.

Change-Id: I126d8742e5e904a074c544514180720466164f7c
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2019-08-19 11:40:28 +02:00
Han-Wen Nienhuys 81801d6f96 reftable: test absense of prefix matching in Reflog
Change-Id: I6705e6c57a8c080b17c7b93fdd598cf44a9d91c2
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2019-08-19 11:40:28 +02:00
Han-Wen Nienhuys 9f9163cbca reftable: enforce ordering for ref and log writes
Previously, the API did not enforce ordering of writes.  Misuse of
this API would lead to data effectively being lost.

Guard against that with IllegalArgumentException, and add a test.

Change-Id: I04f55c481d60532fc64d35fa32c47037a03988ae
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2019-08-19 11:40:25 +02:00
Han-Wen Nienhuys ca3b4b6083 reftable: add some more comments
Change-Id: I95208f7a05919b5019895cf41ae378c97da6e680
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2019-08-19 11:25:58 +02:00
Han-Wen Nienhuys ca9107d166 reftable: fix seeking to refs in reflog implementation
Small reftables omit the log index. Currently,
ReftableWriter#shouldHaveIndex does this if there is a single-block
log, but other writers could decide on different criteria.

In the case that the log index is missing, we have to linearly search
for the right block. It is never appropriate to use binary search on
blocks for log data, as the blocks are compressed and therefore
irregularly sized.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Change-Id: Id59874edf6bf45c7dec502d9465888e077ffe198
2019-08-19 11:10:20 +02:00
Matthias Sohn 86a567f615 Fix NPE in RebaseTodoFile#parseComments
Change-Id: I5487f3c2609eaf2a0ddf71ebb2f6c9701fb7600c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-19 10:16:23 +02:00
Anton Khodos 5e44bfa3ad Fix ApplyCommand which doesn't work if patch adds empty file
Bug: 548219
Change-Id: Ibb32132a38e54508a24489322da58ddfd80a1d9a
Signed-off-by: Anton Khodos <khodosanton@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-19 02:37:04 +02:00
Matthias Sohn a4216e5382 Fix NPE in ObjectIdOwnerMap#get
Change-Id: I3812961a27ac410d610ef50c73a28f21bb05ae79
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-18 11:59:54 +02:00
Matthias Sohn 41da8de001 Fix NPE in CommitOnlyTest#getHead
Change-Id: I05abd00d151cf9834d1a097dd16dc280b62a7edd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-18 11:59:54 +02:00
Matthias Sohn 31356f5d18 FileUtils#lastModifiedInstant should not log error if path doesn't exist
Change-Id: Id8447735beb24becb41612d3d29d5351f8273d22
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-18 11:59:54 +02:00
Matthias Sohn f383206ace Cache user global and system-wide git configurations
So far the git configuration and the system wide git configuration were
always reloaded when jgit accessed these global configuration files to
access global configuration options which are not in the context of a
single git repository. Cache these configurations in SystemReader and
only reload them if their file metadata observed using FileSnapshot
indicates a modification.

Change-Id: I092fe11a5d95f1c5799273cacfc7a415d0b7786c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2019-08-18 11:47:26 +02:00
Matthias Sohn 7f92a70fb3 Avoid setup and saving FileStoreAttributes compete for ~/.gitconfig lock
FS determines FileStore attributes in a background thread and tries to
save the results to the global git configuration. This competed with
LocalDiskRepositoryTestCase#setup trying to save changes to the same
file requiring the same lock. This frequently led to one of the threads
failing to acquire the lock.

Fix this by first initiating determination of FileStore attributes which
then uses a MockSystemReader not using a userConfig stored to disk which
avoids this race for the lock.

Change-Id: I30fcd96bc15100f8ef9b2a9eb3320bb5ace97c67
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-16 16:51:45 +02:00
Matthias Sohn fed2a8a4f9 Add missing dependencies for running FS_POSIXTest in Eclipse
Change-Id: I35fcdfab55ff02943f6185b232e01ce9cfe151a9
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-16 16:51:45 +02:00
Matthias Sohn b51bb4f7bd Fix javadoc for SystemReader#getInstance
The existing javadoc was copied from another method and not adapted.

Change-Id: I39a7e5d719b2c379de9bd1a4710a55a73700c6f0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-16 16:51:45 +02:00
Thomas Wolf 8c7f1a699a TransportHttp: resolve redirect URIs from the "Location" header
The "Location" header in a redirect response may contain a relative
URI. Resolve it against the URI the request was made.

Bug: 550033
Change-Id: I29de07dfbbbc794090821b7c190cb2cf662c5a60
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2019-08-16 08:31:59 +02:00
Thomas Wolf 39e83a6583 GPG: also consider pubring.gpg when looking for keys
The algorithm for finding keys was already improved in commit db0eb9f8,
but that wasn't quite correct yet.

If there is no pubring.kbx but a private-keys-v1.d directory and a
pubring.gpg, GPG also uses pubring.gpg in combination with the
private-keys-v1.d directory. GPG has three ways to locate public and
private key pairs:

* pubring.kbx and private-keys-v1.d (GPG >= 2.1)
* pubring.gpg and private-keys-v1.d (GPG >= 2.1)
* pubring.gpg and secring.gpg (GPG < 2.1)

See [1] and [2]. pubring.kbx may not exist if the user migrated from
an older GPG installation and didn't run the agent. Since we don't
know which GPG version the user has we must try secring.gpg also if
we found the public key in pubring.gpg, but didn't find the secret
key in the private key directory. Note that GPG < 2.1 also may have
a private key directory, used by the agent. But it may also _not_ have
that directory.

[1] https://lists.gnupg.org/pipermail/gnupg-users/2015-December/054881.html
[2] https://www.gnupg.org/faq/whats-new-in-2.1.html#nosecring

Bug: 549439
Change-Id: I6088014b16c585b6a3408bb31dba3c116e6b583d
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2019-08-15 12:45:29 +02:00
Michael Keppler 380d7446c9 Upgrade tycho-extras to 1.4.0
This was probably forgotten when upgrading tycho itself.

Change-Id: I5d20184b6e8f1039e10775c0e13d6b66697e07ff
Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
2019-08-13 10:55:15 +02:00