Bug 394542 - Add git-archive tool that writes a tree as a ZIP file
Summary: Add git-archive tool that writes a tree as a ZIP file
Status: RESOLVED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 2.2   Edit
Hardware: PC Mac OS X
: P3 enhancement (vote)
Target Milestone: 2.2   Edit
Assignee: Jonathan Nieder CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2012-11-18 19:31 EST by Chris Aniszczyk CLA
Modified: 2012-11-18 19:33 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Aniszczyk CLA 2012-11-18 19:31:21 EST
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.
Comment 1 Chris Aniszczyk CLA 2012-11-18 19:33:07 EST
Fixed in master as 6a94f027b6302f1630ccbad8fd4dc5d7f54645d4