gitweb: prepare for repositories with packed refs.
commit2172ce4b01c862e66e3d581282dc92223cbd28fa
authorJunio C Hamano <junkio@cox.net>
Tue, 3 Oct 2006 09:30:47 +0000 (3 02:30 -0700)
committerJunio C Hamano <junkio@cox.net>
Tue, 3 Oct 2006 09:30:47 +0000 (3 02:30 -0700)
treeea00768cc015ae9b4242a6d277179b620e59bbbd
parent954a6183756a073723a7c9fd8d2feb13132876b0
gitweb: prepare for repositories with packed refs.

When a repository is initialized long time ago with symbolic
HEAD, and "git-pack-refs --prune" is run, HEAD will be a
dangling symlink to refs/heads/ somewhere.

Running -e "$dir/HEAD" to guess if $dir is a git repository does
not give us the right answer anymore in such a case.

Also factor out two places that checked if the repository can be
exported with similar code into a call to a new function,
check_export_ok.

Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.perl