Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`bark` currently fails to run if there are annotated tags in the repository. Lightweight tags work, though. First off, no tags works: ``` $ poetry run -- bark -l debug setup INFO 19:20:37.605 [gitbark.logging.set_log_level:18] Logging at level: DEBUG Define what Bark Modules to add! Module to add (leave blank to skip): ^CAborted! ``` A lightweight tag also does not interfere: ``` $ git tag tag-lightweight $ poetry run -- bark -l debug setup INFO 19:20:58.889 [gitbark.logging.set_log_level:18] Logging at level: DEBUG Define what Bark Modules to add! Module to add (leave blank to skip): ^CAborted! ``` But an annotated tag does make `bark` crash on startup: ``` $ git tag tag-annotated -m "TEST" $ poetry run -- bark -l debug setup INFO 19:21:09.945 [gitbark.logging.set_log_level:18] Logging at level: DEBUG ERROR 19:21:09.964 [gitbark.cli.__main__.main:333] An unexpected error occured. Traceback (most recent call last): File "/home/emlun/dev/gitbark/gitbark/cli/__main__.py", line 324, in main cli(obj={}) File "/home/emlun/.cache/pypoetry/virtualenvs/gitbark-X6l5axH9-py3.11/lib/python3.11/site-packages/click/core.py", line 1130, in __call__ return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/emlun/.cache/pypoetry/virtualenvs/gitbark-X6l5axH9-py3.11/lib/python3.11/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "/home/emlun/.cache/pypoetry/virtualenvs/gitbark-X6l5axH9-py3.11/lib/python3.11/site-packages/click/core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/emlun/.cache/pypoetry/virtualenvs/gitbark-X6l5axH9-py3.11/lib/python3.11/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/emlun/.cache/pypoetry/virtualenvs/gitbark-X6l5axH9-py3.11/lib/python3.11/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/emlun/.cache/pypoetry/virtualenvs/gitbark-X6l5axH9-py3.11/lib/python3.11/site-packages/click/decorators.py", line 26, in new_func return f(get_current_context(), *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/emlun/dev/gitbark/gitbark/cli/__main__.py", line 120, in setup setup_cmd(project) File "/home/emlun/dev/gitbark/gitbark/commands/setup.py", line 304, in setup if not has_valid_bark_rules(project): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/emlun/dev/gitbark/gitbark/commands/setup.py", line 119, in has_valid_bark_rules if BARK_RULES_REF in project.repo.references: ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/emlun/dev/gitbark/gitbark/git.py", line 201, in references return { ^ File "/home/emlun/dev/gitbark/gitbark/git.py", line 202, in <dictcomp> ref.name: Commit(ref.resolve().target.raw, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/emlun/dev/gitbark/gitbark/git.py", line 76, in __init__ raise ValueError(f"No commit found with hash {hash.hex()}") ValueError: No commit found with hash 75b81168733bfc515e7204d5be9767ccb1dc2be5 ```
- Loading branch information