]> source.dussan.org Git - jgit.git/log
jgit.git
6 years agoPrepare 4.11.3-SNAPSHOT builds 35/129035/1
Matthias Sohn [Mon, 10 Sep 2018 11:13:19 +0000 (13:13 +0200)]
Prepare 4.11.3-SNAPSHOT builds

Change-Id: I4f5dda6da3f6ecd9b99c1d9a220844c5402f1988
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoJGit v4.11.2.201809100523-r 34/129034/1 v4.11.2.201809100523-r
Matthias Sohn [Mon, 10 Sep 2018 09:24:32 +0000 (11:24 +0200)]
JGit v4.11.2.201809100523-r

Change-Id: I85dab173a94b3036ccf669c20b9dffb4af0922b4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.10' into stable-4.11 87/128987/1
Matthias Sohn [Sun, 9 Sep 2018 13:44:44 +0000 (15:44 +0200)]
Merge branch 'stable-4.10' into stable-4.11

* stable-4.10:
  Prepare 4.9.5-SNAPSHOT builds
  JGit v4.9.4.201809090327-r
  Fix @since tag for LOCK_SUFFIX
  Prepare 4.7.4-SNAPSHOT builds
  JGit v4.7.3.201809090215-r

Change-Id: I8e962758973753fe7baffd959050593a059ee44e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.9' into stable-4.10 86/128986/1
Matthias Sohn [Sun, 9 Sep 2018 13:43:04 +0000 (15:43 +0200)]
Merge branch 'stable-4.9' into stable-4.10

* stable-4.9:
  Prepare 4.9.5-SNAPSHOT builds
  JGit v4.9.4.201809090327-r
  Fix @since tag for LOCK_SUFFIX
  Prepare 4.7.4-SNAPSHOT builds
  JGit v4.7.3.201809090215-r

Change-Id: I78099d2a5ba895273ca3ac587c7aa5f3f43fe869
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoPrepare 4.9.5-SNAPSHOT builds 78/128978/1
Matthias Sohn [Sun, 9 Sep 2018 07:36:35 +0000 (09:36 +0200)]
Prepare 4.9.5-SNAPSHOT builds

Change-Id: Ie8d2b60be1803399027e1a3e9734625278a63861
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoJGit v4.9.4.201809090327-r 77/128977/1 v4.9.4.201809090327-r
Matthias Sohn [Sun, 9 Sep 2018 07:29:05 +0000 (09:29 +0200)]
JGit v4.9.4.201809090327-r

Change-Id: I13488a915fe0ba871c5f37c6e9efc6f436083171
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.8' into stable-4.9 76/128976/1
Matthias Sohn [Sun, 9 Sep 2018 07:23:51 +0000 (09:23 +0200)]
Merge branch 'stable-4.8' into stable-4.9

* stable-4.8:
  Fix @since tag for LOCK_SUFFIX
  Prepare 4.7.4-SNAPSHOT builds
  JGit v4.7.3.201809090215-r

Change-Id: Id3c85149316cbe671e55f41438bd3a3a892b4ed0

6 years agoMerge branch 'stable-4.7' into stable-4.8 75/128975/1
Matthias Sohn [Sun, 9 Sep 2018 06:48:59 +0000 (08:48 +0200)]
Merge branch 'stable-4.7' into stable-4.8

* stable-4.7:
  Prepare 4.7.4-SNAPSHOT builds
  JGit v4.7.3.201809090215-r

Change-Id: I980807ad4701f9e510354b505c9556e123f32471
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix @since tag for LOCK_SUFFIX 74/128974/1
Matthias Sohn [Sun, 9 Sep 2018 06:46:11 +0000 (08:46 +0200)]
Fix @since tag for LOCK_SUFFIX

Change-Id: Ia65cf3f12ec6d35a21b4d9332be912f06d8bf834
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoPrepare 4.7.4-SNAPSHOT builds 72/128972/1
Matthias Sohn [Sun, 9 Sep 2018 06:24:16 +0000 (08:24 +0200)]
Prepare 4.7.4-SNAPSHOT builds

Change-Id: Ie4d17e1604270946606e75145012c5b7fa1283eb
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoJGit v4.7.3.201809090215-r 71/128971/1 v4.7.3.201809090215-r
Matthias Sohn [Sun, 9 Sep 2018 06:15:48 +0000 (08:15 +0200)]
JGit v4.7.3.201809090215-r

Change-Id: I1ded7a2b61235509c5a6ba95e7329e288bbfddb1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.10' into stable-4.11 49/128949/1
Matthias Sohn [Sat, 8 Sep 2018 08:05:36 +0000 (10:05 +0200)]
Merge branch 'stable-4.10' into stable-4.11

* stable-4.10:
  Fix atomic lock file creation on NFS
  Use constant for ".lock"
  Fix handling of option core.supportsAtomicCreateNewFile
  GC: Avoid logging errors when deleting non-empty folders

Change-Id: Ie86079d9ad76972306bc80e63d8bfe18ae06a0da
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.9' into stable-4.10 48/128948/1
Matthias Sohn [Sat, 8 Sep 2018 07:18:19 +0000 (09:18 +0200)]
Merge branch 'stable-4.9' into stable-4.10

* stable-4.9:
  Fix atomic lock file creation on NFS
  Use constant for ".lock"
  Fix handling of option core.supportsAtomicCreateNewFile
  GC: Avoid logging errors when deleting non-empty folders

Change-Id: I32dc651870b7ba7c88de448c7984134b7c99e7e3
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.8' into stable-4.9 47/128947/1
Matthias Sohn [Sat, 8 Sep 2018 07:02:08 +0000 (09:02 +0200)]
Merge branch 'stable-4.8' into stable-4.9

* stable-4.8:
  Fix atomic lock file creation on NFS
  Use constant for ".lock"
  Fix handling of option core.supportsAtomicCreateNewFile
  GC: Avoid logging errors when deleting non-empty folders

Change-Id: Id7f68f4e8fb07a21737e3b7090f600507a13bbbe
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.7' into stable-4.8 46/128946/2
Matthias Sohn [Sat, 8 Sep 2018 05:19:13 +0000 (07:19 +0200)]
Merge branch 'stable-4.7' into stable-4.8

* stable-4.7:
  Fix atomic lock file creation on NFS
  Use constant for ".lock"
  Fix handling of option core.supportsAtomicCreateNewFile
  GC: Avoid logging errors when deleting non-empty folders

Change-Id: Ia7a18f69eee173aec9e462c16eee2b0ca4565e76
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix atomic lock file creation on NFS 91/128091/8
Matthias Sohn [Sun, 26 Aug 2018 17:44:29 +0000 (19:44 +0200)]
Fix atomic lock file creation on NFS

FS_POSIX.createNewFile(File) failed to properly implement atomic file
creation on NFS using the algorithm [1]:
- name of the hard link must be unique to prevent that two processes
  using different NFS clients try to create the same link. This would
  render nlink useless to detect if there was a race.
- the hard link must be retained for the lifetime of the file since we
  don't know when the state of the involved NFS clients will be
  synchronized. This depends on NFS configuration options.

To fix these issues we need to change the signature of createNewFile
which would break API. Hence deprecate the old method
FS.createNewFile(File) and add a new method createNewFileAtomic(File).

The new method returns a LockToken which needs to be retained by the
caller (LockFile) until all involved NFS clients synchronized their
state. Since we don't know when the NFS caches are synchronized we need
to retain the token until the corresponding file is no longer needed.
The LockToken must be closed after the LockFile using it has been
committed or unlocked. On Posix, if core.supportsAtomicCreateNewFile =
false this will delete the hard link which guarded the atomic creation
of the file. When acquiring the lock fails ensure that the hard link is
removed.

[1] https://www.time-travellers.org/shane/papers/NFS_considered_harmful.html
also see file creation flag O_EXCL in
http://man7.org/linux/man-pages/man2/open.2.html

Change-Id: I84fcb16143a5f877e9b08c6ee0ff8fa4ea68a90d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoUse constant for ".lock" 89/128889/2
Matthias Sohn [Fri, 8 Jun 2018 15:22:54 +0000 (17:22 +0200)]
Use constant for ".lock"

(cherry picked from commit 5f27032fb85694a093f827581216d4ffb99db68b)

Change-Id: I6bc0e9a910b110418a82d8e574fb2aecc3a31d6a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix handling of option core.supportsAtomicCreateNewFile 76/128876/1
Christian Halstrick [Fri, 17 Aug 2018 15:46:09 +0000 (17:46 +0200)]
Fix handling of option core.supportsAtomicCreateNewFile

When core.supportsAtomicCreateNewFile was set to false and the
repository was located on a filesystem which doesn't support the file
attribute "unix:nlink" then FS_POSIX#createNewFile may report an error
even if everything was ok. Modify FS_POSIX#createNewFile to silently
ignore this situation. An example of such a filesystem is sshfs where
reading "unix:nlink" always returns 1 (instead of throwing a exception).

Bug: 537969
Change-Id: I6deda7672fa7945efa8706ea1cd652272604ff19
Also-by: Thomas Wolf <thomas.wolf@paranor.ch>
6 years agoGC: Avoid logging errors when deleting non-empty folders 54/128654/2
Hector Caballero [Tue, 4 Sep 2018 15:15:44 +0000 (11:15 -0400)]
GC: Avoid logging errors when deleting non-empty folders

I88304d34c and Ia555bce00 modified the way errors are handled when
trying to delete non-empty reference folders. Before, this error was
silently ignored as it was considered an expected output. Now, every
failed folder delete is logged which can be noisy.

Ignore the DirectoryNotEmptyException but log any other error avoiding
deletion of an eligible folder.

Signed-off-by: Hector Oswaldo Caballero <hector.caballero@ericsson.com>
Change-Id: I194512f67885231d62c03976ae683e5cc450ec7c

6 years agoMerge branch 'stable-4.10' into stable-4.11 04/128404/1
David Pursehouse [Fri, 31 Aug 2018 06:21:10 +0000 (15:21 +0900)]
Merge branch 'stable-4.10' into stable-4.11

* stable-4.10:
  Bazel: Use hyphen instead of underscore in external repository names
  Bazel: Format all build files with buildifier 0.15.0
  ChangeIdUtilTest: Remove unused notestCommitDashV

Change-Id: I500dd4e63302abb19ad669988b3a427cef8ef3d4
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.9' into stable-4.10 03/128403/1
David Pursehouse [Fri, 31 Aug 2018 04:57:40 +0000 (13:57 +0900)]
Merge branch 'stable-4.9' into stable-4.10

* stable-4.9:
  Bazel: Use hyphen instead of underscore in external repository names
  Bazel: Format all build files with buildifier 0.15.0
  ChangeIdUtilTest: Remove unused notestCommitDashV

Change-Id: I37e936de0c06d4b9f17724ac4f1feb83f6c15ae3
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.8' into stable-4.9 02/128402/1
David Pursehouse [Fri, 31 Aug 2018 04:08:29 +0000 (13:08 +0900)]
Merge branch 'stable-4.8' into stable-4.9

* stable-4.8:
  Bazel: Use hyphen instead of underscore in external repository names
  Bazel: Format all build files with buildifier 0.15.0
  ChangeIdUtilTest: Remove unused notestCommitDashV

Change-Id: I17436237cd66ca1c2800ad5ab0142f4a2bc07328
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.7' into stable-4.8 01/128401/1
David Pursehouse [Fri, 31 Aug 2018 00:24:57 +0000 (09:24 +0900)]
Merge branch 'stable-4.7' into stable-4.8

* stable-4.7:
  Bazel: Use hyphen instead of underscore in external repository names
  Bazel: Format all build files with buildifier 0.15.0
  ChangeIdUtilTest: Remove unused notestCommitDashV

Change-Id: I414ade902dc38b696c566dd604000e3d289f3973
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoBazel: Use hyphen instead of underscore in external repository names 54/128354/1
David Pursehouse [Wed, 29 Aug 2018 23:48:41 +0000 (08:48 +0900)]
Bazel: Use hyphen instead of underscore in external repository names

Recent Bazel versions support the hyphen character in external
repository names. On the Gerrit project, the repository names
were harmonized to consistently use hyphen.

As a side effect, it is no longer possible to build jgit from source
in the gerrit tree, due to the different repository names.

Rename the dependencies to use hyphens, consistent with gerrit.

Change-Id: Ideebd858ddd3f0e6f765643001642dfb6c12441f
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoBazel: Format all build files with buildifier 0.15.0 53/128353/1
David Pursehouse [Thu, 30 Aug 2018 06:27:20 +0000 (15:27 +0900)]
Bazel: Format all build files with buildifier 0.15.0

Change-Id: I8343b723da6e40d5ae7fc45c84f64c31276bd5dc
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoChangeIdUtilTest: Remove unused notestCommitDashV 51/128351/1
David Pursehouse [Sat, 30 Sep 2017 09:56:42 +0000 (10:56 +0100)]
ChangeIdUtilTest: Remove unused notestCommitDashV

This test was never being run. Since it was introduced it was
named "notest.." which meant it didn't run with JUnit3, and
since it is not annotated @Test it also doesn't run with JUnit4.

When compiling with Bazel 0.6.0, error-prone raises an error
that the public method is not annotated with @Ignore or @Test.

Given that the test has never been run anyway, we can just
remove it.

Bug: 525415
Change-Id: Ie9a54f89fe42e0c201f547ff54ff1d419ce37864
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoSilence API warning for new ObjectIdSerializer introduced in 4.11.1 46/128046/2
Matthias Sohn [Fri, 24 Aug 2018 16:33:50 +0000 (18:33 +0200)]
Silence API warning for new ObjectIdSerializer introduced in 4.11.1

Change-Id: Ic271dae300f7554b7e13bb1f44006e5b38c00011
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.10' into stable-4.11 47/127947/4
Matthias Sohn [Fri, 24 Aug 2018 16:25:28 +0000 (18:25 +0200)]
Merge branch 'stable-4.10' into stable-4.11

* stable-4.10:
  Ignore API warnings
  Fix photon target platform to use photon version of org.eclipse.osgi
  Update Photon orbit repository to R20180606145124
  Suppress warning for trying to delete non-empty directory
  Fix fetching with duplicate ref updates
  Fetch(Process): should tolerate duplicate refspecs
  FetchCommandTest: test add/update/delete fetch

Change-Id: I47671108574fcd10fe016a58e38c038af54a6748
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.9' into stable-4.10 30/127930/3
Matthias Sohn [Fri, 24 Aug 2018 15:39:07 +0000 (17:39 +0200)]
Merge branch 'stable-4.9' into stable-4.10

* stable-4.9:
  Ignore API warnings
  Fix photon target platform to use photon version of org.eclipse.osgi
  Update Photon orbit repository to R20180606145124
  Suppress warning for trying to delete non-empty directory
  Fix fetching with duplicate ref updates
  Fetch(Process): should tolerate duplicate refspecs
  FetchCommandTest: test add/update/delete fetch

Change-Id: I2a83c059b7014c2a9e6267c963422c7785b23f17
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoIgnore API warnings 40/128040/1
Matthias Sohn [Fri, 24 Aug 2018 15:23:00 +0000 (17:23 +0200)]
Ignore API warnings

The following commits introduced in stable-4.5 and stable-4.9
introduced some minor API additions in service releases.

f7ceeaa2 FileRepository: Add pack-based inserter implementation
085d1f95 Make PackInserter public
10e65cb4 Fix LockFile semantics when running on NFS

Change-Id: I4afed7e0395cf93d828e671080e3ec9ddf20987d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix photon target platform to use photon version of org.eclipse.osgi 35/128035/1
Matthias Sohn [Thu, 23 Aug 2018 10:59:15 +0000 (12:59 +0200)]
Fix photon target platform to use photon version of org.eclipse.osgi

Change-Id: I81cb499a5092eed6569f6fdf612ecab3f5d9bd5e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoUpdate Photon orbit repository to R20180606145124 15/127915/1
Matthias Sohn [Thu, 23 Aug 2018 09:29:15 +0000 (11:29 +0200)]
Update Photon orbit repository to R20180606145124

The S-repository doesn't exist anymore and we should have updated to the
final Photon orbit repository already.

Change-Id: I6d1757833be4abd3643677d6e7814363533e88b2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoSuppress warning for trying to delete non-empty directory 71/127671/4
Thomas Wolf [Sun, 19 Aug 2018 18:48:06 +0000 (20:48 +0200)]
Suppress warning for trying to delete non-empty directory

This is actually a fairly common occurrence; deleting the parent
directories can work only if the file deleted was the last one
in the directory.

Bug: 537872
Change-Id: I86d1d45e1e2631332025ff24af8dfd46c9725711
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
6 years agoFix fetching with duplicate ref updates 70/127670/3
Thomas Wolf [Sun, 19 Aug 2018 18:43:50 +0000 (20:43 +0200)]
Fix fetching with duplicate ref updates

If packed refs are used, duplicate updates result in an exception
because JGit tries to lock the same lock file twice. With non-atomic
ref updates, this used to work, since the same ref would simply be
locked and updated twice in succession.

Let's be more lenient in this case and remove duplicates before
trying to do the ref updates. Silently skip duplicate updates
for the same ref, if they both would update the ref to the same
object ID. (If they don't, behavior is undefined anyway, and we
still throw an exception.)

Add a test that results in a duplicate ref update for a tag.

Bug: 529400
Change-Id: Ide97f20b219646ac24c22e28de0c194a29cb62a5
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
6 years agoFetch(Process): should tolerate duplicate refspecs 69/127669/3
Marc Strapetz [Sat, 30 Dec 2017 10:33:41 +0000 (11:33 +0100)]
Fetch(Process): should tolerate duplicate refspecs

Bug: 529314
Change-Id: I91eaeda8a988d4786908fba6de00478cfc47a2a2
Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
6 years agoFetchCommandTest: test add/update/delete fetch 68/127668/3
Marc Strapetz [Sat, 30 Dec 2017 10:12:14 +0000 (11:12 +0100)]
FetchCommandTest: test add/update/delete fetch

Change-Id: I2442394fb7eae5b3715779555477dd27b274ee83
Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
6 years agoMerge branch 'stable-4.10' into stable-4.11 32/127632/2
Matthias Sohn [Sat, 18 Aug 2018 11:51:45 +0000 (13:51 +0200)]
Merge branch 'stable-4.10' into stable-4.11

* stable-4.10:
  Fix GC run in foreground to not use executor

Change-Id: I565b95de6c89f021475667caaacdbb08caddd881
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.9' into stable-4.10 31/127631/2
Matthias Sohn [Sat, 18 Aug 2018 11:51:00 +0000 (13:51 +0200)]
Merge branch 'stable-4.9' into stable-4.10

* stable-4.9:
  Fix GC run in foreground to not use executor

Change-Id: Ib4d76125fca7eec9e88666688b5e614e7e20dde7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.8' into stable-4.9 30/127630/2
Matthias Sohn [Sat, 18 Aug 2018 11:47:51 +0000 (13:47 +0200)]
Merge branch 'stable-4.8' into stable-4.9

* stable-4.8:
  Fix GC run in foreground to not use executor

Change-Id: Id9d864a8e727fefa35ca87eccb4e3801eb689c3c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.7' into stable-4.8 26/127626/2
Matthias Sohn [Sat, 18 Aug 2018 11:40:33 +0000 (13:40 +0200)]
Merge branch 'stable-4.7' into stable-4.8

* stable-4.7:
  Fix GC run in foreground to not use executor

Change-Id: Ib150d132e2ce055d36ddffb2dbc37b5cb355e77a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix GC run in foreground to not use executor 47/127447/3
Hugo Arès [Wed, 15 Aug 2018 13:54:29 +0000 (09:54 -0400)]
Fix GC run in foreground to not use executor

Since I3870cadb4, GC task was always delegated to an executor even when
background option was set to false. This was an issue because if more
than one GC object was instantiated and executed in parallel, only one GC
was actually running because of the single thread executor.

Change-Id: I8c587d22d63c1601b7d75914692644a385cd86d6
Signed-off-by: Hugo Arès <hugo.ares@ericsson.com>
6 years agoPrepare 4.11.2-SNAPSHOT builds 56/126856/1
Matthias Sohn [Tue, 31 Jul 2018 20:07:17 +0000 (22:07 +0200)]
Prepare 4.11.2-SNAPSHOT builds

Change-Id: I02630900ab131478b30abe68b2133d2c8a5a67ab
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoJGit v4.11.1.201807311124-r 52/126852/1 v4.11.1.201807311124-r
Matthias Sohn [Tue, 31 Jul 2018 15:31:30 +0000 (17:31 +0200)]
JGit v4.11.1.201807311124-r

Change-Id: Ic58a916d7e2c380b84690afa5e3517c6c178af8c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.10' into stable-4.11 51/126851/1
Matthias Sohn [Tue, 31 Jul 2018 15:21:10 +0000 (17:21 +0200)]
Merge branch 'stable-4.10' into stable-4.11

* stable-4.10:
  Prepare 4.9.4-SNAPSHOT builds
  JGit v4.9.3.201807311005-r

Change-Id: I5f73f240951733e8d81d634aa5340a0861936a0c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.9' into stable-4.10 40/126840/1
Matthias Sohn [Tue, 31 Jul 2018 15:11:29 +0000 (17:11 +0200)]
Merge branch 'stable-4.9' into stable-4.10

* stable-4.9:
  Prepare 4.9.4-SNAPSHOT builds
  JGit v4.9.3.201807311005-r

Change-Id: Ifd4b815b0f66d44afeafa9ae77a2a714942d675d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoPrepare 4.9.4-SNAPSHOT builds 38/126838/1
Matthias Sohn [Tue, 31 Jul 2018 14:57:13 +0000 (16:57 +0200)]
Prepare 4.9.4-SNAPSHOT builds

Change-Id: Ibb2ee9d00d5d049f681e1abbb449656105e553a7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoJGit v4.9.3.201807311005-r 36/126836/1 v4.9.3.201807311005-r
Matthias Sohn [Tue, 31 Jul 2018 14:05:49 +0000 (16:05 +0200)]
JGit v4.9.3.201807311005-r

Change-Id: I3f4f437649736c6a27e78d536344c7b31c8a0f65
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.10' into stable-4.11 99/126699/1
Matthias Sohn [Fri, 27 Jul 2018 11:38:21 +0000 (13:38 +0200)]
Merge branch 'stable-4.10' into stable-4.11

* stable-4.10:
  Prepare 4.7.3-SNAPSHOT builds
  JGit v4.7.2.201807261330-r
  Delete all loose refs empty directories
  Use java.nio to delete path to get detailed errors
  GC: Remove empty references folders
  Do not ignore path deletion errors

Change-Id: I2b44d862869d4453c57db668fc7c925da591f671
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.9' into stable-4.10 93/126693/1
Matthias Sohn [Fri, 27 Jul 2018 09:03:11 +0000 (11:03 +0200)]
Merge branch 'stable-4.9' into stable-4.10

* stable-4.9:
  Prepare 4.7.3-SNAPSHOT builds
  JGit v4.7.2.201807261330-r
  Delete all loose refs empty directories
  Use java.nio to delete path to get detailed errors
  GC: Remove empty references folders
  Do not ignore path deletion errors

Change-Id: Ie7029bc91621af32e7bfd2e0d76a424b991b1995
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.8' into stable-4.9 92/126692/1
Matthias Sohn [Fri, 27 Jul 2018 08:51:58 +0000 (10:51 +0200)]
Merge branch 'stable-4.8' into stable-4.9

* stable-4.8:
  Prepare 4.7.3-SNAPSHOT builds
  JGit v4.7.2.201807261330-r
  Delete all loose refs empty directories
  Use java.nio to delete path to get detailed errors
  GC: Remove empty references folders
  Do not ignore path deletion errors

Change-Id: I6ab2b951dd94a9fc1c4f5283847a3e2ec37d0895
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.7' into stable-4.8 34/126634/2
David Pursehouse [Fri, 27 Jul 2018 07:22:51 +0000 (08:22 +0100)]
Merge branch 'stable-4.7' into stable-4.8

* stable-4.7:
  Prepare 4.7.3-SNAPSHOT builds
  JGit v4.7.2.201807261330-r
  Delete all loose refs empty directories
  Use java.nio to delete path to get detailed errors
  GC: Remove empty references folders
  Do not ignore path deletion errors

Change-Id: Iadc8275fbaa3d6f7d08a96ab66d49f392f6aab78
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoPrepare 4.7.3-SNAPSHOT builds 85/126685/1
Matthias Sohn [Thu, 26 Jul 2018 23:00:35 +0000 (01:00 +0200)]
Prepare 4.7.3-SNAPSHOT builds

Change-Id: I5c437f45d5bc469e3c32bef1180c127d96d24d23
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoJGit v4.7.2.201807261330-r 75/126675/1 v4.7.2.201807261330-r
Matthias Sohn [Thu, 26 Jul 2018 17:28:38 +0000 (19:28 +0200)]
JGit v4.7.2.201807261330-r

Change-Id: I0d8c7ca756e6236e315c91da000fe8103ce83d05
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoDelete all loose refs empty directories 55/125755/4
Luca Milanesio [Sat, 7 Jul 2018 22:35:20 +0000 (23:35 +0100)]
Delete all loose refs empty directories

Remove completely the empty directories under refs/<namespace>
including the first level partition of the changes, when they are
completely empty.

Bug: 536777
Change-Id: I88304d34cc42435919c2d1480258684d993dfdca
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoUse java.nio to delete path to get detailed errors 54/125754/4
Luca Milanesio [Sat, 7 Jul 2018 22:09:36 +0000 (23:09 +0100)]
Use java.nio to delete path to get detailed errors

Get the full IOException of the reason why a directory
cannot be removed during GC.

Change-Id: Ia555bce009fa48087a73d677f1ce3b9c0b685b57
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoGC: Remove empty references folders 47/125747/4
Hector Caballero [Mon, 5 Feb 2018 13:58:46 +0000 (08:58 -0500)]
GC: Remove empty references folders

After packaging references, the folders containing these references are
not deleted. In a busy repository, this causes operations to slow down
as traversing the references tree becomes longer.

Delete empty reference folders after the loose references have been
packed.
To avoid deleting a folder that was just created by another concurrent
operation, only delete folders that were not modified in the last 30
seconds.

Signed-off-by: Hector Oswaldo Caballero <hector.caballero@ericsson.com>
Change-Id: Ie79447d6121271cf5e25171be377ea396c7028e0
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoDo not ignore path deletion errors 67/125767/1
Luca Milanesio [Sun, 8 Jul 2018 22:41:00 +0000 (23:41 +0100)]
Do not ignore path deletion errors

Log as warning when an attempt to remove a directory
fails. This helps troubleshooting some bugs like the GC leaving
behind empty directories.

Change-Id: Idb94ce17f8be9668a970c7ecae31436bf434073c
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
6 years agoMerge branch 'stable-4.10' into stable-4.11 85/125485/1
David Pursehouse [Wed, 4 Jul 2018 05:11:06 +0000 (14:11 +0900)]
Merge branch 'stable-4.10' into stable-4.11

* stable-4.10:
  ResolveMerger: Fix encoding with string; use bytes

Change-Id: I2f02298d0ff7caafeca4020cde4fdfa29a46e585
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.9' into stable-4.10 84/125484/1
David Pursehouse [Wed, 4 Jul 2018 05:10:24 +0000 (14:10 +0900)]
Merge branch 'stable-4.9' into stable-4.10

* stable-4.9:
  ResolveMerger: Fix encoding with string; use bytes

Change-Id: Ibd8f2a041b0de6e008a1ea84b92823f8cbc6e3d2
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.8' into stable-4.9 83/125483/1
David Pursehouse [Wed, 4 Jul 2018 05:09:48 +0000 (14:09 +0900)]
Merge branch 'stable-4.8' into stable-4.9

* stable-4.8:
  ResolveMerger: Fix encoding with string; use bytes

Change-Id: Id6a85804695d5dcb32f26ed1d861b7c93577c5e4
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.7' into stable-4.8 82/125482/1
David Pursehouse [Wed, 4 Jul 2018 05:08:56 +0000 (14:08 +0900)]
Merge branch 'stable-4.7' into stable-4.8

* stable-4.7:
  ResolveMerger: Fix encoding with string; use bytes

Change-Id: If17328fbd101d596a8a16d9c4a190e9b6e120902
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.10' into stable-4.11 68/124868/1
David Pursehouse [Fri, 22 Jun 2018 02:14:09 +0000 (11:14 +0900)]
Merge branch 'stable-4.10' into stable-4.11

* stable-4.10:
  Temporarily @Ignore flaky CommitCommandTest methods

Change-Id: I9902553ac442821416912d26a5d6ee1b0dc41cf4
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoResolveMerger: Fix encoding with string; use bytes 60/124860/1
Marco Miller [Thu, 21 Jun 2018 18:18:48 +0000 (14:18 -0400)]
ResolveMerger: Fix encoding with string; use bytes

This change fixes the issue [1]. Before this fix, a merge involving
the caching of consecutive yet similar filenames with Norwegian
characters [2] used to throw an IllegalStateException: Duplicate
stages not allowed. This was caused by inaccurate decoding of the
filenames, using string values assuming default encoding. In the
toString method of DirCacheEntry, used before through getPathString,
UTF-8 encoding is used, but the end result becomes default encoding,
through Object's default toString usage. The special characters in
those two consecutive (particular) filenames [2] were becoming the
very same decoded /single character, lending consecutive -but then
identical- filenames. Thus the perceived duplicate 0-staging of the
file(s).

Replace getPathString usage with getRawPath for this specific case,
or use byte array representations of cached entries instead of string.

Adding a test for this change is not possible, as there is no known
way to change the default encoding for filenames such as [2] (e.g.).
JGitTestUtil does write file contents through UTF-8, but encoding like
so does not apply to the actual file name. Hence there is no way to
create files with names properly made of special characters such as
[2]'s. And the test that is necessary for this case assumes such
Norwegian (or similar characters) filenames. Changing the default
locale programmatically in a test has no effect either. And changing
the LANG value passed to the JVM is only possible upon starting it.

[1] https://bugs.chromium.org/p/gerrit/issues/detail?id=9153

[2] <=>
(...)
"a/b/SíÒr-Norge.map",
"a/b/Sør-Norge.map",
(...)

Change-Id: Ib9f2f5297932337c9817064cc09d9f774dd168f4
Signed-off-by: Marco Miller <marco.miller@ericsson.com>
6 years agoMerge branch 'stable-4.9' into stable-4.10 07/124807/1
David Pursehouse [Thu, 21 Jun 2018 07:17:38 +0000 (16:17 +0900)]
Merge branch 'stable-4.9' into stable-4.10

* stable-4.9:
  Temporarily @Ignore flaky CommitCommandTest methods

Change-Id: I5f256aa6117847a25ab9e15c7d7ccc51e43cbb64
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.8' into stable-4.9 59/124759/1
David Pursehouse [Wed, 20 Jun 2018 07:08:32 +0000 (16:08 +0900)]
Merge branch 'stable-4.8' into stable-4.9

* stable-4.8:
  Temporarily @Ignore flaky CommitCommandTest methods

Change-Id: I318813d19445ab7c44384015d36830ed02b8b590
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.7' into stable-4.8 58/124758/1
David Pursehouse [Wed, 20 Jun 2018 07:07:48 +0000 (16:07 +0900)]
Merge branch 'stable-4.7' into stable-4.8

* stable-4.7:
  Temporarily @Ignore flaky CommitCommandTest methods

Change-Id: I016c9b3ec0081542bb903f361d9a3af1ea746ae3
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.6' into stable-4.7 57/124757/1
David Pursehouse [Wed, 20 Jun 2018 07:06:44 +0000 (16:06 +0900)]
Merge branch 'stable-4.6' into stable-4.7

* stable-4.6:
  Temporarily @Ignore flaky CommitCommandTest methods

Change-Id: Idc653c22a9af2013a4c481bb19ca8d059f5c34d0
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.5' into stable-4.6 38/124738/1
David Pursehouse [Tue, 19 Jun 2018 12:41:05 +0000 (21:41 +0900)]
Merge branch 'stable-4.5' into stable-4.6

* stable-4.5:
  Temporarily @Ignore flaky CommitCommandTest methods

Change-Id: I2a0e0b63a06f442f5a088d4bc8bb08eaf02ce952
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoTemporarily @Ignore flaky CommitCommandTest methods 32/124732/1
Dave Borowitz [Fri, 7 Jul 2017 18:43:57 +0000 (14:43 -0400)]
Temporarily @Ignore flaky CommitCommandTest methods

Change-Id: Ia2c42d014323bd29b85bf76f1a20c83f612406d7
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
(cherry picked from commit e93b0026ced10c956e76daed038f2560a33b5baf)

6 years agoMerge branch 'stable-4.10' into stable-4.11 21/124321/1
Matthias Sohn [Mon, 11 Jun 2018 09:03:42 +0000 (11:03 +0200)]
Merge branch 'stable-4.10' into stable-4.11

* stable-4.10:
  Ensure DirectoryStream is closed promptly

Change-Id: I2c0d5ea96b2c96336908674032d0f7d39dc062b9
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.9' into stable-4.10 20/124320/1
Matthias Sohn [Mon, 11 Jun 2018 08:54:50 +0000 (10:54 +0200)]
Merge branch 'stable-4.9' into stable-4.10

* stable-4.9:
  Ensure DirectoryStream is closed promptly

Change-Id: I62674a1db9266c04fb353ab697e2c0a24a7369b7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoEnsure DirectoryStream is closed promptly 85/124285/1
Dave Borowitz [Fri, 5 Jan 2018 18:02:47 +0000 (13:02 -0500)]
Ensure DirectoryStream is closed promptly

From the javadoc for Files.list:

"The returned stream encapsulates a DirectoryStream. If timely disposal
of file system resources is required, the try-with-resources construct
should be used to ensure that the stream's close method is invoked
after the stream operations are completed."

This is the only call to Files#newDirectoryStream that is not already in
a try-with-resources.

Change-Id: I91e6c56b5d74e8435457ad6ed9e6b4b24d2aa14e
(cherry picked from commit 1c16ea4601920c9dbc7a0202efc20137e1a63d55)

6 years agoMerge "Merge branch 'stable-4.10' into stable-4.11" into stable-4.11
Matthias Sohn [Thu, 10 May 2018 13:24:45 +0000 (09:24 -0400)]
Merge "Merge branch 'stable-4.10' into stable-4.11" into stable-4.11

6 years agoMerge branch 'stable-4.10' into stable-4.11 11/122411/1
Matthias Sohn [Thu, 10 May 2018 10:55:30 +0000 (12:55 +0200)]
Merge branch 'stable-4.10' into stable-4.11

* stable-4.10:
  Retry stale file handles on .git/config file

Change-Id: Ice5c8ae8c2992243a81da77e166406bc1930fe0e

6 years agoMerge branch 'stable-4.9' into stable-4.10 01/122401/1
Matthias Sohn [Thu, 10 May 2018 10:51:57 +0000 (12:51 +0200)]
Merge branch 'stable-4.9' into stable-4.10

* stable-4.9:
  Retry stale file handles on .git/config file

Change-Id: I6db7256dbd1c71b23e1231809642ca21e996e066
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.8' into stable-4.9 00/122400/1
Matthias Sohn [Thu, 10 May 2018 10:30:05 +0000 (12:30 +0200)]
Merge branch 'stable-4.8' into stable-4.9

* stable-4.8:
  Retry stale file handles on .git/config file

Change-Id: Ib029b5536c038190626e7a7ff43b70f0a5673721

6 years agoMerge branch 'stable-4.7' into stable-4.8 99/122399/1
Matthias Sohn [Thu, 10 May 2018 10:08:46 +0000 (12:08 +0200)]
Merge branch 'stable-4.7' into stable-4.8

* stable-4.7:
  Retry stale file handles on .git/config file

Change-Id: Ib665c094b28eefb8236752bb273de0c2d9bf9578

6 years agoMerge branch 'stable-4.6' into stable-4.7 98/122398/1
Matthias Sohn [Thu, 10 May 2018 09:59:56 +0000 (11:59 +0200)]
Merge branch 'stable-4.6' into stable-4.7

* stable-4.6:
  Retry stale file handles on .git/config file

Change-Id: If5a21d38224528edfc551b3216daca6a2582e3ac

6 years agoMerge branch 'stable-4.5' into stable-4.6 95/122395/1
Matthias Sohn [Thu, 10 May 2018 09:39:52 +0000 (11:39 +0200)]
Merge branch 'stable-4.5' into stable-4.6

* stable-4.5:
  Retry stale file handles on .git/config file

Change-Id: Ib6e6ec0846c3ef261ec1016bfa6d26d2eadc3f26

6 years agoRetry stale file handles on .git/config file 73/120973/4
Nasser Grainawi [Fri, 6 Apr 2018 20:05:37 +0000 (14:05 -0600)]
Retry stale file handles on .git/config file

On a local non-NFS filesystem the .git/config file will be orphaned if
it is replaced by a new process while the current process is reading the
old file. The current process successfully continues to read the
orphaned file until it closes the file handle.

Since NFS servers do not keep track of open files, instead of orphaning
the old .git/config file, such a replacement on an NFS filesystem will
instead cause the old file to be garbage collected (deleted).  A stale
file handle exception will be raised on NFS clients if the file is
garbage collected (deleted) on the server while it is being read.  Since
we no longer have access to the old file in these cases, the previous
code would just fail. However, in these cases, reopening the file and
rereading it will succeed (since it will open the new replacement file).
Since retrying the read is a viable strategy to deal with stale file
handles on the .git/config file, implement such a strategy.

Since it is possible that the .git/config file could be replaced again
while rereading it, loop on stale file handle exceptions, up to 5 extra
times, trying to read the .git/config file again, until we either read
the new file, or find that the file no longer exists. The limit of 5 is
arbitrary, and provides a safe upper bounds to prevent infinite loops
consuming resources in a potential unforeseen persistent error
condition.

Change-Id: I6901157b9dfdbd3013360ebe3eb40af147a8c626
Signed-off-by: Nasser Grainawi <nasser@codeaurora.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoLFS: Fix potential NPE in LfsPrePushHook 54/119754/2
Markus Duft [Tue, 20 Mar 2018 07:40:14 +0000 (08:40 +0100)]
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>
6 years agoRemove package import for javax.servlet.http from org.eclipse.jgit 20/120220/1
Matthias Sohn [Mon, 26 Mar 2018 22:33:00 +0000 (00:33 +0200)]
Remove package import for javax.servlet.http from org.eclipse.jgit

This package import is unused.

Change-Id: I9f202bb3162736a1ef8054516f1a3145d3a7bb9b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoAdd missing @since tag and silence API error 19/120219/1
Matthias Sohn [Mon, 26 Mar 2018 22:35:40 +0000 (00:35 +0200)]
Add missing @since tag and silence API error

These methods were introduced for 4.11.1 so we have to silence the API
error adding API in a service release raises.

Change-Id: Ic847cebbed439912d3979ec2ec1809f77a28f61e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoObjectIdSerializer: Support serialization of known non-null ObjectId 56/119456/3
David Pursehouse [Wed, 14 Mar 2018 23:25:43 +0000 (08:25 +0900)]
ObjectIdSerializer: Support serialization of known non-null ObjectId

The implementation of ObjectIdSerializer, added in change I7599cf8bd,
is not equivalent to the original implementation in Gerrit [1].

The Gerrit implementation provides separate methods to (de)serialize
instances of ObjectId that are known to be non-null. In these methods,
no "marker" is written to the stream. Replacing Gerrit's implementation
with ObjectIdSerializer [2] broke persistent caches because it started
writing markers where they were not expected [3].

Since ObjectIdSerializer is included in JGit 4.11 we can't change the
existing #write and #read methods. Keep those as-is, but extend the
Javadoc to clarify that they support possibly null ObjectId instances.

Add new methods #writeWithoutMarker and #readWithoutMarker to support
the cases where the ObjectId is known to be non-null and the marker
should not be written to the serialization stream.

Also:

- Replace the hard-coded `0` and `1` markers with constants that can
  be linked from the Javadocs.

- Include the marker value in the "Invalid flag before ObjectId"
  exception message.

[1] https://gerrit-review.googlesource.com/c/gerrit/+/9792
[2] https://gerrit-review.googlesource.com/c/gerrit/+/165851
[3] https://gerrit-review.googlesource.com/c/gerrit/+/165952

Change-Id: Iaf84c3ec32ecf83efffb306fdb4940cc85740f3f
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoPrepare 4.11.1-SNAPSHOT builds 35/119035/1
Matthias Sohn [Thu, 8 Mar 2018 20:10:08 +0000 (21:10 +0100)]
Prepare 4.11.1-SNAPSHOT builds

Change-Id: Id9aa6b7e8f56de5183b6cd57ef0e790ec9debd4d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoJGit v4.11.0.201803080745-r 96/118996/1 v4.11.0.201803080745-r
Matthias Sohn [Thu, 8 Mar 2018 12:43:46 +0000 (13:43 +0100)]
JGit v4.11.0.201803080745-r

Change-Id: Ie24a33bc8a24c30db06fe7b175f405efb95776ec
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoRemove useless for(;;) loop 13/118713/2
Thomas Wolf [Mon, 5 Mar 2018 19:49:29 +0000 (20:49 +0100)]
Remove useless for(;;) loop

Change-Id: Ic9a7824cc178e92f44126acc8e77b0304b20ef4f
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
6 years agoFix DiffFormatter for diffs against working tree with autocrlf=true 97/117697/3
Thomas Wolf [Mon, 19 Feb 2018 22:42:46 +0000 (23:42 +0100)]
Fix DiffFormatter for diffs against working tree with autocrlf=true

The WorkingTreeSource produced an ObjectLoader that returned
inconsistent sizes: the file size in getSize(), but then a
correctly filtered smaller stream in openStream(). This resulted
either in an IOE "short read of block" or in an EOFException
depending on the resulting filtered size.

Fix this by ensuring that getSize() does return the size of the
filtered stream.

Bug: 530106
Change-Id: I7c7c85036047dc10030ed29c1d5a6c7f34f2bdff
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
6 years agoMerge branch 'stable-4.10' 34/118934/1
Matthias Sohn [Wed, 7 Mar 2018 21:37:27 +0000 (22:37 +0100)]
Merge branch 'stable-4.10'

* stable-4.10:
  Don't subclass ThreadLocal to avoid memory leak in NLS
  Set context classloader to null in WorkQueue

Change-Id: Idacf9a15a27f8e1d73357a80ed11a02237eea49e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoLFS: Adjust some API to make integration into tools (EGit,...) easier 48/118648/4
Markus Duft [Mon, 5 Mar 2018 09:34:29 +0000 (10:34 +0100)]
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>
6 years agoMergeHeadMsgTest: Open FileOutputStream in try-with-resource 55/118855/1
David Pursehouse [Wed, 7 Mar 2018 05:49:21 +0000 (14:49 +0900)]
MergeHeadMsgTest: Open FileOutputStream in try-with-resource

Change-Id: I8efa549b98bf661665dc29d48d0e5661b0e8530c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMergeCommand: Open RevWalk in try-with-resource 54/118854/1
David Pursehouse [Wed, 7 Mar 2018 05:46:08 +0000 (14:46 +0900)]
MergeCommand: Open RevWalk in try-with-resource

Change-Id: I45ce481cc198b8dc78e9c46b433504840597e982
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMeasurePackSizeTest: Open Transport in try-with-resource 53/118853/1
David Pursehouse [Wed, 7 Mar 2018 05:43:51 +0000 (14:43 +0900)]
MeasurePackSizeTest: Open Transport in try-with-resource

Change-Id: If9a39f8eabe1cd3474bdc025ac92218cd2dd1640
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoLongObjectIdTest: Open OutputStreamWriter in try-with-resource 52/118852/1
David Pursehouse [Wed, 7 Mar 2018 05:42:47 +0000 (14:42 +0900)]
LongObjectIdTest: Open OutputStreamWriter in try-with-resource

Change-Id: Ic7c2109204f94c70b933191b46d4a8f2c16a1533
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoJschConfigSessionFactory: Open FileInputStream in try-with-resource 51/118851/1
David Pursehouse [Wed, 7 Mar 2018 05:39:39 +0000 (14:39 +0900)]
JschConfigSessionFactory: Open FileInputStream in try-with-resource

Change-Id: I0f8f4629c93ed747f2f604538fccc52da3974b2e
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoCommandCatalog: Use StandardCharsets.UTF_8 39/118839/2
David Pursehouse [Tue, 6 Mar 2018 23:48:12 +0000 (08:48 +0900)]
CommandCatalog: Use StandardCharsets.UTF_8

Change-Id: I7c3356335cfedd81f663fd528799fc57b95fcf0f
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoJGitTestUtil: Open auto-closeable resources in try-with-resource 35/118835/2
David Pursehouse [Tue, 6 Mar 2018 23:30:52 +0000 (08:30 +0900)]
JGitTestUtil: Open auto-closeable resources in try-with-resource

Change-Id: Ibc8dd8509109708628e5189888fa528add486452
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoUse StandardCharsets.UTF_8 in tests 34/118834/2
David Pursehouse [Tue, 6 Mar 2018 23:29:51 +0000 (08:29 +0900)]
Use StandardCharsets.UTF_8 in tests

Replace hard-coded "UTF-8" string with the constant.

Change-Id: Ie812add2df28e984090563ec7c6e2c0366616424
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoInfoRefsServlet: Open OutputStreamWriter in try-with-resource 33/118833/1
David Pursehouse [Tue, 6 Mar 2018 23:27:06 +0000 (08:27 +0900)]
InfoRefsServlet: Open OutputStreamWriter in try-with-resource

Change-Id: Iaf93d5c020ee67e9effbe93334f1ad419ffaee1f
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoIndexDiffWithSymlinkTest: Open InputStream in try-with-resource 32/118832/1
David Pursehouse [Tue, 6 Mar 2018 23:25:15 +0000 (08:25 +0900)]
IndexDiffWithSymlinkTest: Open InputStream in try-with-resource

Change-Id: I5f49f80debb2259f665748408cd3604f869fa3ef
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>