Revision 7d1864ce67d83485cf5cbc8c90fc170ee884ef16 authored by Junio C Hamano on 07 January 2007, 10:00:28 UTC, committed by Junio C Hamano on 08 January 2007, 05:36:35 UTC
This removes the old is_bare_git_dir(const char *) to ask if a
directory, if it is a GIT_DIR, is a bare repository, and
replaces it with is_bare_repository(void *).  The function looks
at core.bare configuration variable if exists but uses the old
heuristics: if it is ".git" or ends with "/.git", then it does
not look like a bare repository, otherwise it does.

Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 510c5a8
Raw File
install-doc-quick.sh
#!/bin/sh
# This requires a branch named in $head
# (usually 'man' or 'html', provided by the git.git repository)
set -e
head="$1"
mandir="$2"
SUBDIRECTORY_OK=t
USAGE='<refname> <target directory>'
. git-sh-setup
export GIT_DIR

test -z "$mandir" && usage
if ! git-rev-parse --verify "$head^0" >/dev/null; then
	echo >&2 "head: $head does not exist in the current repository"
	usage
fi

GIT_INDEX_FILE=`pwd`/.quick-doc.index
export GIT_INDEX_FILE
rm -f "$GIT_INDEX_FILE"
git-read-tree $head
git-checkout-index -a -f --prefix="$mandir"/

if test -n "$GZ"; then
	cd "$mandir"
	for i in `git-ls-tree -r --name-only $head`
	do
		gzip < $i > $i.gz && rm $i
	done
fi
rm -f "$GIT_INDEX_FILE"
back to top