Re: gitweb / cg-export
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Aug 16, 2006, 09:54 UTC
- Message-ID
- <ebupuk$dgl$1@sea.gmane.org>
- In-Reply-To
- <44E263DD.6030305@cam.ac.uk>
Toby White wrote:
> I was wondering if a feature like the following would be of > use to anyone except me: I'd like to be able to download > the full source of a given tree from gitweb.
[...] So you want to have snapshot of a tree. Why not snapshot of a commit, or of a tag?
Show 9 quoted lines
> I've quickly hacked gitweb to do this for me - patch below. > > It adds an extra link to the 'commit' page. Next to the link > that would lead you to 'tree', there is 'tar.gz' which simply > returns the tar.gz of the same tree. > > The patch is against the version of gitweb currently in > Debian, which is, erm, '264-1', apparently, because that's > what I had to hand.
It is really better to hack git with git. And you can use current gitweb with old git (well, not always, as current gitweb requires --full-history option to git-rev-list to be available).
> Anyway. I'm no git expert so perhaps this is a really bad > idea, but I find it useful.
It is usefull idea, as it was implemented independently by Sven Verdoolaege in http://marc.theaimsgroup.com/?l=git&m=111909432415478&w=2 directly in gitweb, and by Sham Chukoury in gitweb-xmms2 using snapshot.cgi in Python in "Snapshot links support" commit http://git.xmms.se/?p=gitweb-xmms2.git;a=commit;h=3d0284bb784041907de33df5cff8449f8aeb072e and "Add xmms2 project's snapshot.cgi" commit http://git.xmms.se/?p=gitweb-xmms2.git;a=commit;h=3d0284bb784041907de33df5cff8449f8aeb072e
I have planned to add snapshot support, see "[RFC] gitweb wishlist and TODO list" thread in mailing list archives, check http://git.or.cz/gitwiki/GitCommunity for list, but I was planning to do some refactoring, including <td class="link"> links refactoring (that is where snapshot links would be added).
-- Jakub Narebski Warsaw, Poland ShadeHawk on #git