aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm
Commit message (Collapse)AuthorAgeFilesLines
...
| * Decouple JSch from JGit CoreMatthias Sohn2020-06-013-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Motivation: JSch serves as 'default' implementations of the SSH transport. If a client application does not use it then there is no need to pull in this dependency. Move the classes depending on JSch to an OSGi fragment extending the org.eclipse.jgit bundle and keep them in the same package as before since moving them to another package would break API. Defer moving them to a separate package to the next major release. Add a new feature org.eclipse.jgit.ssh.jsch feature to enable installation. With that users can now decide which of the ssh client integrations (JCraft JSch or Apache Mina SSHD) they want to install. We will remove the JCraft JSch integration in a later step due to the reasons discussed in bug 520927. Bug: 553625 Change-Id: I5979c8a9dbbe878a2e8ac0fbfde7230059d74dc2 Also-by: Michael Dardis <git@md-5.net> Signed-off-by: Michael Dardis <git@md-5.net> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: David Ostrovsky <david@ostrovsky.org>
| * Decouple BouncyCastle from JGit CoreMatthias Sohn2020-06-012-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Motivation: BouncyCastle serves as 'default' implementation of the GPG Signer. If a client application does not use it there is no need to pull in this dependency, especially since BouncyCastle is a large library. Move the classes depending on BouncyCastle to an OSGi fragment extending the org.eclipse.jgit bundle. They are moved to a distinct internal package in order to avoid split packages. This doesn't break public API since these classes were already in an internal package before this change. Add a new feature org.eclipse.jgit.gpg.bc to enable installation. With that users can now decide if they want to install it. Attempts to sign a commit if org.eclipse.jgit.gpg.bc isn't available will result in ServiceUnavailableException being thrown. Bug: 559106 Change-Id: I42fd6c00002e17aa9a7be96ae434b538ea86ccf8 Also-by: Michael Dardis <git@md-5.net> Signed-off-by: Michael Dardis <git@md-5.net> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: David Ostrovsky <david@ostrovsky.org>
| * Bazel: Remove superfluous dependencies flagged by unused_depsDavid Ostrovsky2020-05-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bazel buildtools project includes in addition to buildifier also unused deps and buildozer utilities, that detect unused dependencies and fix them by applying the removal to the build files. This change is created by installing unused_deps from buildtools@HEAD and running: $ unused_deps //... and applying the suggested modifications. Change-Id: Iad74ec2fa719475b29391586f40b13ae30477004 Signed-off-by: David Ostrovsky <david@ostrovsky.org>
* | Merge branch 'master' into nextMatthias Sohn2020-05-071-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: Prepare 5.8.0-SNAPSHOT builds JGit v5.8.0.202005061305-m2 Update to bouncycastle 1.65 and orbit I20200506000552 ApplyCommand: use Files#copy to copy file Apply hunks when renaming or copying from patch files Create parent directories when renaming a file in ApplyCommand Reduce BitmappedObjectReachabilityChecker visibility Add missing @since to new API Add missing test source file to the build Upgrade Tycho to 1.7.0 ObjectReachabilityCheckers: Make walk member final Upgrade wagon-ssh to 3.4.0 UploadPack: Use more relevant refs first in object reachability check UploadPack: Refactor to generalize the object reachability checks UploadPack: Use BitmappedReachabilityChecker for not advertised wants revwalk: Introduce bitmap-based object reachability checker Bump Bazel version to 3.1.0 revwalk: Extract ObjectReachabilityChecker interface UploadPack: Extract walk-based reachability check Enable passing java options to jgit command line executable RefTreeBatch: fix unclosed resource warning CherryPickCommand: fix unclosed resource warning URIish: suppress non-localized message warning Always use https to access download.eclipse.org UploadPack: Clear advertised ref map after negotiation Use Map directly in MetaFilter Fix human name for local .bundle files Bazel: Disable SecurityManagerMissingPermissionsTest test Remove double blank from sentence start Upgrade maven-antrun-plugin to 3.0.0 Upgrade maven-shade-plugin to 3.2.3 Remove double blank from sentence start Bump Bazel version to 3.0.0 Scan through all merged reftables for max/min update indices FileUtils: improve delete (Windows) FS.runInShell(): handle quoted filters and hooksPath containing blanks Document gc and pack relevant options Define constants for pack config option keys Fix javadoc typo Upgrade ecj to 3.21.0 ReceivePack: Use error message if set Handle non-normalized index also for executable files Update to org.apache.sshd 2.4.0 Scan through all merged reftables for max/min update indices ResolveMerger: Ignore merge conflicts if asked so Upgrade spotbugs-maven-plugin to 4.0.0 Upgrade maven-javadoc-plugin to 3.2.0 Upgrade maven-dependency-plugin to 3.1.2 tag option for clone command Set baseline for japicmp to 5.7.0.202003110725-r RevWalk: fix bad topo flags error message RevWalk: new topo sort to not mix lines of history Upgrade maven-site-plugin to 3.9.0 Upgrade build-helper-maven-plugin to 3.1.0 Prepare 5.7.1-SNAPSHOT builds JGit v5.7.0.202003110725-r TransportHttp: support HTTP response 308 Permanent Redirect Remove unused API problem filters Change-Id: Ifc0c42fd3881b6026b0dcf7a2eb599e7cdede67e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Enable passing java options to jgit command line executableMatthias Sohn2020-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | This allows to pass java options to the jgit command line executable by setting the environment variable "java_args", e.g. $ java_args="-Xmx8g" jgit log Change-Id: Ic7271b104737a8306d9db0f1895079b9f7bb7fd0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Prepare 5.8.0-SNAPSHOT buildsMatthias Sohn2020-03-093-47/+47
| | | | | | | | | | Change-Id: I056b45806a82eae80177932e42e3dc806015351a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge branch 'master' into nextMatthias Sohn2020-02-234-6/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: Revert "Prepend hostname to subsection used to store file timestamp resolution" Remove use of org.bouncycastle.util.encoders.Hex Remove use of org.bouncycastle.util.io.TeeOutputStream Make the IMatcher public API SimilarityRenameDetector: Fix inconsistent indentation Use indexOf(char) and lastIndexOf(char) rather than String versions Reorder modifiers to follow Java Language Specification GitmoduleEntry: Remove redundant import of class from same package Remove redundant "static" qualifier from enum declarations Change-Id: Ie5a3f55229307c900c8974fcaeb1e77c1c87e87f
| * Merge branch 'stable-5.6'Matthias Sohn2020-02-224-6/+6
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.6: Revert "Prepend hostname to subsection used to store file timestamp resolution" SimilarityRenameDetector: Fix inconsistent indentation Use indexOf(char) and lastIndexOf(char) rather than String versions Reorder modifiers to follow Java Language Specification GitmoduleEntry: Remove redundant import of class from same package Remove redundant "static" qualifier from enum declarations Change-Id: Ibb66bef7e8373f81e3e653c9843d986243446d68 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Reorder modifiers to follow Java Language SpecificationDavid Pursehouse2020-02-192-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Java Language Specification recommends listing modifiers in the following order: 1. Annotations 2. public 3. protected 4. private 5. abstract 6. static 7. final 8. transient 9. volatile 10. synchronized 11. native 12. strictfp Not following this convention has no technical impact, but will reduce the code's readability because most developers are used to the standard order. This was detected using SonarLint. Change-Id: I9cddecb4f4234dae1021b677e915be23d349a380 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | * Remove redundant "static" qualifier from enum declarationsDavid Pursehouse2020-02-192-3/+3
| | | | | | | | | | | | | | | | | | | | | Nested enum types are implicitly static. Change-Id: Id3d7886087494fb67bc0d080b4a3491fb4baac19 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | * Prepare 5.6.2-SNAPSHOT buildsMatthias Sohn2020-02-143-47/+47
| | | | | | | | | | | | | | | Change-Id: Ie04d749bf16eea6db5e5c98be54ba093ca249d05 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * JGit v5.6.1.202002131546-rv5.6.1.202002131546-rMatthias Sohn2020-02-133-4/+4
| | | | | | | | | | | | | | | Change-Id: I2807b9a9f7e8b877b72702ebd1f70c4f9f223481 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Prepare 6.0.0-SNAPSHOT buildsMatthias Sohn2020-02-233-47/+47
|/ / | | | | | | | | | | | | | | | | | | | | | | Purpose of the next branch is preparation of breaking changes before we know when we will release it. Bump the version to the next major release 6.0.0-SNAPSHOT in order to prevent build results compete with build results from the version currently used on the master branch (5.7.0-SNAPSHOT). Bug: 560424 Change-Id: Iba64a0124f5bfc167098d829a7ef29650948e2d0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge branch 'stable-5.7'Matthias Sohn2020-02-011-7/+22
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.7: Fix string format parameter for invalidRefAdvertisementLine WindowCache: add metric for cached bytes per repository pgm daemon: fallback to user and system config if no config specified WindowCache: add option to use strong refs to reference ByteWindows Replace usage of ArrayIndexOutOfBoundsException in treewalk Add config constants for WindowCache configuration options Change-Id: I0538bcba259f7229790a602ac9de120464a1260d
| * | Merge branch 'stable-5.6' into stable-5.7Matthias Sohn2020-02-011-7/+22
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.6: Fix string format parameter for invalidRefAdvertisementLine WindowCache: add metric for cached bytes per repository pgm daemon: fallback to user and system config if no config specified WindowCache: add option to use strong refs to reference ByteWindows Replace usage of ArrayIndexOutOfBoundsException in treewalk Add config constants for WindowCache configuration options Change-Id: I79d615dff66493b60d3a4bcbdc57b9455e8d6673
| | * Merge branch 'stable-5.5' into stable-5.6Matthias Sohn2020-02-011-7/+22
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.5: Fix string format parameter for invalidRefAdvertisementLine WindowCache: add metric for cached bytes per repository pgm daemon: fallback to user and system config if no config specified WindowCache: add option to use strong refs to reference ByteWindows Replace usage of ArrayIndexOutOfBoundsException in treewalk Add config constants for WindowCache configuration options Change-Id: I73d16b53df02bf735c2431588143efe225a4b5b4
| | | * Merge branch 'stable-5.4' into stable-5.5Matthias Sohn2020-02-011-7/+22
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.4: Fix string format parameter for invalidRefAdvertisementLine WindowCache: add metric for cached bytes per repository pgm daemon: fallback to user and system config if no config specified WindowCache: add option to use strong refs to reference ByteWindows Replace usage of ArrayIndexOutOfBoundsException in treewalk Add config constants for WindowCache configuration options Change-Id: I76a62da98182f0c504b1ea8b7d37cecdf4eea7e0
| | | | * Merge branch 'stable-5.3' into stable-5.4Matthias Sohn2020-02-011-7/+22
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.3: Fix string format parameter for invalidRefAdvertisementLine WindowCache: add metric for cached bytes per repository pgm daemon: fallback to user and system config if no config specified WindowCache: add option to use strong refs to reference ByteWindows Replace usage of ArrayIndexOutOfBoundsException in treewalk Add config constants for WindowCache configuration options Change-Id: I12002dbfed9dff14fc6d2df9787d92eab5b1fa78
| | | | | * Merge branch 'stable-5.2' into stable-5.3Matthias Sohn2020-02-011-7/+22
| | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.2: Fix string format parameter for invalidRefAdvertisementLine WindowCache: add metric for cached bytes per repository pgm daemon: fallback to user and system config if no config specified WindowCache: add option to use strong refs to reference ByteWindows Replace usage of ArrayIndexOutOfBoundsException in treewalk Add config constants for WindowCache configuration options Change-Id: I790098be00ff3f9b8278d54ae4fb7c11311816e9
| | | | | | * Merge branch 'stable-5.1' into stable-5.2David Pursehouse2020-02-011-7/+22
| | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.1: Fix string format parameter for invalidRefAdvertisementLine WindowCache: add metric for cached bytes per repository pgm daemon: fallback to user and system config if no config specified WindowCache: add option to use strong refs to reference ByteWindows Change-Id: I741059a1d0d5950ab5bc16ec70352655ee926a24 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | * pgm daemon: fallback to user and system config if no config specifiedMatthias Sohn2020-01-281-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a config file is passed via option --config-file then use only the options defined in that file. This helps to concisely configure the daemon without side effects from global and system level git configs. Otherwise fallback to user and system level configs. Change-Id: I242de248f257579874ad0bfe4882a22502353b1f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | * Prepare 5.1.13-SNAPSHOT buildsMatthias Sohn2019-10-023-46/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic1dca14924f49ad07eb5cd0570ce7ece9f319d0d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | * JGit v5.1.12.201910011832-rv5.1.12.201910011832-rMatthias Sohn2019-10-023-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I69fef9b2cdc18bbf1c8b9b290fb3d190684be13c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * | | Prepare 5.3.7-SNAPSHOT buildsMatthias Sohn2019-10-023-47/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I3465b6a4d913bfb2864abba58448423e7c262f60 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * | | JGit v5.3.6.201910020505-rv5.3.6.201910020505-rMatthias Sohn2019-10-023-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I12d1c6af03f2d7474c99c22cd2aabb77e95fcb32 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * | | | | Prepare 5.5.2-SNAPSHOT buildsMatthias Sohn2019-10-033-47/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ief9940182fd6e3f3e2df88e6485be753c1260e6b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * | | | | JGit v5.5.1.201910021850-rv5.5.1.201910021850-rMatthias Sohn2019-10-033-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I9930b35b095f638119b4601a8311257daf5e5420 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * | | | | Prepare 5.5.1-SNAPSHOT buildsMatthias Sohn2019-09-113-47/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iaf929168770dfef54ce2a7bfcbee9b87c450ca8a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * | | | | JGit v5.5.0.201909110433-rv5.5.0.201909110433-rMatthias Sohn2019-09-113-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5715730ac47d32462f235c2f50581bf1579d46b9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | | | Prepare 5.6.1-SNAPSHOT buildsMatthias Sohn2019-12-113-47/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iaa72d2ea6764ccd4fb6a124b51d89fe6492c602d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | | | JGit v5.6.0.201912101111-rv5.6.0.201912101111-rMatthias Sohn2019-12-103-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Icbb3b46f9d04e45da53936860e07e69fde12971c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | | | Prepare 5.6.0-SNAPSHOT buildsMatthias Sohn2019-12-043-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5e737ff7f262fdd43fc975a0b3594c8b33919663 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | | | JGit v5.6.0.201912041214-rc1v5.6.0.201912041214-rc1Matthias Sohn2019-12-043-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5ed21fbc5f83096bf0b79f2aa751db415cbcc7e8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | | | Prepare 5.6.0-SNAPSHOT buildsMatthias Sohn2019-11-273-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1e52d2dfb202b87ecb9d0273deaa2c8d8ce1864e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | | | JGit v5.6.0.201911271000-m3v5.6.0.201911271000-m3Matthias Sohn2019-11-273-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I3810892c2bed947e4dfaa615a7b4d93eeb46abb9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | | | Prepare 5.7.0-SNAPSHOT buildsMatthias Sohn2020-01-153-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I106098e85db05bb0142f9fb406e3aef3cf0238b4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | | | JGit v5.7.0.202001151323-m1v5.7.0.202001151323-m1Matthias Sohn2020-01-153-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I7701bee6f05d66012c59092126eb4d52f828dc24 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | ErrorProne: Enable and fix UnusedException checkDavid Pursehouse2020-01-2710-11/+21
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable UnusedException at ERROR level which causes the build to fail in many places with: [UnusedException] This catch block catches an symbol and re-throws another, but swallows the caught symbol rather than setting it as a cause. This can make debugging harder. Fix it by setting the caught exception as cause on the subsequently thrown exception. Note: The grammatically incorrect error message is copy-pasted as-is from the version of ErrorProne currently used in Bazel; it has been fixed by [1] in the latest version. [1] https://github.com/google/error-prone/commit/d57a39c Change-Id: I11ed38243091fc12f64f1b2db404ba3f1d2e98b5 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | Update EDL 1.0 license headers to new short SPDX compliant formatMatthias Sohn2020-01-0478-2964/+390
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the format given by the Eclipse legal doc generator [1]. [1] https://www.eclipse.org/projects/tools/documentation.php?id=technology.jgit Bug: 548298 Change-Id: I8d8cabc998ba1b083e3f0906a8d558d391ffb6c4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | pgm: add option if reflogs should be written when converting to reftableMatthias Sohn2019-12-152-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie1c38121005965e63015d9a2af26a1caa88d73fa Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | pgm: add option to configure if convert-ref-storage should create backupMatthias Sohn2019-12-152-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I926f116797508a5982961dfd30c2f765d9536eee Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | Set config "extensions" option when converting ref storage formatMatthias Sohn2019-12-151-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When converting to reftable format the option extensions.refStorage must be set to "reftable" [1]. When converting back to refdir format this config option needs to be removed. Introduce constants for refStorage config options, also for the "reftree" format. [1] https://git.eclipse.org/r/plugins/gitiles/jgit/jgit/+/master/Documentation/technical/reftable.md#Version-1 Change-Id: I190222fa5edc1ad7309daa9be17ca934ff7971e3 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | Fix indentation in ConvertRefStorageMatthias Sohn2019-12-141-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Icd007b035e728f641c70cda68befa11a6197003f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | Replace chain of if statements with switchCarsten Hammer2019-12-142-33/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and switch over strings where possible. Sometimes if statements are chained and form a series of comparisons against constants. Using switch statements improves readability. Bug: 545856 Change-Id: Iacb78956ee5c20db4d793e6b668508ec67466606 Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | Prepare 5.7.0-SNAPSHOT buildsMatthias Sohn2019-12-053-47/+47
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I7efa0cd08dee711d6fefc3e6bb478a3cb11fe85c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | JGit pgm: Format blame output to match canonical gitThomas Wolf2019-11-271-23/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Canonical git shows the zero-Id for lines without commit, and uses the current time stamp for such lines. Also consider lines without commit when calculating the field widths. Change-Id: If0bee9b3e7f90861ad0f387f68e52ecc4a53dfd7 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | | Make blame work correctly on merge conflictsThomas Wolf2019-11-271-25/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a conflicting file was blamed, JGit would not identify lines coming from the merge parents. The main cause for this was that Blame and BlameCommand simply added the first DirCacheEntry found for a file to its queue of candidates (blobs or commits) to consider. In case of a conflict this typically is the merge base commit, and comparing a auto-merged contents against that base would yield incorrect results. Such cases have to be handled specially. The candidate to be considered by the blame must use the working tree contents, but at the same time behave like a merge commit/candidate with HEAD and the MERGE_HEADs as parents. Canonical git does something very similar, see [1]. Implement that and add tests. I first did this for the JGit pgm Blame command. When I then tried to do the same in BlameCommand, I noticed that the latter also included some fancy but incomplete CR-LF handling. In order to be able to use the new BlameGenerator.prepareHead() also in BlameCommand this CR-LF handling was also moved into BlameGenerator and corrected in doing so. (Just considering the git config settings was not good enough, CR-LF behavior can also be influenced by .gitattributes, and even by whether the file in the index has CR-LF. To correctly determine CR-LF handling for check-in one needs to do a TreeWalk with at least a FileTreeIterator and a DirCacheIterator.) [1] https://github.com/git/git/blob/v2.22.0/blame.c#L174 Bug: 434330 Change-Id: I9d763dd6ba478b0b6ebf9456049d6301f478ef7c Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | | pgm: add write stats to BenchmarkReftableHan-Wen Nienhuys2019-11-161-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usage: git ls-remote https://gerrit.googlesource.com/gerrit > 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 On my Lenovo x250 laptop, this yields about 1ms per ref write. Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Change-Id: I31c74a08026ba188a3256ef6862dae9d85e6d5ef
* | | | | | pgm: add command to convert repo to reftableHan-Wen Nienhuys2019-11-163-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2f870699995da164a3e7adec430301ac7a53c425 Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | [pgm] Add --mirror option to clone commandMatthias Sohn2019-10-212-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 552173 Change-Id: Ic8a98b2e0f8f29afd599723f93e51b06b9f13314 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>