]> source.dussan.org Git - jgit.git/log
jgit.git
6 years agoFix javadoc in org.eclipse.jgit patch and revplot package 79/113679/2
Matthias Sohn [Mon, 18 Dec 2017 22:45:58 +0000 (23:45 +0100)]
Fix javadoc in org.eclipse.jgit patch and revplot package

Change-Id: I6f1aba98bf7034cb51494c546806cf1b72dd1473
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit nls and notes package 78/113678/2
Matthias Sohn [Mon, 18 Dec 2017 22:29:46 +0000 (23:29 +0100)]
Fix javadoc in org.eclipse.jgit nls and notes package

Change-Id: I1b65fba5b4856f98974dc10f549540d401ef916f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit merge package 35/113635/4
Matthias Sohn [Mon, 18 Dec 2017 16:07:03 +0000 (17:07 +0100)]
Fix javadoc in org.eclipse.jgit merge package

Change-Id: I735d0f2e9f10531ed43b7b3dd6314c574392422f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit lib package 31/113631/3
Matthias Sohn [Mon, 18 Dec 2017 15:52:40 +0000 (16:52 +0100)]
Fix javadoc in org.eclipse.jgit lib package

Change-Id: I1e85a951488177993521ce177fdea212615e6164
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit storage/reftree package 28/113628/3
Matthias Sohn [Mon, 18 Dec 2017 15:00:44 +0000 (16:00 +0100)]
Fix javadoc in org.eclipse.jgit storage/reftree package

Change-Id: Ie206b5340ad2019a1e0bd2bcede2c1e5a279f2d5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit storage/reftable package 27/113627/3
Matthias Sohn [Mon, 18 Dec 2017 14:56:57 +0000 (15:56 +0100)]
Fix javadoc in org.eclipse.jgit storage/reftable package

Change-Id: I14764c5d5b2309d82fe2ccc0593120b51328bf41
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit storage/pack package 25/113625/3
Matthias Sohn [Mon, 18 Dec 2017 14:33:32 +0000 (15:33 +0100)]
Fix javadoc in org.eclipse.jgit storage/pack package

Change-Id: Id1b7d392e1bb36079edaf16450e73a044a318e7e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit storage/io package 24/113624/3
Matthias Sohn [Mon, 18 Dec 2017 14:18:21 +0000 (15:18 +0100)]
Fix javadoc in org.eclipse.jgit storage/io package

Change-Id: I2db781311af79510b26fd05cc0556623e75e3eff
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit storage/file package 23/113623/3
Matthias Sohn [Mon, 18 Dec 2017 14:17:21 +0000 (15:17 +0100)]
Fix javadoc in org.eclipse.jgit storage/file package

Change-Id: Ieb2f66aef2cab7e2a6d8e35c5f5047da881994dd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit dfs package 20/113620/4
Matthias Sohn [Mon, 18 Dec 2017 13:45:52 +0000 (14:45 +0100)]
Fix javadoc in org.eclipse.jgit dfs package

Change-Id: I1f5e3dc3ba34b323ee7244dbefee207ce19e6021
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoStoredObjectRepresentationNotAvailableException: Add TODO to fix API in 5.0 55/114355/1
David Pursehouse [Tue, 19 Dec 2017 01:48:06 +0000 (10:48 +0900)]
StoredObjectRepresentationNotAvailableException: Add TODO to fix API in 5.0

Change-Id: I9a0e6acac1b88ddf257fe7b2b7d0142be20250ea
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoStoredObjectRepresentationNotAvailableException: Add constructor that takes cause 89/113589/3
David Pursehouse [Mon, 18 Dec 2017 05:34:13 +0000 (14:34 +0900)]
StoredObjectRepresentationNotAvailableException: Add constructor that takes cause

If the cause can be passed into the constructor, callers don't need to
instantiate it and then explicitly call initCause.

Note that the constructors in this class cause "non-API parameter type"
warnings because ObjectToPack is internal, however it's probably OK
since the only non-internal reference to it is in the pgm.debug package.

Change-Id: Ia4eab24e79f9afe6214ea8160137d941d4048319
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge changes Ifc34e96a,I72be0a0d
David Pursehouse [Mon, 18 Dec 2017 23:33:40 +0000 (18:33 -0500)]
Merge changes Ifc34e96a,I72be0a0d

* changes:
  Fix javadoc in org.eclipse.jgit rewalk package
  Fix javadoc in org.eclipse.jgit ketch package

6 years agoConfig: Rewrite subsection and value escaping and parsing 65/113665/2
Dave Borowitz [Mon, 18 Dec 2017 20:35:02 +0000 (15:35 -0500)]
Config: Rewrite subsection and value escaping and parsing

Previously, Config was using the same method for both escaping and
parsing subsection names and config values. The goal was presumably code
savings, but unfortunately, these two pieces of the git config format
are simply different.

In git v2.15.1, Documentation/config.txt says the following about
subsection names:

  "Subsection names are case sensitive and can contain any characters
  except newline (doublequote `"` and backslash can be included by
  escaping them as `\"` and `\\`, respectively).  Section headers cannot
  span multiple lines.  Variables may belong directly to a section or to
  a given subsection."

And, later in the same documentation section, about values:

  "A line that defines a value can be continued to the next line by
  ending it with a `\`; the backquote and the end-of-line are stripped.
  Leading whitespaces after 'name =', the remainder of the line after
  the first comment character '#' or ';', and trailing whitespaces of
  the line are discarded unless they are enclosed in double quotes.
  Internal whitespaces within the value are retained verbatim.

  Inside double quotes, double quote `"` and backslash `\` characters
  must be escaped: use `\"` for `"` and `\\` for `\`.

  The following escape sequences (beside `\"` and `\\`) are recognized:
  `\n` for newline character (NL), `\t` for horizontal tabulation (HT,
  TAB) and `\b` for backspace (BS).  Other char escape sequences
  (including octal escape sequences) are invalid."

The main important differences are that subsection names have a limited
set of supported escape sequences, and do not support newlines at all,
either escaped or unescaped. Arguably, it would be easy to support
escaped newlines, but C git simply does not:

  $ git config -f foo.config $'foo.bar\nbaz.quux' value
  error: invalid key (newline): foo.bar
  baz.quux

I468106ac was an attempt to fix one bug in escapeValue, around leading
whitespace, without having to rewrite the whole escaping/parsing code.
Unfortunately, because escapeValue was used for escaping subsection
names as well, this made it possible to write invalid config files, any
time Config#toText is called with a subsection name with trailing
whitespace, like {foo }.

Rather than pile hacks on top of hacks, fix it for real by largely
rewriting the escaping and parsing code.

In addition to fixing escape sequences, fix (and write tests for) a few
more issues in the old implementation:

* Now that we can properly parse it, always emit newlines as "\n" from
  escapeValue, rather than the weird (but still supported) syntax with a
  non-quoted trailing literal "\n\" before the newline. In addition to
  producing more readable output and matching the behavior of C git,
  this makes the escaping code much simpler.
* Disallow '\0' entirely within both subsection names and values, since
  due to Unix command line argument conventions it is impossible to pass
  such values to "git config".
* Properly preserve intra-value whitespace when parsing, rather than
  collapsing it all to a single space.

Change-Id: I304f626b9d0ad1592c4e4e449a11b136c0f8b3e3

6 years agoFix javadoc in org.eclipse.jgit rewalk package 19/113619/2
Matthias Sohn [Mon, 18 Dec 2017 13:05:44 +0000 (14:05 +0100)]
Fix javadoc in org.eclipse.jgit rewalk package

Change-Id: Ifc34e96a56df30e3b73bef812eea943623af7906
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit ketch package 18/113618/2
Matthias Sohn [Mon, 18 Dec 2017 13:04:41 +0000 (14:04 +0100)]
Fix javadoc in org.eclipse.jgit ketch package

Change-Id: I72be0a0d5ac7d3e957597803bd103dbbec141ba4

6 years agoFix javadoc in org.eclipse.jgit internal and fsck packages 16/113616/1
Matthias Sohn [Mon, 18 Dec 2017 12:25:04 +0000 (13:25 +0100)]
Fix javadoc in org.eclipse.jgit internal and fsck packages

Change-Id: Ib12da10aacda9389d594bf4f521e9a58d1935701
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit ignore package 14/113614/2
Matthias Sohn [Mon, 18 Dec 2017 12:17:49 +0000 (13:17 +0100)]
Fix javadoc in org.eclipse.jgit ignore package

Change-Id: I1a81d371420cd4cf90ab9e048026c0ab8a763018
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit hooks package 11/113611/3
Matthias Sohn [Mon, 18 Dec 2017 10:55:56 +0000 (11:55 +0100)]
Fix javadoc in org.eclipse.jgit hooks package

Change-Id: I3b644048eb0fc19f94ba8f9799b5a2310481103f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit gitrepo package 10/113610/3
Matthias Sohn [Mon, 18 Dec 2017 10:51:33 +0000 (11:51 +0100)]
Fix javadoc in org.eclipse.jgit gitrepo package

Change-Id: I2604c7bca87f005004d6d6c80fa9a39a7a1e3807
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit fnmatch package 09/113609/3
Matthias Sohn [Mon, 18 Dec 2017 10:45:55 +0000 (11:45 +0100)]
Fix javadoc in org.eclipse.jgit fnmatch package

Change-Id: I14384c3bf3c41f8e1c62ec117837c2fc782a832f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit events package 08/113608/3
Matthias Sohn [Mon, 18 Dec 2017 10:39:12 +0000 (11:39 +0100)]
Fix javadoc in org.eclipse.jgit events package

Change-Id: Ifcb9c67daeb9da84a1461a4f731523ac5df3a223
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit errors package 06/113606/3
Matthias Sohn [Mon, 18 Dec 2017 10:34:31 +0000 (11:34 +0100)]
Fix javadoc in org.eclipse.jgit errors package

Change-Id: I46aa5c3073b99a311a1a97fc57d8f29d32524482
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit dircache package 05/113605/3
Matthias Sohn [Mon, 18 Dec 2017 10:15:00 +0000 (11:15 +0100)]
Fix javadoc in org.eclipse.jgit dircache package

Change-Id: Ib485eb217ac6be70519816f8cc0396931043a3d1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoEmtpyCommitException: Add TODO to fix misspelled class name in 5.0 88/113588/2
David Pursehouse [Mon, 18 Dec 2017 05:22:54 +0000 (14:22 +0900)]
EmtpyCommitException: Add TODO to fix misspelled class name in 5.0

Change-Id: I5bb145d6d6cbaaa2d8cfb2febad7a008ca921236
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge "PushConnectionTest: Increase maxCommandBytes yet again"
Christian Halstrick [Mon, 18 Dec 2017 10:50:03 +0000 (05:50 -0500)]
Merge "PushConnectionTest: Increase maxCommandBytes yet again"

6 years agoMerge changes I7162d729,I2761ea91
David Pursehouse [Mon, 18 Dec 2017 10:49:51 +0000 (05:49 -0500)]
Merge changes I7162d729,I2761ea91

* changes:
  Fix javadoc org.eclipse.jgit diff package
  Fix javadoc in org.eclipse.jgit annotations and api packages

6 years agoMerge "Repeat: Fix javadoc to say 'annotation' instead of 'interface'"
Christian Halstrick [Mon, 18 Dec 2017 10:48:45 +0000 (05:48 -0500)]
Merge "Repeat: Fix javadoc to say 'annotation' instead of 'interface'"

6 years agoMerge "Remove redundant @SuppressWarnings("unused")"
Christian Halstrick [Mon, 18 Dec 2017 10:48:09 +0000 (05:48 -0500)]
Merge "Remove redundant @SuppressWarnings("unused")"

6 years agoMerge "PathTreeFilterHandler: Remove unused import"
Christian Halstrick [Mon, 18 Dec 2017 10:46:12 +0000 (05:46 -0500)]
Merge "PathTreeFilterHandler: Remove unused import"

6 years agoFix javadoc org.eclipse.jgit diff package 83/113583/4
Matthias Sohn [Sun, 17 Dec 2017 23:56:12 +0000 (00:56 +0100)]
Fix javadoc org.eclipse.jgit diff package

Change-Id: I7162d72916abc8533ad37e8b17335ff4a70d6519
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit annotations and api packages 78/113578/3
Matthias Sohn [Sun, 17 Dec 2017 23:18:40 +0000 (00:18 +0100)]
Fix javadoc in org.eclipse.jgit annotations and api packages

Change-Id: I2761ea91f8dfed16ea54e7a6646af03a30c15ec9
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit blame package 80/113580/4
Matthias Sohn [Sun, 17 Dec 2017 23:36:39 +0000 (00:36 +0100)]
Fix javadoc in org.eclipse.jgit blame package

Change-Id: I116dacc7f4ace341ec6ffae2ab96b53496d89f64
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit attributes package 79/113579/4
Matthias Sohn [Sun, 17 Dec 2017 23:29:12 +0000 (00:29 +0100)]
Fix javadoc in org.eclipse.jgit attributes package

Change-Id: I12968f4be805266f285a518a014b8bd1d0c23bae
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoPushConnectionTest: Increase maxCommandBytes yet again 51/113551/2
David Pursehouse [Sun, 17 Dec 2017 06:33:39 +0000 (15:33 +0900)]
PushConnectionTest: Increase maxCommandBytes yet again

It was already increased in 61a943e and 661232b but is still not
enough to take into account snapshot versions that are 100 or more
commits ahead of tag, i.e. 4.9.2.201712150930-r.105-gc1d37ca27

Change-Id: Ibeff73adae06b92fe5bb9c5eced9e4c6a08c437c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoRepeat: Fix javadoc to say 'annotation' instead of 'interface' 86/113586/1
David Pursehouse [Mon, 18 Dec 2017 01:21:37 +0000 (10:21 +0900)]
Repeat: Fix javadoc to say 'annotation' instead of 'interface'

Change-Id: Ib0c4ec28d6b7e2fc0fe71f7dc53dd12ccd6e8a2f
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoRemove redundant @SuppressWarnings("unused") 85/113585/1
David Pursehouse [Mon, 18 Dec 2017 01:19:53 +0000 (10:19 +0900)]
Remove redundant @SuppressWarnings("unused")

These are now redundant since the parameters have javadoc.

Change-Id: I6bfde267e1712ee35871c30c8203c3b4dc5e136a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoPathTreeFilterHandler: Remove unused import 84/113584/1
David Pursehouse [Mon, 18 Dec 2017 01:17:37 +0000 (10:17 +0900)]
PathTreeFilterHandler: Remove unused import

Change-Id: I7a91210dcb775d0c9b46772f8ff3d84196ba3b10
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFix javadoc in org.eclipse.jgit.ui 72/113572/2
Matthias Sohn [Sun, 17 Dec 2017 20:46:10 +0000 (21:46 +0100)]
Fix javadoc in org.eclipse.jgit.ui

Change-Id: Iec68c73fc0d8d26fdb26850354059ea521ac7fe5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit.pgm 71/113571/2
Matthias Sohn [Sun, 17 Dec 2017 20:36:30 +0000 (21:36 +0100)]
Fix javadoc in org.eclipse.jgit.pgm

Change-Id: I74616f6e8ef69bef4db2f13a9b47ddf57714fd1f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit.lfs.server 70/113570/1
Matthias Sohn [Sun, 17 Dec 2017 19:59:02 +0000 (20:59 +0100)]
Fix javadoc in org.eclipse.jgit.lfs.server

Change-Id: I0c52536ebeeb8e71d95c6420f6db7055ff082dfa
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit.lfs 69/113569/2
Matthias Sohn [Sun, 17 Dec 2017 19:48:52 +0000 (20:48 +0100)]
Fix javadoc in org.eclipse.jgit.lfs

Change-Id: I97b53c083da6aa31719d9e10369030ee33dd23dc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit.junit 68/113568/2
Matthias Sohn [Sun, 17 Dec 2017 18:50:13 +0000 (19:50 +0100)]
Fix javadoc in org.eclipse.jgit.junit

Change-Id: I1107e6a82849ac329361baabb5c481d86ea6dc9e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit.junit.http 67/113567/1
Matthias Sohn [Sun, 17 Dec 2017 18:49:40 +0000 (19:49 +0100)]
Fix javadoc in org.eclipse.jgit.junit.http

Change-Id: I8af6d07676a285f79635405e5891535a5adfd7e9
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit.http.test 66/113566/1
Matthias Sohn [Sat, 16 Dec 2017 23:13:29 +0000 (00:13 +0100)]
Fix javadoc in org.eclipse.jgit.http.test

Change-Id: Ibd18dfed05d35bd70498d11c04c026a34114a87e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit.http.server 65/113565/1
Matthias Sohn [Sat, 16 Dec 2017 23:12:44 +0000 (00:12 +0100)]
Fix javadoc in org.eclipse.jgit.http.server

Change-Id: I732d773b21bbf64285493070964dd9e442eab5d8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit.http.apache 64/113564/1
Matthias Sohn [Sat, 16 Dec 2017 23:04:11 +0000 (00:04 +0100)]
Fix javadoc in org.eclipse.jgit.http.apache

Change-Id: I38a4854856b0103790a410b48c1c3d708b6500c1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit.archive 63/113563/1
Matthias Sohn [Sat, 16 Dec 2017 23:01:03 +0000 (00:01 +0100)]
Fix javadoc in org.eclipse.jgit.archive

Change-Id: Ibef80b15f17e884f3085e324283cefc738236a4d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix javadoc in org.eclipse.jgit.ant 62/113562/1
Matthias Sohn [Sat, 16 Dec 2017 22:53:05 +0000 (23:53 +0100)]
Fix javadoc in org.eclipse.jgit.ant

Change-Id: I97231080ebe040ad44f7189de6109b9626424d2f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoUpgrade maven-javadoc-plugin to 3.0.0 91/113291/3
David Pursehouse [Wed, 13 Dec 2017 01:35:23 +0000 (10:35 +0900)]
Upgrade maven-javadoc-plugin to 3.0.0

This version seems to be much stricter and reports a lot more errors
in the javadoc formatting.

Disable failOnError to prevent the build from failing due to these
newly reported problems. These should be fixed in a follow-up commit.

Change-Id: Ia403cbedf72cfe8bdaf09f30e42e3bf96084ae52
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoUpgrade maven-surefire{-report}-plugin to 2.20.1 90/113290/3
David Pursehouse [Wed, 13 Dec 2017 01:36:56 +0000 (10:36 +0900)]
Upgrade maven-surefire{-report}-plugin to 2.20.1

Change-Id: If3979b36ac0e1fd66f31f8a92e76b0e47d066a3b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoUpgrade maven-dependency-plugin to 3.0.2 89/113289/3
David Pursehouse [Wed, 13 Dec 2017 01:36:26 +0000 (10:36 +0900)]
Upgrade maven-dependency-plugin to 3.0.2

Change-Id: I1ed9f0e0ebdcadc4ddc56a78894b3a4220ae26ac
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoUpgrade maven-shade-plugin to 3.1.0 88/113288/3
David Pursehouse [Wed, 13 Dec 2017 01:35:54 +0000 (10:35 +0900)]
Upgrade maven-shade-plugin to 3.1.0

Change-Id: I14d746dfbfcea0d87378894b74c0cd673253f566
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.9' 15/113515/2
David Pursehouse [Sat, 16 Dec 2017 13:04:01 +0000 (14:04 +0100)]
Merge branch 'stable-4.9'

* stable-4.9:
  Prepare 4.9.3-SNAPSHOT builds
  JGit v4.9.2.201712150930-r
  Write packed-refs directly when cloning

Change-Id: I3b0fad9c45cdf3a918ddb8ea4a37b8d3403aae90
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoPrepare 4.9.3-SNAPSHOT builds 17/113517/1
Matthias Sohn [Sat, 16 Dec 2017 02:49:03 +0000 (03:49 +0100)]
Prepare 4.9.3-SNAPSHOT builds

Change-Id: Ife3f2b0b5407227f89ded42358adbf01d53e14cf
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoDfsFsck: Skip unborn branches and symrefs to nowhere 09/113509/2
Zhen Chen [Fri, 15 Dec 2017 20:58:49 +0000 (12:58 -0800)]
DfsFsck: Skip unborn branches and symrefs to nowhere

The map returned by getAllRefs includes all refs, including symrefs like
HEAD that may not point to any object yet. That is a valid state (e.g.,
in a new repository that has just been created by "git init"), so skip
such refs.

Change-Id: Ieff8a1aa738b8d09a2990d075eb20601156b70d3
Signed-off-by: Zhen Chen <czhen@google.com>
6 years agoJGit v4.9.2.201712150930-r 75/113475/1 v4.9.2.201712150930-r
Matthias Sohn [Fri, 15 Dec 2017 14:29:36 +0000 (15:29 +0100)]
JGit v4.9.2.201712150930-r

Change-Id: I013964045d532659a4be3b81d6612b59bc9ffb14
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoWrite packed-refs directly when cloning 12/113412/5
Thomas Wolf [Thu, 14 Dec 2017 12:24:00 +0000 (13:24 +0100)]
Write packed-refs directly when cloning

When we are cloning we have no refs at all yet, and there cannot
(or at least should not) be any other thread doing something with
refs yet.

Locking loose refs is thus not needed, since there are no loose
refs yet and nothing should be trying to create them concurrently.

Let's skip the whole loose ref locking when we are cloning a repository.
As a result, JGit will write the refs directly to the packed-refs
file, and will not create the refs/remotes/ directories nor the
lock files underneath when cloning and packed refs are used. Since
no lock files are created, any problems on case-insensitive file
systems with tag or branch names that differ only in case are avoided
during cloning.

Detect if we are cloning based on the following heuristics:
* HEAD is a dangling symref
* There is no loose ref
* There is no packed-refs file

Note, however, that there may still be problems with such tag or
branch names later on. This is primarily a five-minutes-past-twelve
stop-gap measure to resolve the referenced bug, which affects the
Oxygen.2 release.

Bug: 528497
Change-Id: I57860c29c210568165276a123b855e462b6a107a
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoConfigTest: Remove redundant assignment 49/113449/1
David Pursehouse [Fri, 15 Dec 2017 00:33:50 +0000 (09:33 +0900)]
ConfigTest: Remove redundant assignment

Change-Id: Ia913dbe6b7ad4b7000525fda8ca08cbc8dd87da6
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.9' 48/113448/1
David Pursehouse [Fri, 15 Dec 2017 00:21:28 +0000 (09:21 +0900)]
Merge branch 'stable-4.9'

* stable-4.9:
  Config: Remove the include functionality

Merged with "-s ours" because the fix on stable conflicts with
the fix already done here.

Change-Id: I85e394422d5dc40ca33ed3a78ddbf5cd1da1664a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoConfig: Remove the include functionality 47/113447/1
David Pursehouse [Thu, 14 Dec 2017 23:50:28 +0000 (08:50 +0900)]
Config: Remove the include functionality

The Config class must be safe to run against untrusted input files.
Reading arbitrary local system paths using include.path is risky for
servers, including Gerrit Code Review.

This was fixed on master [1] by making "readIncludedConfig" a noop
by default. This allows only FileBasedConfig, which originated from
local disk, to read local system paths.

However, the "readIncludedConfig" method was only introduced in [2]
which was needed by [3], both of which are only on the master branch.
On the stable branch only Config supports includes. Therefore this
commit simply disables the include functionality.

[1] https://git.eclipse.org/r/#/c/113371/
[2] https://git.eclipse.org/r/#/c/111847/
[3] https://git.eclipse.org/r/#/c/111848/

Bug: 528781
Change-Id: I9a3be3f1d07c4b6772bff535a2556e699a61381c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.9' 72/113372/1
David Pursehouse [Thu, 14 Dec 2017 02:05:01 +0000 (11:05 +0900)]
Merge branch 'stable-4.9'

* stable-4.9:
  InMemoryRepository: Make inner class MemObjDatabase static

Change-Id: I62bb5957de1ae3bc6030ea2181b09efccc48252b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMake Config.readIncludedConfig a noop by default 71/113371/2
Shawn Pearce [Thu, 14 Dec 2017 01:35:38 +0000 (17:35 -0800)]
Make Config.readIncludedConfig a noop by default

The Config class must be safe to run against untrusted input files.
Reading arbitrary local system paths using include.path is risky for
servers, including Gerrit Code Review.  Return null by default to
incide the include should be ignored.

Only FileBasedConfig which originated from local disk should be trying
to read local system paths.  FileBasedConfig already overrides this
method with its own implementation.

Change-Id: I2ff31753868aa1bbac4a6843a4c23e50bd6f46f3

6 years agoDfsBlockCache.hasBlock0: quickly check for file in cache 70/113370/1
Shawn Pearce [Thu, 14 Dec 2017 01:10:51 +0000 (17:10 -0800)]
DfsBlockCache.hasBlock0: quickly check for file in cache

This can be useful for sophisticated pre-read algorithms to quickly
determine if a file is likely already in cache, especially small
reftables which may be smaller than a typical DFS block size.

Change-Id: I7756948063b722ff650c9ba82060ff9ad554b0ba

6 years agoMerge branch 'stable-4.9' 85/113285/1
David Pursehouse [Wed, 13 Dec 2017 00:51:44 +0000 (09:51 +0900)]
Merge branch 'stable-4.9'

* stable-4.9:
  TransportCommand#setTimeout: Specify units for timeout in Javadoc
  Fix typo in key of a JGitText externalized string

Change-Id: Icb60537d2e99cb6e928d9fe07f66695ed69081b5
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoUpdpate oxygen orbit to R20170919201930 and remove old orbit repos 66/112766/3
Matthias Sohn [Sun, 3 Dec 2017 10:11:22 +0000 (11:11 +0100)]
Updpate oxygen orbit to R20170919201930 and remove old orbit repos

Change-Id: I2bf09cc3b08ebc762390e2892b966b11027e2e89
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoRemove use of deprecated X509HostnameVerifier 65/112765/3
Matthias Sohn [Fri, 1 Dec 2017 23:03:42 +0000 (00:03 +0100)]
Remove use of deprecated X509HostnameVerifier

Change-Id: I318f5457ade3d11b2ac1c99f6ef382a0a147a352
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoUpdate Apache httpclient to 4.5.2 and httpcore to 4.4.6 64/112764/3
Matthias Sohn [Sun, 3 Dec 2017 10:04:41 +0000 (11:04 +0100)]
Update Apache httpclient to 4.5.2 and httpcore to 4.4.6

CQ: 15051
CQ: 15052
Change-Id: I532cd73253601ce1d2926850af2519aae6744a9c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoRemove unused API filters 34/112934/2
David Pursehouse [Wed, 6 Dec 2017 10:48:36 +0000 (19:48 +0900)]
Remove unused API filters

Change-Id: Ie8bfa4e8473c2a68a6308de7dbf29ccbca97495d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoInMemoryRepository: Make inner class MemObjDatabase static 52/112952/3
David Pursehouse [Wed, 6 Dec 2017 14:31:38 +0000 (23:31 +0900)]
InMemoryRepository: Make inner class MemObjDatabase static

FindBugs reports:

  This class is an inner class, but does not use its embedded reference
  to the object which created it. This reference makes the instances
  of the class larger, and may keep the reference to the creator object
  alive longer than necessary. If possible, the class should be made
  static.

Change-Id: I9f49de32b4cd81b7ef1239b390353689263bf66e
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoTransportCommand#setTimeout: Specify units for timeout in Javadoc 97/113197/1
David Turner [Mon, 11 Dec 2017 20:20:25 +0000 (15:20 -0500)]
TransportCommand#setTimeout: Specify units for timeout in Javadoc

Change-Id: Iadf0e2c6483794e43a5326f6be6bb34c19b00564
Signed-off-by: David Turner <dturner@twosigma.com>
6 years agoFix typo in key of a JGitText externalized string 27/113127/1
Matthias Sohn [Sun, 10 Dec 2017 17:33:23 +0000 (18:33 +0100)]
Fix typo in key of a JGitText externalized string

Change-Id: I0d22e24a0aa3b17339ef68849554f7c99b350dde
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix typo in key of a JGitText externalized string 24/113124/1
Matthias Sohn [Sun, 10 Dec 2017 17:33:23 +0000 (18:33 +0100)]
Fix typo in key of a JGitText externalized string

Change-Id: I0d22e24a0aa3b17339ef68849554f7c99b350dde
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.9' 23/113123/1
Matthias Sohn [Sun, 10 Dec 2017 17:10:25 +0000 (18:10 +0100)]
Merge branch 'stable-4.9'

* stable-4.9:
  Fix IllegalThreadStateException if stderr closed without exiting

Change-Id: I8a6a6788c2bb000171233b88d9592ed0640ad15e

6 years agoFix IllegalThreadStateException if stderr closed without exiting 22/113122/1
Dmitry Pavlenko [Thu, 7 Dec 2017 18:36:35 +0000 (19:36 +0100)]
Fix IllegalThreadStateException if stderr closed without exiting

If some process executed by FS#readPipe lived for a while after
closing stderr, FS#GobblerThread#run failed with an
IllegalThreadStateException exception when accessing p.exitValue()
for the process which is still alive.

Add Process#waitFor calls to wait for the process completion.

Bug: 528335
Change-Id: I87e0b6f9ad0b995dbce46ddfb877e33eaf3ae5a6
Signed-off-by: Dmitry Pavlenko <pavlenko@tmatesoft.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge "URIishTest: more Windows file-protocol tests"
Thomas Wolf [Sat, 9 Dec 2017 21:27:18 +0000 (16:27 -0500)]
Merge "URIishTest: more Windows file-protocol tests"

6 years agoURIishTest: more Windows file-protocol tests 83/113083/2
Marc Strapetz [Sat, 9 Dec 2017 11:12:24 +0000 (12:12 +0100)]
URIishTest: more Windows file-protocol tests

Change-Id: Id5fbd8bb9cd05da89d27e9532612d64ae84a55ba
Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
6 years agoPackInserterTest: Prevent potential NPE dereferencing Path.getFileName() 49/113049/1
David Pursehouse [Fri, 8 Dec 2017 08:21:35 +0000 (17:21 +0900)]
PackInserterTest: Prevent potential NPE dereferencing Path.getFileName()

Path.getFileName() may return null if the path has zero elements.

Enclose the dereference in a null-check.

Change-Id: I7ea3d3f07edc13a80b593d28e8fd512a4e1ed56b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoCloneCommand: Refactor listing of files in deleteChildren 48/113048/1
David Pursehouse [Fri, 8 Dec 2017 08:13:10 +0000 (17:13 +0900)]
CloneCommand: Refactor listing of files in deleteChildren

File.listFiles() returns null if the given File does not represent a
directory, so we can just test for null instead of making a separate
call to FS.DETECTED.isDirectory()

This also avoids a false-positive error from SpotBugs which claims
that there is a potential null-pointer exception on dereferencing the
result of Files.listFiles().

Change-Id: I18e09e391011db997470f5a09d8e38bb604c0213
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoSpecify consistent version range for junit in OSGi manifests 38/113038/2
David Pursehouse [Thu, 7 Dec 2017 22:29:51 +0000 (07:29 +0900)]
Specify consistent version range for junit in OSGi manifests

There are several different version ranges specified in the various
manifest files.

Align them all to the same range:  [4.12,5.0.0)

Change-Id: I02205b8b8546c9f53ed431b5fd9abf6ddcda4423
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.9' 46/113046/1
David Pursehouse [Fri, 8 Dec 2017 07:57:52 +0000 (16:57 +0900)]
Merge branch 'stable-4.9'

* stable-4.9:
  LfsServerText: Fix formatting of invalidPathInfo message
  InvalidLongObjectIdException: Fix formatting of message
  FileLfsServlet: Do not pretty print json response

Change-Id: Ib59431865a45659fe9d91e2556b9d1ce49e3808a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoLfsServerText: Fix formatting of invalidPathInfo message 41/113041/1
David Pursehouse [Thu, 7 Dec 2017 01:18:21 +0000 (10:18 +0900)]
LfsServerText: Fix formatting of invalidPathInfo message

The message is formatted as:

  Invalid pathInfo '/abc' does not match '/{SHA-256}'

but should be:

  Invalid pathInfo: '/abc' does not match '/{SHA-256}'

(i.e. including a colon) to be consistent with other messages.

Change-Id: Ic38aa7d33dd02d7954b95c331a73919a90c69991
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoInvalidLongObjectIdException: Fix formatting of message 40/113040/1
David Pursehouse [Thu, 7 Dec 2017 00:51:56 +0000 (09:51 +0900)]
InvalidLongObjectIdException: Fix formatting of message

The message is formatted as:

  Invalid id: : abcde...

but should be:

  Invalid id: abcde...

Change-Id: Ie15cacdcf2f168edaee262e6cf8061ebfe9d998d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFileLfsServlet: Do not pretty print json response 39/113039/1
David Pursehouse [Wed, 6 Dec 2017 23:25:50 +0000 (08:25 +0900)]
FileLfsServlet: Do not pretty print json response

Pretty printing the response is useful for human readers, but most
(if not all) of the time, the response will be read by programs.

Remove it to avoid the additional overhead of the formatting and
extra bytes in the response. Adjust the test accordingly.

Note that LfsProtocolServlet already doesn't use pretty printing,
so this change makes FileLfsServlet's behavior consistent. In fact,
both classes now have duplicate Gson handling; this will be cleaned
up in a separate change.

Change-Id: I113a23403f9222f16e2c0ddf39461398b721d064
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoDfsBlockCache#creditSpace: release clockLock in finally block 91/112991/2
David Pursehouse [Thu, 7 Dec 2017 08:25:58 +0000 (17:25 +0900)]
DfsBlockCache#creditSpace: release clockLock in finally block

Enclose the call to getStat in a `try`, and release the previously
acquired lock in the `finally`. This prevents that the lock is left
unreleased in the case of an exception being raised in getStat.

Change-Id: I17b4cd134dae887e23a1165253be0ac2d4fd452c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoArchiveTest: Check result of BufferedInputStream#skip 89/112989/2
David Pursehouse [Thu, 7 Dec 2017 07:49:47 +0000 (16:49 +0900)]
ArchiveTest: Check result of BufferedInputStream#skip

Change-Id: I5168c75ca2dda6d1e8c8a6c29043ac781fe9295a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFS_POSIX: Fix boxing/unboxing of Boolean 88/112988/2
David Pursehouse [Thu, 7 Dec 2017 07:30:01 +0000 (16:30 +0900)]
FS_POSIX: Fix boxing/unboxing of Boolean

Boolean is being abused to represent three possible states of atomic
file creation support (true/enabled, false/disabled, null/undefined).

Replace this with an enum of the three explicit states.

Change-Id: I2cd7fa6422311dc427823304b082ce8da50d2fbe
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoUse constants from StandardCharsets instead of hard-coded strings 80/112980/5
David Pursehouse [Thu, 7 Dec 2017 01:23:38 +0000 (10:23 +0900)]
Use constants from StandardCharsets instead of hard-coded strings

Instead of hard-coding the charset strings "US-ASCII", "UTF-8", and
"ISO-8859-1", use the corresponding constants from StandardCharsets.

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

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

Also replace existing usages of the constants with static imports.

Change-Id: I0a4510d3d992db5e277f009a41434276f95bda4e
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoLfsServerText: Fix formatting of invalidPathInfo message 79/112979/4
David Pursehouse [Thu, 7 Dec 2017 01:18:21 +0000 (10:18 +0900)]
LfsServerText: Fix formatting of invalidPathInfo message

The message is formatted as:

  Invalid pathInfo '/abc' does not match '/{SHA-256}'

but should be:

  Invalid pathInfo: '/abc' does not match '/{SHA-256}'

(i.e. including a colon) to be consistent with other messages.

Change-Id: Ic38aa7d33dd02d7954b95c331a73919a90c69991
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoInvalidLongObjectIdException: Fix formatting of message 77/112977/3
David Pursehouse [Thu, 7 Dec 2017 00:51:56 +0000 (09:51 +0900)]
InvalidLongObjectIdException: Fix formatting of message

The message is formatted as:

  Invalid id: : abcde...

but should be:

  Invalid id: abcde...

Change-Id: Ie15cacdcf2f168edaee262e6cf8061ebfe9d998d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMove repeated LFS Gson handling to common class 76/112976/3
David Pursehouse [Wed, 6 Dec 2017 15:00:52 +0000 (00:00 +0900)]
Move repeated LFS Gson handling to common class

LfsProtocolServlet and FileLfsServlet both implement the same
setup of the Gson object.

Factor it out to a common class and reuse it.

Change-Id: I5696404fad140cbff1b712ebb04a7e8bba60e4b4
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoDownloadTest: Use ExpectedException instead of try..catch..fail 75/112975/2
David Pursehouse [Wed, 6 Dec 2017 23:42:39 +0000 (08:42 +0900)]
DownloadTest: Use ExpectedException instead of try..catch..fail

Change-Id: I5547e64de6cea3d2200887b504245c69692f00b5
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFileLfsServlet: Do not pretty print json response 74/112974/1
David Pursehouse [Wed, 6 Dec 2017 23:25:50 +0000 (08:25 +0900)]
FileLfsServlet: Do not pretty print json response

Pretty printing the response is useful for human readers, but most
(if not all) of the time, the response will be read by programs.

Remove it to avoid the additional overhead of the formatting and
extra bytes in the response. Adjust the test accordingly.

Note that LfsProtocolServlet already doesn't use pretty printing,
so this change makes FileLfsServlet's behavior consistent. In fact,
both classes now have duplicate Gson handling; this will be cleaned
up in a separate change.

Change-Id: I113a23403f9222f16e2c0ddf39461398b721d064
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.9' 72/112972/1
David Pursehouse [Wed, 6 Dec 2017 23:13:45 +0000 (08:13 +0900)]
Merge branch 'stable-4.9'

* stable-4.9:
  LfsStore: Make inner class AppServer static
  DirCacheCheckout#processEntry: Fix typo in javadoc

Change-Id: Id8e4a3c4dc741e6e0182522e72ecb4b34ae419eb

6 years agoTransportHttp: retry on IOException with another mechanism 71/111671/4
Thomas Wolf [Wed, 15 Nov 2017 22:23:27 +0000 (23:23 +0100)]
TransportHttp: retry on IOException with another mechanism

When a 401 occurs on POST and the server advertises Negotiate, we
may get an exception from GSSAPI if the client isn't configured
at all for Kerberos.

Add exception logic similar to the GET case: keep trying other
authentication mechanisms if this occurs.

Bug: 501167
Change-Id: Ic3a3368378d4b3408a35aec93e78ef425d54b3e4
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
6 years agoLfsStore: Make inner class AppServer static 51/112951/1
David Pursehouse [Wed, 6 Dec 2017 14:27:09 +0000 (23:27 +0900)]
LfsStore: Make inner class AppServer static

FindBugs reports:

  This class is an inner class, but does not use its embedded reference
  to the object which created it. This reference makes the instances
  of the class larger, and may keep the reference to the creator object
  alive longer than necessary. If possible, the class should be made
  static.

Change-Id: I245e44678166176de0cfb275e22ddd159f88e0bd
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoDirCacheCheckout#processEntry: Fix typo in javadoc 36/112936/1
David Pursehouse [Wed, 6 Dec 2017 10:59:55 +0000 (19:59 +0900)]
DirCacheCheckout#processEntry: Fix typo in javadoc

Change-Id: Ie08a6275f4656ebb46abe8748b73b0fb52a98a35
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoConfigTest: Move pathToString to FileUtils 41/112841/3
David Pursehouse [Tue, 5 Dec 2017 01:37:26 +0000 (10:37 +0900)]
ConfigTest: Move pathToString to FileUtils

ConfigTest#pathToString is not visible to FileBasedConfigTest when
bulding with bazel.

Move it to FileUtils rather than messing about with the bazel build
rules to make it visible.

Change-Id: Idcfd4822699dac9dc4a426088a929a9cd31bf53f
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFileBasedConfig: support for relative includes 48/111848/5
Marc Strapetz [Sat, 18 Nov 2017 16:50:30 +0000 (17:50 +0100)]
FileBasedConfig: support for relative includes

Relative include.path are now resolved against the config's parent
directory. include.path starting with ~/ are resolved against the
user's home directory

Change-Id: I91911ef404126618b1ddd3589294824a0ad919e6
Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
6 years agoConfig: extract method to read included config 47/111847/5
Marc Strapetz [Mon, 20 Nov 2017 09:21:30 +0000 (10:21 +0100)]
Config: extract method to read included config

Change-Id: I2c55af3e5fe29e0ce8e3d05e4b54ec961d3f863a
Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>