]> source.dussan.org Git - jgit.git/commit
Pick default archive format based on filename suffix 09/13609/3
authorJonathan Nieder <jrn@google.com>
Fri, 7 Jun 2013 01:39:04 +0000 (18:39 -0700)
committerJonathan Nieder <jrn@google.com>
Fri, 7 Jun 2013 01:39:04 +0000 (18:39 -0700)
commit56cb2d925c93eadf03a551a2f40bbc9cb2b3241a
treeb42ae518cd96c0342b85f3313b744a50ddd47156
parentebfe85d0374aee1992d01029c12338da3d67e26b
Pick default archive format based on filename suffix

Introduce a setFilename() method for ArchiveCommand so callers can
specify the intended filename of the produced archive.  If the
filename ends with .tar, the format will default to tar; if .zip, zip;
if .tar.gz, gzip-compressed tar; and so on.

This doesn't affect "jgit archive" because it doesn't support the
--output=<file> option yet.  A later patch might do that.

Change-Id: Ic0236a70f7aa7f2271c3ef11083b21ee986b4df5
org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java
org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/Tbz2Format.java
org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TgzFormat.java
org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TxzFormat.java
org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/ZipFormat.java
org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java