summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm/resources
Commit message (Collapse)AuthorAgeFilesLines
* Add support for --version in JGit CLIKaloyan Raev2013-10-091-0/+1
| | | | | Bug: 419000 Change-Id: I43f5267182ea69d1f9abbff33136e0491c629071 Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
* Add missing usage texts for JGit commandline commandsMatthias Sohn2013-09-091-1/+30
| | | | | | | Also update help text for the merge command now supporting recursive strategy as the default merge strategy. Change-Id: I07886fe875c407e2244f562c003bb9d04f398026 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add --quiet flag to pgm fetch.Colby Ranger2013-08-051-0/+1
| | | | Change-Id: If141fdc5c181b3a618b7e286ad3c6957211d0afc
* Move ArchiveCommand into standard porcelain APIJonathan Nieder2013-05-241-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow use of ArchiveCommand without depending on the jgit command-line tools. To avoid complicating the process of installing and upgrading JGit, this does not add a dependency by the org.eclipse.jgit bundle on commons-compress. Instead, the caller is responsible for registering any formats they want to use by calling ArchiveCommand.registerFormat. This patch puts functionality that requires an archiver into a separate org.eclipse.jgit.archive bundle for people who want it. One can use it by calling ArchiveCommand.registerFormat directly to register its formats or by relying on OSGi class loading to load org.eclipse.jgit.archive.FormatActivator, which takes care of registration automatically. Once the appropriate formats are registered, you can make a tar or zip from a git tree object as follows: ArchiveCommand cmd = git.archive(); try { cmd.setTree(tree).setFormat(fmt).setOutputStream(out).call(); } finally { cmd.release(); } Change-Id: I418e7e7d76422dc6f010d0b3b624d7bec3b20c6e
* Remove dependency by ArchiveCommand on archive formatsJonathan Nieder2013-05-241-0/+2
| | | | | | | | | | | | | | | | Provide static registerFormat and unregisterFormat methods to allow formats to register themselves without the ArchiveCommand code being aware of them. Register the basic "zip" and "tar" support at bundle activation time (and deregister them when unloading the bundle). For anyone using this code as an OSGi plugin it should continue to just work. The jgit program does not load org.eclipse.jgit.pgm as an OSGi bundle, so let the Archive command register the formats it uses explicitly with registerFormat. Change-Id: Id39c03ea6923d0aed8316ed7b6bd04d5ced570a7
* ArchiveCommand: make archive formats non-inner classesJonathan Nieder2013-05-231-0/+1
| | | | | | First step toward making ArchiveCommand itself format-agnostic. Change-Id: I3cff5fce28fa7a19e34f8291cfb5b62f16429713
* Move org.eclipse.jgit.pgm's resource bundle to internal packageMatthias Sohn2013-05-061-0/+0
| | | | | | | | Translatable texts aren't API and shouldn't require maintenance of @since tags to prevent API warnings. Change-Id: I228ff37f17c0e792a6bc188c463a0d19138e88ac Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Delete CLIText strings previously used in iplog generatorJonathan Nieder2013-04-271-3/+0
| | | | | | | The only callers using these strings were removed in commit 850e5bc24e31 (Delete the iplog generator, 2013-01-09). Change-Id: Ia4f81b29b8d00782ee559d69de3befc0a6c4d403
* ArchiveCommand: Do not warn for unsupported file modeJonathan Nieder2013-04-261-1/+0
| | | | | | | | | | | | | | | | When ArchiveCommand is invoked directly on the command line, these warnings to stderr warning: mode of path/to/some/submodule ignored are a useful hint, but in the more usual case where an archive is being served by a server, the intended audience for that message cannot see stderr. Later it might be useful to accept a callback to return these warnings out of band. Change-Id: I22e79be69859176d85594031d67c6cb3371c4bd2
* Add internal porcelain-style API for ArchiveCommandJonathan Nieder2013-04-261-0/+1
| | | | | | | One step closer to exposing archive creation functionality in a org.eclipse.jgit.archive bundle. Change-Id: If0ebb2417a941d9d3fc0d3f444316d0d1c494ff3
* status: Print conflict description for unmerged pathsRobin Stocker2013-04-191-0/+8
| | | | | | | Prefix unmerged paths with conflict description (e.g. "both modified:"), the same way C Git does. Change-Id: I083cd191ae2ad3e2460aa4052774aed6e36c2699
* clean up merge squash and no-commit messages in pgmTomasz Zarna2013-04-081-1/+1
| | | | Change-Id: Iffa6e8752fbd94f3ef69f49df772be82e3da5d05
* Detect and handle a checkout conflict during merge nicelyRobin Rosenberg2013-04-081-0/+2
| | | | | | Report the conflicting files nicely and inform the user. Change-Id: I75d464d4156d10c6cc6c7ce5a321e2c9fb0df375
* Add the no-commit option to MergeCommandTomasz Zarna2013-04-041-0/+2
| | | | | | | | | | Added also tests and the associated option for the command line Merge command. Bug: 335091 Change-Id: Ie321c572284a6f64765a81674089fc408a10d059 Signed-off-by: Christian Halstrick <christian.halstrick@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Must use double single quotes around parametersRobin Rosenberg2013-02-161-5/+5
| | | | Change-Id: I34da782e6b9a492e3e291b36ef82f06ce8347660
* Add the --branch flag to the jgit clone commandRobin Rosenberg2013-02-161-0/+3
| | | | | | | --branch or -b allows the user to specify which branch to checkout after clone. Change-Id: Ie27533e5ecb43097862a8337a27a742b501e17a5
* Delete the iplog generatorMatthias Sohn2013-01-091-6/+0
| | | | | | | | | | | It stopped working when we moved to the Eclipse foundation's Gerrit server since it doesn't use the Gerrit internal user store but LDAP. Instead, since 2.0, we use the Eclipse foundation's automatic IP log generator [1] to generate IP logs for releasing jgit and egit. [1] http://www.eclipse.org/projects/ip_log_selector.php Change-Id: I98dc65efb62909bc0258e6c680df0c93a57e9677 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* archive: Add tar supportJonathan Nieder2012-12-041-1/+1
| | | | | | | | 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: Add --format option that switches between formatsJonathan Nieder2012-12-041-0/+2
| | | | | | | Prepare for .tar support. Change-Id: Ieb07702da1a54b41ae764fbb425f70826907b593 Improved-by: Shawn O. Pearce <spearce@spearce.org>
* Add "jgit archive" tool that writes a tree as a ZIP fileJonathan Nieder2012-11-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | 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
* Add reflog command to JGit CLITomasz Zarna2012-11-161-0/+1
| | | | | | Bug: 394497 Change-Id: Ib8bc1d9fd789d22fe5f10e03068a11cfdd3e46eb Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Add support for --no-ff while mergingTomasz Zarna2012-11-161-0/+3
| | | | | | 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/+1
| | | | | | | | 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>
* Prefix an abnormal CLI command termination with 'fatal:'Tomasz Zarna2012-11-151-1/+0
| | | | | Change-Id: I3d257666c6fbed7b238c575808f73ec518e811b9 Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Add --squash option to org.eclipse.jgit.pgm.MergeTomasz Zarna2012-10-071-0/+3
| | | | Change-Id: Ifd20b6f4731cfa71319145cac7b464aa53db18b8
* Add tests for output result of merging -- org.eclipse.jgit.pgm.MergeTomasz Zarna2012-09-171-1/+2
| | | | Change-Id: I888c7e80503b869d65a9617e6a07e01d1ff5f197
* Check for write errors in standard out and exit with errorRobin Rosenberg2012-09-161-0/+1
| | | | | | | | | | | | | 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-091-0/+13
| | | | | | | | | | | | | 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-051-2/+7
| | | | Change-Id: I9829950b686ce3b8c70b8f7a1774d5e2b55cd00a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* show: Implement command line show for any objectShawn O. Pearce2012-07-181-0/+4
| | | | | | Change-Id: I4dea84428d48b3de0e187c510b766f965323b21b Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
* Typo in CLIText#unknownMergeStratey, should be #unknownMergeStrategyTomasz Zarna2012-07-141-1/+1
| | | | | Change-Id: I4d4aa59723d6422ff755165e45f368da76d309ab Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
* Add config --list command to pgmTomasz Zarna2012-05-231-0/+1
| | | | | | | 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>
* Add --all switch to org.eclipse.jgit.pgm.CommitTomasz Zarna2012-05-101-0/+2
| | | | | Change-Id: Iab52f995676daf60e0dfa043cc9e022f6e32a758 Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Fix two typos in CLIText.propertiesTomasz Zarna2012-05-021-2/+2
| | | | Change-Id: Id1429d52c88a9e2b888e6c6906cf8148945bd2ca
* Allow to amend commits with JGit CLITomasz Zarna2011-12-181-0/+1
| | | | Change-Id: I0e8d365b56e079ac4ccece7fcf80ea140c319c78
* Make use of the many date formatting options in the log commandRobin Rosenberg2011-10-261-0/+1
| | | | Change-Id: I30f1049fce086f2cf7e39ba3ad8b335df3a7b827
* blame: Implement blame on the command lineShawn O. Pearce2011-08-131-0/+17
| | | | | | | | Command line options match the C implementation of `git blame` as closely as possible, making for a pretty complete tool. Change-Id: Ie1bd172ad9de586c3b60f0ee4a77a8f047364882 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Added Merge command to the CLIChristian Halstrick2011-03-291-0/+10
| | | | | | | | | | This merge command accepts the merge strategy as option and uses the resolve strategy as default. It expects exactly one other revision which is merged with current head. Change-Id: Ia8c188b93ade4afabe6a9ccf267faf045f359a3a Signed-off-by: Christian Halstrick <christian.halstrick@sap.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
* Add -o option to commit commandPhilipp Thun2011-03-111-1/+5
| | | | | | | This change adds the --only/ -o option to the commit command. Change-Id: I44352d56877f8204d985cb7a35a2e0faffb7d341 Signed-off-by: Philipp Thun <philipp.thun@sap.com>
* Show notes in Log CLI command - Part 2Sasa Zivkov2011-03-011-0/+1
| | | | | | | | This change fixes issues identified in the commit 5f3d577e5a1e8f23a2b6ea6a2bf24516806e01b8. Change-Id: Idbd935f5f60ad043faa0d4982b3e101ef7c07d60 Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
* Show notes in Log CLI commandSasa Zivkov2011-02-231-0/+3
| | | | | | | | | | | | | | Support for --no-standard-notes and --show-notes=REF options is added to the Log command. The --show-notes option can be specified more than once if more than one notes branch should be used for showing notes. The notes are displayed from note branches in the order how the note branches are specified in the command line. However, the standard note, from the refs/notes/commits, is always displayed as first unless the --no-standard-notes options is given. Change-Id: I4e7940804ed9d388b625b8e8a8e25bfcf5ee15a6 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
* Add Reset to the JGit CLIChris Aniszczyk2011-02-171-0/+4
| | | | | Change-Id: I85368c849c0964b9a539fa1991920adb2ace94df Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
* Add the Checkout command to the Git CLIChris Aniszczyk2010-11-231-0/+3
| | | | | | | | The implementation delegates to the CheckoutCommand and therefore only supports some of the options supported by the CheckoutCommand. Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
* Fixed help of Diff and ShowCommands commandsChristian Halstrick2010-11-081-1/+3
| | | | | | | | | jgit.sh <command> --help was not working for the commands Diff and ShowCommands because of missing metaVar information. Missing information is added here. Change-Id: I0ab7e35006b6aa7d4326a634309dddfcdb78f2a6 Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
* Implemented the git add commandline command.Sasa Zivkov2010-11-071-5/+9
| | | | | | | | | Implementation delegates all work to the AddCommand class and, therefore, supports only those options currently supported by the AddCommand which means: --update and the filepattern... arguments. Change-Id: I4827d37e08b4c988c2458d9ba60a61b6ad414d10 Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
* Add option to select diff algorithm for diff commandChristian Halstrick2010-10-261-0/+1
| | | | | | | | The diff command in the pgm package was enhanced to allow choosing the diff algorithm (currently myers or histogram) Change-Id: I72083e78fb5c92868eb5d8ec512277d212a39349 Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
* diff: Default arguments to HEAD, working directoryShawn O. Pearce2010-09-021-0/+1
| | | | | | | | | | | Similar to C Git, default our difference when no trees are given to us to something that makes a tiny bit of sense to the human. We also now support the --cached flag, and have its meaning work the same way as C Git. Change-Id: I2f19dad4e018404e280ea3e95ebd448a4b667f59 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* log, diff: Add --src-prefix, --dst-prefix, --no-prefixShawn O. Pearce2010-09-021-0/+3
| | | | | Change-Id: I0c7154a51143d56362f12ee4fa93133778d3a9eb Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Move rename detection, path following into DiffFormatterShawn O. Pearce2010-09-021-0/+1
| | | | | | | | | | | | | Applications just want a quick way to configure our diff implementation, and then just want to use it without a lot of fuss. Move all of the rename detection logic and path following logic out of our pgm package and into DiffFormatter itself, making it much easier for a GUI to take advantage of the features without duplicating a lot of code. Change-Id: I4b54e987bb6dc804fb270cbc495fe4cae26c7b0e Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Make Tag class only for writingShawn O. Pearce2010-08-201-0/+1
| | | | | | | | | | The Tag class now only supports the creation of an annotated tag object. To read an annotated tag, applictions should use RevTag. This permits us to have exactly one implementation, and RevTag's is faster and more bug-free. Change-Id: Ib573f7e15f36855112815269385c21dea532e2cf Signed-off-by: Shawn O. Pearce <spearce@spearce.org>