]> source.dussan.org Git - jgit.git/log
jgit.git
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>
6 years agoHugeFileTest: Open RandomAccessFile in try-with-resource 31/118831/1
David Pursehouse [Tue, 6 Mar 2018 23:14:08 +0000 (08:14 +0900)]
HugeFileTest: Open RandomAccessFile in try-with-resource

Change-Id: Iecb9a7348b40c91fa45c051c2a9c4eb47e4bdeca
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoHookMessageTest: Open Transport in try-with-resource 63/118763/1
David Pursehouse [Tue, 6 Mar 2018 08:42:50 +0000 (17:42 +0900)]
HookMessageTest: Open Transport in try-with-resource

Change-Id: Ie58b01a8a78e4f42a3b913708a545687c5c9f96b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoGitSmartHttpTools: Open OutputStream in try-with-resource 62/118762/1
David Pursehouse [Tue, 6 Mar 2018 08:41:12 +0000 (17:41 +0900)]
GitSmartHttpTools: Open OutputStream in try-with-resource

Change-Id: Ifb50b923f58f73d323cc1492950e58b6dc39f376
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoGitServletResponseTests: Open Transport in try-with-resource 61/118761/1
David Pursehouse [Tue, 6 Mar 2018 08:40:23 +0000 (17:40 +0900)]
GitServletResponseTests: Open Transport in try-with-resource

Change-Id: Ib74752c9185e38d0bfe9b4cef93b2427bf3afbd0
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoGetTextTest: Open InputStream in try-with-resource 60/118760/1
David Pursehouse [Tue, 6 Mar 2018 08:37:22 +0000 (17:37 +0900)]
GetTextTest: Open InputStream in try-with-resource

Change-Id: I3b68686de2d852b1f0b19c267a4e527229b40316
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoGC: Open auto-closeable resources in try-with-resource 57/118757/2
David Pursehouse [Tue, 6 Mar 2018 08:23:53 +0000 (17:23 +0900)]
GC: Open auto-closeable resources in try-with-resource

Change-Id: If437e14636de7c5014ee2aa419d6518acd857792
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFileSnapshotTest: Open FileOutputStream in try-with-resource 56/118756/1
David Pursehouse [Tue, 6 Mar 2018 08:19:59 +0000 (17:19 +0900)]
FileSnapshotTest: Open FileOutputStream in try-with-resource

Change-Id: I187dd61e3e7d6f141722bf1af86a7fe04711057d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFileSender: Open OutputStream in try-with-resource 55/118755/1
David Pursehouse [Tue, 6 Mar 2018 08:19:07 +0000 (17:19 +0900)]
FileSender: Open OutputStream in try-with-resource

Change-Id: I2278950998dffc2b5730a91a5bb3bcc38f4d446b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFileRepository: Open FileInputStream in try-with-resource 54/118754/1
David Pursehouse [Tue, 6 Mar 2018 08:18:23 +0000 (17:18 +0900)]
FileRepository: Open FileInputStream in try-with-resource

Change-Id: Ief8aa4834437d76f7e636598bf9861312475e64a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFileLfsServlet: Open PrintWriter in try-with-resource 53/118753/1
David Pursehouse [Tue, 6 Mar 2018 08:15:04 +0000 (17:15 +0900)]
FileLfsServlet: Open PrintWriter in try-with-resource

Change-Id: I6fa225e541c6d5c3dbf3d852a502f4e9c4f7d77e
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFetchProcess: Open OutputStreamWriter in try-with-resource 52/118752/1
David Pursehouse [Tue, 6 Mar 2018 08:14:19 +0000 (17:14 +0900)]
FetchProcess: Open OutputStreamWriter in try-with-resource

Change-Id: Ide7768882a95f9e9706e50ca0774edd428dd07c1
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFS: Open TemporaryBuffer in try-with-resource 50/118750/1
David Pursehouse [Tue, 6 Mar 2018 07:58:12 +0000 (16:58 +0900)]
FS: Open TemporaryBuffer in try-with-resource

Change-Id: I52e048e491e838b7f762a5b5f4d148e91049877c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoEditListTest: Open InputStream in try-with-resource 49/118749/2
David Pursehouse [Tue, 6 Mar 2018 07:52:28 +0000 (16:52 +0900)]
EditListTest: Open InputStream in try-with-resource

Change-Id: Ib5b86e332ec674dec5460a9629d94d9f94c31c24
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoEGitPatchHistoryTest: Open BufferedReader in try-with-resource 48/118748/2
David Pursehouse [Tue, 6 Mar 2018 07:49:23 +0000 (16:49 +0900)]
EGitPatchHistoryTest: Open BufferedReader in try-with-resource

Change-Id: I74aede463c7b0a478a1e0e8b680c206d3964061d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoT0003_BasicTest: Use CommitBuilder.setEncoding(Charset) 47/118747/3
David Pursehouse [Tue, 6 Mar 2018 04:42:45 +0000 (13:42 +0900)]
T0003_BasicTest: Use CommitBuilder.setEncoding(Charset)

Change-Id: I1c4cdd4b856d715a204030d2de25ef91977186c2
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoWalkEncryptionTest: Use StandardCharsets.UTF_8 46/118746/3
David Pursehouse [Tue, 6 Mar 2018 04:39:37 +0000 (13:39 +0900)]
WalkEncryptionTest: Use StandardCharsets.UTF_8

Change-Id: I6eb8a33be62c452c264fb0560b988144d80a41f9
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoGetTextTest: Use StandardCharsets constants instead of CharSet.forName 45/118745/3
David Pursehouse [Tue, 6 Mar 2018 04:37:09 +0000 (13:37 +0900)]
GetTextTest: Use StandardCharsets constants instead of CharSet.forName

Change-Id: I61d626495338a89c014187c38a1f6b49accf7af4
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoEGitPatchHistoryTest: Set input stream encoding with constant 44/118744/3
David Pursehouse [Tue, 6 Mar 2018 04:34:31 +0000 (13:34 +0900)]
EGitPatchHistoryTest: Set input stream encoding with constant

Change-Id: Ieff9b1d07704e37c8d5616b220b015855a7cc624
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoDirCacheIterator: Open InputStream in try-with-resource 43/118743/3
David Pursehouse [Tue, 6 Mar 2018 04:31:32 +0000 (13:31 +0900)]
DirCacheIterator: Open InputStream in try-with-resource

Change-Id: I05d2d1de9a3d39466a6880f6e8107da8681876b1
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoDumbClientSmartServerTest: Open auto-closeable resources in try-with-resource 41/118741/3
David Pursehouse [Tue, 6 Mar 2018 01:49:58 +0000 (10:49 +0900)]
DumbClientSmartServerTest: Open auto-closeable resources in try-with-resource

Change-Id: I599c6e274fe80af7bfd2205f56f469c22d1dd3e0
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoDirCacheCheckoutTest: Open FileInputStream in try-with-resource 40/118740/3
David Pursehouse [Tue, 6 Mar 2018 01:44:23 +0000 (10:44 +0900)]
DirCacheCheckoutTest: Open FileInputStream in try-with-resource

Change-Id: I3ceef36803752a19a4d74910b4db26c01279fd99
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoDiffFormatterReflowTest: Open InputStream in try-with-resource 38/118738/3
David Pursehouse [Tue, 6 Mar 2018 01:42:36 +0000 (10:42 +0900)]
DiffFormatterReflowTest: Open InputStream in try-with-resource

Change-Id: Id7f420a2eac57e59fa3feb04236df6f5f8d07f02
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge changes from topic 'try-with-resource'
David Pursehouse [Tue, 6 Mar 2018 07:55:50 +0000 (02:55 -0500)]
Merge changes from topic 'try-with-resource'

* changes:
  DiffCommand: Open DiffFormatter in try-with-resource
  DiffAlgorithms: Open Repository in try-with-resource
  DescribeCommandTest: Open FileWriter in try-with-resource
  CommitCommand: Open InputStream in try-with-resource
  DefaultNoteMerger: Open UnionInputStream in try-with-resource

6 years agoDiffCommand: Open DiffFormatter in try-with-resource 37/118737/1
David Pursehouse [Tue, 6 Mar 2018 01:40:35 +0000 (10:40 +0900)]
DiffCommand: Open DiffFormatter in try-with-resource

Change-Id: I22bd1062d64b01bb98cdaf612482538114624b7f
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge "Silence API error raised for new CONFIG_SECTION_LFS constant"
David Pursehouse [Tue, 6 Mar 2018 00:53:55 +0000 (19:53 -0500)]
Merge "Silence API error raised for new CONFIG_SECTION_LFS constant"

6 years agoDiffAlgorithms: Open Repository in try-with-resource 33/118733/1
David Pursehouse [Tue, 6 Mar 2018 00:52:12 +0000 (09:52 +0900)]
DiffAlgorithms: Open Repository in try-with-resource

Change-Id: I67cb486283213f8aa964333533c55966518baa36
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoDescribeCommandTest: Open FileWriter in try-with-resource 32/118732/1
David Pursehouse [Tue, 6 Mar 2018 00:49:16 +0000 (09:49 +0900)]
DescribeCommandTest: Open FileWriter in try-with-resource

Change-Id: Ida79bdae652faa88fbdb1b81e7e10b5019ff2c16
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoCommitCommand: Open InputStream in try-with-resource 31/118731/1
David Pursehouse [Tue, 6 Mar 2018 00:48:19 +0000 (09:48 +0900)]
CommitCommand: Open InputStream in try-with-resource

Change-Id: I800a2afae17f84636cae593be7f07628fb8476c1
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoDefaultNoteMerger: Open UnionInputStream in try-with-resource 30/118730/1
David Pursehouse [Tue, 6 Mar 2018 00:47:11 +0000 (09:47 +0900)]
DefaultNoteMerger: Open UnionInputStream in try-with-resource

Change-Id: I035aa89cdbf235992f41e752f49d735be4e5df0a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoSilence API error raised for new CONFIG_SECTION_LFS constant 28/118728/1
Matthias Sohn [Mon, 5 Mar 2018 23:28:38 +0000 (00:28 +0100)]
Silence API error raised for new CONFIG_SECTION_LFS constant

Change-Id: I27e68d245c6b9c972ab9470c14d1f45d15d4c253
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoCommitCommandTest: Open Repository in try-with-resource 27/118727/1
David Pursehouse [Mon, 5 Mar 2018 23:24:28 +0000 (08:24 +0900)]
CommitCommandTest: Open Repository in try-with-resource

Change-Id: Id9961a120ef9f949f04fc95455fae06ba95d8031
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoCommitAndLogCommandTest: Open PrintWriter in try-with-resource 26/118726/1
David Pursehouse [Mon, 5 Mar 2018 23:22:48 +0000 (08:22 +0900)]
CommitAndLogCommandTest: Open PrintWriter in try-with-resource

Change-Id: I0c7f07e27d1881d8856dac008110fcaa85c98fbb
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoCloneCommandTest: Open Repository in try-with-resource 24/118724/1
David Pursehouse [Mon, 5 Mar 2018 23:20:45 +0000 (08:20 +0900)]
CloneCommandTest: Open Repository in try-with-resource

Change-Id: Id09d2126fb17d84581f8637e83a75dfa2e85ebe8
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoAutoCRLFInputStreamTest: Open auto-closeable resources in try-with-resource 68/118668/1
David Pursehouse [Mon, 5 Mar 2018 11:59:31 +0000 (20:59 +0900)]
AutoCRLFInputStreamTest: Open auto-closeable resources in try-with-resource

Change-Id: I427ab43a82861f7bc69b104e29dc4360048aec4e
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoCleanCommandTest: Open Repository in try-with-resource 67/118667/1
David Pursehouse [Mon, 5 Mar 2018 11:56:38 +0000 (20:56 +0900)]
CleanCommandTest: Open Repository in try-with-resource

Change-Id: If87cb729432ae711a2e7cfd08d288d7fec3f6de2
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoCGitVsJGitRandomIgnorePatternTest: Open OutputStream in try-with-resource 66/118666/1
David Pursehouse [Mon, 5 Mar 2018 11:55:20 +0000 (20:55 +0900)]
CGitVsJGitRandomIgnorePatternTest: Open OutputStream in try-with-resource

Change-Id: I08e27d0ee48dabd94a4eeb608508f815a3000ec9
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoArchiveTest: Open auto-closeable resources in try-with-resource 64/118664/1
David Pursehouse [Mon, 5 Mar 2018 11:23:03 +0000 (20:23 +0900)]
ArchiveTest: Open auto-closeable resources in try-with-resource

Change-Id: If11017f21027b46c7a66e52e4bc0cc73f4fbdc07
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoArchiveCommand: Create archive output stream in try-with-resource 63/118663/1
David Pursehouse [Mon, 5 Mar 2018 11:19:25 +0000 (20:19 +0900)]
ArchiveCommand: Create archive output stream in try-with-resource

Change-Id: I72f4d303945275d400723aa17212b302e051dc15
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoApplyCommand: Open FileWriter in try-with-resource 62/118662/1
David Pursehouse [Mon, 5 Mar 2018 11:17:32 +0000 (20:17 +0900)]
ApplyCommand: Open FileWriter in try-with-resource

Change-Id: Ia473f74dc4608fc43edd57eda4f193c226e9004d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoAmazonS3Client: Open Input/OutputStream in try-with-resource 59/118659/1
David Pursehouse [Mon, 5 Mar 2018 11:13:51 +0000 (20:13 +0900)]
AmazonS3Client: Open Input/OutputStream in try-with-resource

Change-Id: I32d4031159dff9005e839d0b53940431cba12beb
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoAmazonS3: Open InputStream/FileInputStream in try-with-resource 58/118658/1
David Pursehouse [Mon, 5 Mar 2018 11:11:59 +0000 (20:11 +0900)]
AmazonS3: Open InputStream/FileInputStream in try-with-resource

Change-Id: I71606e14d2b3cf085b8d1343c3858e7a729a173e
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoAdvertiseErrorTest: Open Transport in try-with-resource 57/118657/1
David Pursehouse [Mon, 5 Mar 2018 11:10:12 +0000 (20:10 +0900)]
AdvertiseErrorTest: Open Transport in try-with-resource

Change-Id: I78adec7baf82d1a0eedc10e90b6d4f20008a046d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoAddCommandTest: Open PrintWriter in try-with-resource 56/118656/1
David Pursehouse [Mon, 5 Mar 2018 11:08:34 +0000 (20:08 +0900)]
AddCommandTest: Open PrintWriter in try-with-resource

Change-Id: I8ef769d12239447a20b670398293dbb64b90087d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFileBasedConfigTest: Open FileOutputStream in try-with-resource 34/118634/1
David Pursehouse [Mon, 5 Mar 2018 08:16:14 +0000 (17:16 +0900)]
FileBasedConfigTest: Open FileOutputStream in try-with-resource

Change-Id: Id4c49d4af30bcc5210d35630a8699574694060bb
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoWalkRemoteObjectDatabase: Open auto-closeable resources in try-with-resource 33/118633/1
David Pursehouse [Mon, 5 Mar 2018 08:15:04 +0000 (17:15 +0900)]
WalkRemoteObjectDatabase: Open auto-closeable resources in try-with-resource

Change-Id: Ie4f67ca8cab1031089782f202588b08cc157dd79
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoTransportSftp: Open BufferedReader in try-with-resource 32/118632/1
David Pursehouse [Mon, 5 Mar 2018 08:13:20 +0000 (17:13 +0900)]
TransportSftp: Open BufferedReader in try-with-resource

Change-Id: Iab94cce80c11a5edeaf8f377001408cc53707c04
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoReflogReaderTest: Open FileOutputStream in try-with-resource 29/118629/1
David Pursehouse [Mon, 5 Mar 2018 07:35:09 +0000 (16:35 +0900)]
ReflogReaderTest: Open FileOutputStream in try-with-resource

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