]> source.dussan.org Git - jgit.git/log
jgit.git
6 years agoPrepare 5.0.0-SNAPSHOT builds 45/119045/1
Matthias Sohn [Thu, 8 Mar 2018 22:09:18 +0000 (23:09 +0100)]
Prepare 5.0.0-SNAPSHOT builds

Change-Id: I2d2f50ed8a12f310e7cac68eed5536bd460c403f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.11' 44/119044/1
Matthias Sohn [Thu, 8 Mar 2018 22:08:28 +0000 (23:08 +0100)]
Merge branch 'stable-4.11'

* stable-4.11:
  Prepare 4.11.1-SNAPSHOT builds
  JGit v4.11.0.201803080745-r

Change-Id: I225b9a6a9be6bda1d6fc8f605917645ff1fec852

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>
6 years agoReflogReaderTest: Fix indentation 28/118628/1
David Pursehouse [Mon, 5 Mar 2018 07:33:42 +0000 (16:33 +0900)]
ReflogReaderTest: Fix indentation

Change-Id: I981dc14065ce435034d2072cff77e7efaa2c5573
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoReflogWriterTest: Open FileInputStream in try-with-resource 27/118627/1
David Pursehouse [Mon, 5 Mar 2018 07:30:36 +0000 (16:30 +0900)]
ReflogWriterTest: Open FileInputStream in try-with-resource

Change-Id: Ie111aead49d83d6acfbb89bb475ef6d3159b36c4
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoTransportHttp: Open auto-closeable resources in try-with-resource 26/118626/1
David Pursehouse [Mon, 5 Mar 2018 07:28:59 +0000 (16:28 +0900)]
TransportHttp: Open auto-closeable resources in try-with-resource

Change-Id: I2f713b79ff07f5759c189f384cd25adb9b9f5761
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoRebaseCommandTest: Open BufferedReader in try-with-resource 25/118625/1
David Pursehouse [Mon, 5 Mar 2018 07:23:50 +0000 (16:23 +0900)]
RebaseCommandTest: Open BufferedReader in try-with-resource

Change-Id: If8d77431edfdaec4a49a3c4ffe66a99e6d31c682
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoDirCacheCGitCompatabilityTest: Open BufferedReader in try-with-resource 24/118624/1
David Pursehouse [Mon, 5 Mar 2018 07:23:08 +0000 (16:23 +0900)]
DirCacheCGitCompatabilityTest: Open BufferedReader in try-with-resource

Change-Id: I0494eb475954927743174941a7d6c06d8431f57f
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoLockFile: Open FileInputStream in try-with-resource 20/118620/1
David Pursehouse [Mon, 5 Mar 2018 02:03:21 +0000 (11:03 +0900)]
LockFile: Open FileInputStream in try-with-resource

Change-Id: I0784266814225428a6a0070d1653c465d268b342
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoCheckoutCommandTest: Open FileInputStream in try-with-resource 19/118619/1
David Pursehouse [Mon, 5 Mar 2018 01:59:43 +0000 (10:59 +0900)]
CheckoutCommandTest: Open FileInputStream in try-with-resource

Change-Id: I972958373ceaf4c3ae756559ccbc341506d4e72d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoSmudgeFilter: Fix Integer boxing warning 18/118618/1
David Pursehouse [Mon, 5 Mar 2018 01:57:41 +0000 (10:57 +0900)]
SmudgeFilter: Fix Integer boxing warning

Change-Id: Ic00bcd25b0808a58880a4433d76b3b5a6a4ee5c7
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoAdd ConfigConstants.CONFIG_SECTION_LFS 17/118617/1
David Pursehouse [Mon, 5 Mar 2018 01:53:12 +0000 (10:53 +0900)]
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>
6 years agoReturn this from InstallLfsCommand.setRepository() to allow chaining 08/118608/2
Matthias Sohn [Sun, 4 Mar 2018 20:26:33 +0000 (21:26 +0100)]
Return this from InstallLfsCommand.setRepository() to allow chaining

Change-Id: I105f1f62f2dcdb20a196361190e9c9fe368e8613
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoUpgrade spotbugs-maven-plugin to 3.1.2 23/118323/3
David Pursehouse [Wed, 28 Feb 2018 02:25:30 +0000 (11:25 +0900)]
Upgrade spotbugs-maven-plugin to 3.1.2

Change-Id: I01d8392ef8d20efd7f03590c82da017e2b53a043
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoUpdate orbit to S20180302171354 (photon) and R20180206163158 (oxygen) 90/118590/1
Matthias Sohn [Sat, 3 Mar 2018 23:53:19 +0000 (00:53 +0100)]
Update orbit to S20180302171354 (photon) and R20180206163158 (oxygen)

Change-Id: I5b5e59581bfa00bb16e3b8e0af6e154ad6583bb9
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoAdd|RemoveNoteComand: Reduce duplicated code 86/118486/2
David Pursehouse [Fri, 2 Mar 2018 05:14:55 +0000 (14:14 +0900)]
Add|RemoveNoteComand: Reduce duplicated code

The private method commitNoteMap is in both classes with the same
implementation.

Make it static in AddNoteCommand and reuse it from RemoveNoteCommand.

Change-Id: Ia037bf9efdd94ee7b8d33b41321e9cfd6ea4a6a5
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoLFSPointerTest: Open ByteArrayOutputStream in try-with-resource 77/118477/2
David Pursehouse [Fri, 2 Mar 2018 02:10:00 +0000 (11:10 +0900)]
LFSPointerTest: Open ByteArrayOutputStream in try-with-resource

Change-Id: Ib15a838e735f8b960e0ed635d6d9b0caf97f4791
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoAbbreviationTest: Open FileOutputStream in try-with-resource 76/118476/2
David Pursehouse [Fri, 2 Mar 2018 02:08:05 +0000 (11:08 +0900)]
AbbreviationTest: Open FileOutputStream in try-with-resource

Change-Id: Id1d48da466251f9e4186f4674afba4b5901a4388
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoTagBuilder: Open OutputStreamWriter in try-with-resource 75/118475/2
David Pursehouse [Fri, 2 Mar 2018 02:04:27 +0000 (11:04 +0900)]
TagBuilder: Open OutputStreamWriter in try-with-resource

Change-Id: Ic0e23039b0aec6171f192234c6b1474cd32eadff
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoDaemonService: Open Repository in try-with-resource 33/118233/3
David Pursehouse [Tue, 27 Feb 2018 05:21:36 +0000 (14:21 +0900)]
DaemonService: Open Repository in try-with-resource

Change-Id: I8deec91d91e82c7cb186cfa9507eb443dd87aad3
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoRefDirectory: Open BufferedReader in try-with-resource 32/118232/3
David Pursehouse [Tue, 27 Feb 2018 05:16:19 +0000 (14:16 +0900)]
RefDirectory: Open BufferedReader in try-with-resource

Change-Id: I9239df3e381b141b48ad7ea1b706e5b5927946cd
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoObjectDirectory: Open BufferedReader in try-with-resource 31/118231/3
David Pursehouse [Tue, 27 Feb 2018 05:14:03 +0000 (14:14 +0900)]
ObjectDirectory: Open BufferedReader in try-with-resource

Change-Id: I4a44954c61647af1e48eade19112697e79297f2e
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoPatch: Open TemporaryBuffer in try-with-resource 30/118230/3
David Pursehouse [Tue, 27 Feb 2018 05:12:10 +0000 (14:12 +0900)]
Patch: Open TemporaryBuffer in try-with-resource

Change-Id: I90bff8d49ecc37b8c10ce909cd3ac563205b641c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoEnable warning for resources not managed by try-with-resource 29/118229/3
David Pursehouse [Tue, 27 Feb 2018 05:10:41 +0000 (14:10 +0900)]
Enable warning for resources not managed by try-with-resource

Change-Id: Iefe97de6bdb62af558f1b0e77c9205a9186f9b4c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoLFS: Enable LFS support for the CLI, better error handling 64/112864/34
Markus Duft [Tue, 5 Dec 2017 10:16:30 +0000 (11:16 +0100)]
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>
6 years agoCleanup stream usage WRT filters 02/118502/3
Markus Duft [Fri, 2 Mar 2018 09:13:05 +0000 (10:13 +0100)]
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>
6 years agoLFS: support merge/rebase/cherry-pick/diff/compare with LFS files 76/111376/43
Markus Duft [Fri, 2 Mar 2018 09:11:42 +0000 (10:11 +0100)]
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>
6 years agoMerge "LFS: Dramatically improve checkout speed with SSH authentication"
Matthias Sohn [Thu, 1 Mar 2018 14:16:55 +0000 (09:16 -0500)]
Merge "LFS: Dramatically improve checkout speed with SSH authentication"

6 years agoLFS: Dramatically improve checkout speed with SSH authentication 63/112863/30
Markus Duft [Tue, 5 Dec 2017 09:46:43 +0000 (10:46 +0100)]
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>
6 years agoCorrectly exit fetch negotiation for stateless RPC connections 89/118389/3
Terry Parker [Wed, 28 Feb 2018 23:10:23 +0000 (15:10 -0800)]
Correctly exit fetch negotiation for stateless RPC connections

Commit 9530c10192cf033c021802a3b295b06864654464 (2018-02-11)
"Add a minimum negotiation feature for fetch" made fetch
negotiation cheaper for repos with huge numbers of
references (we are seeing a 15x reduction in maximum fetch
times for chromium/chromium/src on trans-Pacific links).
But it inadvertently broke the handling of stateless RPC
connections, so fix that here.

Change-Id: I0090aa76ffecc55801ebb833ac2e0c933a4a7c54
Signed-off-by: Terry Parker <tparker@google.com>
6 years agoLFS: pre-push upload support 64/111364/31
Markus Duft [Fri, 10 Nov 2017 10:10:28 +0000 (11:10 +0100)]
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>
6 years agoAmazonS3: Open OutputStream in try-with-resource 44/118144/1
David Pursehouse [Mon, 26 Feb 2018 11:38:12 +0000 (20:38 +0900)]
AmazonS3: Open OutputStream in try-with-resource

Change-Id: I0685a298a0f9fec465973cc718ae3bff373318a4
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMergeGitAttributeTest: Open FileInputStream in try-with-resource 43/118143/1
David Pursehouse [Mon, 26 Feb 2018 08:48:42 +0000 (17:48 +0900)]
MergeGitAttributeTest: Open FileInputStream in try-with-resource

Change-Id: Iec85eea044c46a199b5b6f6bdbb3191d817dd441
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoPullCommandWithRebaseTest: Open File{Input|Output}Stream in try-with-resource 26/118126/2
David Pursehouse [Mon, 26 Feb 2018 08:42:38 +0000 (17:42 +0900)]
PullCommandWithRebaseTest: Open File{Input|Output}Stream in try-with-resource

Change-Id: I1ff707ab7bab676603907f4c0bb1bc495503055b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoRecursiveMergerTest: Open FileOutputStream in try-with-resource 24/118124/1
David Pursehouse [Mon, 26 Feb 2018 08:39:57 +0000 (17:39 +0900)]
RecursiveMergerTest: Open FileOutputStream in try-with-resource

Change-Id: I158333d6393fb807bc21fba23fec7ad474384471
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoPullCommandTest: Use try-with-resources for File{Input,Output}Stream 21/118121/1
David Pursehouse [Sun, 25 Feb 2018 23:58:48 +0000 (08:58 +0900)]
PullCommandTest: Use try-with-resources for File{Input,Output}Stream

Change-Id: I09242eb289655c7554aefa9e0817d9b881db656b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoAdd ObjectIdSerializer 31/117831/3
David Pursehouse [Wed, 21 Feb 2018 03:40:47 +0000 (12:40 +0900)]
Add ObjectIdSerializer

This is based on the ObjectIdSerialization class written by Shawn Pearce
for the Gerrit Code Review project in 2009 [1]. As mentioned in the
commit message there, it should be part of core JGit.

This implementation is slightly different to Shawn's version. Rather
than having separate methods for null/non-null ids, single methods are
implemented with @Nullable annotations.

[1] https://gerrit-review.googlesource.com/c/gerrit/+/9792

Change-Id: I7599cf8bd1ecd546e2252783d6d672eb76804060
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoCheckoutCommandTest: Fix name of created temp file 05/118105/1
David Pursehouse [Sun, 25 Feb 2018 08:47:31 +0000 (17:47 +0900)]
CheckoutCommandTest: Fix name of created temp file

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