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

Bug: Not working in first commit #1

Open
tyapochkin opened this issue Mar 5, 2020 · 0 comments
Open

Bug: Not working in first commit #1

tyapochkin opened this issue Mar 5, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@tyapochkin
Copy link

If dstrace is initialized in empty repo, there is the error during first commit:

`Calling DSTrace pre-commit hook

DSTrace pre-commit started.
Traceback (most recent call last):
File "/media/konstantin/docs/anaconda3/bin/dstrace", line 8, in
sys.exit(main())
File "/media/konstantin/docs/anaconda3/lib/python3.6/site-packages/dstrace/dstrace.py", line 354, in main
fire.Fire(CLI)
File "/media/konstantin/docs/anaconda3/lib/python3.6/site-packages/fire/core.py", line 138, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/media/konstantin/docs/anaconda3/lib/python3.6/site-packages/fire/core.py", line 471, in _Fire
target=component.name)
File "/media/konstantin/docs/anaconda3/lib/python3.6/site-packages/fire/core.py", line 675, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "/media/konstantin/docs/anaconda3/lib/python3.6/site-packages/dstrace/dstrace.py", line 315, in pre_commit
self.convert_staged_notebooks()
File "/media/konstantin/docs/anaconda3/lib/python3.6/site-packages/dstrace/dstrace.py", line 331, in convert_staged_notebooks
for f in gp.get_git_staged():
File "/media/konstantin/docs/anaconda3/lib/python3.6/site-packages/dstrace/dstrace.py", line 122, in get_git_staged
return [i.a_path for i in self.repo.index.diff('HEAD')]
File "/media/konstantin/docs/anaconda3/lib/python3.6/site-packages/git/index/util.py", line 76, in check_default_index
return func(self, *args, **kwargs)
File "/media/konstantin/docs/anaconda3/lib/python3.6/site-packages/git/index/base.py", line 1227, in diff
other = self.repo.rev_parse(other)
File "/media/konstantin/docs/anaconda3/lib/python3.6/site-packages/git/repo/fun.py", line 333, in rev_parse
obj = name_to_object(repo, rev)
File "/media/konstantin/docs/anaconda3/lib/python3.6/site-packages/git/repo/fun.py", line 146, in name_to_object
raise BadName(name)
gitdb.exc.BadName: Ref 'HEAD' did not resolve to an object
`

@sancau sancau self-assigned this Mar 5, 2020
@sancau sancau added the bug Something isn't working label Mar 5, 2020
@sancau sancau changed the title Not working in first commit Bug: Not working in first commit Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants