Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

branches in .git/logs/refs/heads are not checked, but do show up as branches in git-branch #30

Open
jauco opened this issue Feb 9, 2020 · 1 comment

Comments

@jauco
Copy link

jauco commented Feb 9, 2020

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)

@jauco
Copy link
Author

jauco commented Feb 9, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant