This commit is contained in:
1 file changed
+1
-3
+1
-3
@@ -230,9 +230,7 @@ def commit_role(
|
|||||||
url = f'https://github.com/kovidgoyal/kitty/commit/{commit_id}'
|
url = f'https://github.com/kovidgoyal/kitty/commit/{commit_id}'
|
||||||
options = normalize_options(options)
|
options = normalize_options(options)
|
||||||
try:
|
try:
|
||||||
short_id = subprocess.check_output(
|
short_id = subprocess.check_output(f'git rev-list --max-count=1 --abbrev-commit {commit_id}'.split(), stderr=subprocess.DEVNULL).decode('utf-8').strip()
|
||||||
f'git rev-list --max-count=1 --abbrev-commit {commit_id}'.split(), stderr=subprocess.DEVNULL
|
|
||||||
).decode('utf-8').strip()
|
|
||||||
except Exception:
|
except Exception:
|
||||||
short_id = commit_id
|
short_id = commit_id
|
||||||
node = nodes.reference(rawtext, f'commit: {short_id}', refuri=url, **options)
|
node = nodes.reference(rawtext, f'commit: {short_id}', refuri=url, **options)
|
||||||
|
|||||||
Reference in new issue
Block a user