diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-11-02 10:21:38 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-11-02 19:20:52 -0800 |
commit | 1ec2fb5fa37d823d02517263f8e2a78930abd1dd (patch) | |
tree | 79a9ed0cfd415cb3b170a1f5666eb68054100b7e /strbuf.h | |
parent | gitweb: make the supported snapshot formats array global (diff) | |
download | tgif-1ec2fb5fa37d823d02517263f8e2a78930abd1dd.tar.xz |
gitweb: retrieve snapshot format from PATH_INFO
We parse requests for $project/snapshot/$head.$sfx as equivalent to
$project/snapshot/$head?sf=$sfx, where $sfx is any of the known
(although not necessarily supported) snapshot formats (or its default
suffix).
The filename for the resulting package preserves the requested
extensions (so asking for a .tgz gives a .tgz, and asking for a .tar.gz
gives a .tar.gz), although for obvious reasons it doesn't preserve the
basename (git/snapshot/next.tgz returns a file names git-next.tgz).
This introduces a potential case for ambiguity if a project has a head
that ends with a snapshot-like suffix (.zip, .tgz, .tar.gz, etc) and the
sf CGI parameter is not present; however, gitweb only produces URLs with
the sf parameter currently, so this is only a potential issue for
hand-coded URLs for extremely unusual project.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'strbuf.h')
0 files changed, 0 insertions, 0 deletions