From 6a94f027b6302f1630ccbad8fd4dc5d7f54645d4 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Thu, 15 Nov 2012 18:48:12 -0800 Subject: Add "jgit archive" tool that writes a tree as a ZIP file 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 --- org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/CLIText.properties | 3 +++ 1 file changed, 3 insertions(+) (limited to 'org.eclipse.jgit.pgm/resources') diff --git a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/CLIText.properties b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/CLIText.properties index a75bb001d2..2afaa12f9f 100644 --- a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/CLIText.properties +++ b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/CLIText.properties @@ -8,6 +8,7 @@ N=N IPZillaPasswordPrompt=IPZilla Password alreadyOnBranch=Already on ''{0}'' alreadyUpToDate=Already up-to-date. +archiveEntryModeIgnored=warning: mode of {0} ignored authorInfo=Author: {0} <{1}> averageMSPerRead=average {0} ms/read branchAlreadyExists=A branch named ''{0}'' already exists. @@ -156,6 +157,7 @@ tagAlreadyExists=tag ''{0}'' already exists tagLabel=tag taggerInfo=Tagger: {0} <{1}> timeInMilliSeconds={0} ms +treeIsRequired=argument tree is required tooManyRefsGiven=Too many refs given unknownIoErrorStdout=An unknown I/O error occurred on standard output unknownMergeStrategy=unknown merge strategy {0} specified @@ -193,6 +195,7 @@ usage_actOnRemoteTrackingBranches=act on remote-tracking branches usage_addFileContentsToTheIndex=Add file contents to the index usage_alterTheDetailShown=alter the detail shown usage_approveDestructionOfRepository=approve destruction of repository +usage_archive=zip up files from the named tree usage_blameLongRevision=show long revision usage_blameRange=annotate only the given range usage_blameRawTimestamp=show raw timestamp -- cgit v1.2.3