Skip to content

Commit

Permalink
Restrict short SHA to 7 chars --autopull
Browse files Browse the repository at this point in the history
`git log` sometimes returns 8 chars, dunno when and how
  • Loading branch information
iBug committed Aug 29, 2018
1 parent dfce765 commit 1bf1859
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion globalvars.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def git_commit_info():
except sp.CalledProcessError as e:
raise OSError("Git error:\n" + e.output) from e
short_id, full_id, author, message = data.strip().split("\n")
return {'id': short_id, 'id_full': full_id, 'author': author, 'message': message}
return {'id': full_id[:7], 'id_full': full_id, 'author': author, 'message': message}


def git_status():
Expand Down

0 comments on commit 1bf1859

Please sign in to comment.