|
|
@ -42,12 +42,10 @@ |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
package org.eclipse.jgit.pgm.archive; |
|
|
|
package org.eclipse.jgit.pgm.archive; |
|
|
|
|
|
|
|
|
|
|
|
import java.lang.String; |
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
import java.io.IOException; |
|
|
|
import java.io.OutputStream; |
|
|
|
import java.io.OutputStream; |
|
|
|
import java.util.EnumMap; |
|
|
|
import java.util.EnumMap; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
|
import java.text.MessageFormat; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.apache.commons.compress.archivers.ArchiveOutputStream; |
|
|
|
import org.apache.commons.compress.archivers.ArchiveOutputStream; |
|
|
|
import org.apache.commons.compress.archivers.tar.TarArchiveEntry; |
|
|
|
import org.apache.commons.compress.archivers.tar.TarArchiveEntry; |
|
|
@ -55,6 +53,7 @@ import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream; |
|
|
|
import org.apache.commons.compress.archivers.tar.TarConstants; |
|
|
|
import org.apache.commons.compress.archivers.tar.TarConstants; |
|
|
|
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; |
|
|
|
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; |
|
|
|
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream; |
|
|
|
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream; |
|
|
|
|
|
|
|
import org.eclipse.jgit.api.Git; |
|
|
|
import org.eclipse.jgit.api.GitCommand; |
|
|
|
import org.eclipse.jgit.api.GitCommand; |
|
|
|
import org.eclipse.jgit.api.errors.GitAPIException; |
|
|
|
import org.eclipse.jgit.api.errors.GitAPIException; |
|
|
|
import org.eclipse.jgit.api.errors.JGitInternalException; |
|
|
|
import org.eclipse.jgit.api.errors.JGitInternalException; |
|
|
@ -106,7 +105,10 @@ public class ArchiveCommand extends GitCommand<OutputStream> { |
|
|
|
* the --format= option) |
|
|
|
* the --format= option) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static enum Format { |
|
|
|
public static enum Format { |
|
|
|
|
|
|
|
/** Zip format */ |
|
|
|
ZIP, |
|
|
|
ZIP, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Posix TAR-format */ |
|
|
|
TAR |
|
|
|
TAR |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -244,6 +246,7 @@ public class ArchiveCommand extends GitCommand<OutputStream> { |
|
|
|
* @param tree |
|
|
|
* @param tree |
|
|
|
* the tag, commit, or tree object to produce an archive for |
|
|
|
* the tag, commit, or tree object to produce an archive for |
|
|
|
* @return this |
|
|
|
* @return this |
|
|
|
|
|
|
|
* @throws IOException |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public ArchiveCommand setTree(ObjectId tree) throws IOException { |
|
|
|
public ArchiveCommand setTree(ObjectId tree) throws IOException { |
|
|
|
final RevWalk rw = new RevWalk(walk.getObjectReader()); |
|
|
|
final RevWalk rw = new RevWalk(walk.getObjectReader()); |
|
|
|