summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm.test
Commit message (Collapse)AuthorAgeFilesLines
* Prepare 5.11.0-SNAPSHOT buildsMatthias Sohn2021-02-242-2/+2
| | | | | Change-Id: If3dbe084ee37ae4b993d3a10ec48b14e8709ff6d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v5.11.0.202102240950-m3v5.11.0.202102240950-m3Matthias Sohn2021-02-242-2/+2
| | | | | Change-Id: Iea6b3515fa63db497989194b6bf50fe7324086d0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* init: allow specifying the initial branch name for the new repositoryMatthias Sohn2021-02-221-0/+21
| | | | | | | | | | | Add option --initial-branch/-b to InitCommand and the CLI init command. This is the first step to implement support for the new option init.defaultBranch. Both were added to git in release 2.28. See https://git-scm.com/docs/git-init#Documentation/git-init.txt--bltbranch-namegt Bug: 564794 Change-Id: Ia383b3f90b5549db80f99b2310450a7faf6bce4c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fail clone if initial branch doesn't exist in remote repositoryMatthias Sohn2021-02-221-0/+42
| | | | | | | | | | jgit clone --branch foo <url> did not fail if the remote branch "foo" didn't exist in the remote repository being cloned. Bug: 546580 Change-Id: I55648ad3a39da4a5711dfa8e6d6682bb8190a6d6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 5.11.0-SNAPSHOT buildsMatthias Sohn2020-12-022-19/+19
| | | | | Change-Id: I91e5532526775191fbd34f81e2ef777cba605e3b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Ignore missing javadoc tags in test bundlesMatthias Sohn2020-11-291-2/+2
| | | | | | | | It seems Eclipse 4.18 reports them as error whereas earlier versions ignored this maybe since we don't require javadoc comments for all the test bundles. Change-Id: I3f4d42ce681ea5c2b4b302991d2641290ac8561d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add support for reading symrefs from pack capabilitiesLee Worrall2020-11-261-1/+19
| | | | | | | | | | | | | | | A SymbolicRef is added to the advertised refs for any symref in capabilities whose target is an advertised ref; this may replace an existing entry, such as HEAD. When cloning, if any advertised HEAD is symbolic then use the target rather than looking for an advertised ref with a matching objectId. Add --symref option to LsRemote command. Bug: 514052 Change-Id: Idfb48e6f6e8dcfe57a6896883fe6d84d533aa9d0 Signed-off-by: Lee Worrall <worrall.la@gmail.com>
* Prepare 5.10.0-SNAPSHOT buildsMatthias Sohn2020-08-272-19/+19
| | | | | Change-Id: I9a2b39e9e85f27179ceb3b1709d75c466089a3bc Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 5.9.0-SNAPSHOT buildsMatthias Sohn2020-06-092-19/+19
| | | | | Change-Id: Ia998e2772df1285a4c674b07201f15d53156eb78 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Decouple JSch from JGit CoreMatthias Sohn2020-06-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* Bazel: Remove superfluous dependencies flagged by unused_depsDavid Ostrovsky2020-05-221-1/+0
| | | | | | | | | | | | | | 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>
* Prepare 5.8.0-SNAPSHOT buildsMatthias Sohn2020-03-092-19/+19
| | | | | Change-Id: I056b45806a82eae80177932e42e3dc806015351a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Replace ExpectedException which was deprecated in junit 4.13Matthias Sohn2020-01-241-17/+9
| | | | | Change-Id: I64b0c057dd0a12aef2f3d56fa0c8a10e3b23fffd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Update to Orbit I20200120214610 and JUnit to 4.13David Pursehouse2020-01-221-2/+2
| | | | | | | | | | Since version 4.13 JUnit has an assertThrows method. Remove the implementation in MoreAsserts and use the one from JUnit. CQ: 21439 Change-Id: I086baa94aa3069cebe87c4cbf91ed1534523c6cb 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-0427-1026/+135
| | | | | | | | | | 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>
* Replace chain of if statements with switchCarsten Hammer2019-12-141-3/+4
| | | | | | | | | | | 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-052-19/+19
| | | | | Change-Id: I7efa0cd08dee711d6fefc3e6bb478a3cb11fe85c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit pgm: Format blame output to match canonical gitThomas Wolf2019-11-271-8/+11
| | | | | | | | | | 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-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 --mirror option to clone commandMatthias Sohn2019-10-211-2/+42
| | | | | Bug: 552173 Change-Id: Ic8a98b2e0f8f29afd599723f93e51b06b9f13314 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Enable and fix "Statement unnecessarily nested within else clause" warningsDavid Pursehouse2019-10-171-1/+1
| | | | | | | | | | | | | | | Since [1] the gerrit project includes jgit as a submodule, and has this warning enabled, resulting in 100s of warnings in the console. Also enable the warning here, and fix them. At the same time, add missing braces around adjacent and nearby one-line blocks. [1] https://gerrit-review.googlesource.com/c/gerrit/+/227897 Change-Id: I81df3fc7ed6eedf6874ce1a3bedfa727a1897e4c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Merge branch 'stable-5.5'Matthias Sohn2019-09-081-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.5: bazel: fix running http tests Set parameter name in parameterized http tests Format BUILD files with buildifier Format BUILD files with buildifier [error prone] Suppress NonAtomicVolatileUpdate in SimpleLruCache Bazel: Format BUILD files with buildifier Bazel: Add fixes for --incompatible_load_java_rules_from_bzl Bazel: Fix warning about deprecated lib.bzl Format lib/BUILD with buildifier Bazel: Add fixes for --incompatible_load_java_rules_from_bzl Bazel: Bump minimum supported version to 0.29.0 Bazel: Bump skylib library version to 0.8.0 Use bazelisk to switch between used bazel version Bazel: Require minimum bazel version 0.17.1 Fix wrong placeholder index in error message packInaccessible JGitText: Remove unused externalized strings RepoText: Remove unused externalized string CLI: Remove unused externalized strings Change-Id: Idb0848dd33a76328b24908dc86db335cca742a1c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Merge branch 'stable-5.4' into stable-5.5Matthias Sohn2019-09-081-0/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.4: Format BUILD files with buildifier Format BUILD files with buildifier [error prone] Suppress NonAtomicVolatileUpdate in SimpleLruCache Bazel: Format BUILD files with buildifier Bazel: Add fixes for --incompatible_load_java_rules_from_bzl Bazel: Fix warning about deprecated lib.bzl Format lib/BUILD with buildifier Bazel: Add fixes for --incompatible_load_java_rules_from_bzl Bazel: Bump minimum supported version to 0.29.0 Bazel: Bump skylib library version to 0.8.0 Use bazelisk to switch between used bazel version Bazel: Require minimum bazel version 0.17.1 Fix wrong placeholder index in error message packInaccessible JGitText: Remove unused externalized strings RepoText: Remove unused externalized string CLI: Remove unused externalized strings Change-Id: Idf3abd80ad3b00188f655e638d9908228770911f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Merge branch 'stable-5.3' into stable-5.4Matthias Sohn2019-09-081-0/+1
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.3: Format BUILD files with buildifier [error prone] Suppress NonAtomicVolatileUpdate in SimpleLruCache Bazel: Format BUILD files with buildifier Bazel: Add fixes for --incompatible_load_java_rules_from_bzl Bazel: Fix warning about deprecated lib.bzl Format lib/BUILD with buildifier Bazel: Add fixes for --incompatible_load_java_rules_from_bzl Bazel: Bump minimum supported version to 0.29.0 Bazel: Bump skylib library version to 0.8.0 Use bazelisk to switch between used bazel version Bazel: Require minimum bazel version 0.17.1 Fix wrong placeholder index in error message packInaccessible JGitText: Remove unused externalized strings RepoText: Remove unused externalized string CLI: Remove unused externalized strings Change-Id: Iaea77a89fcd821df5dbb24f5e3e39e6d1dfc0bd4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Format BUILD files with buildifierMatthias Sohn2019-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using buildifier from master branch and the command: $ buildifier -r -lint fix -warnings all . Change-Id: I52a18c09a1f192e2141f4156f9c1aabbbdbc910a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Merge branch 'stable-5.2' into stable-5.3Matthias Sohn2019-09-081-0/+1
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.2: [error prone] Suppress NonAtomicVolatileUpdate in SimpleLruCache Bazel: Format BUILD files with buildifier Bazel: Add fixes for --incompatible_load_java_rules_from_bzl Bazel: Fix warning about deprecated lib.bzl Format lib/BUILD with buildifier Bazel: Add fixes for --incompatible_load_java_rules_from_bzl Bazel: Bump minimum supported version to 0.29.0 Bazel: Bump skylib library version to 0.8.0 Use bazelisk to switch between used bazel version Bazel: Require minimum bazel version 0.17.1 Fix wrong placeholder index in error message packInaccessible JGitText: Remove unused externalized strings RepoText: Remove unused externalized string CLI: Remove unused externalized strings Change-Id: I0d8b7f79177a20dc00c89e2cf0005eb3d3039532 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * Merge branch 'stable-5.1' into stable-5.2Matthias Sohn2019-09-071-0/+1
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.1: Bazel: Fix warning about deprecated lib.bzl Format lib/BUILD with buildifier Bazel: Add fixes for --incompatible_load_java_rules_from_bzl Bazel: Bump minimum supported version to 0.29.0 Bazel: Bump skylib library version to 0.8.0 Use bazelisk to switch between used bazel version Bazel: Require minimum bazel version 0.17.1 Fix wrong placeholder index in error message packInaccessible JGitText: Remove unused externalized strings RepoText: Remove unused externalized string CLI: Remove unused externalized strings Change-Id: Iea37a8e39e9d4872dc607c9222dcf191ce4e4757 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * Bazel: Add fixes for --incompatible_load_java_rules_from_bzlDavid Pursehouse2019-09-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I24746335db132bf20f400cb3db400737596d4542 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | | | * Prepare 5.1.12-SNAPSHOT buildsMatthias Sohn2019-09-032-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I353ac3f23024063722abc7340bc9a6df3c615741 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * JGit v5.1.11.201909031202-rv5.1.11.201909031202-rMatthias Sohn2019-09-032-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I288acf670160b9bcd2d04f572a902b5838b4d4f8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * Prepare 5.1.11-SNAPSHOT buildsMatthias Sohn2019-08-232-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I8608580424d0e523dcace63f83ae530ba78dbb15 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * JGit v5.1.10.201908230655-rv5.1.10.201908230655-rMatthias Sohn2019-08-232-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I68d15ebd6054bdeaf62e14cddb87724828db7943 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * Prepare 5.1.10-SNAPSHOT buildsMatthias Sohn2019-08-212-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: If10afc8e663299a15db8c5fd0574fb51bf7e7ae9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * JGit v5.1.9.201908210455-rv5.1.9.201908210455-rMatthias Sohn2019-08-212-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iaade207292acb8b27e01aca7e1af97ad7db1e854 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * | | Prepare 5.3.6-SNAPSHOT buildsMatthias Sohn2019-09-042-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I4d57f8ea0ab1f8fbd73fd75861f2f751c4aba0a6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * | | JGit v5.3.5.201909031855-rv5.3.5.201909031855-rMatthias Sohn2019-09-042-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I7f5dcebc2e5816c845fa63046c67bc2301926e2a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * | | Prepare 5.3.5-SNAPSHOT buildsMatthias Sohn2019-08-232-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic0b9dfcac814ac7584e5eb19105f46344a10465a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * | | JGit v5.3.4.201908231101-rv5.3.4.201908231101-rMatthias Sohn2019-08-232-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ia98f47d9a10d6b8cccca6b697230dad4f350d720 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * | | Prepare 5.3.4-SNAPSHOT buildsMatthias Sohn2019-08-212-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1ccfeb28e87d13b25a8892947e62f1151130b6a6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * | | JGit v5.3.3.201908210735-rv5.3.3.201908210735-rMatthias Sohn2019-08-212-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I799859e47616af0ac5ee3a982cb9350d141681d7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | Prepare 5.4.4-SNAPSHOT buildsMatthias Sohn2019-09-042-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I64c03436c285bd8eb5e87abe560417402b60e695 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | JGit v5.4.3.201909031940-rv5.4.3.201909031940-rMatthias Sohn2019-09-042-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I48ff1d51122ff73e0561f1fcf52a532221810e5d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | Prepare 5.4.3-SNAPSHOT buildsMatthias Sohn2019-08-232-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iaf5140446dcf86a50bdb1a30860dfd624d3ec337 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | JGit v5.4.2.201908231537-rv5.4.2.201908231537-rMatthias Sohn2019-08-232-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1d808c63db81435173987c399c90bda7bc5c8d9d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | Prepare 5.4.2-SNAPSHOT buildsMatthias Sohn2019-08-212-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5b2fde2d69ef1cc11b085874ab783ba48e070470 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | JGit v5.4.1.201908211225-rv5.4.1.201908211225-rMatthias Sohn2019-08-212-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ifa99b930bd20a9bc10696c414c73ebde0cd4b0c8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | Prepare 5.5.0-SNAPSHOT buildsMatthias Sohn2019-09-042-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I96bbefd698c74e450d05d21572d4769c6c5aaea6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | JGit v5.5.0.201909041048-rc1v5.5.0.201909041048-rc1Matthias Sohn2019-09-042-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I77a8c73cfd0a27b1242eddf32da513ce0148260e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | Prepare 5.5.0-SNAPSHOT buildsMatthias Sohn2019-08-282-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib498303c8787a5fbee89377eaed332a5a6b4f3b0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | JGit v5.5.0.201908280940-m3v5.5.0.201908280940-m3Matthias Sohn2019-08-282-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I0920767979d7927bc18f3e395963aeebae5ea540 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>