aboutsummaryrefslogtreecommitdiff
path: root/transport.h
diff options
context:
space:
mode:
authorMark Rada <marada@uwaterloo.ca>2009-11-07 16:13:29 +0100
committerJunio C Hamano <gitster@pobox.com>2009-11-08 19:22:45 -0800
commitb629275fd02aa07c2630d1a8c8a14011ff164043 (patch)
tree7471d117ee67a0037eed8f5bd9424a8e7a73d3c4 /transport.h
parent3ce9450a810243cbd9d0250d9ae3ea6834f50b9c (diff)
downloadgit-b629275fd02aa07c2630d1a8c8a14011ff164043.tar.gz
git-b629275fd02aa07c2630d1a8c8a14011ff164043.tar.xz
gitweb: Smarter snapshot names
Teach gitweb how to produce nicer snapshot names by only using the short hash id. If clients make requests using a tree-ish that is not a partial or full SHA-1 hash, then the short hash will also be appended to whatever they asked for. If clients request snapshot of a tag (which means that $hash ('h') parameter has 'refs/tags/' prefix), use only tag name. Update tests cases in t9502-gitweb-standalone-parse-output. Gitweb uses the following format for snapshot filenames: <sanitized project name>-<version info>.<snapshot suffix> where <sanitized project name> is project name with '.git' or '/.git' suffix stripped, unless '.git' is the whole project name. For snapshot prefix it uses: <sanitized project name>-<version info>/ as compared to <sanitized project name>/ before (without version info). Current rules for <version info>: * if 'h' / $hash parameter is SHA-1 or shortened SHA-1, use SHA-1 shortened to to 7 characters * otherwise if 'h' / $hash parameter is tag name (it begins with 'refs/tags/' prefix, use tag name (with 'refs/tags/' stripped * otherwise if 'h' / $hash parameter starts with 'refs/heads/' prefix, strip this prefix, convert '/' into '.', and append shortened SHA-1 after '-', i.e. use <sanitized hash>-<shortened sha1> Signed-off-by: Mark Rada <marada@uwaterloo.ca> Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport.h')
0 files changed, 0 insertions, 0 deletions