From: Junio C Hamano Date: Tue, 3 Oct 2006 09:30:47 +0000 (-0700) Subject: gitweb: prepare for repositories with packed refs. X-Git-Tag: v1.4.4-rc1~69^2~9 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/2172ce4b01c862e66e3d581282dc92223cbd28fa?ds=inline;hp=2172ce4b01c862e66e3d581282dc92223cbd28fa 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 ---