2 # This requires a branch named in $head
3 # (usually 'man' or 'html', provided by the git.git repository)
8 USAGE
='<refname> <target directory>'
12 test -z "$mandir" && usage
13 if ! git-rev-parse
--verify "$head^0" >/dev
/null
; then
14 echo >&2 "head: $head does not exist in the current repository"
18 GIT_INDEX_FILE
=`pwd`/.quick-doc.index
20 rm -f "$GIT_INDEX_FILE"
22 git-checkout-index
-a -f --prefix="$mandir"/
24 if test -n "$GZ"; then
26 for i
in `git-ls-tree -r --name-only $head`
28 gzip < $i > $i.gz
&& rm $i
31 rm -f "$GIT_INDEX_FILE"