jgit/org.eclipse.jgit.test
Luca Milanesio 4bb4693633 Do not create reflog for remote tracking branches during clone
When using JGit on a non-bare repository, the CloneCommand
it previously created local reflogs for all branches including remote
tracking ones, causing the generation of a potentially large
number of files on the local filesystem.

The creation of the remote-tracking branches (refs/remotes/*) during
clone is not an issue for the local filesystem because all of them are
stored in a single packed-refs file. However, the creation of a large
number of ref logs on a local filesystem IS an issue because it
may not be tuned or initialised in term of inodes to contain a very
large number of files.

When a user (or a CI system) performs the CloneCommand against
a potentially large repository (e.g., millions of branches), it is
interested in working or validating a single branch or tag and is
unlikely to work with all the remote-tracking branches.
The eager creation of a reflogs for all the remote-tracking branches is
not just a performance issue but may also compromise the ability to
use JGit for cloning a large repository.

The behaviour implemented in this change is also consistent with the
optimisation done in the C code-base [1].

We differentiate between clone and fetch commands using --branch
<initialBranch> option, that is only available in clone command,
and is set as HEAD per default.

[1] 58f233ce1e

Bug: 579805
Change-Id: I58d0d36a8a4ce42e0f59b8bf063747c4b81bd859
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
2022-06-25 12:09:01 +01:00
..
.settings ApplyCommand: use byte arrays for text patches, not strings 2021-05-26 00:38:00 +02:00
META-INF Prepare 5.13.2-SNAPSHOT builds 2022-06-14 00:41:18 +02:00
exttst/org/eclipse/jgit Add a cgit interoperability test for LockFile 2021-05-09 22:49:19 +02:00
findBugs [spotbugs] Silence CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE in jgit tests 2020-12-22 10:53:00 +01:00
src/org/eclipse/jgit Decouple JSch from JGit Core 2020-06-01 01:46:59 +02:00
tst/org/eclipse/jgit Do not create reflog for remote tracking branches during clone 2022-06-25 12:09:01 +01:00
tst-rsrc AmazonS3: Add support for AWS API signature version 4 2022-06-13 09:44:23 +02:00
.classpath Decouple JSch from JGit Core 2020-06-01 01:46:59 +02:00
.gitignore Fix test setup for Eclipse Photon and greater 2018-11-02 18:50:26 +01:00
.project Remove references to org.eclipse.jgit.java7 2016-08-05 11:22:27 +09:00
BUILD Bazel: Remove unused resources variable 2021-02-07 23:06:25 +01:00
build.properties Use slf4j-simple instead of log4j for logging 2021-12-31 01:09:52 +01:00
org.eclipse.jgit.core--All-Tests (Java 8) (de).launch Fixed few locale dependent pgm tests 2016-01-02 17:41:58 +01:00
org.eclipse.jgit.core--All-Tests (Java 8).launch Fix classpath of test launch configurations 2015-11-21 00:33:43 +01:00
org.eclipse.jgit.core--All-Tests.launch
org.eclipse.jgit.test-WalkEncryptionTest-Proxy.launch Adding AES Walk Encryption support in http://www.jets3t.org/ mode 2015-10-18 19:14:31 +00:00
org.eclipse.jgit.test-WalkEncryptionTest.launch Adding AES Walk Encryption support in http://www.jets3t.org/ mode 2015-10-18 19:14:31 +00:00
plugin.properties Fix bundle localization of Apache SSH bundle 2019-06-21 17:54:06 +02:00
pom.xml Prepare 5.13.2-SNAPSHOT builds 2022-06-14 00:41:18 +02:00
tests.bzl Use slf4j-simple instead of log4j for logging 2021-12-31 01:09:52 +01:00