summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm.test
Commit message (Collapse)AuthorAgeFilesLines
* Merge bundle org.eclipse.jgit.java7 into org.eclipse.jgitMatthias Sohn2015-03-231-17/+0
| | | | | | | As we moved minimum Java version to 7 we don't need a separate bundle and feature for JGit features depending on Java 7 anymore. Change-Id: Ib5da61b0886ddbdea65298f1e8c6d65c9879ced1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* CLI status should support --untracked-filesKaloyan Raev2015-03-121-206/+428
| | | | | | | | | | | | | | | | | | A special options handler is added to properly handle the short -u alias of the option. The "normal" mode is not supported by this patch, because this mode of listing untracked files is not supported by the org.eclipse.jgit.lib.IndexDiff class. This mode is not necessary for my use case. It can be added later if anyone really needs it. The StatusTest is updated to cover all possible combinations of the --porcelain and --untracked-files options. Bug: 459319 Change-Id: I305ac95739cfed0c16735e0987844e57fa27e236 Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add "--long" option to JGit describeChristian Halstrick2015-03-091-0/+7
| | | | | | | | | | | Native git supports "git describe --long". This will enforce returning a long description of a commit even if a tag is directly pointing to the commit (in contrast to just returning the tag name as it is now). This commit teaches JGits DescribeCommand and the describe command in the pgm package to support "--long". Bug: 460991 Change-Id: I65e179b79e89049c6deced3c71cb3ebb08ed0a8f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Set minimum required Java version to Java 7Matthias Sohn2015-02-093-5/+5
| | | | | | Bug: 458475 Change-Id: Iea8f2236d4e6a94a8d14bb8cc685006ea3fd1bb7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge branch 'stable-3.7'Matthias Sohn2015-02-041-0/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.7: Add option --orphan for checkout Prepare post 3.7.0.201502031740-rc1 builds JGit v3.7.0.201502031740-rc1 Support for the pre-commit hook Fix FileUtils.testRelativize_mixedCase which failed on Mac OS X Add a hook test Introduce hook support into the FS implementations If a pack isn't found on disk remove it from pack list Conflicts: org.eclipse.jgit.java7.test/META-INF/MANIFEST.MF Change-Id: I936acd24d47b911fa30ab29856094e1b2c6ac3db Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Add option --orphan for checkoutRĂ¼diger Herrmann2015-02-041-0/+12
| | | | | | | | | | Change-Id: I546a93f3e147d8d6fc70094b22679c0d11cd8921 Signed-off-by: RĂ¼diger Herrmann <ruediger.herrmann@gmx.de>
| * Prepare post 3.7.0.201502031740-rc1 buildsMatthias Sohn2015-02-042-2/+2
| | | | | | | | Change-Id: Id3728e771a4441757de016cc9d68055f668126b0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v3.7.0.201502031740-rc1v3.7.0.201502031740-rc1Matthias Sohn2015-02-032-2/+2
| | | | | | | | | | Change-Id: Ia2ea65945b7e1d4120da3d6e6c9f6d5fdb642ae6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Prepare 4.0.0-SNAPSHOT buildsMatthias Sohn2015-01-272-18/+18
|/ | | | | Change-Id: I414ba8ccc82866d3107ba7083a567ea70c879bdf Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 3.7.0-SNAPSHOT buildsMatthias Sohn2014-12-242-18/+18
| | | | | Change-Id: Ib3e7b5f46ee1e27b9cf25b3b2d01d681a5c4904c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 3.6.1-SNAPSHOT buildsMatthias Sohn2014-12-232-18/+18
| | | | | Change-Id: Ie620c90ffafbffc6755b4e1ed55a61a15b118a2a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v3.6.0.201412230720-rv3.6.0.201412230720-rMatthias Sohn2014-12-232-2/+2
| | | | | Change-Id: Ic28e2bbbdb1099e948c64a005c39f6b8d8ac69a8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* [pgm] Add option --bare to clone commandMatthias Sohn2014-12-221-0/+20
| | | | Change-Id: I528491e3e20d3c9ebe37fe3cd2bf85b4644d8698 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* [pgm] Implement clone using CloneCommandMatthias Sohn2014-12-221-0/+136
| | | | Change-Id: I56699b7bf9a71f673cb308d3015f51de5b06c1d9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* [pgm] Add option --tags for ls-remoteMatthias Sohn2014-12-161-0/+31
| | | | | Bug: 444072 Change-Id: I52b470924609fc201e078d9d232aad257506728d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* [pgm] Add option --heads for ls-remoteMatthias Sohn2014-12-161-0/+11
| | | | | | | | TODO: find a way to use option -h which is already captured by TextBuiltin's option --help which also uses the alias -h. Bug: 444072 Change-Id: Ie66584c2fc7fc224014a43cf928547703dd9d213 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* [pgm] Use LsRemoteCommand to implement ls-remote and add a testMatthias Sohn2014-12-151-0/+96
| | | | Change-Id: Ic266f844c23e2519df5770ca56284b26e4cfe1f4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare post 3.6.0-m1 buildsMatthias Sohn2014-11-122-2/+2
| | | | | Change-Id: Ie9927de64fa6b7d517f96b8cd12e57541f284ff2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v3.6.0.201411121045-m1v3.6.0.201411121045-m1Matthias Sohn2014-11-122-2/+2
| | | | | Change-Id: I9d789113d88cbbbdbabb8919f80c805aa4ba86fe Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 3.6.0-SNAPSHOT buildsMatthias Sohn2014-09-052-18/+18
| | | | | Change-Id: I2d8c3768998c0cfc8d02d11009bc5b7ed1d75778 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Handle -m option for Merge commandAxel Richard2014-08-301-1/+24
| | | | | | | | | Set the commit message to be used for the merge commit (in case one is created) Bug: 442886 Change-Id: Ie5ecc13822faa366f00b3daa07f74c8441cae195 Signed-off-by: Axel Richard <axel.richard@obeo.fr> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Strip trailing /s in repo base URI.Yuxuan 'fishy' Wang2014-07-281-1/+1
| | | | | Change-Id: I71040db2cca69638cfad89acdc9179ee80592b27 Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
* Don't prefix output from jgit status with '# 'Robin Rosenberg2014-07-191-75/+75
| | | | | | C Git does not do it anymore Bug: 439937 Change-Id: I20bdb787a00bba3e4adf269fd64ec6296bdc2a66
* Don't warn for methods that can be staticRobin Rosenberg2014-07-021-1/+1
| | | | | | | | Making the methods static would gain little in performance, make the code harder to change. Removing unncessary warnings is more important. Change-Id: If3e6aa9c1d92e58b4e7a8e246cf4aace237d7a7b
* Add new default settings from Eclipse 4.4Robin Rosenberg2014-07-021-0/+5
| | | | | | | | These settings were added by Eclipse simply by touching the project settings. Adding these makes it simpler to see what local changes have been made. Change-Id: Iab0aa62530312eb0c78b03b5c6a632742bcc4978
* Prepare 3.5.0-SNAPSHOT buildsRobin Rosenberg2014-06-042-18/+18
| | | | | Change-Id: I53bd500188e09ae2e007a58b3cd89aa0805d6f2a Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
* Prepare post 3.4.0 RC1 buildsMatthias Sohn2014-05-212-2/+2
| | | | Change-Id: Ia8d29046439bc9134acdf7c88ab85ea49c4ddf47 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v3.4.0.201405211411-rc1v3.4.0.201405211411-rc1Matthias Sohn2014-05-212-2/+2
| | | | | Change-Id: Ia3834770b9719f64cbdfd0338034c392fa3ae5db Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix a number of failing conflict situationsRobin Rosenberg2014-05-172-0/+362
| | | | | | | | | | | | | Adds further tests where the working tree is dirty (differs from index) and where we have staged but uncommitted changes. Fixed the test case 9 for file/directory conflicts. Bug: 428819 Change-Id: Ie44a288b052abe936ebb74272d0fefef3b218a7a Signed-off-by: Axel Richard <axel.richard@obeo.fr> Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
* Fix failing ConfigTest on WindowsRobin Rosenberg2014-05-171-23/+7
| | | | | | Trust the detection of features and just test CoreConfig. Change-Id: I37f838d270a221a75d0d3842ba2f3f90aa1d6f01
* Command line: implement checkout -- <path>Matthias Sohn2014-05-122-0/+28
| | | | Change-Id: I3d261e6541fe0fcaa210587d2aa226e153071351 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 3.4.0-SNAPSHOT buildsMatthias Sohn2014-05-062-2/+2
| | | | Change-Id: I5cf20c875c3e92e12c2b22465774ba42513b9add Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v3.4.0.201405051725-m7v3.4.0.201405051725-m7Matthias Sohn2014-05-052-2/+2
| | | | | Change-Id: I8d941d22becdf019199a1c0fe28aa5835038647d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* cleanup: remove some unused importsRobin Rosenberg2014-04-251-4/+0
| | | | Change-Id: I549b934b86753acc362364c8986bfe6457affd12
* Added groups support to repo subcommand.Yuxuan 'fishy' Wang2014-04-231-13/+83
| | | | | Change-Id: Id0e7663b6ac4f6938fdcacaf2158107b6285fc25 Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
* Added the command line of jgit repo.Yuxuan 'fishy' Wang2014-04-231-0/+96
| | | | | Change-Id: Ib809b00c236a9c44422a872ae801b060f5b26808 Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
* Add launchers for running tests with Java 8Robin Rosenberg2014-03-291-0/+28
| | | | Change-Id: I91a7225cff350f11cc224129439622c7dfd9f4f3 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Make sure we include the Java 7 module in tests when using JDK 8Robin Rosenberg2014-03-291-1/+1
| | | | Change-Id: Idfb3b16725d8f2ad25338dd0910fb1334c00cde4
* Implement "git branch --contains" in pgmRobin Stocker2014-03-071-1/+24
| | | | | | Bug: 425678 Change-Id: Ib59e05a0bde58562cc61e6e3000df761660b468e Signed-off-by: Robin Stocker <robin@nibor.org>
* Prepare 3.4.0-SNAPSHOT buildsMatthias Sohn2014-03-052-16/+16
| | | | | Change-Id: I907c6f1834c06b8ab4d3e0f76dde475faea7b4a5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge branch 'stable-3.3'Matthias Sohn2014-03-052-16/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.3: Update scripts to deploy jgit on Maven central Prepare 3.3.1-SNAPSHOT builds JGit v3.3.0.201403021825-r Fix merge/cherry-picking in CRLF mode Expose the received pack size in ReceivePack Revert "Add getPackFile to ReceivePack to make PostReceiveHook more usable" Avoid an NPE after 7b01a5369210 Add a launcher for Java 7 tests Remove obsolete getRepositoryMethod from WorkingTreeIterator Fix NPE when WorkingTreeIterator does not have a repository set Add getPackFile to ReceivePack to make PostReceiveHook more usable Possibility to limit the max pack size on receive-pack Package httpclient and httpcore in o.e.j.http.apache.feature Change-Id: I814a150980854bbaabd767f97b062d247af6cb50 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Prepare 3.3.1-SNAPSHOT buildsMatthias Sohn2014-03-052-15/+15
| | | | | | | | Change-Id: If15560f2731e54dbf9db88d8a308b4c25ce27e8e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v3.3.0.201403021825-rv3.3.0.201403021825-rMatthias Sohn2014-03-032-2/+2
| | | | | | | | | | Change-Id: Iaf3da455f7d6f691617299e881154ff8185a9d46 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Prepare post 3.3.0RC1 buildsMatthias Sohn2014-02-202-2/+2
| | | | | | | | | | Change-Id: I0d808f8733a490b75bbcaacedb4b095e05fab32e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v3.3.0.201402191814-rc1v3.3.0.201402191814-rc1Matthias Sohn2014-02-202-2/+2
| | | | | | | | | | Change-Id: Ida3a0417ae646ce37214153f49a85de2be3dd4fd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Don't raise checkout conflict for file missing in working treeChristian Halstrick2014-02-262-0/+51
|/ | | | | | | | | | | During a checkout we want to prevent to overwrite unsaved local file content. Jgit was therefore checking whether the file to overwrite is dirty or missing and would raise a conflict if this was the case. That was wrong. It should only check if the file is dirty. It's ok to "overwrite" a missing/non-existing file. Change-Id: I63c3a94f663c87f09170fdf8b1b1bf4ed5246fc5 Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
* Add symlink support to JGitRobin Rosenberg2014-02-101-0/+22
| | | | | | | | | | | | | | | | | | | | The change includes comparing symbolic links between disk and index, adding symbolic links to the index, creating/modifying links on checkout. The behavior is controlled by the core.symlinks setting, just as C Git does. When a new repository is created core.symlinks will be set depending on the capabilities of the operating system and Java runtime. If core.symlinks is set to true, the assumption is that symlinks are supported, which may result in runtime errors if this turns out not to be the case. Measuring the cost of jgit status on a repository with ~70000 files, of which ~30000 are tracked reveals a penalty of about 10% for using the Java7 (really NIO2) support module. Bug: 354367 Change-Id: I12f0fdd9d26212324a586896ef7eb1f6ff89c39c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove unused import from ArchiveTestMatthias Sohn2014-01-071-1/+0
| | | | | | This unnecessary import was introduced by 2ecc27d. Change-Id: I5cb415de7e33428d9f95dfbe1e214ef24be9dad9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* archive: Use an empty directory for submodulesJonathan Nieder2013-12-271-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | When encountering a submodule entry, "jgit archive" tries to write its content verbatim as an entry to the archive, which fails with a JGitInternalException wrapping a MissingObjectException because the submodule repository commits are typically not part of the superproject. When a subproject is available (for example because it has been checked out as a subdirectory of a superproject worktree), it would be nice to recurse into it and make one archive recording the state of the entire project. Unfortunately sometimes the subproject is not available or it can be hard to find (e.g., it can be on another server). Even when some subprojects are available, "jgit archive" should not produce different output for the same tree depending on which subprojects it has easy access to, so there is no obvious good default behavior that recurses without relying on access to all subprojects. Instead, replace each submodule entry with a placeholder empty directory. "git archive" does the same. Change-Id: I1295086037b77fc948b3f93c21d47341e25483e5 Signed-off-by: Jonathan Nieder <jrn@google.com>
* archive: Include entries for directoriesJonathan Nieder2013-12-271-14/+31
| | | | | | | | | | | | Entries for directories are optional and mostly wasted space in most archive formats (except as a place to hang ownership and filesystem permissions), but "git archive" includes them. Follow suit. This will make it easier in a later change to include empty directories as placeholders for missing submodules. Change-Id: I1810c686bcc9eb4d73498e4d3e763e18787b088a Signed-off-by: Jonathan Nieder <jrn@google.com>