branches in .git/logs/refs/heads are not checked, but do show up as branches in git-branch
jauco opened this issue · 1 comments
I have an (old) git repo that has a branch that is not in .git/refs/heads
but in .git/logs/refs/heads
. It shows up as a normal branch in git branch
and also when doing git for-each-ref --format '%(refname:short)' refs/heads/
. Maybe we should replace the for REF_HEAD in $(cd $GIT_DIR/refs/heads
with the git for-each-ref
command? (I'd be happy to provide a PR)
Just checked with another repo that I've had on my laptop for a few years now. It contains files in logs/refs/heads that are not in refs/heads and do show up in git branch. Files that appear in both directories and also files that appear in logs/refs/heads that are in refs/heads and that do not show up in git branch. Apperently the logic is not trivial.