Re: [PATCH][RFC] Add git-archive-tree
- From
- Franck Bui-Huu <vagabon.xyz@gmail.com>
- Date
- Sep 2, 2006, 20:13 UTC
- Message-ID
- <cda58cb80609021313p5156a14du4895e53387dd24dc@mail.gmail.com>
- In-Reply-To
- <44F982BD.1050509@lsrfire.ath.cx>
2006/9/2, Rene Scharfe <rene.scharfe@lsrfire.ath.cx>:
Show 5 quoted lines
> The two patches I sent are what I have been able to come up with so far. > The next step would be to add archive-neutral upload and download support. > > Having thought a bit about it I propose to keep git-archive-tree for > local operations, only. It can be called by the uploader just like
Well I don't see why putting the remote operations in an other file. I was more thinking on something like this:
git-archive --format=<fmt> [--remote=<repo>] <tree-ish> [path...]
This main porcelain function would call directly functions provided by archivers lib. We will need to define an API which git-archive will use for local operations.
Symetrically, on the sever side we would have:
git-upload-archive --format=<fmt> <repo> [path...]
used by git-daemon. It will deal with protocol, paths and use archiver's lib.
Eventually, we would have 2 commands:
git-archive git-upload-archive
and get ride of
git-tar-tree git-zip-tree git-upload-tar git-upload-zip
Show 7 quoted lines
> git-tar-tree is now called by git-upload-tar. As Franck suggested, the > uploader should allow the list of archive formats it supports to be > restricted in a config file. The range of allowed compression levels > should also be configurable. > > Does it make sense to change the wire protocol to simply send the > command line options one by one?
That would make sense if the number of options grow up. Currently the remote protocol had been written by Junio, I just pick up that part from git-tar-tree and put it into git-archive. But if we allow pathspec for remote operations, then we need to send them to the uploader.
Show 8 quoted lines
> > The interface could be something like this: > > git-download-archive <repo> <git-archive-tree options...> > git-upload-archive <directory> > > Or, if the big number of git command names is a concern: >
I think it is, IMHO. And that's why I think we could have only one command for building localy/remotely archive whatever the format. git-archive should be a main procelain command, and we should get rid of git-{tar,zip}-tree commands.
--
Franck
--
VGER BF report: U 0.742177