| Conditions | 3 |
| Total Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | # Copyright 2017 Starbot Discord Project |
||
| 16 | def git_commit(): |
||
| 17 | '''Get the current git commit.''' |
||
| 18 | if git_branch() == "UNKNOWN": |
||
| 19 | return "UNKNOWN" |
||
| 20 | else: |
||
| 21 | with open(".git/refs/heads/{}".format(git_branch())) as file: |
||
| 22 | commit = file.read() |
||
| 23 | return commit.strip() |
||
| 24 | |||
| 42 | return line.split("url = ")[1].strip() |