Commit Graph

8219 Commits

Author SHA1 Message Date
Matthias Sohn 5b528474f5 GitHook: use generic OutputStream instead of PrintStream
Change-Id: I15e64dc963c9d27dc9c8de4976dd63f74b918b15
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2021-02-15 16:45:58 +01:00
Matthias Sohn 7cc1a52c66 Update jetty to 9.4.36.v20210114
Change-Id: Iea57f0fddb0f10dbd1c9be886bfa5ad8c3ff5cb5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2021-02-13 22:17:43 +01:00
Marija Savtchouk 1b9911d9ae Allow dir/file conflicts in virtual base commit on recursive merge.
If RecursiveMerger finds multiple base commits, it tries to compute
the virtual ancestor to use as a base for the three way merge.
Currently, the content conflicts between ancestors are ignored (file
staged with the conflict markers). If the path is a file in one ancestor
and a dir in the other, it results in NoMergeBaseException
(CONFLICTS_DURING_MERGE_BASE_CALCULATION).

Allow these conflicts by ignoring this unmerged path in the virtual
base. The merger will compute diff in the children instead and it
can be further fixed manually if needed.

Change-Id: Id59648ae1d6bdf300b26fff513c3204317b755ab
Signed-off-by: Marija Savtchouk <mariasavtchouk@google.com>
2021-02-09 15:26:03 +00:00
Christian Halstrick fe4b2a4656 Merge "GitHook: make fields outputStream and errorStream private" 2021-02-09 02:07:53 -05:00
Matthias Sohn 686565f416 GitHook: make fields outputStream and errorStream private
Subclasses can use the corresponding getter methods.

Change-Id: Iaa9ab01f5a9731a264b28608d2418a9405b601d7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2021-02-09 02:42:47 +01:00
Thomas Wolf 6d462e5fe9 GPG: support git config gpg.program
Add it to the GpgConfig. Change GpgConfig to load the values once only.
Add a parameter to the GpgObjectSigner interface's operations to pass
in a GpgConfig. Update CommitCommand and TagCommand to pass the value
to the signer. Let the signer decide whether it can actually produce
the wanted signature type (openpgp or x509).

No behavior change. But this makes it possible to implement different
signers that might support x509 signatures, or use gpg.program and
shell out to an external GPG executable for signing.

Change-Id: I427f83eb1ece81c310e1cddd85315f6f88cc99ea
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-02-07 17:32:30 -05:00
David Ostrovsky 19bed3399d Bump bazel version to 4.0.0
Change-Id: I2faa67d5083f23b29f7a434e54c5e17360b1c0fe
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
2021-02-07 23:06:25 +01:00
David Ostrovsky 7755645777 Bazel: Remove unused resources variable
Change-Id: Iac2e547791929c26027ab4730ceac6177899ccf1
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
2021-02-07 23:06:25 +01:00
Adithya Chakilam c7685003d8 Fix DateRevQueue tie breaks with more than 2 elements
DateRevQueue is expected to give out the commits that have higher
commit time. But in case of tie(same commit time), it should give
the commit that is inserted first. This is inferred from the
testInsertTie test case written for DateRevQueue. Also that test
case, right now uses just two commits which caused it not to fail
with the current implementation, so added another commit to make
the test more robust.

By fixing the DateRevQueue, we would also match the behaviour of
LogCommand.addRange(c1,c2) with git log c1..c2. A test case for
the same is added to show that current behaviour is not the
expected one.

By fixing addRange(), the order in which commits are applied during
a rebase is altered. Rebase logic should have never depended upon
LogCommand.addRange() since the intended order of addRange() is not
the order a rebase should use. So, modify the RebaseCommand to use
RevWalk directly with TopoNonIntermixSortGenerator.

Add a new LogCommandTest.addRangeWithMerge() test case which creates
commits in the following order:

         A - B - C - M
              \     /
                -D-

Using git 2.30.0, git log B..M outputs:  M C D
LogCommand.addRange(B, M) without this fix outputs: M D C
LogCommand.addRange(B, M) with this fix outputs: M C D

Change-Id: I30cc3ba6c97f0960f64e9e021df96ff276f63db7
Signed-off-by: Adithya Chakilam <achakila@codeaurora.org>
2021-02-07 06:09:48 -05:00
Lars Vogel 3259a96021 Field updateHead can be a local variable in RefDirectoryRename
Keeping the field updateDate is unecessary, as it is set and used only
in the doRename method.

Change-Id: I1cdd1adf759b75c103480db7a74cec8c2d78b794
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
2021-02-06 19:50:43 -05:00
Matthias Sohn 58f2e23fde Fix FileRepository#convertToReftable which failed if no reflog existed
Deleting non-existing files when converting to reftable without backup
caused convertToReftable to fail. Observed this on a mirrored repository
which had no reflogs. Fix this by skipping missing files during
deletion.

Change-Id: I3bb913d5bfddccc6813677b873006efb849a6ebc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2021-02-05 20:48:51 -05:00
Matthias Sohn 9299df41cb Fix SeparateClassloaderTestRunner on Java 9 or higher
Since Java 9 the SystemClassLoader is no longer a URLClassLoader.

Change-Id: I3aa834f1075e611c86fc4684fda6a50c684b3729
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2021-02-05 19:45:49 -05:00
Matthias Sohn c2990810e9 Merge "reftable: add random suffix to table names" 2021-02-05 19:43:42 -05:00
Alina Djamankulova f077158acf TransportGitAnon: remove unnecessary socket bind to a local address
before connecting.

A socket gets bound on connect in the next line.

Signed-off-by: Alina Djamankulova <adjama@google.com>
Change-Id: I69a423c592e2fdd582b3c40099137b4ef3d05b39
2021-02-05 18:14:59 -05:00
David Ostrovsky 4560bdf7e2 Migrate to Apache MINA sshd 2.6.0 and Orbit I20210203173513
Re-enable DSA, DSA_CERT, and RSA_CERT public key authentication.
DSA is discouraged for a long time already, but it might still be
way too disruptive to completely drop it. RSA is discouraged for
far less long, and dropping that would be really disruptive.

Adapt to the changed property handling. Remove work-arounds for
shortcomings of earlier sshd versions.

Use Orbit I20210203173513, which includes sshd 2.6.0. This also bumps
apache.httpclient to 4.5.13 and apache.httpcore to 4.4.14.

Change-Id: I2d24a1ce4cc9f616a94bb5c4bdaedbf20dc6638e
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2021-02-04 08:35:12 +01:00
Matthias Sohn 083e6fd709 LFSPointerTest: suppress errorprone error [SelfComparison]
The test #testCompareToSame tests comparing against self intentionally.
Suppress the error raised by errorprone.

Change-Id: If8d70a51ab34ffb6d7f0c9d409746aee8b031408
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2021-02-04 01:19:42 +01:00
Matthias Sohn 8ad53baa14 Fix bazel tests broken by classes moved in dbd05433
Change-Id: I88a3547c4b52bcf28c0f0f548ba1bb41a7787704
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2021-02-04 01:19:42 +01:00
Matthias Sohn b6fe0300f2 Merge branch 'stable-5.11'
* stable-5.11:
  Prepare 5.11.0-SNAPSHOT builds
  JGit v5.11.0.202102031030-m2

Change-Id: I3cada72e1917e6349ee415e29987165692d65c4b
2021-02-03 22:57:33 +01:00
Matthias Sohn 43b651ea93 Prepare 5.11.0-SNAPSHOT builds
Change-Id: I191674448c4a220e61ec5f0c181c0809eb873166
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2021-02-03 21:17:22 +01:00
Matthias Sohn 247babb603 JGit v5.11.0.202102031030-m2
Change-Id: Ie14c162a7fc5e1e8f34bf4bbc944f4dbe13e4dd0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2021-02-03 16:29:21 +01:00
Thomas Wolf 91ddc0e284 IO: fix IO.readFully(InputStream, byte[], int)
This would run into an endless loop if the offset given was not zero.
Fix the logic to exit the read loop when the buffer is full.

Luckily all existing uses of this method call it only with offset zero.

Change-Id: I0ec2a4fb43efe4a605d06ac2e88cf155d50e2f1e
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-01-31 10:31:10 +01:00
Thomas Wolf aa052ea099 LFS: make pointer parsing more robust
Parsing an LFS pointer must check the input more to not run into
exceptions. LfsPoint.parseLfsPointer() is used in various places to
determine whether a blob is a LFS pointer; it is not only called with
valid LFS pointers. Tighten the validations and return null if they
fail. All callers already do check for a null return value.

Also, LfsPointer implemented Comparable but did not override equals().
This is rather unusual and actually warned against in the javadoc of
Comparable. Implement equals() and hashCode().

Add more tests.

Bug: 570744
Change-Id: I90ca264d0a250275cf1907e9dcfcee5eab80df0f
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-01-31 10:31:10 +01:00
Matthias Sohn 9109cb9d2b [pgm] add option --timeout to clone command
Change-Id: I2ee74755045a8d9971ea0d9426db405829c7c679
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2021-01-29 16:23:29 +01:00
Jonathan Nieder 59420886e9 Merge "Move reachability checker generation into the ObjectReader object" 2021-01-29 01:52:13 -05:00
Terry Parker dbd05433ec Move reachability checker generation into the ObjectReader object
Reachability checkers are retrieved from RevWalk and ObjectWalk objects:
* RevWalk.createReachabilityChecker()
* ObjectWalk.createObjectReachabilityChecker()

Since RevWalks and ObjectWalks are themselves directly instantiated
in hundreds of places (e.g. UploadPack...) overriding them in a
consistent way requires overloading 100s of methods, which isn't
feasible. Moving reachability checker generation to a more central
place solves that problem.

The ObjectReader object seems a good place from which to get
reachability checkers, because reachability checkers return
information about relationships between objects. ObjectDatabases
delegate many operations to ObjectReaders, and reachability bitmaps
are attached to ObjectReaders.

The Bitmapped and Pedestrian reachability checker objects were
package private in the org.eclipse.jgit.revwalk package. This change
makes them public and moves them to the
org.eclipse.jgit.internal.revwalk package. Corresponding tests are
also moved.

Motivation:
1) Reachability checking algorithms need to scale. One of the
   internal Android repositories has ~2.4 million refs/changes/*
   references, causing bad long tail performance in reachability
   checks.
2) Reachability check performance is impacted by repository
   topography: number of refs, number of objects, amounts of
   related vs. unrelated history.
3) Reachability check performance is also affected by per-branch
   access (Gerrit branch permissions) since different users can
   see different branches.
4) Reachability check performance isn't affected by any state in a
   RevWalk or ObjectWalk.

I don't yet know if a single algorithm will work for all cases in #2
and #3. We may need to evolve the ReachabilityChecker interfaces
over time to solve the Gerrit branch permissions case, or use
Gerrit-specific identity information to solve that in an efficient
way.

This change takes the existing public API and moves it to the
ObjectReader/whole repository level, which is where we can do
consistent customizations for #2 and #3. We intend to upstream the
best of whatever works, but anticipate the need for multiple rounds
of experimentation.

Change-Id: I9185feff43551fb387957c436112d5250486833d
Signed-off-by: Terry Parker <tparker@google.com>
2021-01-28 22:17:26 -08:00
Youssef Elghareeb 6f82690aaf Add the "compression-level" option to all ArchiveCommand formats
Different archive formats support a compression level in the range
[0-9]. The value 0 is for lowest compressions and 9 for highest. Highest
levels produce output files of smaller sizes but require more memory to
do the compression.

This change allows passing a "compression-level" option to the git
archive command and implements using it for different file formats.

Change-Id: I5758f691c37ba630dbac24db67bb7da827bbc8e1
Signed-off-by: Youssef Elghareeb <ghareeb@google.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2021-01-28 02:57:22 -05:00
Jonathan Tan c29ec3447d Merge changes I36d9b63e,I8c5db581,I2c02e89c
* changes:
  Compare getting all refs except specific refs with seek and with filter
  Add getsRefsByPrefixWithSkips (excluding prefixes) to ReftableDatabase
  Add seekPastPrefix method to RefCursor
2021-01-27 13:36:43 -05:00
Gal Paikin 31e3cb4375 Compare getting all refs except specific refs with seek and with filter
There are currently two ways to get all refs except a specific ref, we
add two methods that perform both and compare the two different approaches.

This change adds two methods that compares the two different approaches
of such query:
1. Get all the refs, and then filter by refs that don't start with the
prefix (current approach).
2. Get all refs until encountering a ref that is part of the prefix we
should exclude, skip using seekPastPrefix, and continue (new approach).
This works since the refs are sorted.

Specifically in Gerrit, we often have thousands of refs that are not
refs/changes, and millions of refs/changes, hence the second approach
should be much faster. In Jgit in general it's still expected to provide
a better result even if we're skipping a smaller chunk of the refs
since the complexity here is O(logn) with a binary search, rather than
O(number of skipped refs).

We ran this benchmark on a big chunk of chromium/src's reftable. To run
it, we first create the reftable:

  git ls-remote https://chromium.googlesource.com/chromium/src > lsr

  bazel build org.eclipse.jgit.pgm:jgit && rm -rf /tmp/reftable* && \
    ./bazel-bin/org.eclipse.jgit.pgm/jgit debug-benchmark-reftable \
    --test write_stack lsr /tmp/reftable

Then, we actually test the created reftable. Note that we can't test all
of them at once since there are multiple ones, but below is a good
example.

bazel build org.eclipse.jgit.pgm:jgit  && \
./bazel-bin/org.eclipse.jgit.pgm/jgit debug-benchmark-reftable \
--test get_refs_excluding_ref --ref refs/changes \
lsr /tmp/reftable/000000000001-0000001e0371.ref

Result:
total time the action took using seek:      36925 usec
total time the action took using filter:     874382 usec
number of refs that start with prefix: 4266.
number of refs that don't start with prefix: 1962695.

Similarly for Android's biggest repository, platform/frameworks/base
(still only partial result):
total time the action took using seek:       9020 usec
total time the action took using filter:     143166 usec
number of refs that start with prefix: 296.
number of refs that don't start with prefix: 60400.

In conclusion, it's easy to see an improvement of a factor of 15-20x for
large Gerrit repositories!

Signed-off-by: Gal Paikin <paiking@google.com>
Change-Id: I36d9b63eb259804c774864429cf2c761cd099cc3
2021-01-27 02:22:51 -05:00
Gal Paikin a6b90b7ec5 Add getsRefsByPrefixWithSkips (excluding prefixes) to ReftableDatabase
We sometimes want to get all the refs except specific prefixes,
similarly to getRefsByPrefix that gets all the refs of a specific
prefix.

We now create a new method that gets all refs matching a prefix except a
set of specific prefixes.

One use-case is for Gerrit to be able to get all the refs except
refs/changes; in Gerrit we often have lots of refs/changes, but very
little other refs. Currently, to get all the refs except refs/changes we
need to get all the refs and then filter the refs/changes, which is very
inefficient. With this method, we can simply skip the unneeded prefix so
that we don't have to go over all the elements.

RefDirectory still uses the inefficient implementation, since there
isn't a simple way to use Refcursor to achieve the efficient
implementation (as done in ReftableDatabase).

Signed-off-by: Gal Paikin <paiking@google.com>
Change-Id: I8c5db581acdeb6698e3d3a2abde8da32f70c854c
2021-01-27 02:22:45 -05:00
Terry Parker b79882586d Wrap the Files.list returned Stream in a try-with-resources block
Adds a new FileUtils.hasFiles(Path) helper method to correctly handle
the Files.list returned Stream.

These errors were found by compiling the code using JDK11's
javac compiler.

Change-Id: Ie8017fa54eb56afc2e939a2988d8b2c5032cd00f
Signed-off-by: Terry Parker <tparker@google.com>
2021-01-26 16:04:13 -08:00
Gal Paikin 68b95afc70 Add seekPastPrefix method to RefCursor
This method will be used by the follow-up change. This useful if we want
to go over all the changes after a specific ref.

For example, the new method allows us to create a follow-up that would
go over all the refs until we reach a specific ref (e.g refs/changes/),
and then we use seekPastPrefix(refs/changes/) to read the rest of the refs,
thus basically we return all refs except a specific prefix.

When seeking past a prefix, the previous condition that created the
RefCursor still applies. E.g, if the cursor was created by
seekRefsWithPrefix, we can skip some refs but we will not return refs
that are not starting with this prefix.

Signed-off-by: Gal Paikin <paiking@google.com>
Change-Id: I2c02e89c877fe90da8619cb8a4a9a0c865f238ef
2021-01-26 21:47:28 +01:00
Han-Wen Nienhuys b832b068d2 reftable: add random suffix to table names
In some circumstances (eg. compacting a stack that has deletions), the
result may have a {min, max} range that already exists. In these
cases, we would rename onto an already existing file, which does not
work on Windows. By adding a random suffix, we disambiguate the files,
and avoid this failure scenario.

Change-Id: I0273f99bb845cfbdbd8cdd582b55d3c310505d29
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2021-01-25 16:55:39 +01:00
Thomas Wolf 84dbc2d431 TemporaryBuffer: fix toByteArray(limit)
Heap always copied whole blocks, which leads to AIOOBEs. LocalFile
didn't overwrite the method and thus caused NPEs.

Change-Id: Ia37d4a875df9f25d4825e6bc95fed7f0dff42afb
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-01-22 23:00:01 +01:00
Thomas Wolf cf9433a9b3 Correct the minimum required version of Apache httpclient
org.eclipse.jgit.http.apache uses several features that exist only
since httpclient 4.4, but its MANIFEST.MF still had a lower bound of
4.3.0. Bump this to 4.4.0 for all packages from httpclient. 4.3.0 for
the packages from httpcore is fine.

Do a similar clean-up in the other bundles using packages from Apache
httpclient (http.test, lfs, lfs.server, lfs.server.test)

Bug: 570451
Change-Id: Iffdde2a9bd0d65db2e5201a08cffbf03597e2866
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-01-18 16:18:09 +01:00
Matthias Sohn c9b0606782 Merge "pgm: add missing dependency to org.apache.commons.logging" 2021-01-18 02:44:39 -05:00
Matthias Sohn 5e2c976233 Merge "[spotbugs]: Fix potential NPE in FileSnapshot constructor" 2021-01-18 02:44:13 -05:00
Matthias Sohn d4fca2e81c pgm: add missing dependency to org.apache.commons.logging
Without this dependency I get class loading exceptions when trying to
run org.eclipse.jgit.pgm.Clone in Eclipse.

Change-Id: Ia9ecb385d3baccbcd041114287af5076fefd3d71
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2021-01-17 18:04:38 -05:00
Thomas Wolf 3ef9f2c764 [pgm] Use Apache sshd by default
Change-Id: I2a00059415fc2674469bc921827362801583af83
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-01-15 18:42:45 -05:00
Thomas Wolf 58f4e6e7f8 TransportHttp: support preemptive Basic authentication
If the caller knows already HTTP Basic authentication will be needed
and if it also already has the username and password, preemptive
authentication is a little bit more efficient since it avoids the
initial 401 response.

Add a setPreemptiveBasicAuthentication(username, password) method
to TransportHttp. Client code could call this for instance in a
TransportConfigCallback. The method throws an IllegalStateException
if it is called after an HTTP request has already been made.

Additionally, a URI can include userinfo. Although it is not
recommended to put passwords in URIs, JGit's URIish and also the
Java URL and URI classes still allow it. The underlying HTTP
connection may omit these fields though. If present, take these
fields as additional source for preemptive Basic authentication if
setPreemptiveBasicAuthentication() has not been called.

No preemptive authentication will be done if the connection is
redirected to a different host.

Add tests.

Bug: 541327
Change-Id: Id00b975e56a15b532de96f7bbce48106d992a22b
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-01-14 16:23:45 +01:00
Thomas Wolf 471ad49546 TransportHttp: shared SSLContext during fetch or push
TransportHttp makes several HTTP requests. The SSLContext and socket
factory must be shared over these requests, otherwise authentication
information may not be propagated correctly from one request to the
next. This is important for authentication mechanisms that rely on
client-side state, like NEGOTIATE (either NTLM, if the underlying HTTP
library supports it, or Kerberos). In particular, SPNEGO cannot
authenticate on a POST request; the authentication must come from the
initial GET request, which implies that the POST request must use the
same SSLContext and socket factory that was used for the GET.

Change the way HTTPS connections are configured. Introduce the concept
of a GitSession, which is a client-side HTTP session over several HTTPS
requests. TransportHttp creates such a session and uses it to configure
all HTTP requests during that session (fetch or push). This gives a way
to abstract away the differences between JDK and Apache HTTP connections
and to configure SSL setup outside.

A GitSession can maintain state and thus give all HTTP requests in a
session the same socket factory.

Introduce an extension interface HttpConnectionFactory2 that adds a
method to obtain a new GitSession. Implement this for both existing
HTTP connection factories. Change TransportHttp to use the new
GitSession to configure HTTP connections.

The old methods for disabling SSL verification still exist to support
possibly external connection and connection factory implementations
that do not make use of the new GitSession yet.

Bug: 535850
Change-Id: Iedf67464e4e353c1883447c13c86b5a838e678f1
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-01-14 16:23:45 +01:00
Thomas Wolf 224aaa0be7 TransportHttp: make the connection factory configurable
Previously, TransportHttp always used the globally set connection
factory. This is problematic if that global factory is changed in
the middle of a fetch or push operation. Initialize the factory to
use in the constructor, then use that factory for all HTTP requests
made through this transport. Provide a setter and a getter for it
so that client code can customize the factory, if needed, in a
TransportConfigCallback.

Once a factory has been used on a TransportHttp instance it cannot
be changed anymore.

Make the global static factory reference volatile.

Change-Id: I7c6ee16680407d3724e901c426db174a3125ba1c
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-01-14 16:23:44 +01:00
Matthias Sohn 312ab4f7f6 Add target platform for eclipse 4.19 staging
Change-Id: I172aa01203edc8cd069c93762c482a3f21950acc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2021-01-12 23:26:09 +01:00
Matthias Sohn a3d1bb0445 Update orbit to S20210105214148 and com.google.gson to 2.8.6
Also fix target name of jgit-4.18 target.

Change-Id: Ib5a13281398e7c5589de2e4a34fae0d08346db9c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2021-01-12 23:26:09 +01:00
Marco Miller 63f4de721c Update spotbugs-maven-plugin to 4.2.0
Change-Id: I094d92f95ec2ab1cefa8f1504f2a8c1aa6e28d96
Signed-off-by: Marco Miller <marco.miller@ericsson.com>
2021-01-12 16:00:12 -05:00
Matthias Sohn 4120d17b0b Add org.eclipse.jetty.util.ajax to target platform and bazel deps
It is required by org.eclipse.jetty.servlet [1].

[1] https://search.maven.org/artifact/org.eclipse.jetty/jetty-servlet/9.4.35.v20201120/jar

Change-Id: I307ec8bad17f3a703bf25cc16c87ab9b524a84ff
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2021-01-12 10:14:42 +01:00
Thomas Wolf dd3846513b Tag message must not include the signature
Signatures on tags are just tacked onto the end of the message.
Getting the message must not return the signature. Compare [1]
and [2] in C git, which both drop a signature at the end of an
object body.

[1] https://github.com/git/git/blob/21bf933/builtin/tag.c#L173
[2] https://github.com/git/git/blob/21bf933/ref-filter.c#L1276

Change-Id: Ic8a1062b8bc77f2d7c138c3fe8a7fd13b1253f38
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-01-10 10:19:40 -05:00
Matthias Sohn db48fcedbc Update jetty to 9.4.35.v20201120
Change-Id: I203778ea0536defffb720bcf7cdcbc6258540e65
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2021-01-07 15:51:18 -05:00
Thomas Wolf fb3ae37e26 Protocol V2: don't log spurious ACKs in UploadPack
UploadPack may log ACKs in protocol V2 that it doesn't send (if it
got a "done" from the client), or may log ACKs twice. That makes
packet log analysis difficult.

Add a new constructor to PacketLineOut to omit all logging from an
instance, and use it in UploadPack.

Change-Id: Ic29ef5f9a05cbcf5f4858a4e1b206ef0e6421c65
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-01-06 12:17:23 +01:00
Thomas Wolf fc9f866a17 Merge "Protocol V2: respect MAX_HAVES only once we got at least one ACK" 2021-01-05 17:59:27 -05:00
Christian Halstrick 5aaaad5cc1 Merge "FileSnapshot: don't try to read file attributes twice" 2021-01-05 02:11:48 -05:00