Commit Graph

301 Commits

Author SHA1 Message Date
Matthias Sohn c8e42ca3ba Prepare 5.1.12-SNAPSHOT builds
Change-Id: I353ac3f23024063722abc7340bc9a6df3c615741
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-03 22:56:39 +02:00
Matthias Sohn 002f1628c6 JGit v5.1.11.201909031202-r
Change-Id: I288acf670160b9bcd2d04f572a902b5838b4d4f8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-03 18:01:55 +02:00
Matthias Sohn 7aec793266 Merge branch 'stable-5.0' into stable-5.1
* stable-5.0:
  Prepare 4.11.10-SNAPSHOT builds
  JGit v4.11.9.201909030838-r
  Bazel: Update bazlets to the latest master revision
  Bazel: Remove FileTreeIteratorWithTimeControl from BUILD file
  BatchRefUpdate: repro racy atomic update, and fix it
  Delete unused FileTreeIteratorWithTimeControl
  Fix RacyGitTests#testRacyGitDetection
  Change RacyGitTests to create a racy git situation in a stable way
  Silence API warnings

Change-Id: I172136a031ff0730e575327cafb3527c9650a71d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-03 17:40:19 +02:00
Matthias Sohn 5e24753ab0 Prepare 5.6.0-SNAPSHOT builds
Change-Id: I9eceb7b1272b27b979144041c75eb09ab4eeca6b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-29 10:08:52 +02:00
Matthias Sohn d5a0d76ed0 Prepare 5.5.0-SNAPSHOT builds
Change-Id: Ib498303c8787a5fbee89377eaed332a5a6b4f3b0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-28 21:14:09 +02:00
Matthias Sohn e0ea41b500 JGit v5.5.0.201908280940-m3
Change-Id: I0920767979d7927bc18f3e395963aeebae5ea540
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-28 15:40:54 +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 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 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 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 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 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
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 3cea3676c7 Merge branch 'stable-5.4'
* stable-5.4: (82 commits)
  Export all packages of o.e.j.ant and o.e.j.archive bundles
  Do not require test bundles to export all packages
  Fix API problem filters
  Increase severity of AmbiguousMethodReference to ERROR
  [error prone] suppress AmbiguousMethodReference in AnyLongObjectId
  [error prone] fix ReferenceEquality warning in CommitBuilder
  [error prone] suppress NonAtomicVolatileUpdate warning in SimpleLruCache
  [error prone] fix ReferenceEquality warning in CommitGraphPane#authorFor
  [error prone] fix ReferenceEquality warning in RevWalk#isMergedInto
  [error prone] fix ReferenceEquality warning in RefUpdate#updateImpl
  [error prone] fix ReferenceEquality warning in static equals methods
  [error prone] suppress AmbiguousMethodReference in AnyObjectId
  [error prone] fix "FutureReturnValueIgnored" error in FS
  Fix formatting and add missing braces in Repository#stripWorkDir
  Repository: fix reference comparison of Files
  MergeAlgorithm: Suppress Error Prone warning about reference equality
  Fix NarrowingCompoundAssignment warnings from Error Prone
  FS_POSIX: handle Files.getFileStore() failures
  Fix OpenSshConfigTest#config
  FileSnapshot: fix bug with timestamp thresholding
  In LockFile#waitForStatChange wait in units of file time resolution
  Cache FileStoreAttributeCache per directory
  Fix FileSnapshot#save(long) and FileSnapshot#save(Instant)
  Persist minimal racy threshold and allow manual configuration
  Measure minimum racy interval to auto-configure FileSnapshot
  Reuse FileUtils to recursively delete files created by tests
  Fix FileAttributeCache.toString()
  Add test for racy git detection in FileSnapshot
  Repeat RefDirectoryTest.testGetRef_DiscoversModifiedLoose 100 times
  Fix org.eclipse.jdt.core.prefs of org.eclipse.jgit.junit
  Add missing javadoc in org.eclipse.jgit.junit
  Enhance RepeatRule to report number of failures at the end
  Fix FileSnapshotTests for filesystem with high timestamp resolution
  Retry deleting test files in FileBasedConfigTest
  Measure filesystem timestamp resolution already in test setup
  Refactor FileSnapshotTest to use NIO APIs
  Measure stored timestamp resolution instead of time to touch file
  Handle CancellationException in FileStoreAttributeCache
  Fix FileSnapshot#saveNoConfig
  Use Instant for smudge time in DirCache and DirCacheEntry
  Use Instant instead of milliseconds for filesystem timestamp handling
  Workaround SecurityException in FS#getFsTimestampResolution
  Fix NPE in FS$FileStoreAttributeCache.getFsTimestampResolution
  FS: ignore AccessDeniedException when measuring timestamp resolution
  Add debug trace for FileSnapshot
  Use FileChannel.open to touch file and set mtime to now
  Persist filesystem timestamp resolution and allow manual configuration
  Increase bazel timeout for long running tests
  Bazel: Fix lint warning flagged by buildifier
  Update bazlets to latest version
  Bazel: Add missing dependencies for ArchiveCommandTest
  Bazel: Remove FileTreeIteratorWithTimeControl from BUILD file
  Add support for nanoseconds and microseconds for Config#getTimeUnit
  Optionally measure filesystem timestamp resolution asynchronously
  Delete unused FileTreeIteratorWithTimeControl
  FileSnapshot#equals: consider UNKNOWN_SIZE
  Timeout measuring file timestamp resolution after 2 seconds
  Fix RacyGitTests#testRacyGitDetection
  GlobalBundleCache: Fix ClassNewInstance warning from Error Prone
  IncorrectObjectTypeException: Fix typos in constructors' Javadoc
  Change RacyGitTests to create a racy git situation in a stable way
  Deprecate Constants.CHARACTER_ENCODING in favor of StandardCharsets.UTF_8
  Fix non-deterministic hash of archives created by ArchiveCommand
  Update Maven plugins ecj, plexus, error-prone
  Update Maven plugins and cleanup Maven warnings
  Make inner classes static where possible
  Error Prone: Increase severity of NonOverridingEquals to ERROR
  Error Prone: Increase severity of ImmutableEnumChecker to ERROR
  GitDateParser#ParseableSimpleDateFormat: Make formatStr private final
  BatchRefUpdateTest: Suppress ImmutableEnumChecker warning
  PacketLineIn: Suppress comparison warnings for END and DELIM
  FileSnapshot#toString: Suppress ReferenceEquality warnings
  Blame: Suppress ReferenceEquality warning for RevCommit instances
  Fix API problem filters
  pgm: add missing optional dependency to org.tukaani:xz
  NetscapeCookieFile: Make hash static and group overloaded write
  NetscapeCookieFile: Javadoc fixes
  Config: Handle reference-equality warning (and empty javadoc)
  Error Prone: Increase severity of ShortCircuitBoolean to ERROR
  ObjectWalk: Prefer boolean operators over logical operators in comparisons
  BasePackFetchConnection: Prefer boolean operators over logical operators in comparisons
  PackWriter: Prefer boolean operators over logical operators in comparisons

Change-Id: I825fd55bcb5345fb7afe066bf54ca50325f40acb
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-09 14:32:02 +02:00
Matthias Sohn 83502bb201 Fix API problem filters
- add missing filters for methods introduced in 5.4.1 to fix error prone
warnings
- remove no longer needed filters

Change-Id: Ia74d4e9876eae8acd403c8dea1fdf1227d68037e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-09 13:12:59 +02:00
David Pursehouse 13df53c149 [error prone] suppress AmbiguousMethodReference in AnyLongObjectId
Move the implementation of the static equals() method to a new method
and suppress the error. Deprecate the old method to signal that we
intend to remove it in the next major release.

See https://errorprone.info/bugpattern/AmbiguousMethodReference

Change-Id: I712697a411ab44c6e05ae4604eb2dcb9c0f8abd3
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-08-09 16:09:04 +09:00
Matthias Sohn bac0e8fd8d [error prone] fix ReferenceEquality warning in static equals methods
Implement a helper method suppressing the ReferenceEquality error prone
warning and use it to fix this warning in static equals methods where
this comparison is used to implement fast path of static equals
implementation.

See https://errorprone.info/bugpattern/ReferenceEquality

Change-Id: I33538a3406007d24efec3a504e031ca1069572ed
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-08-09 01:49:56 +02:00
David Turner 59640fb4f0 Constants for objects and info/{http-,}alternates
These are useful to avoid typos, and also for tab completion.

Change-Id: I0f2d267e46b36bc40297c9657c447f3fd8b9f831
Signed-off-by: David Turner <dturner@twosigma.com>
2019-08-02 12:16:31 -04:00
Michael Keppler 4b0c192f2d Fix bundle localization of Apache SSH bundle
The placeholders in manifest and plugin.properties did not match. To
avoid similar issues, all placeholders have been changed to
Bundle-Vendor and Bundle-Name now.

Bug:548503
Change-Id: Ibd4b9bc237b323e614506b97e5fbc99416365040
Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
2019-06-21 17:54:06 +02:00
David Pursehouse 430be89307 Error Prone: Increase severity of NonOverridingEquals to ERROR
Error Prone reports the warning on several classes:

   [NonOverridingEquals] equals method doesn't override Object.equals;
   if this is a type-specific helper for a method that does override
   Object.equals, either inline it into the callers or rename it to
   avoid ambiguity.

   See https://errorprone.info/bugpattern/NonOverridingEquals

Most of these are in the public API, so we can't rename or inline them
without breaking the API. FileSnapshot is not part of the public API,
but clients may be using it anyway, so we also shouldn't change that.

Suppress all the warnings instead. Having the check at severity ERROR
will at least make sure we don't introduce any new occurrences.

Change-Id: I92345c11256f06b4fa03ccc13337f72af5a43591
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-06-17 09:40:11 +09:00
Matthias Sohn 16fd3feefc Prepare 5.5.0-SNAPSHOT builds
Change-Id: I177d637e552a79014816dc5d2ef5ccda506adb39
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-06-13 03:01:15 +02:00
Matthias Sohn f3b7c2beae Prepare 5.4.1-SNAPSHOT builds
Change-Id: I8620d03c1cd5c1d0ad04e7607553e9aa18def9bb
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-06-12 17:35:11 +02:00
Matthias Sohn 3dad0682be JGit v5.4.0.201906121030-r
Change-Id: Ie68828af68d07cf8e3fe778d39436f539f1c73d0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-06-12 16:29:11 +02:00
Matthias Sohn 0e9361f066 JGit v5.4.0.201906120450-r
Change-Id: Iea17cba848d4e53d69d34e952a2476c375721aa4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-06-12 10:50:14 +02:00
David Pursehouse 4e8a3df68f Abbreviated{Long}ObjectId: Make operator precedence explicit
Change-Id: Iafd616d3fdc81ac3072f776061548be195270d85
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-06-11 10:37:18 +09:00
Matthias Sohn fcfe1299c3 Prepare 5.3.3-SNAPSHOT builds
Change-Id: Idebf272835cb22c21257c88b414ada802629b665
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-06-05 23:35:14 +02:00
Matthias Sohn d6c7c42a1b JGit v5.3.2.201906051522-r
Change-Id: I41b4926f4bfa896ef2a13c35e93e08071ae949a3
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-06-05 21:23:13 +02:00
Matthias Sohn 57ccca75e6 Prepare 5.1.9-SNAPSHOT builds
Change-Id: I60571e4e0bea04bb2c25ef3d0332a9ab6895db06
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-06-05 15:23:56 +02:00
Matthias Sohn 2fe587fcfd JGit v5.1.8.201906050907-r
Change-Id: Iae0ffe161df2ca8a800d21688d6b7d7419dfb640
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-06-05 15:06:56 +02:00
Carsten Hammer 84fc5c908d Convert to lambda or member reference
Convert anonymous inner classes to lambda expressions or member
references

Bug: 545856
CQ: 19537
Change-Id: I621431c178e8b99316314602f7c66c9a36f9ae98
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-05-16 02:58:43 -04:00
Matthias Sohn 1342942cc8 Prepare 5.3.2-SNAPSHOT builds
Change-Id: Iedd56602acc89783387098c7f92ce0e5bad091e0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-28 00:54:08 +02:00
Matthias Sohn 38049a008d JGit v5.3.1.201904271842-r
Change-Id: If3c323acfd2b6933f7d4fbec480cd4e82224f701
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-28 00:41:59 +02:00
Matthias Sohn a72e0b0188 Prepare 5.2.3-SNAPSHOT builds
Change-Id: I6ae3db901d986467128326073d4ba70406ae8385
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-24 00:04:44 +02:00
Matthias Sohn 1d297c3ddc JGit v5.2.2.201904231744-r
Change-Id: I4ed2aff28bff702a8c1b42814acb04c7ef9025a7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-23 23:43:50 +02:00
Matthias Sohn c2945bd261 Prepare 5.1.8-SNAPSHOT builds
Change-Id: I331bbaefd42ef94673ae8565c9b2b3af9eadfda0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-20 10:51:17 +02:00
Matthias Sohn 22e41cfd56 JGit v5.1.7.201904200442-r
Change-Id: Ifaa3a88c5e117912a8c691b8b8369dd9a17faebb
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-20 10:42:58 +02:00
Matthias Sohn 27f1fb668f Add missing source bundles and add them to a single source feature
Add missing source bundles for
- org.eclipse.jgit.ant
- org.eclipse.jgit.archive
- org.eclipse.jgit.http.apache
- org.eclipse.jgit.http.server
- org.eclipse.jgit.junit
- org.eclipse.jgit.junit.http
- org.eclipse.jgit.junit.ssh
- org.eclipse.jgit.lfs
- org.eclipse.jgit.lfs.server
- org.eclipse.jgit.ui

Combine all source bundles into a single source feature
org.eclipse.jgit.source and delete the other source features.

Ensure all bundles are added to the jgit p2 repository.

Change-Id: I56785f49c940b79f41f763c26e63a4a820ed7cce
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-02 01:57:28 -04:00
Matthias Sohn 4ade2de34f Prepare 5.3.1-SNAPSHOT builds
Change-Id: I8dc5e47bd19809d684579610edf922abca3cb3cc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-03-13 15:10:33 +01:00
Matthias Sohn de4a633201 JGit v5.3.0.201903130848-r
Change-Id: I52256a6d07011030698299d9a97dd01ea825fb7f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-03-13 13:47:54 +01:00
Matthias Sohn 639d53721c Prepare 5.1.7-SNAPSHOT builds
Change-Id: Ica716b2ad18f8390e75466430ef81c86ea06f004
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-03-13 07:49:33 +01:00
Matthias Sohn a31756fbfc JGit v5.1.6.201903130242-r
Change-Id: Iaf5e451f72dc8512afee99a9f3fb91aa348e3cf5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-03-13 07:41:27 +01:00
Matthias Sohn 90107d53eb Prepare 5.4.0-SNAPSHOT builds
Change-Id: I90a4791f63d0eba23da744c720e869f1830b86e7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-03-07 00:34:14 +01:00
Matthias Sohn 0295ee1164 Prepare 5.3.0-SNAPSHOT builds
Change-Id: I9b934bcfad3d2091f4da163170348b0c8ef5e732
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-03-06 22:26:03 +01:00
Matthias Sohn aca889f8cc JGit v5.3.0.201903061415-rc1
Change-Id: I85866af97fe1c0c0a0da83a7605484082fa56b52
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-03-06 20:03:00 +01:00
Matthias Sohn 23affa6c77 Prepare 5.3.0-SNAPSHOT builds
Change-Id: I9f0bf3ff2b26f4a8300c98206beb19c2b9d4946a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-01-17 04:23:42 +01:00
Matthias Sohn 05159ed656 JGit v5.3.0.201901162155-m1
Change-Id: I350925ff3b1fba2c83a448bc4e6d67368573693e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-01-17 04:17:18 +01:00
Matthias Sohn 8fc2aef89e JGit v5.3.0.201901161700-m1
Change-Id: I935cae5ae09ee5598ebdf6d9209048afec0d42dc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-01-17 02:39:39 +01:00
Matthias Sohn 56562221d6 Prepare 5.2.2-SNAPSHOT builds
Change-Id: I9487f6a59ed684ad13bcfbff7d6c730ae4f37030
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-12-27 03:32:48 +01:00
Matthias Sohn 24e89950e7 JGit v5.2.1.201812262042-r
Change-Id: Idfefc54e898f364407a931b787a26db2489b031c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-12-27 02:44:17 +01:00
Matthias Sohn fafad4196d Prepare 5.1.6-SNAPSHOT builds
Change-Id: If3313d602aa57cfa031ba2c9ec03bd51b464dc19
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-12-27 01:35:30 +01:00
Matthias Sohn 510011b05c JGit v5.1.5.201812261915-r
Change-Id: I249a440d1ca1c997343da942ae55fcb27a645b92
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-12-27 01:16:15 +01:00
Matthias Sohn d14209e81b Prepare 5.1.5-SNAPSHOT builds
Change-Id: I3eeb24b01a4f955e7e933238defb42635ebfec7d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-12-26 00:57:01 +01:00
Matthias Sohn c93aec2b73 JGit v5.1.4.201812251853-r
Change-Id: I30ba167bcd8144074553d7446a45fa6be19584fe
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-12-26 00:53:51 +01:00
Matthias Sohn 57b8cf4261 Prepare 5.2.1-SNAPSHOT builds
Change-Id: I68d9f5b1c8ca8e8eada9143093dc4fa82519edd8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-12-07 01:46:38 +01:00
Matthias Sohn c84c08107d JGit v5.2.0.201812061821-r
Change-Id: I8528c913ad1a820ee9a2fa6be1c9125b518caefe
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-12-07 00:20:43 +01:00
Matthias Sohn 38da21d6b0 Prepare 5.3.0-SNAPSHOT builds
Change-Id: I8951c2cf650cc3e41d2baa0b330b94468cfed5c2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-12-03 02:32:49 +01:00
Matthias Sohn 055c312bd1 Prepare 5.2.0-SNAPSHOT builds
Change-Id: I18646aaeee51047b234b758dcc1c2f89fd01b2f8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-11-30 22:57:04 +01:00
Matthias Sohn 12d840dfcb JGit v5.2.0.201811281532-m3
Change-Id: I79988b473d67e565d8f6bcac40ee9a14b26c9e60
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-11-28 21:35:26 +01:00
Matthias Sohn b65e247568 Prepare 5.1.4-SNAPSHOT builds
Change-Id: Iee86860f3b4eb9f4af818c60342fd29465c0474c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-10-20 10:39:16 +02:00
Matthias Sohn cf24983b23 JGit v5.1.3.201810200350-r
Change-Id: Ib2c5a79d4fdf77680b7b65652fc3659527df27ad
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-10-20 09:50:16 +02:00
David Pursehouse 7ebd434e91 Disable Eclipse warning about unrecognized @SuppressWarnings value
The code base has several @SuppressWarnings annotations to suppress
warnings raised by Error Prone, but those are not recognized by
Eclipse and there is currently no way to tell it about them [1].

Suppress them for now.

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=392045

Change-Id: I3de7cfa8ad4370ca5be71e1303879c73ab6829c1
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2018-10-17 10:40:36 +09:00
Jonathan Nieder b0991ca805 Format @NonNull on return value as method annotation
For example, instead of using

	public @NonNull String getMyFavoriteString() { ... }

use

	@NonNull
	public String getMyFavoriteString() { ... }

This makes the style more consistent (the existing JGit code base
tends to lean toward the second style) and makes the source code
better reflect how the annotation is parsed, as a METHOD annotation.

Longer term, we should switch to a TYPE_USE annotation and switch to
the first style.

Noticed using a style checker that follows
https://google.github.io/styleguide/javaguide.html#s4.8.5-annotations

Change-Id: I9b9fa08035d805ca660520f812a84d2f47eff507
Reported-by: Ivan Frade <ifrade@google.com>
Signed-off-by: Jonathan Nieder <jrn@google.com>
2018-10-09 15:56:55 -07:00
Jonathan Nieder 608b6b03b1 Format @Nullable on return value as method annotation
For example, instead of using

	public @Nullable String getMyFavoriteString() { ... }

use

	@Nullable
	public String getMyFavoriteString() { ... }

This makes the style more consistent (the existing JGit code base
tends to lean toward the second style) and makes the source code
better reflect how the annotation is parsed, as a METHOD annotation.

Longer term, we should switch to a TYPE_USE annotation and switch to
the first style.

Noticed using a style checker that follows
https://google.github.io/styleguide/javaguide.html#s4.8.5-annotations

Change-Id: I07f4e67cc149fb8007f696a4663e10d4bfc57e3a
Reported-by: Ivan Frade <ifrade@google.com>
Signed-off-by: Jonathan Nieder <jrn@google.com>
2018-10-09 15:52:54 -07:00
Matthias Sohn 2078b23cee Prepare 5.1.3-SNAPSHOT builds
Change-Id: I75c1a01885115fc709ab37f181234264c3f7423a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-10-06 18:54:50 +02:00
Matthias Sohn b63870200b JGit v5.1.2.201810061102-r
Change-Id: Id34e4ae12a796460862edc37c5eb072314199bf4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-10-06 17:10:45 +02:00
Michael Keppler 751abf4a50 Fix Mylyn commit message template
The commit message template contains a superfluous blank at the end of
the first line, which is deleted by this change. This is only relevant
for jgit contributors using Eclipse, not for jgit users.

Change-Id: I462deb49c26fb64b3dc2d1d75f1e40ef302b0fc9
Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
2018-09-23 04:11:58 -04:00
Matthias Sohn 48e21dc10b Prepare 5.1.2-SNAPSHOT builds
Change-Id: I095d246e27de747a234bc058725454c222be51ce
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-09-18 17:03:49 +02:00
Matthias Sohn b06d2e6a31 JGit v5.1.1.201809181055-r
Change-Id: I2366444fca125139eadb6d513be721167a266d70
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-09-18 16:55:20 +02:00
Matthias Sohn 63fe317f60 [spotBugs] Fix potential NPE in SmudgeFilter#downloadLfsResource
Change-Id: Ibaf8481a5b1a96ebe1debfd98e1e2201d1005fc0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-09-13 00:54:58 +02:00
Matthias Sohn a44d95c814 Prepare 5.1.1-SNAPSHOT builds
Change-Id: Ie220dd95fae18f894e2a04a5ae6d29a1e5a6d76b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-09-11 23:28:07 +02:00
Matthias Sohn 47956bcc68 JGit v5.1.0.201809111528-r
Change-Id: I583bf7d60bccc876156be1f605bfda32b89cd08b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-09-11 21:30:23 +02:00
Matthias Sohn 0b11e31a4c Prepare 5.0.4-SNAPSHOT builds
Change-Id: Ib9042662c3f2a1544d597d476c5952c61767687b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-09-09 17:28:59 +02:00
Matthias Sohn faf1ae230e JGit v5.0.3.201809091024-r
Change-Id: I9e8e74a10dbb235b08c6a5e1b169c5cae440f129
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-09-09 16:24:44 +02:00
Matthias Sohn 2fae326aa9 Prepare 5.2.0-SNAPSHOT builds
Change-Id: If8e8ca20e745901a5e0239c16cb4acc7934b4ec8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-09-06 09:36:00 +02:00
Matthias Sohn 4c8a4eb8fd Prepare 5.1.0-SNAPSHOT builds
Change-Id: I3d06c5237edae54b09f465f415f5a308b5e7ceff
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-09-05 20:41:53 +02:00
Matthias Sohn e4281f1d5f JGit v5.1.0.201809051400-rc1
Change-Id: I0b53f95ee51d94da8b029c9bb10eb854ff9dd4f6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-09-05 19:55:38 +02:00
David Pursehouse 30c6c75421 Deprecate Constants.CHARSET in favor of StandardCharsets.UTF_8
Change-Id: I3b748620f067582afef20f144feebe40d0332be2
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2018-09-04 10:53:10 +09:00
David Pursehouse a3cb474c94 Specify charset when constructing InputStreamReader
ErrorProne warns [1] about implicit use of the platform default charset,
which can result in differing behaviour between JVM executions or
incorrect behavior if the encoding of the data source doesn't match
expectations.

[1] http://errorprone.info/bugpattern/DefaultCharset

Change-Id: I0fd489d352170339c3867355cd24324dfdbd4b59
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2018-09-02 01:44:36 -05:00
Markus Duft c64de36a06 Adjust severity of missing execution environment for LFS
All other JGit bundles use severity warning for missing execution
environment definition. Use the same configuration for LFS bundles.

Bug: 488123
Change-Id: I575d6d61418f5c4e39303fb8a9cd69e6539f6b5e
Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
2018-08-29 23:18:51 +02:00
Matthias Sohn a6d641a03b Prepare 5.1.0-SNAPSHOT builds
Change-Id: If57fcce14f5ba3ef2a2602515e2f89b8f22a742b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-08-29 13:51:08 +02:00
Matthias Sohn a7ad89e974 JGit v5.1.0.201808281540-m3
Change-Id: Ie86c46a828b55a2235056b9a5bc2c6c450b95ed0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-08-28 21:41:37 +02:00
Michael Keppler 2fc00af44e refactor: simplify collection.toArray()
On recent VMs, collection.toArray(new T[0]) is faster than
collection.toArray(new T[collection.size()]). Since it is also more
readable, it should now be the preferred way of collection to array
conversion.

https://shipilev.net/blog/2016/arrays-wisdom-ancients/

Change-Id: I80388532fb4b2b0663ee1fe8baa94f5df55c8442
Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
2018-08-23 01:34:39 -04:00
Matthias Sohn 2f7bf6b536 Prepare 5.0.3-SNAPSHOT builds
Change-Id: Iae9d763a65481b09af6e19b33e41375f27038357
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-08-01 01:30:05 +02:00
Matthias Sohn 40813388e7 JGit v5.0.2.201807311906-r
Change-Id: Iccb98c03a069fee85a52325e1ed22cba8b76bcd8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-08-01 01:06:30 +02:00
Matthias Sohn ff15df05c3 Prepare 5.0.2-SNAPSHOT builds
Change-Id: I65e83f39a4082278c4cb809dbb08d44a119cebe0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-06-22 01:42:14 +02:00
Matthias Sohn a7e38fb0b0 JGit v5.0.1.201806211838-r
Change-Id: I594cd85d46698953c27da3687e4ec40aeb73b445
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-06-22 00:40:01 +02:00
Matthias Sohn 331f1a8e49 Merge branch 'stable-5.0'
* stable-5.0:
  Prepare 5.0.1-SNAPSHOT builds
  JGit v5.0.0.201806131550-r
  JGit v5.0.0.201806131210-r
  Downgrade Apache httpclient to 4.5.2.v20170210-0925
  RefUpdateTest: Refactor to not use deprecated Repository#getAllRefs
  Propagate failure of ssh command to caller of SshSupport
  Make JGit describe behaves same as c-git for lightweight tags
  Fix issues with LFS on GitHub (SSH)

Change-Id: I0471440919adfdbfc72996711d9e0bbd1f3cf477
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-06-14 00:00:30 +02:00
Matthias Sohn 0dbaf9d951 Prepare 5.0.1-SNAPSHOT builds
Change-Id: Iadf12dbdd63ef17c3f712c0fc18495304aa35016
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-06-13 23:24:42 +02:00
Matthias Sohn e729a83bd2 JGit v5.0.0.201806131550-r
Change-Id: Ia2d548676217250593c3f0c383aec19e12e5e4a4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-06-13 21:42:40 +02:00
Matthias Sohn 94a585e6e8 JGit v5.0.0.201806131210-r
Change-Id: Iedccfcaf57c11822f1faf5d5195357de42b2a14e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-06-13 18:11:23 +02:00
Matthias Sohn f7fbc7fcd7 Propagate failure of ssh command to caller of SshSupport
When SshSupport.runSshCommand fails since the executed external ssh
command failed throw a CommandFailedException.

If discovery of LFS server fails due to failure of the
git-lfs-authenticate command chain the CommandFailureException to the
LfsConfigInvalidException in order to allow root cause analysis in the
application using that.

Change-Id: I2f9ea2be11274549f6d845937164c248b3d840b2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-06-13 11:24:24 +02:00
Markus Duft 01c52a58f6 Fix issues with LFS on GitHub (SSH)
* URIish seems to have a tiny feature (bug?). The path of the URI
   starts with a '/' only if the URI has a port set (it seems).
 * GitHub does not return SSH authorization on a single line as Gerrit
   does - need to account for that.
 * Increase the SSH git-lfs-authenticate timeout, as GitHub sometimes
   responds slower than expected.
 * Guard against NPE in case the download action does not contain any
   additional headers.

Change-Id: Icd1ead3d015479fd4b8bbd42ed42129b0abfb95c
Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
2018-06-12 09:49:15 +02:00
Matthias Sohn 0f8f6746ed Merge branch 'stable-5.0'
* stable-5.0:
  Ensure Jsch checks all configured algorithms
  RawTextTest#testBinary: use array comparison to compare arrays
  LFS: Better SSH authentication token timeout handling
  Ensure DirectoryStream is closed promptly
  Validate branch names on branch creation

Change-Id: Ic4f6a24b6ccee6730eee3fd5dcb0d1f3e291c478
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-06-10 12:12:16 +02:00
Markus Duft a9e6da1082 LFS: Better SSH authentication token timeout handling
* Larger eager timeout to compensate for high-latency lines
 * Respect eager timeout in case the server uses "expiresIn"

Change-Id: Id87da1eea874e70b69eaccf35c84af4c3bb50770
Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
2018-06-09 14:42:55 +02:00
Matthias Sohn cb0abf787e Prepare 5.0.0-SNAPSHOT builds
Change-Id: I9acca328146aa7100fbc1b457fcb1f8fd87cf52a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-06-05 15:31:07 +02:00
Matthias Sohn ca57743a45 JGit v5.0.0.201806050710-rc3
Change-Id: Ic7a6a87dd3a21351e60fbf6cd330456adf1f6800
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-06-05 13:10:10 +02:00
Matthias Sohn c473bbf802 Prepare 5.0.0-SNAPSHOT builds
Change-Id: I9c4a0465f8e85041d24da97f4b4c7ad5f5eed3e4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-05-30 23:16:23 +02:00
Matthias Sohn dbf091a7ee JGit v5.0.0.201805301535-rc2
Change-Id: Ifad678794525c01838b03e52bada66e1c089c5ae
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-05-30 21:33:49 +02:00
Matthias Sohn 2f1b4ffcd2 Prepare 5.1.0-SNAPSHOT builds
Change-Id: I8523a993ae1f7b62573d7547273bc1356bf64fa7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-05-23 10:18:18 +02:00
Matthias Sohn 9ad7031381 Prepare 5.0.0-SNAPSHOT builds
Change-Id: Ie343ccf37f46168041046500a2e19acc80814cfe
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-05-23 01:54:32 +02:00
Matthias Sohn 812abefd58 JGit v5.0.0.201805221745-rc1
Change-Id: Ie2c35fab87f294b00f9754b07b60a848bf256b10
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-05-22 23:43:43 +02:00
Han-Wen Nienhuys f3ec7cf3f0 Remove further unnecessary 'final' keywords
Remove it from

 * package private functions.

 * try blocks

 * for loops

this was done with the following python script:

$ cat f.py
import sys
import re
import os

def replaceFinal(m):
  return m.group(1) + "(" +  m.group(2).replace('final ', '') + ")"

methodDecl = re.compile(r"^([\t ]*[a-zA-Z_ ]+)\(([^)]*)\)")

def subst(fn):
  input = open(fn)
  os.rename(fn, fn + "~")

  dest = open(fn, 'w')
  for l in input:
    l = methodDecl.sub(replaceFinal, l)
    dest.write(l)
  dest.close()


for root, dirs, files in os.walk(".", topdown=False):
  for f in files:
    if not f.endswith('.java'):
      continue

    full = os.path.join(root, f)
    print full
    subst(full)

Change-Id: If533a75a417594fc893e7c669d2c1f0f6caeb7ca
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2018-05-18 17:59:45 +02:00
Han-Wen Nienhuys 6d370d837c Remove 'final' in parameter lists
Change-Id: Id924f79c8b2c720297ebc49bf9c5d4ddd6d52547
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2018-05-15 17:05:02 -04:00
Matthias Sohn 9edf9bf2d6 Remove trivial cases of using deprecated RefDatabase.getRefs()
Change-Id: I2d3e426a3391923f8a690ac68fcc33851f3eb419
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-04-25 03:28:51 +02:00
David Pursehouse 045799f2ec Merge branch 'stable-4.11'
* stable-4.11:
  LFS: Fix potential NPE in LfsPrePushHook

Change-Id: If721bd18035870541d216d2dcd9d47484e9af3e5
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2018-04-09 16:40:42 +09:00
Markus Duft 312e61a373 LFS: Fix potential NPE in LfsPrePushHook
The NPE occurred in conjunction with a symbolic ref (origin/HEAD).

Change-Id: I291636818a121ca00e0df25de5b6fc71a48d447f
Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
2018-04-04 17:30:58 -04:00
David Pursehouse 66165fef48 Remove unused API problem filters
Change-Id: I414ebba1db831686fd378dadcb7c4882eb323115
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2018-03-24 19:55:08 -04:00
Matthias Sohn 6f82de449f Merge "Introduce SshSupport to centralize SSH related utility code" 2018-03-12 19:52:43 -04:00
Markus Duft 4ca9bb5ab9 Introduce SshSupport to centralize SSH related utility code
As discussed with Thomas here:
https://git.eclipse.org/r/#/c/83506/31/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java@349

Move the code from ConfigureGerritAfterCloneTask to SshSupport and
eliminate the slightly modified copy of the code from
LfsConnectionFactory. Separate EGit commit will eliminate the code from
ConfigureGerritAfterCloneTask.

Change-Id: Ifb5adb1342e0fc1f2a70cddf693408d4e0ef7906
Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
2018-03-12 07:53:35 +01:00
David Pursehouse f07b60239c Consistently use Constants.CHARSET rather than StandardCharsets.UTF_8
Change-Id: I6714fc3666e1bced22abba94ceb700477349586e
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2018-03-11 22:46:52 +01:00
Matthias Sohn b0e06a733b Remove deprecated Lfs#Lfs(Path)
Use Lfs#Lfs(Repository) instead.

Change-Id: I7303987ed047b42fd1bac8e27ed49333080e556b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-03-10 19:41:32 +01:00
Matthias Sohn d0f1f5eef6 Prepare 5.0.0-SNAPSHOT builds
Change-Id: I2d2f50ed8a12f310e7cac68eed5536bd460c403f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-03-08 23:09:18 +01:00
Matthias Sohn f389e18a28 Prepare 4.11.1-SNAPSHOT builds
Change-Id: Id9aa6b7e8f56de5183b6cd57ef0e790ec9debd4d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-03-08 21:10:08 +01:00
Matthias Sohn f944063517 JGit v4.11.0.201803080745-r
Change-Id: Ie24a33bc8a24c30db06fe7b175f405efb95776ec
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-03-08 13:43:46 +01:00
Markus Duft 0f9ec9e406 LFS: Adjust some API to make integration into tools (EGit,...) easier
Make the install command accessible without requiring reflection.

Expose the isEnabled(Repository) API to be able to check if calling the
install command is required for a repository.

Change-Id: I17e6eaefb6afda17fea8162cbf0cb86a20506753
Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-03-07 22:02:02 +01:00
David Pursehouse 52383c2919 SmudgeFilter: Fix Integer boxing warning
Change-Id: Ic00bcd25b0808a58880a4433d76b3b5a6a4ee5c7
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2018-03-05 10:57:41 +09:00
David Pursehouse 60b43c03e2 Add ConfigConstants.CONFIG_SECTION_LFS
DirCacheCheckout has a warning about non-localised string "lfs". Other
classes use org.eclipse.jgit.lfs.lib.Constants but that is not visible
to DirCacheCheckout.

Add a new constant in ConfigConstants and use that in DirCacheCheckout.

Replace existing uses of org.eclipse.jgit.lfs.lib.Constants.LFS with
the new constant, except where it is referring to the folder name.

Change-Id: I0f21b951babff9a2e579d68c4de0c62ee4bc23d4
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2018-03-05 10:53:28 +09:00
Matthias Sohn 28167853c1 Return this from InstallLfsCommand.setRepository() to allow chaining
Change-Id: I105f1f62f2dcdb20a196361190e9c9fe368e8613
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-03-04 23:41:31 +01:00
David Pursehouse a573dfc658 Enable warning for resources not managed by try-with-resource
Change-Id: Iefe97de6bdb62af558f1b0e77c9205a9186f9b4c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2018-03-03 23:58:47 +01:00
Markus Duft c0103bc59d LFS: Enable LFS support for the CLI, better error handling
Enable LFS support for the CLI by registering the according filters.

Errors during filter creation must be propagated up the call stack, as a
failure to create a filter should be treated as fatal if the filter is
required.

Change-Id: I3833757839bdda97cd01b6c21c1613d199e2692d
Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
2018-03-03 11:44:01 +01:00
Markus Duft a3f8edbf6a Cleanup stream usage WRT filters
As it is right now some streams leak out of the filter construct. This
change clarifies responsibilities and fixes stream leaks

Change-Id: Ib9717d43a701a06a502434d64214d13a392de5ab
Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-03-03 11:40:55 +01:00
Markus Duft d3ed64bcd4 LFS: support merge/rebase/cherry-pick/diff/compare with LFS files
Respect merge=lfs and diff=lfs attributes where required to replace (in
memory) the content of LFS pointers with the actual blob content from
the LFS storage (and vice versa when staging/merging).

Does not implement general support for merge/diff attributes for any
other use case apart from LFS.

Change-Id: Ibad8875de1e0bee8fe3a1dffb1add93111534cae
Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-03-03 11:39:43 +01:00
Markus Duft ea2f7e93c7 LFS: Dramatically improve checkout speed with SSH authentication
SSH Authentication is quite expensive (~120ms on localhost against
Gerrit with LFS plugin). The SSH authentication typically also sends a
validity time of the returned token, which allows to re-use it for a
certain time, avoiding the expensive authentication on every download
request. This improves checkout times by large factors depending on the
LFS object amount/sizes.

Also make sure that all instances of Gson used by LFS are configured in
the same way.

Change-Id: I422c94c37021b4322789b3829fa0185e25d683f2
Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
2018-03-01 13:29:17 +01:00
Markus Duft c0bb992845 LFS: pre-push upload support
If JGit built in LFS support is enabled for the current repository (or
user/system), any existing pre-push hook will cause an exception for the
time beeing, as only a single pre-push hook is supported.

Thus either native pre-push hooks OR JGit built-in LFS support may be
enabled currently, but not both.

Change-Id: Ie7d2b90e26e948d9cca3d05a7a19489488c75895
Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-02-27 18:32:45 +01:00
Han-Wen Nienhuys 35bb7ccc4c Declare LFS dependency on GSON for Bazel build
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Change-Id: Ia017dd5651756c3b80f18b908fb28ba56b6cbf14
2018-02-19 19:06:38 +09:00
Markus Duft 94bcde663c LFS: Add remote download to SmudgeFilter
Transfer data in chunks of 8k Transferring data byte per byte is slow,
running checkout with CleanFilter on a 2.9MB file takes 20 seconds.
Using a buffer of 8k shrinks this time to 70ms.

Also register the filter commands in a way that the native GIT LFS can
be used alongside with JGit.

Implements auto-discovery of LFS server URL when cloning from a Gerrit
LFS server.

Change-Id: I452a5aa177dcb346d92af08b27c2e35200f246fd
Also-by: Christian Halstrick <christian.halstrick@sap.com>
Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
2018-02-16 18:27:25 +01:00
Matthias Sohn 5a4b6fd237 Prepare 4.11.0-SNAPSHOT builds
Change-Id: I5d5e2befcf530d93457d44684bd9e4fc2392e5eb
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-12-31 04:05:07 +01:00
Karsten Thoms 3832527b02 Add header Automatic-Module-Name for Java 9
Bug: 529075
Change-Id: I4532ce2c80eb91531d46026676502d636ccda706
Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-12-23 01:00:01 +01:00
Matthias Sohn 2464fa440f Fix remaining javadoc errors raised by doclint
For now ignore doclint "missing" warnings.

Change-Id: I0e5af7a757f4d92ffeeb113f30576a35414d6781
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-12-21 02:42:14 +01:00
Matthias Sohn e0332bfbc6 Fix javadoc in org.eclipse.jgit.lfs
Change-Id: I97b53c083da6aa31719d9e10369030ee33dd23dc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-12-17 20:59:24 +01:00
David Pursehouse 171f84a041 Use constants from StandardCharsets instead of hard-coded strings
Instead of hard-coding the charset strings "US-ASCII", "UTF-8", and
"ISO-8859-1", use the corresponding constants from StandardCharsets.

UnsupportedEncodingException is not thrown when the StandardCharset
constants are used, so remove the now redundant handling.

Because the encoding names are no longer hard-coded strings, also
remove redundant $NON-NLS warning suppressions.

Also replace existing usages of the constants with static imports.

Change-Id: I0a4510d3d992db5e277f009a41434276f95bda4e
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-12-07 20:02:59 +09:00
David Pursehouse 899696ed08 InvalidLongObjectIdException: Fix formatting of message
The message is formatted as:

  Invalid id: : abcde...

but should be:

  Invalid id: abcde...

Change-Id: Ie15cacdcf2f168edaee262e6cf8061ebfe9d998d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-12-07 20:02:59 +09:00
Matthias Sohn f0c119de4f Merge branch 'stable-4.9'
* stable-4.9:
  Ignore warning for minor version change without API change
  Silence boxing warning
  Prepare 4.5.5-SNAPSHOT builds
  JGit v4.5.4.201711221230-r
  Fix LockFile semantics when running on NFS
  Honor trustFolderStats also when reading packed-refs
  Prepare 4.5.4-SNAPSHOT builds
  JGit v4.5.3.201708160445-r

Change-Id: Icc33d2e36f140e8714fce088379673a8834ae9de
2017-11-24 01:18:13 +01:00
Matthias Sohn 03abd1dff2 Ignore warning for minor version change without API change
- this is a new warning option in Eclipse 4.7 and higher
- we always change version of all bundles in a release to keep release
engineering simple

Change-Id: Ic7523d77b67b2802f1bab3bc70af250d712a034f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-11-24 01:12:14 +01:00
Marc Strapetz 9bb126d12d FileUtils.toPath to convert File to Path
When invoking File.toPath(), an (unchecked) InvalidPathException may be
thrown which should be converted to a checked IOException.

For now, we will replace File.toPath() by FileUtils.toPath() only for
code which can already handle IOExceptions.

Change-Id: I0f0c5fd2a11739e7a02071adae9a5550985d4df6
Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
2017-11-14 10:07:37 +01:00
Matthias Sohn 6b544da293 Prepare 4.10.0-SNAPSHOT builds
Change-Id: I5ca462d1db18a2c5c9382cfb9c83972510fa2b88
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-10-08 11:35:54 +02:00
Matthias Sohn 8180183289 Prepare 4.9.1-SNAPSHOT builds
Change-Id: Ic49fd093d3fe4324c4d83aba74033040fcaa37a6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-10-08 11:25:06 +02:00
Matthias Sohn 6877730fa0 JGit v4.9.0.201710071750-r
Change-Id: I487f6aa3d0c4ef1d57f91cdc36177d994ae24c51
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-10-07 23:46:52 +02:00