Commit Graph

562 Commits

Author SHA1 Message Date
Matthias Sohn d1189a1cd3 Renormalize line endings based on .gitattributes
This fixes line endings of all text files to use LF in the repository.

Change-Id: I4df6fd7aaf9db9cdaa953a0d1062981b4612056c
2023-12-22 23:20:40 +01:00
Matthias Sohn b54592c8ee Prepare 6.9.0-SNAPSHOT builds
Change-Id: Id1d784ec4870cfb53c4b140fe0bb3fad9eef651d
2023-12-04 23:02:44 +01:00
Matthias Sohn 796fb2e5c7 Prepare 6.8.1-SNAPSHOT builds
Change-Id: I56458c5345dcd9544868c948e90c9827d25c6850
2023-11-29 16:53:24 +01:00
Matthias Sohn c43560487b JGit v6.8.0.202311291450-r
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: Iecfe3f628cfdc437ee0d63fe52653ef952c8c494
2023-11-29 15:49:43 +01:00
Matthias Sohn 9a05ca42ba Prepare 6.8.0-SNAPSHOT builds
Change-Id: I89178175549541111cddb88da401899960c0ecac
2023-11-22 01:41:02 +01:00
Matthias Sohn 7bc697dfde JGit v6.8.0.202311212206-rc1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: I6a40cdef68538fa769f4525eb2ff1ed4a810f11c
2023-11-21 23:05:56 +01:00
Matthias Sohn d9568eda92 Prepare 6.8.0-SNAPSHOT builds
Change-Id: Id11a260db84aea6743f2e6edec8b8010693aab42
2023-11-15 23:42:56 +01:00
Matthias Sohn 375710194d JGit v6.8.0.202311151710-m2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: I9d06bb08fc1f9a2a08d4bc5a4459ec7e7e8c1be4
2023-11-15 18:11:07 +01:00
Matthias Sohn e0acf25795 Prepare 6.8.0-SNAPSHOT builds
Change-Id: Idb86bac4bd152e57f1810c789bdbd26648f0b6ae
2023-10-03 20:10:22 +02:00
Matthias Sohn e5a79343c5 JGit v6.8.0.202310031045-m1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: Ida0108f3661213922b1e4340216d60a640a1b662
2023-10-03 16:41:57 +02:00
Matthias Sohn 3a3b72cf90 Prepare 6.8.0-SNAPSHOT builds
Change-Id: Ifc81f0a96c2ced0b25926b9daa539d9cfc951925
2023-09-07 02:24:53 +02:00
Matthias Sohn bb12dd4cbd Prepare 6.7.1-SNAPSHOT builds
Change-Id: I96097ef8c6f198220f513bbc6d5f8881834a1491
2023-09-07 02:03:54 +02:00
Matthias Sohn ea02caf1e7 JGit v6.7.0.202309050840-r
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: Ibe952d97bc178adb909cdd40f48957f5b68af699
2023-09-05 14:41:09 +02:00
Matthias Sohn c5d8936c80 Prepare 6.7.0-SNAPSHOT builds
Change-Id: I49751232464e70b7d1dc3292a9f36b7a7015e44f
2023-08-30 17:46:26 +02:00
Matthias Sohn c54acc5822 JGit v6.7.0.202308301100-rc1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: I712a9f6830364ed404d03f3a145c055906273544
2023-08-30 16:57:25 +02:00
Matthias Sohn 8995a64295 Update Orbit to orbit-aggregation/release/4.29.0
Switch to bundle dependencies for hamcrest 1.3 to avoid issues with
split packages in that version.

Don't allow hamcrest 2.x yet since junit 4.13.2 still requires hamcrest
1.3.

See Orbit restructuring in
https://github.com/orgs/eclipse-orbit/discussions/49

Change-Id: I8faf519b8f2c4e4a6bd255d694d1aa28017acd85
2023-08-30 14:28:33 +02:00
Antoine Musso 7b955048eb Fix all Javadoc warnings and fail on them
This fixes all the javadoc warnings, stops ignoring doclint 'missing'
category and fails the build on javadoc warnings for public and
protected classes and class members.

Since javadoc doesn't allow access specifiers when specifying doclint
configuration we cannot set `-Xdoclint:all,-missing/private`
hence there is no simple way to skip private elements from doclint.
Therefore we check javadoc using the Eclipse Java compiler
(which is used by default) and javadoc configuration in
`.settings/org.eclipse.jdt.core.prefs` files.
This allows more fine grained configuration.

We can reconsider this when javadoc starts supporting access specifiers
in the doclint configuration.

Below are detailled explanations for most modifications.

@inheritDoc
===========
doclint complains about explicits `{@inheritDoc}` when the parent does
not have any documentation. As far as I can tell, javadoc defaults to
inherit comments and should only be used when one wants to append extra
documentation from the parent. Given the parent has no documentation,
remove those usages which doclint complains about.

In some case I have moved up the documentation from the concrete class
up to the abstract class.

Remove `{@inheritDoc}` on overriden methods which don't add additional
documentation since javadoc defaults to inherit javadoc of overridden
methods.

@value to @link
===============
In PackConfig, DEFAULT_SEARCH_FOR_REUSE_TIMEOUT and similar are forged
from Integer.MAX_VALUE and are thus not considered constants (I guess
cause the value would depends on the platform). Replace it with a link
to `Integer.MAX_VALUE`.

In `StringUtils.toBoolean`, @value was used to refer to the
`stringValue` parameter. I have replaced it with `{@code stringValue}`.

{@link <url>} to <a>
====================
@link does not support being given an external URL. Replaces them with
HTML `<a>`.

@since: being invalid
=====================

org.eclipse.jgit/src/org/eclipse/jgit/util/Equality.java has an invalid
tag `@since: ` due to the extra `:`. Javadoc does not complain about it
with version 11.0.18+10 but does with 11.0.19.7. It is invalid
regardless.

invalid HTML syntax
===================

- javadoc doesn't allow <br/>, <p/> and </p> anymore, use <br> and <p>
instead
- replace <tt>code</tt> by {@code code}
- <table> tags don't allow summary attribute, specify caption as
<caption>caption</caption> to fix this

doclint visibility issue
========================

In the private abstract classes `BaseDirCacheEditor` and
`BasePackConnection` links to other methods in the abstract class are
inherited in the public subclasses but doclint gets confused and
considers them unreachable. The HTML documentation for the sub classes
shows the relative links in the sub classes, so it is all correct. It
must be a bug somewhere in javadoc.
Mute those warnings with: @SuppressWarnings("doclint:missing")

Misc
====
Replace `<` and `>` with HTML encoded entities (`&lt; and `&gt;`).
In `SshConstants` I went enclosing a serie of -> arrows in @literal.

Additional tags
===============
Configure maven-javad0c-plugin to allow the following additional tags
defined in https://openjdk.org/jeps/8068562:
- apiNote
- implSpec
- implNote

Missing javadoc
===============
Add missing @params and descriptions

Change-Id: I840056389aa59135cfb360da0d5e40463ce35bd0
Also-By: Matthias Sohn <matthias.sohn@sap.com>
2023-06-16 01:08:13 +02:00
Matthias Sohn 9afff3e808 Prepare 6.7.0-SNAPSHOT builds
Change-Id: I50ff7ee31046cfc29a087c8963be3deae24b1c9c
2023-05-24 17:31:26 +02:00
Matthias Sohn 3d90c4a433 Add TransportHttp#getAdditionalHeaders
to enable inspecting which additional HTTP headers have been set on the
transport.

Change-Id: I0771be9cb7c837de7c203b7f044109b9b2a7d7ad
2023-05-03 02:40:41 +02:00
Matthias Sohn 84461e8086 Update slf4j to 1.7.36 and consume it directly from Maven Central
BundleSymbolicNames changed to the names used upstream:
- slf4j.api
- slf4j.simple

Change-Id: Ibcaafae282d3a6fa013bc39d879def1b66073bca
2023-05-02 17:05:18 +02:00
Matthias Sohn f34ae6fe31 Prepare 6.6.0-SNAPSHOT builds
Change-Id: I17893f9db12bcb208866f40a06cd4f1ccbb4fe30
2023-03-01 15:40:45 +01:00
Matthias Sohn 2e28f27c26 Prepare 6.5.0-SNAPSHOT builds
Change-Id: I4238b6181e96e22e540cf34802a332f868cb6dfb
2022-11-23 19:09:33 +01:00
Matthias Sohn 0fb9d26eff Merge branch 'stable-6.3'
* stable-6.3:
  [benchmarks] Remove profiler configuration
  Add SHA1 benchmark
  [benchmarks] Set version of maven-compiler-plugin to 3.8.1
  Fix running JMH benchmarks
  Add option to allow using JDK's SHA1 implementation
  Fix API breakage caused by extracting WorkTreeUpdater
  Extract Exception -> HTTP status code mapping for reuse
  Don't handle internal git errors as an HTTP error
  Ignore IllegalStateException if JVM is already shutting down
  Allow to perform PackedBatchRefUpdate without locking loose refs

Change-Id: Ib58879be292c54a2a7f4936ac0986997985c822b
2022-11-16 10:15:30 +01:00
Matthias Sohn 1cd9a1f804 Merge branch 'stable-6.2' into stable-6.3
* stable-6.2:
  Extract Exception -> HTTP status code mapping for reuse
  Don't handle internal git errors as an HTTP error
  Allow to perform PackedBatchRefUpdate without locking loose refs

Change-Id: I562be0802efa231023c5f10e6461339b2d7fbacf
2022-11-16 10:14:13 +01:00
Matthias Sohn a24b22632f Merge branch 'stable-6.1' into stable-6.2
* stable-6.1:
  Extract Exception -> HTTP status code mapping for reuse
  Don't handle internal git errors as an HTTP error
  Allow to perform PackedBatchRefUpdate without locking loose refs

Change-Id: Icb321779184d20f3871e236fda1a3acba605a6da
2022-11-16 10:13:20 +01:00
Sven Selberg ac127a7932 Don't handle internal git errors as an HTTP error
The fix that fixed the propagation of error-codes:
  8984e1f66 HTTP Smart: set correct HTTP status on error [1]
made some faulty assumptions.

"Wants not valid", can be an intermittent git error and the HTTP
response should be 200 and not 400 since the request isn't necessary
faulty.

[1] https://git.eclipse.org/r/c/jgit/jgit/+/192677

Bug: 579676
Change-Id: I461bc78ff6e450636811ece50d21c57a2a7f2ae3
2022-11-10 04:35:28 -04:00
Matthias Sohn 85182df267 Prepare 6.4.0-SNAPSHOT builds
Change-Id: I47ca5f1d0263caa0bfc7c303042360c6c5ac4dec
2022-09-14 13:56:40 +02:00
Matthias Sohn fb377b09eb Prepare 6.3.1-SNAPSHOT builds
Change-Id: I44e159eca4131880d74d3078060e7e20f9b5ce76
2022-09-12 10:09:10 +02:00
Matthias Sohn 68e8ecc91b JGit v6.3.0.202209071007-r
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: Iea3fae9f6f6c5fb0a79f7684334a3e0059738c4f
2022-09-07 16:07:11 +02:00
Matthias Sohn f8104e25f1 JGit v6.3.0.2022009070944-r
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: I3cc78dbcf8c7970e80bf1499751611110ec2b30b
2022-09-07 15:39:48 +02:00
Matthias Sohn 3a12709851 Prepare 6.3.0-SNAPSHOT builds
Change-Id: Ie398b651c5308ec86812bf01fcc563d3e679c828
2022-08-17 07:44:50 +02:00
Matthias Sohn 85a4809996 JGit v6.3.0.202208161710-m3
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: I0954d11a1f35eff196b157df3aa8386476c48a7e
2022-08-16 23:09:30 +02:00
Robin Müller 207dd4c938 Fetch: add support for shallow
This adds support for shallow cloning. The CloneCommand and the
FetchCommand now have the new methods setDepth, setShallowSince and
addShallowExclude to tell the server that the client doesn't want to
download the complete history.

Bug: 475615
Change-Id: Ic80fb6efb5474543ae59be590ebe385bec21cc0d
2022-07-31 14:08:47 +02:00
Matthias Sohn a9f535e104 Prepare 6.2.1-SNAPSHOT builds
Change-Id: I4a0f3919ff43a3b9fafa85b8ecec2d760b7eb161
2022-06-07 22:31:32 +02:00
Matthias Sohn 236b45f95b JGit v6.2.0.202206071550-r
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: Ib4ae85a0cabcc9cb867f2c85034d72fb676a500a
2022-06-07 21:49:30 +02:00
Matthias Sohn 8137e5e746 Prepare 6.3.0-SNAPSHOT builds
Change-Id: I092fdd2c35d85bf35e3ef700aa7078e6d304d977
2022-06-07 01:02:10 +02:00
Matthias Sohn cc862f843a Prepare 6.2.0-SNAPSHOT builds
Change-Id: Id2ad8d5b561620723b2c52c86909321d628de12f
2022-06-06 22:08:59 +02:00
Matthias Sohn 7b1ade51d2 JGit v6.2.0.202206011217-rc1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: Id9639b466583d8c373ef700402cb685ce4a8ee15
2022-06-01 18:17:31 +02:00
Matthias Sohn 760d8ea608 Prepare 6.2.0-SNAPSHOT builds
Change-Id: I9d6afd80cc024d6e03aa46bbaaaeec10b60fb485
2022-05-26 23:24:41 +02:00
Matthias Sohn 649b2b72cd JGit v6.2.0.202205251150-m3
Change-Id: I48492aef02c2ea39cec171d84e92643859e064a6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2022-05-25 16:49:01 +02:00
Matthias Sohn e1efd4dd1f Merge branch 'stable-6.1' into stable-6.2
* stable-6.1:
  HTTP Smart: set correct HTTP status on error

Change-Id: I792d6cdfe9e76a3d2e6d1e01ec1dc96805ed2900
2022-05-09 22:09:05 +02:00
Sven Selberg 8984e1f663 HTTP Smart: set correct HTTP status on error
Previous behavior was that status code was automatically set to 200
regardless of reported status and according to HTTP Smart protocol[1]:

  If there is no repository at $GIT_URL, or the resource pointed to by
  a location matching $GIT_URL does not exist, the server MUST NOT
  respond with 200 OK response. A server SHOULD respond with
  404 Not Found, 410 Gone, or any other suitable HTTP status code which
  does not imply the resource exists as requested.

Since the jgit HTTP client isn't able to handle reading content from a
response reporting an error (calling HttpURLConnection#getInputStream
on a "failed" connection throws an exception and the internal interface
HttpConnection does not expose HttpURLConnection#getErrorStream) the
SmartClientSmartServerTest needed to be rewritten to expect the generic
response messages.

[1] https://git-scm.com/docs/http-protocol#_general_request_processing

Bug: 579676
Change-Id: Ibb942d02124a0bc279df09600b091354019ce064
2022-05-09 22:06:38 +02:00
Matthias Sohn b969c44c00 Prepare 6.2.0-SNAPSHOT builds
Change-Id: Ic3788b38d6408e83729caa718c128a5632798a60
2022-05-05 13:39:09 +02:00
Matthias Sohn 6ac09896b2 JGit v6.2.0.202205041315-m2
Change-Id: Ie13beac020e79182a4058ba67550bb78b2008833
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2022-05-04 19:25:04 +02:00
Matthias Sohn 8f7ef245f0 Prepare 6.1.1-SNAPSHOT builds
Change-Id: Ifc80355025d8459245843be1c24dc5a286913e77
2022-03-08 17:04:10 +01:00
Matthias Sohn e982de3fcb JGit v6.1.0.202203080745-r
Change-Id: I8766ed400020c9571f321bbbfe34b0688af0107d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2022-03-08 13:45:56 +01:00
Matthias Sohn d0ed6016d4 Prepare 6.2.0-SNAPSHOT builds
Change-Id: Ic2dde88bee3242169d6fa50956f8938f3fc4ba8e
2022-03-03 10:49:58 +01:00
Matthias Sohn 60d52c9cfd Prepare 6.1.0-SNAPSHOT builds
Change-Id: I525fc1258a729c36d63fdb3c8170e9f04ad55cec
2022-03-02 22:28:46 +01:00
Matthias Sohn 4b9fb3161c JGit v6.1.0.202203021511-rc1
Change-Id: I4c75a58fd76102e773af4f1f8a1487d5e7ffc7cf
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2022-03-02 21:11:54 +01:00
Matthias Sohn 8845f2e91b Prepare 6.1.0-SNAPSHOT builds
Change-Id: I30a89277373ad62c857151532942e135e34d1d0c
2022-03-01 17:21:11 +01:00