aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm.test
Commit message (Collapse)AuthorAgeFilesLines
...
* JGit v2.2.0.201212191850-rv2.2.0.201212191850-rMatthias Sohn2012-12-202-2/+2
| | | | | Change-Id: Idc49f17d03886b6a1e61a94ff81e32625c8675d9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* archive: Add tar supportJonathan Nieder2012-12-041-7/+160
| | | | | | | | Unlike ZIP files, tar files do not treat symlinks as ordinary files with a different mode, so tar support involves a little more code than would be ideal. Change-Id: Ica2568f4a0e443bf4b955ef0c029bc8eec62d369
* archive: Record executable and symlink bitsJonathan Nieder2012-12-041-0/+74
| | | | | | | | | | | Setting the mode for a zip entry is now as simple as "entry.setUnixMode(mode)", so do that. The test checks using the system's "zipinfo" command (from InfoZIP) that the mode has been recorded correctly on systems that happen to have a "zipinfo" command, using org.junit.Assume to distinguish them. Change-Id: I4236c102fd76f18d01b2dc926eeb9b9fa11a61b7
* Add basic "jgit add" testsJonathan Nieder2012-11-292-0/+116
| | | | | Change-Id: I056c2556c7db98bf57e2527dec11af7c3daf472a Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Add "jgit archive" tool that writes a tree as a ZIP fileJonathan Nieder2012-11-161-0/+175
| | | | | | | | | | | | | | | | | | | | | | | C Git's "git archive" command represents a tree object using a standard archival format like tar, zip, or tgz, ready for consumption by other, git-unaware users or tools. Add a bare-bones analagous "jgit archive" command to show what is possible, supporting only ZIP format for now. It uses java.util.zip which is not aware of the InfoZIP extensions for representing symlinks and file permissions, so symlinks, executable files, and submodule entries are represented as plain text files. Making this functionality available from the library, improving handling of special entries, and support for other output formats are left for later patches. Ultimately the intent is to offer a TreeArchiveStream class for use by web frontends like Gitiles to offer "download as zip/tgz/txz" links and use by, for example, code search tools to get easy access to the content of git tree objects. Test with "jgit archive my-favorite-tree >out.zip". Change-Id: Ib590f173ceff3df4b58493cecccd6b9a1b355e3d
* Allow commandline tests to use raw outputJonathan Nieder2012-11-161-4/+11
| | | | | | | | | | | | | | | | | | | | | Introduce a new CLIGitCommand.rawExecute() helper that behaves just like execute() except that instead of processing its output it returns it raw. So now you can do final byte[] expect = { 0, 1, 2, 3 }; final byte[] actual = CLIGitCommand.rawExecute( "git show HEAD:goo.raw", db); assertArrayEquals(expect, actual); to test the output from "git show HEAD:goo.raw" without being distracted by encoding issues. Noticed while writing tests for a new "jgit archive" command that writes its output in ZIP format. Change-Id: I2fe6020a537975d0ccf414b7125d85d6cd86898c
* Add reflog command to JGit CLITomasz Zarna2012-11-161-0/+80
| | | | | | Bug: 394497 Change-Id: Ib8bc1d9fd789d22fe5f10e03068a11cfdd3e46eb Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Harmonize the JDT settings within JGitRobin Rosenberg2012-11-163-7/+81
| | | | | | | | | | | Note the the settings are slightly less restrictive for test bundles. -Also cleanup a couple of malformed javadocs -Update compiler warnings/errors to include default values from Juno -We now flag diagnosed null dereference as error. We didn't do that earlier because of some false positives. Change-Id: I58386d63164e65d3d8d1998da3390d99bdc7381a Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Add support for --no-ff while mergingTomasz Zarna2012-11-161-2/+57
| | | | | | Bug: 394432 Change-Id: I373128c0ba949f9b24248874f77f3d68b50ccfd1 Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Add a test for org.eclipse.jgit.pgm.TagTomasz Zarna2012-11-151-0/+73
| | | | | | | | The test checks if an error is thrown when trying to create the same tag for the second time. Change-Id: I4ed2f6c997587f0ea23bd26a32fb64a2d48a980e Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Do not fail when checking out HEADTomasz Zarna2012-11-151-3/+20
| | | | | Change-Id: I99f5467477ed53101121a5a5d8a0910c55758401 Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Prefix an abnormal CLI command termination with 'fatal:'Tomasz Zarna2012-11-153-4/+6
| | | | | Change-Id: I3d257666c6fbed7b238c575808f73ec518e811b9 Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Add --squash option to org.eclipse.jgit.pgm.MergeTomasz Zarna2012-10-071-13/+43
| | | | Change-Id: Ifd20b6f4731cfa71319145cac7b464aa53db18b8
* Prepare 2.2.0 buildsMatthias Sohn2012-09-192-12/+12
| | | | | Change-Id: I386ba70541d644e58661d26713b309371e0f9257 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add tests for output result of merging -- org.eclipse.jgit.pgm.MergeTomasz Zarna2012-09-172-0/+94
| | | | Change-Id: I888c7e80503b869d65a9617e6a07e01d1ff5f197
* Check for write errors in standard out and exit with errorRobin Rosenberg2012-09-162-8/+5
| | | | | | | | | | | | | The underlying problem is that System.out is a PrintWriter and as such it does not throw exceptions on error, but rather just sets a flag and continues. This changes replaces the use of System.out with a PrintWriter-like writer that does not catch error, but instead throw them to the caller. Bug: 366243 Change-Id: I44405edc4416e943b87f09a0f6ed041c6c51b046
* Added new Status CLI command 'jgit status'Robin Rosenberg2012-09-093-0/+235
| | | | | | | | | | | | | This is a first basic implementation that displays current branch and list of files of various status, but isn't as refined as its native counterpart (e.g. does not say if we're ahead or behind the remote). It's been helpful in the diagnostic of bug #347885. Bug: 348318 CQ: 6769 Change-Id: Ifc35da608fbba652524c1b5b522e3c0d5369ad5e Signed-off-by: François Rey <eclipse.org@francois.rey.name> Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
* Output result of switching branch -- o.e.jgit.pgm.CheckoutTomasz Zarna2012-09-053-0/+109
| | | | Change-Id: I9829950b686ce3b8c70b8f7a1774d5e2b55cd00a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Set core.precomposeunicode to true when creating repository on MacRobin Rosenberg2012-08-221-5/+14
| | | | | | | | | Java has no option but to use precomposed Unicode, so we should state that when creating a new repository. Not that Java will use precomposed unicode regardless of this setting, but this reduces the risk of incompatibility with C Git. Change-Id: I3779b75f76d2e2061c836cbc9b4b7c2ae0cf18f4
* In org.eclipse.jgit.pgm.ConfigTest expect core.filemode=false on WindowsTomasz Zarna2012-06-161-8/+10
| | | | Change-Id: I8f8ae7a8bc0793643184bc0e7afa9f4e2c5ff1a1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 2.1.0 buildsMatthias Sohn2012-06-142-9/+9
| | | | Change-Id: I4aad3efdd435d8d5eb53c84a8d38132acce97c25 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare post v2.0.0.201206130900-r buildsMatthias Sohn2012-06-142-2/+2
| | | | Change-Id: I51b1bbed35288c5285b3d6860efba97d58de5a1c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v2.0.0.201206130900-rv2.0.0.201206130900-rMatthias Sohn2012-06-132-2/+2
| | | | | Change-Id: I685e09b3e37d68614df1b5cc5f687a65cd6eb82d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Do not set core.autocrlf when creating repoRobin Rosenberg2012-06-121-7/+8
| | | | | | | | | | | | core.autorlf defaults to false, but can be set in the user or "system" config files. Note that EGit/JGit may not know where the "system" config file is located. Also fix pgm's ConfigTest which depends on default repository configuration. Bug: 382067 Change-Id: I2c698a76e30d968e7f351b4f5a2195f0b124f62f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare next 2.0.0-SNAPSHOT buildsMatthias Sohn2012-06-062-2/+2
| | | | Change-Id: I0d55b390502b3da139ab0d15a6cf3d05774d8ad9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v2.0.0.201206060730-rc3v2.0.0.201206060730-rc3Matthias Sohn2012-06-062-2/+2
| | | | | Change-Id: I12f8800b74228e71c77f0fb82c250c154d06369f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare next 2.0.0-SNAPSHOT buildsMatthias Sohn2012-05-312-2/+2
| | | | Change-Id: Iffc57d6b25dafb72272d1957116c19ab45ba2c54 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v2.0.0.201205301645-rc2v2.0.0.201205301645-rc2Matthias Sohn2012-05-302-2/+2
| | | | | Change-Id: Ic4f84f1a11c93863c229c0089f2e4edc7c7a36b7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add config --list command to pgmTomasz Zarna2012-05-231-0/+70
| | | | | | | Currently, only --list option is supported with --global, --system, --local and --file switches. Change-Id: I9b179b162996520e95c4e001dccd65c566a4bd27 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Allow to write tests with CLI syntaxTomasz Zarna2012-04-1821-0/+1163
| | | | | | | CQ: 6385 Bug: 365444 Change-Id: I2d5164cd92429673fe3c37e9f5f9bc565192cc12 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Revert "Allow to write tests with CLI syntax"Matthias Sohn2012-03-2321-1163/+0
| | | | | | | | | This reverts commit bf845c126d53f07de103e03b68ddb7f24014cee5 since this change needs to go through a formal IP review and Chris missed to file a CQ for that. Change-Id: I303515d78116f0591a2911dbfb9f857738f086a9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Allow to write tests with CLI syntaxTomasz Zarna2012-03-2221-0/+1163
Bug: 365444 Change-Id: I86f382913bc47665c5b9a2827b878e7dbedce7b1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>