git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH][RFC] Add git-archive-tree

From
FBFranck 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
Previous: Rene ScharfeNext: Rene Scharfe
Message 4 of 17 in “[RFC] Add git-archive-tree”
  1. [RFC] Add git-archive-treeRene Scharfe, Sep 2, 2006
  2. Add support for tgz archive formatRene Scharfe, Sep 2, 2006
  3. Rene ScharfeSep 2, 2006
  4. Franck Bui-HuuSep 2, 2006
  5. Rene ScharfeSep 4, 2006
  6. Junio C HamanoSep 4, 2006
  7. Rene ScharfeSep 4, 2006
  8. Junio C HamanoSep 4, 2006
  9. Franck Bui-HuuSep 5, 2006
  10. Junio C HamanoSep 2, 2006
  11. Rene ScharfeSep 2, 2006
  12. Franck Bui-HuuSep 2, 2006
  13. Rene ScharfeSep 2, 2006
  14. Junio C HamanoSep 2, 2006
  15. Rene ScharfeSep 6, 2006
  16. Junio C HamanoSep 6, 2006
  17. Rene ScharfeSep 17, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.