You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 24, 2022. It is now read-only.
Describe the bug
Command 'check' with flag '--has-new-runs' crashes if it is run in a detached commit
To Reproduce
Steps to reproduce the behavior:
In the project directory run git checkout 0.3.0
Run python -m nitpicker run --has-new-runs
See error:
-----------------------------------Check if all the last runs passed.-----------------------------------Plancommands.add has 0 failed and 0 skipped of 2 test casesPlancommands.check has 0 failed and 0 skipped of 2 test casesPlancommands.run has 0 failed and 0 skipped of 1 test casesTotally your project has 0 failed and 0 skipped of 5 test cases-----------------------------------Check if current branch has new runs.-----------------------------------Traceback (most recent call last): File "/opt/python/3.3.6/lib/python3.3/runpy.py", line 160, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/opt/python/3.3.6/lib/python3.3/runpy.py", line 73, in _run_code exec(code, run_globals) File "./nitpicker/__main__.py", line 3, in <module> nitpicker.main() File "/home/travis/virtualenv/python3.3.6/lib/python3.3/site-packages/click/core.py", line 722, in __call__ return self.main(*args, **kwargs) File "/home/travis/virtualenv/python3.3.6/lib/python3.3/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/home/travis/virtualenv/python3.3.6/lib/python3.3/site-packages/click/core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/travis/virtualenv/python3.3.6/lib/python3.3/site-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/travis/virtualenv/python3.3.6/lib/python3.3/site-packages/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/home/travis/virtualenv/python3.3.6/lib/python3.3/site-packages/click/decorators.py", line 17, in new_func return f(get_current_context(), *args, **kwargs) File "./nitpicker/nitpicker.py", line 138, in check success &= handler.check_has_new_runs() File "./nitpicker/commands/check_command_handler.py", line 79, in check_has_new_runs diffs = list(self.__cvs_adapter.diff(self.__main_branch)) File "./nitpicker/cvs/git_adapter.py", line 28, in diff branch = self.__repo.active_branch File "/home/travis/virtualenv/python3.3.6/lib/python3.3/site-packages/git/repo/base.py", line 696, in active_branch return self.head.reference File "/home/travis/virtualenv/python3.3.6/lib/python3.3/site-packages/git/refs/symbolic.py", line 275, in _get_reference raise TypeError("%s is a detached symbolic reference as it points to %r" % (self, sha))TypeError: HEAD is a detached symbolic reference as it points to '670365d9258c7fd89e4ba43160d78c1a5f698f49'
Expected behavior
The program should not crash
The text was updated successfully, but these errors were encountered:
Describe the bug
Command 'check' with flag '--has-new-runs' crashes if it is run in a detached commit
To Reproduce
Steps to reproduce the behavior:
git checkout 0.3.0
Expected behavior
The program should not crash
The text was updated successfully, but these errors were encountered: