Open lenntt opened 2 weeks ago
This is Git internal behaviour, so I'd keep it the same. I just tested it in my terminal:
> git init
> git rev-list HEAD --
fatal: bad revision 'HEAD'
We could parse the exception and check for this exact string, but if Git returns this, I'd say let's leave it 😄
Fair, but didn't ask to do a git rev-list HEAD, I was asking to traverse_commits :)
Other than putting a large try
around my code, do you know of a better way? is there a call to pre-check HEAD?
doing only a 'git init' and then try to traverse commits on that repo, will fail here: https://github.com/ishepard/pydriller/blob/8bfbbbc82ab31cf9552f22cb79c846478df9ae37/pydriller/repository.py#L236
relates to this: https://stackoverflow.com/questions/15628720/fatal-bad-default-revision-head
Expected behavior: either:
I'm on git 2.39.3, MacOS.