]> source.dussan.org Git - jgit.git/log
jgit.git
5 years agoUse Objects.requireNonNull instead of a custom helper 46/139346/1
Jonathan Nieder [Fri, 22 Mar 2019 16:44:27 +0000 (09:44 -0700)]
Use Objects.requireNonNull instead of a custom helper

This simplifies the API surface and makes JGit internals into less of
a custom Java dialect.

Change-Id: Idbb7d4d1037c5336341088385b8e0a59c8b4c952

5 years agoIntroduce a checkNotNull helper 39/139339/1
Jonathan Nieder [Fri, 22 Mar 2019 16:07:03 +0000 (09:07 -0700)]
Introduce a checkNotNull helper

When using @NonNull annotations in new code, if I write

public void setFrobber(@NonNull frobber) {
this.frobber = frobber;
}

then consumers of the JGit library that do not have nullness checking
enabled can easily pass in null by mistake.  On the other hand, if I
write

public void setFrobber(@NonNull frobber) {
if (frobber == null) {
throw new NullPointerException();
}
this.frobber = frobber;
}

then Eclipse JDT complains:

Null comparison always yields false: The variable frobber is specified as @NonNull

Add a checkNotNull helper that offers the best of both worlds:

public void setFrobber(@NonNull frobber) {
this.frobber = checkNotNull(frobber);
}

Briefer code, null check is intact, and no warning.

Inspired by Guava's com.google.common.base.Preconditions.checkNotNull.

Change-Id: If59588d13a1119e899657ed2296931ea18ed0e2a

5 years agoUpgrade ecj to 3.17.0 58/139258/2
David Pursehouse [Thu, 21 Mar 2019 18:16:15 +0000 (18:16 +0000)]
Upgrade ecj to 3.17.0

Change-Id: Ia0806034668af65196c3223f5ee32065e07bbb2d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoMerge branch 'stable-5.3' 48/139248/1
Matthias Sohn [Thu, 21 Mar 2019 15:47:08 +0000 (16:47 +0100)]
Merge branch 'stable-5.3'

* stable-5.3:
  Fix GC to delete empty fanout directories after repacking

Change-Id: I080ddb03c6143f0bfa24707a10a4d926676d32b1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-5.2' into stable-5.3 47/139247/1
Matthias Sohn [Thu, 21 Mar 2019 15:45:26 +0000 (16:45 +0100)]
Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  Fix GC to delete empty fanout directories after repacking

Change-Id: I29e1da15396daaf0036bcb92cfb567cc243db5a1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-5.1' into stable-5.2 45/139245/1
Matthias Sohn [Thu, 21 Mar 2019 15:14:03 +0000 (16:14 +0100)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Fix GC to delete empty fanout directories after repacking

Change-Id: I0cf4d26bdee5ecee43e723c4176efbce777acabc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-5.0' into stable-5.1 44/139244/1
Matthias Sohn [Thu, 21 Mar 2019 15:07:11 +0000 (16:07 +0100)]
Merge branch 'stable-5.0' into stable-5.1

* stable-5.0:
  Fix GC to delete empty fanout directories after repacking

Change-Id: I5c0e7d59f137c27e4588f20f4472d3ea450cd59c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-4.11' into stable-5.0 42/139242/1
Matthias Sohn [Thu, 21 Mar 2019 14:55:39 +0000 (15:55 +0100)]
Merge branch 'stable-4.11' into stable-5.0

* stable-4.11:
  Fix GC to delete empty fanout directories after repacking

Change-Id: Idce894a24e126e0fbe7bc9b6a3c64318f1a8eb75
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-4.10' into stable-4.11 40/139240/1
Matthias Sohn [Thu, 21 Mar 2019 14:35:18 +0000 (15:35 +0100)]
Merge branch 'stable-4.10' into stable-4.11

* stable-4.10:
  Fix GC to delete empty fanout directories after repacking

Change-Id: I7118b9c668dcbb0f5435cc613e964c557bfebf01
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-4.9' into stable-4.10 38/139238/1
Matthias Sohn [Thu, 21 Mar 2019 14:06:47 +0000 (15:06 +0100)]
Merge branch 'stable-4.9' into stable-4.10

* stable-4.9:
  Fix GC to delete empty fanout directories after repacking

Change-Id: Ibdbfe08eb290286fa738010bad1c604e857885cd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMove filter-line-parsing code to a separate file 92/139192/2
Matthew DeVore [Thu, 21 Mar 2019 01:47:24 +0000 (18:47 -0700)]
Move filter-line-parsing code to a separate file

This code is not specific to V2 of the protocol, so it doesn't belong
there. Move it to its own class.

Change-Id: I8084764147d1d0e2bceaaead59b332a8ec1a0825
Signed-off-by: Matthew DeVore <matvore@gmail.com>
5 years agoUse RefMap instead of HashMap 76/139076/7
Masaya Suzuki [Wed, 20 Mar 2019 03:42:10 +0000 (20:42 -0700)]
Use RefMap instead of HashMap

HashMap<String, Ref> has a memory overhead for refs. Use RefMap.

Change-Id: I3fb4616135dacf687cc3bc2b473effc66ccef5e6
Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
5 years agoFix GC to delete empty fanout directories after repacking 18/139118/1
Matthias Sohn [Wed, 20 Mar 2019 12:54:10 +0000 (13:54 +0100)]
Fix GC to delete empty fanout directories after repacking

The prune method did not delete empty fanout directories when loose
objects moved to a new pack file but only when loose unreferenced
objects were pruned.

Change-Id: Ia068f4914c54d9cf9f40b75e8ea50759402b5000
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoDescribeCommandTest: Trivially fix formatting by removing a blank line 21/138921/1
Sebastian Schuberth [Mon, 18 Mar 2019 08:30:02 +0000 (09:30 +0100)]
DescribeCommandTest: Trivially fix formatting by removing a blank line

Change-Id: Ibf0343f05b2c08f87e4f3cb0d56a11e797bcde53
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
5 years agoDescribeCommand: Add a missing dots at the end of docs 20/138920/1
Sebastian Schuberth [Fri, 15 Mar 2019 14:26:05 +0000 (15:26 +0100)]
DescribeCommand: Add a missing dots at the end of docs

Ensure the sentences to document fields consistenly end with a dot.

Change-Id: I084899cafe4dea6f2424132dce9f3adca2e20985
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
5 years agoReplace "Checkout" by "Check out" when used as a verb 59/138859/1
Thomas Wolf [Fri, 15 Mar 2019 20:07:42 +0000 (21:07 +0100)]
Replace "Checkout" by "Check out" when used as a verb

One occurrence in core JGit, several in jgit.pgm. One unused
occurrence in jgit.pgm; remove it.

Change-Id: I04c3dd9d9f542f1e1ac6df4cbf03bcefb6bfdf78
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoBaseReceive/UploadPack: Stop using deprecated RefAdvertiser.send(Map) 09/138709/3
Ivan Frade [Thu, 14 Mar 2019 04:39:51 +0000 (21:39 -0700)]
BaseReceive/UploadPack: Stop using deprecated RefAdvertiser.send(Map)

RefAdvertiser.send(Map<String, Ref>) is deprecated in favour of
RefAdvertiser.send(Collection<Ref>). Subclasses that need to override
the "send" method need to override also the deprecated version, because
it is still invoked by BaseReceivePack and UploadPack.

Remove the last usages of the deprecated method.

Change-Id: I7eba426970251f78801ddf96b87a65d1baaebdcf
Signed-off-by: Ivan Frade <ifrade@google.com>
5 years agoMerge branch 'stable-5.3' 80/138680/1
Matthias Sohn [Wed, 13 Mar 2019 16:47:08 +0000 (17:47 +0100)]
Merge branch 'stable-5.3'

* stable-5.3:
  Prepare 5.3.1-SNAPSHOT builds
  JGit v5.3.0.201903130848-r
  Prepare 5.1.7-SNAPSHOT builds
  JGit v5.1.6.201903130242-r
  Prepare 4.11.8-SNAPSHOT builds
  JGit v4.11.7.201903122105-r
  Prepare 4.9.10-SNAPSHOT builds
  JGit v4.9.9.201903122025-r
  Prepare 4.7.9-SNAPSHOT builds
  JGit v4.7.8.201903121755-r
  Prepare 4.5.7-SNAPSHOT builds
  JGit v4.5.6.201903121547-r
  Check for packfile validity and fd before reading
  Move throw of PackInvalidException outside the catch
  Use FileSnapshot to get lastModified on PackFile
  Include size when comparing FileSnapshot
  Do not reuse packfiles when changed on filesystem
  Silence API warnings for new API introduced for fixes

Change-Id: Ief9f6a9e89c4a1ef122daedbfd933676393fab06
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoPrepare 5.3.1-SNAPSHOT builds 67/138667/1
Matthias Sohn [Wed, 13 Mar 2019 14:10:17 +0000 (15:10 +0100)]
Prepare 5.3.1-SNAPSHOT builds

Change-Id: I8dc5e47bd19809d684579610edf922abca3cb3cc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoJGit v5.3.0.201903130848-r 52/138652/1 v5.3.0.201903130848-r
Matthias Sohn [Wed, 13 Mar 2019 12:47:54 +0000 (13:47 +0100)]
JGit v5.3.0.201903130848-r

Change-Id: I52256a6d07011030698299d9a97dd01ea825fb7f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-5.2' into stable-5.3 37/138637/1
Matthias Sohn [Wed, 13 Mar 2019 09:14:07 +0000 (10:14 +0100)]
Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  Prepare 5.1.7-SNAPSHOT builds
  JGit v5.1.6.201903130242-r
  Prepare 4.11.8-SNAPSHOT builds
  JGit v4.11.7.201903122105-r
  Prepare 4.9.10-SNAPSHOT builds
  JGit v4.9.9.201903122025-r
  Prepare 4.7.9-SNAPSHOT builds
  JGit v4.7.8.201903121755-r
  Prepare 4.5.7-SNAPSHOT builds
  JGit v4.5.6.201903121547-r
  Check for packfile validity and fd before reading
  Move throw of PackInvalidException outside the catch
  Use FileSnapshot to get lastModified on PackFile
  Include size when comparing FileSnapshot
  Do not reuse packfiles when changed on filesystem
  Silence API warnings for new API introduced for fixes

Change-Id: Ia866587a910e620cb297bcb2a81fe0786f4e3db2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-5.1' into stable-5.2 21/138621/1
Matthias Sohn [Wed, 13 Mar 2019 06:51:34 +0000 (07:51 +0100)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Prepare 5.1.7-SNAPSHOT builds
  JGit v5.1.6.201903130242-r
  Prepare 4.11.8-SNAPSHOT builds
  JGit v4.11.7.201903122105-r
  Prepare 4.9.10-SNAPSHOT builds
  JGit v4.9.9.201903122025-r
  Prepare 4.7.9-SNAPSHOT builds
  JGit v4.7.8.201903121755-r
  Prepare 4.5.7-SNAPSHOT builds
  JGit v4.5.6.201903121547-r
  Check for packfile validity and fd before reading
  Move throw of PackInvalidException outside the catch
  Use FileSnapshot to get lastModified on PackFile
  Include size when comparing FileSnapshot
  Do not reuse packfiles when changed on filesystem
  Silence API warnings for new API introduced for fixes

Change-Id: I8da2761ed27ff2817a4136f843b9b293e3c0f4e6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoPrepare 5.1.7-SNAPSHOT builds 20/138620/1
Matthias Sohn [Wed, 13 Mar 2019 06:49:33 +0000 (07:49 +0100)]
Prepare 5.1.7-SNAPSHOT builds

Change-Id: Ica716b2ad18f8390e75466430ef81c86ea06f004
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoJGit v5.1.6.201903130242-r 19/138619/1 v5.1.6.201903130242-r
Matthias Sohn [Wed, 13 Mar 2019 06:41:27 +0000 (07:41 +0100)]
JGit v5.1.6.201903130242-r

Change-Id: Iaf5e451f72dc8512afee99a9f3fb91aa348e3cf5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-5.0' into stable-5.1 18/138618/1
Matthias Sohn [Wed, 13 Mar 2019 06:37:36 +0000 (07:37 +0100)]
Merge branch 'stable-5.0' into stable-5.1

* stable-5.0:
  Prepare 4.11.8-SNAPSHOT builds
  JGit v4.11.7.201903122105-r
  Prepare 4.9.10-SNAPSHOT builds
  JGit v4.9.9.201903122025-r
  Prepare 4.7.9-SNAPSHOT builds
  JGit v4.7.8.201903121755-r
  Prepare 4.5.7-SNAPSHOT builds
  JGit v4.5.6.201903121547-r
  Check for packfile validity and fd before reading
  Move throw of PackInvalidException outside the catch
  Use FileSnapshot to get lastModified on PackFile
  Include size when comparing FileSnapshot
  Do not reuse packfiles when changed on filesystem
  Silence API warnings for new API introduced for fixes

Change-Id: I71771dcc086a9a0097bad74d65ec71ad97106a38
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-4.11' into stable-5.0 13/138613/1
Matthias Sohn [Wed, 13 Mar 2019 01:21:54 +0000 (02:21 +0100)]
Merge branch 'stable-4.11' into stable-5.0

* stable-4.11:
  Prepare 4.11.8-SNAPSHOT builds
  JGit v4.11.7.201903122105-r
  Prepare 4.9.10-SNAPSHOT builds
  JGit v4.9.9.201903122025-r
  Prepare 4.7.9-SNAPSHOT builds
  JGit v4.7.8.201903121755-r
  Prepare 4.5.7-SNAPSHOT builds
  JGit v4.5.6.201903121547-r
  Check for packfile validity and fd before reading
  Move throw of PackInvalidException outside the catch
  Use FileSnapshot to get lastModified on PackFile
  Include size when comparing FileSnapshot
  Do not reuse packfiles when changed on filesystem
  Silence API warnings for new API introduced for fixes

Change-Id: I04c70f66c6f1e53bdc199fb5b24c9136c9a8e4f7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoPrepare 4.11.8-SNAPSHOT builds 12/138612/1
Matthias Sohn [Wed, 13 Mar 2019 01:13:36 +0000 (02:13 +0100)]
Prepare 4.11.8-SNAPSHOT builds

Change-Id: I92789b0c02e83786961b81556bf2faec5d26b0c1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoJGit v4.11.7.201903122105-r 11/138611/1 v4.11.7.201903122105-r
Matthias Sohn [Wed, 13 Mar 2019 01:04:31 +0000 (02:04 +0100)]
JGit v4.11.7.201903122105-r

Change-Id: I4fc62c304b5a8452ca72a3b305e5732a26120000
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-4.10' into stable-4.11 10/138610/1
Matthias Sohn [Wed, 13 Mar 2019 00:55:10 +0000 (01:55 +0100)]
Merge branch 'stable-4.10' into stable-4.11

* stable-4.10:
  Prepare 4.9.10-SNAPSHOT builds
  JGit v4.9.9.201903122025-r
  Prepare 4.7.9-SNAPSHOT builds
  JGit v4.7.8.201903121755-r
  Prepare 4.5.7-SNAPSHOT builds
  JGit v4.5.6.201903121547-r
  Check for packfile validity and fd before reading
  Move throw of PackInvalidException outside the catch
  Use FileSnapshot to get lastModified on PackFile
  Include size when comparing FileSnapshot
  Do not reuse packfiles when changed on filesystem
  Silence API warnings for new API introduced for fixes

Change-Id: Ic66dc00455c05f7627919f682a7221ffeef1629d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-4.9' into stable-4.10 09/138609/1
Matthias Sohn [Wed, 13 Mar 2019 00:48:06 +0000 (01:48 +0100)]
Merge branch 'stable-4.9' into stable-4.10

* stable-4.9:
  Prepare 4.9.10-SNAPSHOT builds
  JGit v4.9.9.201903122025-r
  Prepare 4.7.9-SNAPSHOT builds
  JGit v4.7.8.201903121755-r
  Prepare 4.5.7-SNAPSHOT builds
  JGit v4.5.6.201903121547-r
  Check for packfile validity and fd before reading
  Move throw of PackInvalidException outside the catch
  Use FileSnapshot to get lastModified on PackFile
  Include size when comparing FileSnapshot
  Do not reuse packfiles when changed on filesystem
  Silence API warnings for new API introduced for fixes

Change-Id: Ifcd8ea6a2b59f6f8e9d896d8407cfcaef0a9375d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoPrepare 4.9.10-SNAPSHOT builds 08/138608/1
Matthias Sohn [Wed, 13 Mar 2019 00:34:49 +0000 (01:34 +0100)]
Prepare 4.9.10-SNAPSHOT builds

Change-Id: I2bdbe822ee623c5f15a26d092136d8602cef06ac
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoJGit v4.9.9.201903122025-r 07/138607/1 v4.9.9.201903122025-r
Matthias Sohn [Wed, 13 Mar 2019 00:27:02 +0000 (01:27 +0100)]
JGit v4.9.9.201903122025-r

Change-Id: I807d24461b3557eee48294bfaa652b2a13d78113
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-4.8' into stable-4.9 06/138606/1
Matthias Sohn [Wed, 13 Mar 2019 00:17:47 +0000 (01:17 +0100)]
Merge branch 'stable-4.8' into stable-4.9

* stable-4.8:
  Prepare 4.7.9-SNAPSHOT builds
  JGit v4.7.8.201903121755-r
  Prepare 4.5.7-SNAPSHOT builds
  JGit v4.5.6.201903121547-r
  Check for packfile validity and fd before reading
  Move throw of PackInvalidException outside the catch
  Use FileSnapshot to get lastModified on PackFile
  Include size when comparing FileSnapshot
  Do not reuse packfiles when changed on filesystem
  Silence API warnings for new API introduced for fixes

Change-Id: I9a47153831f8eb10d3cd91b4157cf45385e5b13a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-4.7' into stable-4.8 05/138605/1
Matthias Sohn [Wed, 13 Mar 2019 00:16:28 +0000 (01:16 +0100)]
Merge branch 'stable-4.7' into stable-4.8

* stable-4.7:
  Prepare 4.7.9-SNAPSHOT builds
  JGit v4.7.8.201903121755-r
  Prepare 4.5.7-SNAPSHOT builds
  JGit v4.5.6.201903121547-r
  Check for packfile validity and fd before reading
  Move throw of PackInvalidException outside the catch
  Use FileSnapshot to get lastModified on PackFile
  Include size when comparing FileSnapshot
  Do not reuse packfiles when changed on filesystem
  Silence API warnings for new API introduced for fixes

Change-Id: I1136eaa1590b225ceaf16ba7552af0374253a74e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoPrepare 4.7.9-SNAPSHOT builds 03/138603/1
Matthias Sohn [Tue, 12 Mar 2019 22:26:43 +0000 (23:26 +0100)]
Prepare 4.7.9-SNAPSHOT builds

Change-Id: I1602a6b811fd9f95e284153b560d8d9f855fae9f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoJGit v4.7.8.201903121755-r 01/138601/1 v4.7.8.201903121755-r
Matthias Sohn [Tue, 12 Mar 2019 21:55:42 +0000 (22:55 +0100)]
JGit v4.7.8.201903121755-r

Change-Id: Ia6dbde615671ed09789326aacad1655e7a7a59ad
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-4.6' into stable-4.7 00/138600/1
Matthias Sohn [Tue, 12 Mar 2019 21:39:53 +0000 (22:39 +0100)]
Merge branch 'stable-4.6' into stable-4.7

* stable-4.6:
  Prepare 4.5.7-SNAPSHOT builds
  JGit v4.5.6.201903121547-r
  Check for packfile validity and fd before reading
  Move throw of PackInvalidException outside the catch
  Use FileSnapshot to get lastModified on PackFile
  Include size when comparing FileSnapshot
  Do not reuse packfiles when changed on filesystem
  Silence API warnings for new API introduced for fixes

Change-Id: I3d1544d034783fe0fa1385dfe9b03ad8e9247c63
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-4.5' into stable-4.6 93/138593/1
Matthias Sohn [Tue, 12 Mar 2019 20:01:55 +0000 (21:01 +0100)]
Merge branch 'stable-4.5' into stable-4.6

* stable-4.5:
  Prepare 4.5.7-SNAPSHOT builds
  JGit v4.5.6.201903121547-r
  Check for packfile validity and fd before reading
  Move throw of PackInvalidException outside the catch
  Use FileSnapshot to get lastModified on PackFile
  Include size when comparing FileSnapshot
  Do not reuse packfiles when changed on filesystem
  Silence API warnings for new API introduced for fixes

Change-Id: I029e1797447e6729de68bd89d4d69b324dbb3f5f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoPrepare 4.5.7-SNAPSHOT builds 84/138584/1
Matthias Sohn [Tue, 12 Mar 2019 19:54:12 +0000 (20:54 +0100)]
Prepare 4.5.7-SNAPSHOT builds

Change-Id: I5c275c542e12746c3d8ecf8462791969f9e89e12
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoJGit v4.5.6.201903121547-r 83/138583/1 v4.5.6.201903121547-r
Matthias Sohn [Tue, 12 Mar 2019 19:47:04 +0000 (20:47 +0100)]
JGit v4.5.6.201903121547-r

Change-Id: I5a071ed10e1ac1ab28f992d45cde335c12556a80
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoCheck for packfile validity and fd before reading 44/138444/3
Luca Milanesio [Sun, 10 Mar 2019 22:03:40 +0000 (22:03 +0000)]
Check for packfile validity and fd before reading

When reading from a packfile, make sure that is valid
and has a non-null file-descriptor.

Because of concurrency between a thread invalidating a packfile
and another trying to read it, the read() may result into a NPE
that won't be able to be automatically recovered.

Throwing a PackInvalidException would instead cause the packlist
to be refreshed and the read to eventually succeed.

Bug: 544199
Change-Id: I27788b3db759d93ec3212de35c0094ecaafc2434
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
5 years agoMove throw of PackInvalidException outside the catch 63/138163/5
Luca Milanesio [Wed, 6 Mar 2019 11:30:07 +0000 (11:30 +0000)]
Move throw of PackInvalidException outside the catch

When a packfile is invalid, throw an exception explicitly
outside any catch scope, so that is not accidentally caught
by the generic catch-all cause, which would set the packfile
as valid again.

Flagging an invalid packfile as valid again would have
dangerous consequences such as the corruption of the in-memory
packlist.

Bug: 544199
Change-Id: If7a3188a68d7985776b509d636d5ddf432bec798
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
5 years agoUse FileSnapshot to get lastModified on PackFile 21/138521/2
Luca Milanesio [Tue, 12 Mar 2019 07:00:01 +0000 (07:00 +0000)]
Use FileSnapshot to get lastModified on PackFile

Do not redundantly call File.lastModified() for extracting the
timestamp of the PackFile but rather use consistently the FileSnapshot
which reads all file attributes in a single bulk call.

Change-Id: I932675ae4fe56dcd3833dac249816f097303bb09
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoInclude size when comparing FileSnapshot 00/138200/6
Luca Milanesio [Wed, 6 Mar 2019 17:51:59 +0000 (17:51 +0000)]
Include size when comparing FileSnapshot

Due to finite filesystem timestamp resolution the last modified
timestamp of files cannot detect file changes which happened in the
immediate past (less than one filesystem timer tick ago).

Read and consider file size also, so that differing file size can help
to more accurately detect file changes without reading the file content.
Use bulk read to avoid multiple stat calls to retrieve file attributes.

Change-Id: I974288fff78ac78c52245d9218b5639603f67a46
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoDo not reuse packfiles when changed on filesystem 90/138190/4
Luca Milanesio [Wed, 6 Mar 2019 00:31:45 +0000 (00:31 +0000)]
Do not reuse packfiles when changed on filesystem

The pack reload mechanism from the filesystem works only by name
and does not check the actual last modified date of the packfile.

This lead to concurrency issues where multiple threads were loading
and removing from each other list of packfiles when one of those
was failing the checksum.

Rely on FileSnapshot rather than directly checking lastModified
timestamp so that more checks can be performed.

Bug: 544199
Change-Id: I173328f29d9914007fd5eae3b4c07296ab292390
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
5 years agoSilence API warnings for new API introduced for fixes 60/138560/1
Matthias Sohn [Tue, 12 Mar 2019 13:30:20 +0000 (14:30 +0100)]
Silence API warnings for new API introduced for fixes

Change-Id: I3ea7ff2efd33ca6c780afaef9010cec82780d7fa
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-5.3' 12/138512/1
Matthias Sohn [Mon, 11 Mar 2019 23:13:59 +0000 (00:13 +0100)]
Merge branch 'stable-5.3'

* stable-5.3:
  Reduce contention on PackFile.idx() function.
  Use SystemReader in JSchConfigSessionFactoryTest
  Avoid NPE in ObjectId.isId()

Change-Id: I1d13f6fb705258ae6d6e5fa5e733bfacd4f3d0e3
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-5.2' into stable-5.3 11/138511/1
Matthias Sohn [Mon, 11 Mar 2019 23:12:59 +0000 (00:12 +0100)]
Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  Reduce contention on PackFile.idx() function.

Change-Id: I6bf4c1db695b8fa134ea425bbd488d2dc5438152
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-5.1' into stable-5.2 10/138510/1
Matthias Sohn [Mon, 11 Mar 2019 23:11:54 +0000 (00:11 +0100)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Reduce contention on PackFile.idx() function.

Change-Id: I3f981dd923209e4d2d23f3b10db9fda1e9e68104
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-5.0' into stable-5.1 09/138509/1
Matthias Sohn [Mon, 11 Mar 2019 23:10:51 +0000 (00:10 +0100)]
Merge branch 'stable-5.0' into stable-5.1

* stable-5.0:
  Reduce contention on PackFile.idx() function.

Change-Id: Ic50f375faa757076e2dfd6c25e9e0025482aa3d9
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-4.11' into stable-5.0 08/138508/1
Matthias Sohn [Mon, 11 Mar 2019 23:09:34 +0000 (00:09 +0100)]
Merge branch 'stable-4.11' into stable-5.0

* stable-4.11:
  Reduce contention on PackFile.idx() function.

Change-Id: Ib1be8c04c9587c595f7d95df26f7be9b237bda40
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-4.10' into stable-4.11 07/138507/1
Matthias Sohn [Mon, 11 Mar 2019 23:08:13 +0000 (00:08 +0100)]
Merge branch 'stable-4.10' into stable-4.11

* stable-4.10:
  Reduce contention on PackFile.idx() function.

Change-Id: I5dd7576018ab2e85d77d336f97c8e77ad71520c9
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-4.9' into stable-4.10 06/138506/1
Matthias Sohn [Mon, 11 Mar 2019 23:05:55 +0000 (00:05 +0100)]
Merge branch 'stable-4.9' into stable-4.10

* stable-4.9:
  Reduce contention on PackFile.idx() function.

Change-Id: I277e53aa752c8ffb8560de710d27ecb58871ec02
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoReduce contention on PackFile.idx() function. 99/138499/1
Juergen Denner [Tue, 15 Jan 2019 12:22:54 +0000 (13:22 +0100)]
Reduce contention on PackFile.idx() function.

In case of concurrent pack file access, threads may wait on the idx()
function even for already open files. This happens especially with a
slow file system.

Performance numbers are listed in the bug report.

Bug: 543739
Change-Id: Iff328d347fa65ae07ecce3267d44184161248978
Signed-off-by: Juergen Denner <j.denner@sap.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoUse SystemReader in JSchConfigSessionFactoryTest 14/138414/2
Matthias Sohn [Sat, 9 Mar 2019 00:21:40 +0000 (01:21 +0100)]
Use SystemReader in JSchConfigSessionFactoryTest

This isolates the test from the concrete system it's running on.
SshSessionFactory reads the user also through SystemReader.

Change-Id: I1c796aa1c498fe3967456d8589e6be0a82ab8f44
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoAvoid NPE in ObjectId.isId() 20/138420/2
Michael Keppler [Sat, 9 Mar 2019 11:37:10 +0000 (12:37 +0100)]
Avoid NPE in ObjectId.isId()

That method can easily be invoked with a null argument (e.g.
isId(repo.getFullBranch()), therefore it should handle null arguments.

Change was suggested in https://git.eclipse.org/r/#/c/137918/, which
tried to fix the same in egit only.

Bug:544982
Change-Id: I32d1df6e9b2946ab324eda7008721159019316b3
Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
5 years agoFix Javadoc typo 90/138390/1
Michael Keppler [Fri, 8 Mar 2019 13:43:30 +0000 (14:43 +0100)]
Fix Javadoc typo

Change-Id: I3f169eaf649843e954762bb4ac8f72fa5f88a67a
Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
5 years agoUploadPack: Do not retain commit body when checking wants 14/138314/1
Jonathan Nieder [Fri, 8 Mar 2019 03:58:35 +0000 (19:58 -0800)]
UploadPack: Do not retain commit body when checking wants

The commit body contains the commit message, which is not needed for
reachability checks.

Change-Id: Ie209c3b3f022579942f05b8b5d0625ce26400a5d
Signed-off-by: Jonathan Nieder <jrn@google.com>
5 years agoFetchV2Request.getWantedRefs: Bump @since to 5.4 12/138312/2
Ivan Frade [Fri, 8 Mar 2019 01:33:35 +0000 (17:33 -0800)]
FetchV2Request.getWantedRefs: Bump @since to 5.4

The visibility change was merged after 5.3 release. The @since line
is wrong.

Fixing it in a new commit looks like the easiest way forward.

Change-Id: I6f72a9e684e99a4440cda1eb532c22b4b7bbdea5
Signed-off-by: Ivan Frade <ifrade@google.com>
5 years agoMerge "FetchV2Request: make getWantedRefs public"
Jonathan Nieder [Thu, 7 Mar 2019 22:28:05 +0000 (17:28 -0500)]
Merge "FetchV2Request: make getWantedRefs public"

5 years agoMerge "Prepare 5.4.0-SNAPSHOT builds"
Matthias Sohn [Thu, 7 Mar 2019 16:16:46 +0000 (11:16 -0500)]
Merge "Prepare 5.4.0-SNAPSHOT builds"

5 years agoMerge "Merge branch 'stable-5.3'"
Matthias Sohn [Thu, 7 Mar 2019 16:16:27 +0000 (11:16 -0500)]
Merge "Merge branch 'stable-5.3'"

5 years agoPrepare 5.4.0-SNAPSHOT builds 34/138234/1
Matthias Sohn [Wed, 6 Mar 2019 23:34:14 +0000 (00:34 +0100)]
Prepare 5.4.0-SNAPSHOT builds

Change-Id: I90a4791f63d0eba23da744c720e869f1830b86e7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoDo not retain commit body in RevWalk for reachability checks 31/138231/1
Minh Thai [Wed, 6 Mar 2019 23:25:10 +0000 (15:25 -0800)]
Do not retain commit body in RevWalk for reachability checks

Commit body contains the message that is not needed for reachability checks, and
takes up memory unnecessarily.

Change-Id: I0c7f6da249bf9c4fda9dc9e62e809322c68effce
Signed-off-by: Minh Thai <mthai@google.com>
5 years agoMerge branch 'stable-5.3' 33/138233/1
Matthias Sohn [Wed, 6 Mar 2019 23:25:22 +0000 (00:25 +0100)]
Merge branch 'stable-5.3'

* stable-5.3:
  Prepare 5.3.0-SNAPSHOT builds
  JGit v5.3.0.201903061415-rc1
  Fix error log message in ObjectDirectory.handlePackError()
  Properly format pack checksums in PackFile.idx()
  Cancel gc if thread was interrupted
  PackFile: report correct message for checksum mismatch
  ObjectDirectory: Clean up logging
  Bazel: Stop using native.git_repository
  ObjectDirectory: extra logging on packfile exceptions

Change-Id: I8c7dfd5141be0d27547d65f19054f9a1665b55fb

5 years agoPrepare 5.3.0-SNAPSHOT builds 26/138226/1
Matthias Sohn [Wed, 6 Mar 2019 21:26:03 +0000 (22:26 +0100)]
Prepare 5.3.0-SNAPSHOT builds

Change-Id: I9b934bcfad3d2091f4da163170348b0c8ef5e732
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoJGit v5.3.0.201903061415-rc1 12/138212/1 v5.3.0.201903061415-rc1
Matthias Sohn [Wed, 6 Mar 2019 19:03:00 +0000 (20:03 +0100)]
JGit v5.3.0.201903061415-rc1

Change-Id: I85866af97fe1c0c0a0da83a7605484082fa56b52
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoTrack object inflation time in DfsReaderIoStats 06/138206/2
Terry Parker [Wed, 6 Mar 2019 18:01:16 +0000 (10:01 -0800)]
Track object inflation time in DfsReaderIoStats

This can help track down poor long tail performance that isn't accounted
for in the readIdxMicros or readBlockMicros metrics.

Change-Id: I701b9cfcc124f4ddb860d1766a11ea3557e604ce
Signed-off-by: Terry Parker <tparker@google.com>
5 years agoMerge branch 'master' into stable-5.3 59/138159/1
Matthias Sohn [Wed, 6 Mar 2019 10:57:39 +0000 (11:57 +0100)]
Merge branch 'master' into stable-5.3

* master:
  Update Orbit to R20190226160451
  Upgrade maven-javadoc-plugin to 3.1.0
  diff: add option metaVar for --src-prefix and --dst-prefix
  ResolveMerger: Destroy TemporaryBuffer on unchecked exceptions
  Expose the filter blob limit in UploadPack
  Upgrade error_prone_core to 2.3.3
  On Windows use %APPDATA%\gnupg as GPG directory if it exists
  Remove duplicate externalized message
  RebaseCommand: tighten check for --preserve-merges on --continue
  RebaseCommand: fix ONTO_NAME, and --preserve-merges is interactive
  RebaseCommand: use orig-head to abort
  Fix core.autocrlf for non-normalized index
  RebaseCommand: use orig-head in addition to head
  SHA1: Use externalized message in log
  JGitText: Remove unnecessary suffix from externalized message identifier
  FS_POSIX: Externalize log message
  Strongly reference indices in DfsPackFile
  Update Orbit to S20190219190953
  Update README
  Update README
  Add missing @since tag for new API method getUpdateIndex
  Fix NPE in PlotCommitList
  CommitBuilder: Deprecate setEncoding(String)
  CommitBuilder: Add missing periods on methods' Javadoc
  Upgrade wagon-ssh to 3.3.2
  Fix bug in copyPackBypassCache's skip 'PACK' header logic
  Upgrade spotbugs to 3.1.11
  Atomic file creation: hard-linking may not be allowed
  Update Orbit to S20190129210011
  Fix GC.deleteEmptyRefsFolders
  Enable cloning only specific tags
  Delete jgit-4.5 target platform
  Add 4.11-staging target platform and update Orbit to I20190123233226
  Upgrade jacoco-maven-plugin to 0.8.3
  Bazel: Format BUILD file with buildifier
  RenameBranchCommand: more consistent handling of short ref names
  SshdSessionFactory: generalize providing default keys
  Allow to check for signing key
  Handle premature EOF in BundleFetchConnection
  pgm: Fix missing braces in Version.run()
  pgm: Handle IOException in Version command
  pgm: Fix missing braces in UploadPack.run()
  pgm: Handle IOException in UploadPack command
  pgm: Handle exceptions in Tag command
  pgm: Fix missing braces in Status.run()
  pgm: Handle exceptions in Status command
  pgm: Fix missing braces in ShowRef.run()
  pgm: Handle IOException in ShowRef command
  pgm: Fix missing braces in Show.run()
  pgm: Handle exceptions in Show command
  pgm: Fix missing braces in Rm command
  pgm: Handle GitAPIException in Rm command
  pgm: Handle exceptions in RevParse command
  pgm: Externalize error message
  pgm: Fix missing braces in Reset.run()
  pgm: Handle GitAPIException in Reset command
  pgm: Handle GitAPIException in Repo command
  pgm: Handle exceptions in Remote command
  pgm: Handle exceptions in Reflog command
  pgm: Handle IOException in ReceivePack command
  SmartClientSmartServerTest: Open Repository in try-with-resource
  SmartClientSmartServerTest: Open ObjectInserter.Formatter in try-with-resource
  SmartClientSmartServerTest#addBrokenContext: Remove unused TestRepository
  IO: Open TemporaryBuffer.Heap in try-with-resource
  GitSmartHttpTools: Open SideBandOutputStream in try-with-resource
  TemporaryBufferTest: Open TemporaryBuffer in try-with-resource
  Scanner: Open RevWalk in try-with-resource
  SubmoduleWalkTest: Open Repository in try-with-resource
  SideBandOutputStreamTest: Open SideBandOutputStream in try-with-resource
  UnionInputStreamTest: Open UnionInputStream in try-with-resource
  Merge: Avoid non-localised literal string warning for "recursive"
  pgm: Fix missing braces in Push.run()
  pgm: Handle exceptions in Push command
  pgm: Fix missing braces in MergeBase.run()
  pgm: Handle IOException in MergeBase command
  pgm: Fix missing braces in Merge command
  pgm: Handle exceptions in Merge command
  pgm: Fix missing braces in LsTree.run()
  pgm: Handle exceptions in LsTree command
  pgm: Fix missing braces in LsRemote.run()
  pgm: Handle exceptions in LsRemote command
  pgm: Handle exceptions in LsFiles command
  pgm: Fix missing braces in Log.run()
  pgm: Handle exceptions in Log command
  pgm: Handle exceptions in Init command
  pgm: Handle IOException in IndexPack command
  pgm: Fix missing braces in Fetch.run()
  pgm: Handle IOException in Fetch command
  pgm: Handle GitAPIException in Gc command
  pgm: Fix missing braces in DiffTree.run()
  pgm: Handle exceptions in DiffTree command
  pgm: Fix missing braces in Diff.run()
  pgm: Handle exceptions in Diff command
  RawParseUtils: Avoid import of java.nio.charset.StandardCharsets
  Consistently import constants from StandardCharsets as static
  LocalDiskRepositoryTestCase#createRepository: Default auto-close to false
  UploadPack: Suppress false-positive resource leak warning
  PushConnectionTest: Open TestRepository in try-with-resource
  MergerTest: Open TestRepository in try-with-resource
  MergeCommandTest: Open TestRepository in try-with-resource
  PackWriterTest: Open TestRepository in try-with-resource
  ReceivePackAdvertiseRefsHookTest: Open TestRepository in try-with-resource
  SubmoduleStatusTest: Open TestRepository in try-with-resource
  UploadPackTest: Open TestRepository in try-with-resource
  PackParserTest: Open TestRepository in try-with-resource
  SmartClientSmartServerTest: Open TestRepository in try-with-resource
  Stop using deprecated methods of RemoteSetUrlCommand/RemoteRemoveCommand
  SmartClientSmartServerTest: Stop using deprecated Repository#hasObject
  DumbClientSmartServerTest: Open TestRepository in try-with-resource
  DumbClientDumbServerTest: Open TestRepository in try-with-resource
  DirCacheCheckoutTest: Open TestRepository in try-with-resource
  HttpTestCase#fsck: Open TestRepository in try-with-resource
  CheckoutCommandTest: Add comment to document intentionally empty catch block
  pgm: Fix missing braces in Describe.run()
  pgm: Handle exceptions in Describe command
  pgm: Handle exceptions in Config command
  pgm: Fix too wide lines in Commit.run()
  pgm: Fix missing braces in Commit.run()
  pgm: Handle exceptions in Commit command
  pgm: Handle exceptions in Clean command
  pgm: Handle GitAPIException in Fetch command
  Fix missing braces in Branch.run()
  pgm: Handle exceptions in Branch command
  Fix missing braces in Blame.run()
  pgm: Handle NoWorkTreeException and IOException in Blame command
  Use try-with-resource for reader in Blame.run()
  pgm: Handle GitAPIException in Add command

Change-Id: I6d546885beb9596120e201973995a7c6bfe115e0

5 years agoMerge branch 'stable-5.2' into stable-5.3 44/138144/1
Matthias Sohn [Wed, 6 Mar 2019 08:44:37 +0000 (09:44 +0100)]
Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  Fix error log message in ObjectDirectory.handlePackError()
  Properly format pack checksums in PackFile.idx()
  Cancel gc if thread was interrupted
  PackFile: report correct message for checksum mismatch
  ObjectDirectory: Clean up logging
  Bazel: Stop using native.git_repository
  ObjectDirectory: extra logging on packfile exceptions

Change-Id: I81cf1cdc9d8dcd54536a79e522274fd244fa1d00

5 years agoMerge branch 'stable-5.1' into stable-5.2 38/138138/1
David Pursehouse [Wed, 6 Mar 2019 06:55:47 +0000 (15:55 +0900)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Fix error log message in ObjectDirectory.handlePackError()
  Properly format pack checksums in PackFile.idx()
  Cancel gc if thread was interrupted
  PackFile: report correct message for checksum mismatch
  ObjectDirectory: Clean up logging
  Bazel: Stop using native.git_repository
  ObjectDirectory: extra logging on packfile exceptions

Change-Id: Id9f957ca8386f6035f4ab34d242cb6fb8c38e012
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoMerge branch 'stable-5.0' into stable-5.1 33/138133/1
David Pursehouse [Wed, 6 Mar 2019 05:16:07 +0000 (14:16 +0900)]
Merge branch 'stable-5.0' into stable-5.1

* stable-5.0:
  Fix error log message in ObjectDirectory.handlePackError()
  Properly format pack checksums in PackFile.idx()
  Cancel gc if thread was interrupted
  PackFile: report correct message for checksum mismatch
  ObjectDirectory: Clean up logging
  Bazel: Stop using native.git_repository
  ObjectDirectory: extra logging on packfile exceptions

Change-Id: I056f41f619a1bb22ca6be75ec21c32c1f6d4fd2f
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoMerge branch 'stable-4.11' into stable-5.0 32/138132/1
David Pursehouse [Wed, 6 Mar 2019 05:15:23 +0000 (14:15 +0900)]
Merge branch 'stable-4.11' into stable-5.0

* stable-4.11:
  Fix error log message in ObjectDirectory.handlePackError()
  Properly format pack checksums in PackFile.idx()
  Cancel gc if thread was interrupted
  PackFile: report correct message for checksum mismatch
  ObjectDirectory: Clean up logging
  Bazel: Stop using native.git_repository
  ObjectDirectory: extra logging on packfile exceptions

Change-Id: If75b149e693005dd3fe06b523e6e6784bedf44c1
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoMerge branch 'stable-4.10' into stable-4.11 31/138131/1
David Pursehouse [Wed, 6 Mar 2019 05:14:29 +0000 (14:14 +0900)]
Merge branch 'stable-4.10' into stable-4.11

* stable-4.10:
  Fix error log message in ObjectDirectory.handlePackError()
  Properly format pack checksums in PackFile.idx()
  Cancel gc if thread was interrupted
  PackFile: report correct message for checksum mismatch
  ObjectDirectory: Clean up logging
  Bazel: Stop using native.git_repository
  ObjectDirectory: extra logging on packfile exceptions

Change-Id: I9052e318b5d920770f7c7121d36e3c58df9d5f5a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoMerge branch 'stable-4.9' into stable-4.10 30/138130/1
David Pursehouse [Wed, 6 Mar 2019 05:13:35 +0000 (14:13 +0900)]
Merge branch 'stable-4.9' into stable-4.10

* stable-4.9:
  Fix error log message in ObjectDirectory.handlePackError()
  Properly format pack checksums in PackFile.idx()
  Cancel gc if thread was interrupted
  PackFile: report correct message for checksum mismatch
  ObjectDirectory: Clean up logging
  Bazel: Stop using native.git_repository
  ObjectDirectory: extra logging on packfile exceptions

Change-Id: I0847251eb010616a705e0b91df4bdebc225fa95d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoFix error log message in ObjectDirectory.handlePackError() 27/138127/1
Matthias Sohn [Mon, 4 Mar 2019 12:44:24 +0000 (13:44 +0100)]
Fix error log message in ObjectDirectory.handlePackError()

Change-Id: I154f392ad025c4b642eb1123d375a0afaa853885
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
(cherry picked from commit 997d785418d55dce5a1188fdb95e6d2b4ab0bde5)

5 years agoProperly format pack checksums in PackFile.idx() 26/138126/1
Matthias Sohn [Mon, 4 Mar 2019 12:28:25 +0000 (13:28 +0100)]
Properly format pack checksums in PackFile.idx()

Change-Id: Id805850dbe9a3d633168f3056e06ddeafd86f961
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
(cherry picked from commit a33e4dc58a87daf34072b82643aba0fd4456c165)

5 years agoCancel gc if thread was interrupted 25/138125/1
Matthias Sohn [Thu, 6 Jul 2017 22:58:28 +0000 (00:58 +0200)]
Cancel gc if thread was interrupted

see
https://groups.google.com/d/msg/repo-discuss/oDB2rl3doDc/tFEh5Xt0CAAJ

Change-Id: Ia6d4631c64e065d8b9b09e0b45e7a9ea8ac3f41d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
(cherry picked from commit 882fed0d96c533513c43ae77aaff9cc07b94012c)

5 years agoPackFile: report correct message for checksum mismatch 24/138124/1
Luca Milanesio [Sat, 23 Feb 2019 21:57:09 +0000 (21:57 +0000)]
PackFile: report correct message for checksum mismatch

When the packfile checksum does not match the expected one
report the correct checksum error instead of reporting that
the number of objects is incorrect.

Change-Id: I040f36dacc4152ae05453e7acbf8dfccceb46e0d
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
(cherry picked from commit 436c99ce5946f31f06b8704b1fd33136f39dc814)

5 years agoObjectDirectory: Clean up logging 23/138123/1
David Pursehouse [Sun, 24 Feb 2019 23:35:12 +0000 (08:35 +0900)]
ObjectDirectory: Clean up logging

Externalize the message and log the pack file with absolute path.

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

5 years agoBazel: Stop using native.git_repository 22/138122/1
David Pursehouse [Sun, 3 Mar 2019 04:14:46 +0000 (13:14 +0900)]
Bazel: Stop using native.git_repository

The native.git_repository method doesn't work in the latest version
of bazel, and causes the build to fail with:

  type 'struct' has no method git_repository()

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

5 years agoObjectDirectory: extra logging on packfile exceptions 21/138121/1
Luca Milanesio [Mon, 11 Feb 2019 07:49:43 +0000 (07:49 +0000)]
ObjectDirectory: extra logging on packfile exceptions

Display extra logging, including the exception with the associated
stacktrace, whenever a packFile can't be read and thus removed
from the packlist.

Change-Id: I97a4e31dc427bfcc0baae438dcbe2dcd4704b824
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
(cherry picked from commit 962babc4b27ffd90058fe7734f17ed1c4e77d958)

5 years agoUpdate Orbit to R20190226160451 16/138116/1
Matthias Sohn [Tue, 5 Mar 2019 23:41:47 +0000 (00:41 +0100)]
Update Orbit to R20190226160451

Change-Id: I43bfd56b029b4bf16aaf001915a9dabeb189a9e2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge "Upgrade maven-javadoc-plugin to 3.1.0"
Matthias Sohn [Tue, 5 Mar 2019 19:19:39 +0000 (14:19 -0500)]
Merge "Upgrade maven-javadoc-plugin to 3.1.0"

5 years agoMerge "Merge branch 'stable-5.2'"
Matthias Sohn [Tue, 5 Mar 2019 19:19:28 +0000 (14:19 -0500)]
Merge "Merge branch 'stable-5.2'"

5 years agoMerge "diff: add option metaVar for --src-prefix and --dst-prefix"
Christian Halstrick [Tue, 5 Mar 2019 13:50:42 +0000 (08:50 -0500)]
Merge "diff: add option metaVar for --src-prefix and --dst-prefix"

5 years agoUpgrade maven-javadoc-plugin to 3.1.0 62/138062/1
David Pursehouse [Tue, 5 Mar 2019 10:54:31 +0000 (19:54 +0900)]
Upgrade maven-javadoc-plugin to 3.1.0

Change-Id: I4fc59b02e92db55797b9773648fd1dea88682ade
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoMerge branch 'stable-5.2' 55/137955/2
David Pursehouse [Tue, 5 Mar 2019 01:24:34 +0000 (10:24 +0900)]
Merge branch 'stable-5.2'

* stable-5.2:
  Fix error log message in ObjectDirectory.handlePackError()
  Properly format pack checksums in PackFile.idx()
  Cancel gc if thread was interrupted
  PackFile: report correct message for checksum mismatch
  ObjectDirectory: Clean up logging
  Bazel: Stop using native.git_repository

Change-Id: Ib972641105cef8089791fc65389c4f43e218620a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoMerge branch 'stable-5.1' into stable-5.2 54/137954/2
David Pursehouse [Tue, 5 Mar 2019 01:23:38 +0000 (10:23 +0900)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Fix error log message in ObjectDirectory.handlePackError()
  Properly format pack checksums in PackFile.idx()
  Cancel gc if thread was interrupted
  PackFile: report correct message for checksum mismatch
  ObjectDirectory: Clean up logging
  Bazel: Stop using native.git_repository

Change-Id: I42b72a3bba3b4c9389d91a1a35a8004836567e7c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agodiff: add option metaVar for --src-prefix and --dst-prefix 82/137482/3
Andre Bossert [Sat, 23 Feb 2019 15:03:58 +0000 (16:03 +0100)]
diff: add option metaVar for --src-prefix and --dst-prefix

Fixes exception if using "jgit diff --help".

Bug: 544735
Change-Id: I694ff3103da4bc199dd03c40962c5be191eddcd1
Signed-off-by: Andre Bossert <andre.bossert@siemens.com>
5 years agoFix error log message in ObjectDirectory.handlePackError() 90/137990/1
Matthias Sohn [Mon, 4 Mar 2019 12:44:24 +0000 (13:44 +0100)]
Fix error log message in ObjectDirectory.handlePackError()

Change-Id: I154f392ad025c4b642eb1123d375a0afaa853885
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoProperly format pack checksums in PackFile.idx() 89/137989/1
Matthias Sohn [Mon, 4 Mar 2019 12:28:25 +0000 (13:28 +0100)]
Properly format pack checksums in PackFile.idx()

Change-Id: Id805850dbe9a3d633168f3056e06ddeafd86f961
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoCancel gc if thread was interrupted 45/137945/1
Matthias Sohn [Thu, 6 Jul 2017 22:58:28 +0000 (00:58 +0200)]
Cancel gc if thread was interrupted

see
https://groups.google.com/d/msg/repo-discuss/oDB2rl3doDc/tFEh5Xt0CAAJ

Change-Id: Ia6d4631c64e065d8b9b09e0b45e7a9ea8ac3f41d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoPackFile: report correct message for checksum mismatch 83/137483/3
Luca Milanesio [Sat, 23 Feb 2019 21:57:09 +0000 (21:57 +0000)]
PackFile: report correct message for checksum mismatch

When the packfile checksum does not match the expected one
report the correct checksum error instead of reporting that
the number of objects is incorrect.

Change-Id: I040f36dacc4152ae05453e7acbf8dfccceb46e0d
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoObjectDirectory: Clean up logging 99/137499/3
David Pursehouse [Sun, 24 Feb 2019 23:35:12 +0000 (08:35 +0900)]
ObjectDirectory: Clean up logging

Externalize the message and log the pack file with absolute path.

Change-Id: I019052dfae8fd96ab67da08b3287d699287004cb
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoBazel: Stop using native.git_repository 32/137932/1
David Pursehouse [Sun, 3 Mar 2019 04:14:46 +0000 (13:14 +0900)]
Bazel: Stop using native.git_repository

The native.git_repository method doesn't work in the latest version
of bazel, and causes the build to fail with:

  type 'struct' has no method git_repository()

Change-Id: Id6a57369b681c0afe811e9e3740b141fb7fb4653
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoResolveMerger: Destroy TemporaryBuffer on unchecked exceptions 02/137902/1
Dave Borowitz [Fri, 1 Mar 2019 20:35:38 +0000 (12:35 -0800)]
ResolveMerger: Destroy TemporaryBuffer on unchecked exceptions

Previously, we called destroy() to delete the temp file on failure only
when catching an IOException, not a RuntimeException. Use a slightly
different construction with a finally block to ensure it's always
deleted on error (assuming the JVM is still healthy enough).

Change-Id: Ie201f3cfc81099ee1cafed066632da76223cef1f

5 years agoFetchV2Request: make getWantedRefs public 38/137838/2
Ivan Frade [Thu, 24 Jan 2019 20:38:07 +0000 (12:38 -0800)]
FetchV2Request: make getWantedRefs public

There are valid cases where a hook, invoked by ProtocolV2Hook
and probably implemented in a different package, is interested
in knowing the wanted refs in the request.

Increase visibility to public in the wanted-ref method.

Change-Id: I5da085ac7af4c396c1cb85e630f40a57fc70b33e
Signed-off-by: Ivan Frade <ifrade@google.com>
5 years agoExpose the filter blob limit in UploadPack 35/137835/1
Terry Parker [Fri, 1 Mar 2019 00:00:24 +0000 (16:00 -0800)]
Expose the filter blob limit in UploadPack

Similar to UploadPack.getDepth() to know the shallow clone depth, expose
the user-specified filter blob limit for partial clones.

Change-Id: I04bde06862a1cf8a9862d950c15023c49d16a2a6
Signed-off-by: Terry Parker <tparker@google.com>
5 years agoUpgrade error_prone_core to 2.3.3 17/137517/2
David Pursehouse [Mon, 25 Feb 2019 10:13:01 +0000 (19:13 +0900)]
Upgrade error_prone_core to 2.3.3

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