Commit Graph

7136 Commits

Author SHA1 Message Date
Thomas Wolf 62675c48de Apache MINA sshd: make sendKexInit() work also for re-keying
The message delaying for the initial SSH messages (client
identification followed by the initial key exchange request)
was broken. sendKexInit() is _also_ called when a new key exchange
is requested. We inadvertently also re-sent the client identification
at that point, which is wrong and makes the server terminate the
connection.

Re-keying occurs from time to time during an SSH connection depending
on time, the number of messages (packets/blocks) exchanged, or the
amount of data exchanged. The net result was that for large
repositories data-intensive operations failed on the first re-keying.

Change the initial message delay such that the two messages for the
client identification and the initial key exchange can be buffered
individually while the proxy protocol is still in progress. The
AbstractClientProxyConnector can now buffer several commands, which
should also resolve bug 544715.

Bug: 545920
Change-Id: If09ee963a439b39098a0f52a1510237b428df8dd
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2019-04-20 11:19:34 +02:00
Matthias Sohn 2a6973bf6b Merge branch 'stable-5.1' into stable-5.2
* stable-5.1:
  Prepare 5.1.8-SNAPSHOT builds
  JGit v5.1.7.201904200442-r
  ObjectUploadListener: Add callback interface
  Prepare 4.11.9-SNAPSHOT builds
  JGit v4.11.8.201904181247-r
  Prepare 4.9.11-SNAPSHOT builds
  JGit v4.9.10.201904181027-r
  Prepare 4.7.10-SNAPSHOT builds
  JGit v4.7.9.201904161809-r
  Prepare 4.5.8-SNAPSHOT builds
  JGit v4.5.7.201904151645-r
  Remember the cause for invalidating a packfile
  Fix API problem filters
  Fix pack files scan when filesnapshot isn't modified

Change-Id: I76761002eedf360e93d0559942ebc927a40428d6
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-20 11:16:54 +02:00
Matthias Sohn c2945bd261 Prepare 5.1.8-SNAPSHOT builds
Change-Id: I331bbaefd42ef94673ae8565c9b2b3af9eadfda0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-20 10:51:17 +02:00
Matthias Sohn 22e41cfd56 JGit v5.1.7.201904200442-r
Change-Id: Ifaa3a88c5e117912a8c691b8b8369dd9a17faebb
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-20 10:42:58 +02:00
David Pursehouse cf7c49868b ObjectUploadListener: Add callback interface
The callback interface is invoked after object upload was
completed.

Change-Id: I705d8becaf4f35188caf098aa75cff8963d64a60
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-04-20 10:23:59 +02:00
Matthias Sohn f33fd16425 Merge branch 'stable-5.0' into stable-5.1
* stable-5.0:
  Prepare 4.11.9-SNAPSHOT builds
  JGit v4.11.8.201904181247-r
  Prepare 4.9.11-SNAPSHOT builds
  JGit v4.9.10.201904181027-r
  Prepare 4.7.10-SNAPSHOT builds
  JGit v4.7.9.201904161809-r
  Prepare 4.5.8-SNAPSHOT builds
  JGit v4.5.7.201904151645-r
  Remember the cause for invalidating a packfile
  Fix API problem filters
  Fix pack files scan when filesnapshot isn't modified

Change-Id: I685d8a797209bc1b9c1bb9caba40ac8713c6ce5b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-20 01:52:02 +02:00
Matthias Sohn 710d00b85e Merge branch 'stable-4.11' into stable-5.0
* stable-4.11:
  Prepare 4.11.9-SNAPSHOT builds
  JGit v4.11.8.201904181247-r
  Prepare 4.9.11-SNAPSHOT builds
  JGit v4.9.10.201904181027-r
  Prepare 4.7.10-SNAPSHOT builds
  JGit v4.7.9.201904161809-r
  Prepare 4.5.8-SNAPSHOT builds
  JGit v4.5.7.201904151645-r
  Remember the cause for invalidating a packfile
  Fix API problem filters
  Fix pack files scan when filesnapshot isn't modified

Change-Id: I9b7f9faf3dc584068456f1ae2cacc4ce5137d4ad
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-19 12:36:24 +02:00
Matthias Sohn f90c526cfb Prepare 4.11.9-SNAPSHOT builds
Change-Id: Ie0ef10159bac6daf4db3f68e8c0825bc1608e40f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-19 12:05:01 +02:00
Matthias Sohn 513710a9a4 JGit v4.11.8.201904181247-r
Change-Id: I0356bde8fbb789faa74ed3635046f4fd0dce28de
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-18 18:47:14 +02:00
Matthias Sohn bb7d58d670 Merge branch 'stable-4.10' into stable-4.11
* stable-4.10:
  Prepare 4.9.11-SNAPSHOT builds
  JGit v4.9.10.201904181027-r
  Prepare 4.7.10-SNAPSHOT builds
  JGit v4.7.9.201904161809-r
  Prepare 4.5.8-SNAPSHOT builds
  JGit v4.5.7.201904151645-r
  Remember the cause for invalidating a packfile
  Fix API problem filters
  Fix pack files scan when filesnapshot isn't modified

Change-Id: Ib2a170e24bddad0e8c9c7be6688269f6318bf30f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-18 18:44:35 +02:00
Matthias Sohn 53014c0804 Merge branch 'stable-4.9' into stable-4.10
* stable-4.9:
  Prepare 4.9.11-SNAPSHOT builds
  JGit v4.9.10.201904181027-r
  Prepare 4.7.10-SNAPSHOT builds
  JGit v4.7.9.201904161809-r
  Prepare 4.5.8-SNAPSHOT builds
  JGit v4.5.7.201904151645-r
  Remember the cause for invalidating a packfile
  Fix API problem filters
  Fix pack files scan when filesnapshot isn't modified

Change-Id: I94c9e6300b5f77b185ec6661fa76f0c74a5fc2a9
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-18 18:43:01 +02:00
Matthias Sohn 551110b0e2 Prepare 4.9.11-SNAPSHOT builds
Change-Id: I99137bc4958167773d2fc8b1d48fbb508af52be5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-18 18:05:43 +02:00
Matthias Sohn 7be6f02d32 JGit v4.9.10.201904181027-r
Change-Id: I3034d1ad263fdfb23347304f866309354930fd19
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-18 16:26:30 +02:00
Matthias Sohn d5ec15c8d0 Merge branch 'stable-4.8' into stable-4.9
* stable-4.8:
  Prepare 4.7.10-SNAPSHOT builds
  JGit v4.7.9.201904161809-r
  Prepare 4.5.8-SNAPSHOT builds
  JGit v4.5.7.201904151645-r
  Remember the cause for invalidating a packfile
  Fix API problem filters
  Fix pack files scan when filesnapshot isn't modified

Change-Id: Idaa789e699f1ef568ea957184d0641355d9e3181
2019-04-18 14:43:23 +02:00
Matthias Sohn fad5cf8b23 Merge branch 'stable-4.7' into stable-4.8
* stable-4.7:
  Prepare 4.7.10-SNAPSHOT builds
  JGit v4.7.9.201904161809-r
  Prepare 4.5.8-SNAPSHOT builds
  JGit v4.5.7.201904151645-r
  Remember the cause for invalidating a packfile
  Fix API problem filters
  Fix pack files scan when filesnapshot isn't modified

Change-Id: I7984f68833f2d615399296e53cb9a64e5b4ca6ed
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-17 00:54:37 +02:00
Matthias Sohn 21042c0de7 Prepare 4.7.10-SNAPSHOT builds
Change-Id: I662ee441521c1370a31f274cc6d001723ad0c528
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-17 00:18:13 +02:00
Matthias Sohn cfeb4187b7 JGit v4.7.9.201904161809-r
Change-Id: Id6e379c3ce52c83455e37cbc3d77db0e188fdb85
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-17 00:08:39 +02:00
Matthias Sohn b23735107b Merge branch 'stable-4.6' into stable-4.7
* stable-4.6:
  Prepare 4.5.8-SNAPSHOT builds
  JGit v4.5.7.201904151645-r
  Remember the cause for invalidating a packfile
  Fix API problem filters
  Fix pack files scan when filesnapshot isn't modified

Change-Id: I6ea51dde6608a4163d681aa1ebf710f06da44b21
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-16 23:53:21 +02:00
Matthias Sohn 422f030d29 Merge branch 'stable-4.5' into stable-4.6
* stable-4.5:
  Prepare 4.5.8-SNAPSHOT builds
  JGit v4.5.7.201904151645-r
  Remember the cause for invalidating a packfile
  Fix API problem filters
  Fix pack files scan when filesnapshot isn't modified

Change-Id: I0b4eaa521ebdea83ab18c05915d691c07a575a7d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-16 23:36:46 +02:00
Matthew DeVore 0a15cb3a2b tree:<depth>: do not revisit tree during packing
If a tree is visited during pack and filtered out with tree:<depth>, we
may need to include it if it is visited again at a lower depth.

Until now we revisit it no matter what the depth is. Now, avoid
visiting it if it has been visited at a lower or equal depth.

Change-Id: I68cc1d08f1999a8336684a05fe16e7ae51898866
Signed-off-by: Matthew DeVore <matvore@gmail.com>
2019-04-16 10:36:59 -07:00
Matthew DeVore 175e66548b tree:<depth> should not traverse overly-deep trees
If we are traversing a tree which is too deep, then there is no need to
traverse the children. Skipping children is much faster than traversing
the possibly thousands of objects which are directly or indirectly
referenced by the tree.

Change-Id: I6d68cc1d35da48e3288b9cc80356a281ab36863d
Signed-off-by: Matthew DeVore <matvore@gmail.com>
2019-04-16 10:36:59 -07:00
Matthew DeVore 93dd2d482a Preliminary support for tree:<depth> filter
This is used when fetching, and in particular to populate a partial
clone or a virtual file system cache as the user navigates. With this,
a client can pre-fetch a few directories deeper than only the current
directory.

depth:0 will omit all trees, and is useful if you only want to fetch
the commits of a repository, or fetch just a single tree or blob object.
depth:1 will fetch only the root tree of all commits fetched. depth:2
will fetch the root tree and all blobs and tree objects directly
referenced from it. depth:3 gets one more level, and so on. depth:#
will not filter a blob or tree that is explicitly marked wanted.

Bitmaps are disabled when this filter is used.

This implementation is quite slow because it iterates over all omitted
objects rather than skipping them. This will be addressed in follow-up
commits.

Change-Id: Ic312fee22d60e32cfcad59da56980e90ae2cae6a
Signed-off-by: Matthew DeVore <matvore@gmail.com>
2019-04-16 10:36:55 -07:00
Matthias Sohn 0291b2eaf8 Prepare 4.5.8-SNAPSHOT builds
Change-Id: I70628cb8fcad0a60598dc937abbed63606a78599
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-16 00:34:19 +02:00
Matthias Sohn adccfd4503 JGit v4.5.7.201904151645-r
Change-Id: I3e32cf13f5cb99d8e570412d80d941740399c07d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-15 22:46:38 +02:00
Jonathan Nieder 5a0f631063 Merge "Revert "Use try-with-resources in SubmoduleWalk"" 2019-04-14 12:09:02 -04:00
Jonathan Nieder 460500e99a Revert "Use try-with-resources in SubmoduleWalk"
This reverts commit 39b0b51b12. Before
that change, SubmoduleWalk.forPath transferred ownership to the caller
on success. Afterward, it returns a closed SubmoduleWalk to the caller,
which does not appear to be intentional.

Change-Id: I9381daac5153706e24fd9117700089848b58c54e
2019-04-14 11:00:46 -04:00
Carsten Hammer 0b320b2c35 Use Arrays.asList instead of copying array in a for loop
Change-Id: Ie44950f7d2f2f94a0412efb6c274f6e1e31efcd6
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-14 00:19:51 +02:00
Carsten Hammer 39b0b51b12 Use try-with-resources in SubmoduleWalk
Convert try finally block to try-with-resources
Change-Id: Ifd676a2aba3e926bd2f3b6b8fefd5f63564899ed
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-13 19:58:24 +02:00
Carsten Hammer 6a4c77e619 Use isEmpty() instead of size()==0 where possible
Change-Id: I97f1367a2ea9f1f6146e264c27c3981b842f2a26
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-13 19:53:29 +02:00
Carsten Hammer 6e03645ad8 Use jdk 5 for loop
Replace simple uses of Iterator with a corresponding for-loop.
Also add missing braces on loops as necessary.

Change-Id: I708d82acdf194787e3353699c07244c5ac3de189
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-13 19:33:13 +02:00
Carsten Hammer c0268f899e Join catch sections using multicatch
Change-Id: I1a9112e6a4f938638c599b489cb0858eca27ab91
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-13 18:53:58 +02:00
Masaya Suzuki 3c1af2761f Process unshallow commits first
DepthGenerator marks commits reinteresting for the ones that are
reachable from unshallow commits as it walks over the revisions. Those
unshallow commits won't necessarily be processed first. Because of this,
even if a commit is reachable from unshallow commits, if it's processed
before the uninteresting commits, it will not be processed as
reinteresting and processed as uninteresting. This causes unshallow
git-fetch to be failed.

This changes DepthGenerator to process unshallow commits first
independent to their depth. This makes uninteresting flag carry work
properly.

Change-Id: I94378271cf85fbe6302cefc19a167d8cf68e1a69
Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
2019-04-11 19:45:52 -07:00
Luca Milanesio d6e00d2015 Remember the cause for invalidating a packfile
Keep track of the original cause for a packfile invalidation.
It is needed for the sysadmin to understand if there is a real
underlying filesystem problem and repository corruption or if it is
simply a consequence of a concurrency of Git operations (e.g. repack
or GC).

Change-Id: I06ddda9ec847844ec31616ab6d17f153a5a34e33
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-11 10:55:45 +02:00
Carsten Hammer 38eaa490f2 Remove unnecessary type specifications
Since Java 7 the diamond operator can be used instead of explicit
type parameters.

Change-Id: I2dee5fce7afebb1d9088eeaec4484ee58b4fa492
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-04-11 11:49:32 +09:00
Carsten Hammer 0db509f7e7 Use String.isEmpty() instead of comparing to ""
Use of String.equals("") can be replaced with with String.length() == 0
(for JDK5 and lower) or String.isEmpty() (for JDK6 and higher)

Change-Id: Id1462d22c5d249485d87993263a9239809e73c55
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-04-11 11:48:31 +09:00
Carsten Hammer e876a70ede Use StringBuilder instead of StringBuffer where possible.
Change-Id: Ifc67c84a3e786cd766f45726733a6d294d2652a1
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-04-11 11:47:40 +09:00
Carsten Hammer bf251ea0e8 Replace usage of String.indexOf with String.contains where possible
Change-Id: Iad3fce891077d85cf2533272c54206c33c37afd8
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-04-11 11:45:11 +09:00
David Pursehouse dff4f6cc74 ConfigTest: Add test for parsing invalid group header
Test that an exception is raised for an invalid group header:

  [group "foo" ]
     foo = bar

i.e. where there is a space between the group subsection name
and the closing ']'.

Change-Id: I8933ae100b77634b0afb66bb8aa43d24c955799e
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-04-11 09:09:47 +09:00
Matthias Sohn aa6e7e2c12 Fix API problem filters
Change-Id: I96e0ddc34251348ec4877c9d94b045eb1c53e758
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-11 00:34:20 +02:00
Luca Milanesio 82b1af31e2 Fix pack files scan when filesnapshot isn't modified
Do not reload packfiles when their associated filesnapshot is not
modified on disk compared to the one currently stored in memory.

Fix the regression introduced by fef78212 which, in conjunction with
core.trustfolderstats = false, caused any lookup of objects inside
the packlist to loop forever when the object was not found in the pack
list.

Bug: 546190
Change-Id: I38d752ebe47cefc3299740aeba319a2641f19391
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-09 14:31:39 +01:00
Patrick Hiesel 93a0e50ed0 Introduce RefDatabase#getTipsWithSha1 to list refs pointing to object
Add resolveTipSha1, an inverse of exactRef(String ...), to RefDatabase
and provide a default implementation that runs in O(n) time where n is
the number of refs. For RefTable, provide an implementation that runs
in O(log(n)) time.

[ifrade@google.com: with tests in InMemoryRepositoryTest to exercise
 the reftable code path, too]

Change-Id: I2811ccd0339cdc1c74b42cce2ea003f07a2ce9e1
Signed-off-by: Patrick Hiesel <hiesel@google.com>
Signed-off-by: Ivan Frade <ifrade@google.com>
2019-04-08 17:53:51 -07:00
David Pursehouse ee32ca226e LocalDiskRepositoryTestCase: Clarify semantics of repository creation methods
Several of the utility methods create a Repository without setting
the 'autoClose' flag, which means that the caller is responsible for
closing it. Update the Javadoc to explicitly mention this.

Change-Id: I2410dd8d230cd4519f756c38b17141d0daa6c314
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-04-08 01:13:01 +02:00
David Pursehouse 9c2ef2d71e UploadPackTest: Stop using deprecated Transport.setFilterBlobLimit(long)
Replace usage with the recommended setFilterSpec(FilterSpec).

Change-Id: Icc528d175f25234eeb2daa6b4c29a67a7a6d1e0a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-04-08 01:13:00 +02:00
Thomas Wolf 965aacc7c9 Attach deletion failure reason in FileUtils.delete()
Use Files.delete() instead of File.delete(), and if there is
an exception thrown propagate it unless errors are to be ignored so
that the actual deletion failure cause is available to the caller
(and will be logged).

Change-Id: I5fdb5a4052942437ab365289ad4bb1b563c29456
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2019-04-03 18:35:48 +02:00
Gunnar Wagenknecht 440296873b Ignore invalid files in '.gnupg/private-keys-v1.d'
Bug: 545673
Change-Id: I4a2ee1e76f320209b3f8090264d771f1a9da566f
Signed-off-by: Gunnar Wagenknecht <gunnar@wagenknecht.org>
2019-04-03 03:11:58 -07:00
Matthias Sohn 27f1fb668f Add missing source bundles and add them to a single source feature
Add missing source bundles for
- org.eclipse.jgit.ant
- org.eclipse.jgit.archive
- org.eclipse.jgit.http.apache
- org.eclipse.jgit.http.server
- org.eclipse.jgit.junit
- org.eclipse.jgit.junit.http
- org.eclipse.jgit.junit.ssh
- org.eclipse.jgit.lfs
- org.eclipse.jgit.lfs.server
- org.eclipse.jgit.ui

Combine all source bundles into a single source feature
org.eclipse.jgit.source and delete the other source features.

Ensure all bundles are added to the jgit p2 repository.

Change-Id: I56785f49c940b79f41f763c26e63a4a820ed7cce
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-04-02 01:57:28 -04:00
Jonathan Nieder 4fcaa1a7d5 Merge ".gitignore: remove editor- and OS-specific files" 2019-04-01 16:47:06 -04:00
Matthew DeVore 54bdeaab88 .gitignore: remove editor- and OS-specific files
Whenever Vim opens a file, it creates a .<filename>.swp file in the same
directory as the file. Emacs adds *~ backup files. macOS creates
.DS_Store files. Other editors and OS' surely do their own thing. Rather
than add each one's own swap/backup file to this .gitignore, encourage
users to add the corresponding items to their system-wide gitignore
files.

Change-Id: I5535f5d2f1ebe896eef108cfda087dcb4c50f031
Signed-off-by: Matthew DeVore <matvore@gmail.com>
2019-04-01 13:38:00 -07:00
Thomas Wolf eeab375796 [releng] Fix dependencies between features
Add dependencies from source to binary features and enforce the same
version. Restrict the dependencies between binary features by version,
too.

Adapt the version.sh script to properly replace these version numbers.

Bug: 545906
Change-Id: I953616e58d27accdf61b49f6435a54895bcbf6da
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-03-31 01:13:53 +01:00
Michael Keppler a2901cf9dc Convert target platform to simple POM project
There is no reason why this is a plugin project. It is sufficient as
Xtext nature project which is only built via Maven.

Change-Id: I000f61f27aeb5c377fbbb7f452c26b0d0bff0ae0
Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
2019-03-30 17:31:10 -04:00