diff options
author | Jonathan Nieder <jrn@google.com> | 2013-05-24 17:30:18 -0700 |
---|---|---|
committer | Jonathan Nieder <jrn@google.com> | 2013-05-24 17:30:18 -0700 |
commit | 56276d053f44209f25951d3acfba226c563a81f0 (patch) | |
tree | 9eb091e509cf57eefd22d8b099438757d9510b56 /org.eclipse.jgit.pgm/resources | |
parent | a544ff72dbf62671d2530f4cfca0e8f9dd693d78 (diff) | |
download | jgit-56276d053f44209f25951d3acfba226c563a81f0.tar.gz jgit-56276d053f44209f25951d3acfba226c563a81f0.zip |
Move ArchiveCommand into standard porcelain API
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
Diffstat (limited to 'org.eclipse.jgit.pgm/resources')
-rw-r--r-- | org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties index 4a1548134f..48b61edb03 100644 --- a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties +++ b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties @@ -7,8 +7,6 @@ N=N alreadyOnBranch=Already on ''{0}'' alreadyUpToDate=Already up-to-date. -archiveFormatAlreadyRegistered=Archive format already registered: {0} -archiveFormatAlreadyAbsent=Archive format already absent: {0} authorInfo=Author: {0} <{1}> averageMSPerRead=average {0} ms/read branchAlreadyExists=A branch named ''{0}'' already exists. @@ -48,7 +46,6 @@ deletedRemoteBranch=Deleted remote branch {0} doesNotExist={0} does not exist dontOverwriteLocalChanges=error: Your local changes to the following file would be overwritten by merge: everythingUpToDate=Everything up-to-date -exceptionCaughtDuringExecutionOfArchiveCommand=Exception caught during execution of archive command expectedNumberOfbytes=Expected {0} bytes. exporting=Exporting {0} failedToCommitIndex=failed to commit index @@ -175,7 +172,6 @@ tooManyRefsGiven=Too many refs given unknownIoErrorStdout=An unknown I/O error occurred on standard output unknownMergeStrategy=unknown merge strategy {0} specified unmergedPaths=Unmerged paths: -unsupportedArchiveFormat=Unknown archive format ''{0}'' unsupportedOperation=Unsupported operation: {0} untrackedFiles=Untracked files: updating=Updating {0}..{1} |