author | Junio C Hamano <junkio@cox.net> | |
Tue, 3 Oct 2006 09:30:47 +0000 (02:30 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 3 Oct 2006 09:30:47 +0000 (02:30 -0700) | ||
commit | 2172ce4b01c862e66e3d581282dc92223cbd28fa | |
tree | ea00768cc015ae9b4242a6d277179b620e59bbbd | tree | snapshot |
parent | 954a6183756a073723a7c9fd8d2feb13132876b0 | commit | diff |
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>
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 | diff | blob | history |