aboutsummaryrefslogtreecommitdiff
path: root/x11/kitty/files/patch-docs_conf.py
diff options
context:
space:
mode:
authorNicola Vitale <nivit@FreeBSD.org>2024-02-14 16:02:19 +0000
committerNicola Vitale <nivit@FreeBSD.org>2024-02-14 16:03:13 +0000
commit83f782b083bd3b4adb2a4eeeb8d5085058fc9b48 (patch)
tree44fdc94fa68f4046a5ebe7f8176c321ade949aee /x11/kitty/files/patch-docs_conf.py
parent309199036a2954576fe6435bbfb1dc987a2aed07 (diff)
Diffstat (limited to 'x11/kitty/files/patch-docs_conf.py')
-rw-r--r--x11/kitty/files/patch-docs_conf.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/x11/kitty/files/patch-docs_conf.py b/x11/kitty/files/patch-docs_conf.py
index 8b651d34b08f..74b0105c6ca2 100644
--- a/x11/kitty/files/patch-docs_conf.py
+++ b/x11/kitty/files/patch-docs_conf.py
@@ -1,22 +1,22 @@
---- docs/conf.py.orig 2023-09-18 07:09:42 UTC
+--- docs/conf.py.orig 1979-11-29 23:00:00 UTC
+++ docs/conf.py
-@@ -207,18 +207,10 @@ def commit_role(
+@@ -209,18 +209,10 @@ def commit_role(
name: str, rawtext: str, text: str, lineno: int, inliner: Any, options: Any = {}, content: Any = []
) -> Tuple[List[nodes.reference], List[nodes.problematic]]:
' Link to a github commit '
- try:
- commit_id = subprocess.check_output(
-- f'git rev-list --max-count=1 --skip=# {text}'.split()).decode('utf-8').strip()
+- f'git rev-list --max-count=1 {text}'.split()).decode('utf-8').strip()
- except Exception:
- msg = inliner.reporter.error(
-- f'GitHub commit id "{text}" not recognized.', line=lineno)
+- f'git commit id "{text}" not recognized.', line=lineno)
- prb = inliner.problematic(rawtext, rawtext, msg)
- return [prb], [msg]
+ commit_id = text
url = f'https://github.com/kovidgoyal/kitty/commit/{commit_id}'
set_classes(options)
- short_id = subprocess.check_output(
-- f'git rev-list --max-count=1 --abbrev-commit --skip=# {commit_id}'.split()).decode('utf-8').strip()
+- f'git rev-list --max-count=1 --abbrev-commit {commit_id}'.split()).decode('utf-8').strip()
+ short_id = text[:9]
node = nodes.reference(rawtext, f'commit: {short_id}', refuri=url, **options)
return [node], []