Closed kalanzun closed 4 years ago
Thanks a lot.
I opened an issue, to respect the usual workflow (issue => discussion => pull request).
Commit a6b6c1e solves this issue (integrates the substance of this PR and expands on it).
@kalanzun Thanks a lot for this!
Diagnosis Information
The except clauses actually return None, because dict().update() returns None.
The pull request changes get_git_info() to actually return the diagnosis information in r. The except clauses now just updates r with
r.update({})
and at the very end of the function, get_git_info() returns r.git repositories without tags
If the git repository has no tags,
git describe --tags
fails with error code 128 and aborts git_get_config(). However, the other commands still provide useful information.This pull request adds a try except block around the git call and ignores error 128 for r['tag']. The function continues to collect information for git repositories without tags.