Skip to content

Fix issue with empty branches - #73

Merged
brendan-kellam merged 1 commit into
mainfrom
bkellam/fix_72
Nov 15, 2024
Merged

brendan-kellam merged 1 commit into
mainfrom
bkellam/fix_72

Conversation

@brendan-kellam

@brendan-kellam brendan-kellam commented Nov 15, 2024 •

Copy link
Copy Markdown
Contributor

Previously, indexing was failing for empty repositories with getCommit("refs/heads/", "HEAD"): reference not found. This PR adds the allow_missing_branches option to the zoekt-git-index call. This will make it s.t., a ref is skipped if it cannot be found.

Note for issue #59 : this might has the side-effect where if HEAD actually does reference something that exists, we will now silently fail (HEAD will not be indexed). We should follow up by raising a warning message when HEAD doesn't reference anything.

@brendan-kellam
brendan-kellam merged commit bea86a6 into main Nov 15, 2024
@brendan-kellam
brendan-kellam deleted the bkellam/fix_72 branch November 15, 2024 06:35
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

Successfully merging this pull request may close these issues.

1 participant