diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/archive/ArchiveCommand.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/archive/ArchiveCommand.java index ff5b0d0cd..ad1daebd4 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/archive/ArchiveCommand.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/archive/ArchiveCommand.java @@ -106,7 +106,7 @@ public class ArchiveCommand extends GitCommand { * ArchiveOutputStream out = format.createArchiveOutputStream(System.out); * try { * for (...) { - * format.putEntry(path, mode, repo.open(objectId), out); + * format.putEntry(out, path, mode, repo.open(objectId)); * } * } finally { * out.close(); @@ -114,9 +114,8 @@ public class ArchiveCommand extends GitCommand { */ public static interface Format { ArchiveOutputStream createArchiveOutputStream(OutputStream s); - void putEntry(String path, FileMode mode, // - ObjectLoader loader, ArchiveOutputStream out) // - throws IOException; + void putEntry(ArchiveOutputStream out, String path, FileMode mode, + ObjectLoader loader) throws IOException; } /** @@ -204,7 +203,7 @@ public class ArchiveCommand extends GitCommand { continue; walk.getObjectId(idBuf, 0); - fmt.putEntry(name, mode, reader.open(idBuf), outa); + fmt.putEntry(outa, name, mode, reader.open(idBuf)); } } finally { outa.close(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/archive/TarFormat.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/archive/TarFormat.java index c27fb350b..a0bbd5240 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/archive/TarFormat.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/archive/TarFormat.java @@ -57,8 +57,9 @@ class TarFormat implements ArchiveCommand.Format { return new TarArchiveOutputStream(s); } - public void putEntry(String path, FileMode mode, ObjectLoader loader, - ArchiveOutputStream out) throws IOException { + public void putEntry(ArchiveOutputStream out, + String path, FileMode mode, ObjectLoader loader) + throws IOException { if (mode == FileMode.SYMLINK) { final TarArchiveEntry entry = new TarArchiveEntry( path, TarConstants.LF_SYMLINK); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/archive/ZipFormat.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/archive/ZipFormat.java index d08428f54..a85ae3bfa 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/archive/ZipFormat.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/archive/ZipFormat.java @@ -56,8 +56,9 @@ class ZipFormat implements ArchiveCommand.Format { return new ZipArchiveOutputStream(s); } - public void putEntry(String path, FileMode mode, ObjectLoader loader, - ArchiveOutputStream out) throws IOException { + public void putEntry(ArchiveOutputStream out, + String path, FileMode mode, ObjectLoader loader) + throws IOException { final ZipArchiveEntry entry = new ZipArchiveEntry(path); if (mode == FileMode.REGULAR_FILE) {