Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0a609b9

Browse filesBrowse files
authored
Merge pull request #1879 from EliahKagan/manpages
Improve Sphinx role usage, including linking Git manpages
2 parents 7ab0933 + a957ae7 commit 0a609b9
Copy full SHA for 0a609b9

25 files changed

+189
-182
lines changed

‎doc/source/conf.py

Copy file name to clipboardExpand all lines: doc/source/conf.py
+44-45Lines changed: 44 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,28 @@
33
#
44
# This file is execfile()d with the current directory set to its containing dir.
55
#
6-
# The contents of this file are pickled, so don't put values in the namespace
7-
# that aren't pickleable (module imports are okay, they're removed automatically).
6+
# The contents of this file are pickled, so don't put values in the namespace that
7+
# aren't pickleable (module imports are okay, they're removed automatically).
88
#
9-
# Note that not all possible configuration values are present in this
10-
# autogenerated file.
9+
# Note that not all possible configuration values are present in this autogenerated
10+
# file.
1111
#
12-
# All configuration values have a default; values that are commented out
13-
# serve to show the default.
12+
# All configuration values have a default; values that are commented out serve to show
13+
# the default.
1414

15-
import sys
1615
import os
16+
import sys
1717

18-
# If your extensions are in another directory, add it here. If the directory
19-
# is relative to the documentation root, use os.path.abspath to make it
20-
# absolute, like shown here.
18+
# If your extensions are in another directory, add it here. If the directory is relative
19+
# to the documentation root, use os.path.abspath to make it absolute, like shown here.
2120
# sys.path.append(os.path.abspath('.'))
2221
sys.path.insert(0, os.path.abspath("../.."))
2322

2423
# General configuration
2524
# ---------------------
2625

27-
# Add any Sphinx extension module names here, as strings. They can be extensions
28-
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
26+
# Add any Sphinx extension module names here, as strings. They can be extensions coming
27+
# with Sphinx (named 'sphinx.ext.*') or your custom ones.
2928
extensions = ["sphinx.ext.autodoc", "sphinx.ext.doctest"]
3029

3130
# Add any paths that contain templates here, relative to this directory.
@@ -44,9 +43,8 @@
4443
project = "GitPython"
4544
copyright = "Copyright (C) 2008, 2009 Michael Trier and contributors, 2010-2015 Sebastian Thiel"
4645

47-
# The version info for the project you're documenting, acts as replacement for
48-
# |version| and |release|, also used in various other places throughout the
49-
# built documents.
46+
# The version info for the project you're documenting, acts as replacement for |version|
47+
# and |release|, also used in various other places throughout the built documents.
5048
#
5149
# The short X.Y version.
5250
with open(os.path.join(os.path.dirname(__file__), "..", "..", "VERSION")) as fd:
@@ -55,8 +53,8 @@
5553
# The full version, including alpha/beta/rc tags.
5654
release = VERSION
5755

58-
# The language for content autogenerated by Sphinx. Refer to documentation
59-
# for a list of supported languages.
56+
# The language for content autogenerated by Sphinx. Refer to documentation for a list of
57+
# supported languages.
6058
# language = None
6159

6260
# There are two options for replacing |today|: either, you set today to some
@@ -68,8 +66,8 @@
6866
# List of documents that shouldn't be included in the build.
6967
# unused_docs = []
7068

71-
# List of directories, relative to source directory, that shouldn't be searched
72-
# for source files.
69+
# List of directories, relative to source directory, that shouldn't be searched for
70+
# source files.
7371
exclude_trees = ["build"]
7472

7573
# The reST default role (used for this markup: `text`) to use for all documents.
@@ -78,58 +76,59 @@
7876
# If true, '()' will be appended to :func: etc. cross-reference text.
7977
# add_function_parentheses = True
8078

81-
# If true, the current module name will be prepended to all description
82-
# unit titles (such as .. function::).
79+
# If true, the current module name will be prepended to all description unit titles
80+
# (such as .. function::).
8381
# add_module_names = True
8482

85-
# If true, sectionauthor and moduleauthor directives will be shown in the
86-
# output. They are ignored by default.
83+
# If true, sectionauthor and moduleauthor directives will be shown in the output.
84+
# They are ignored by default.
8785
# show_authors = False
8886

8987
# The name of the Pygments (syntax highlighting) style to use.
9088
pygments_style = "sphinx"
9189

90+
manpages_url = "https://git-scm.com/docs/{page}"
91+
9292

9393
# Options for HTML output
9494
# -----------------------
9595

9696
html_theme = "sphinx_rtd_theme"
9797
html_theme_options = {}
9898

99-
# The name for this set of Sphinx documents. If None, it defaults to
100-
# "<project> v<release> documentation".
99+
# The name for this set of Sphinx documents.
100+
# If None, it defaults to "<project> v<release> documentation".
101101
# html_title = None
102102

103-
# A shorter title for the navigation bar. Default is the same as html_title.
103+
# A shorter title for the navigation bar. Default is the same as html_title.
104104
# html_short_title = None
105105

106-
# The name of an image file (relative to this directory) to place at the top
107-
# of the sidebar.
106+
# The name of an image file (relative to this directory) to place at the top of the
107+
# sidebar.
108108
# html_logo = None
109109

110-
# The name of an image file (within the static path) to use as favicon of the
111-
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
112-
# pixels large.
110+
# The name of an image file (within the static path) to use as favicon of the docs.
111+
# This file should be a Windows icon file (.ico) being 16x16 or 32x32 pixels large.
113112
# html_favicon = None
114113

115-
# Add any paths that contain custom static files (such as style sheets) here,
116-
# relative to this directory. They are copied after the builtin static files,
117-
# so a file named "default.css" will overwrite the builtin "default.css".
114+
# Add any paths that contain custom static files (such as style sheets) here, relative
115+
# to this directory. They are copied after the builtin static files, so a file named
116+
# "default.css" will overwrite the builtin "default.css".
118117
html_static_path = []
119118

120-
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
121-
# using the given strftime format.
119+
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, using the
120+
# given strftime format.
122121
# html_last_updated_fmt = '%b %d, %Y'
123122

124-
# If true, SmartyPants will be used to convert quotes and dashes to
125-
# typographically correct entities.
123+
# If true, SmartyPants will be used to convert quotes and dashes to typographically
124+
# correct entities.
126125
# html_use_smartypants = True
127126

128127
# Custom sidebar templates, maps document names to template names.
129128
# html_sidebars = {}
130129

131-
# Additional templates that should be rendered to pages, maps page names to
132-
# template names.
130+
# Additional templates that should be rendered to pages, maps page names to template
131+
# names.
133132
# html_additional_pages = {}
134133

135134
# If false, no module index is generated.
@@ -144,9 +143,9 @@
144143
# If true, the reST sources are included in the HTML build as _sources/<name>.
145144
# html_copy_source = True
146145

147-
# If true, an OpenSearch description file will be output, and all pages will
148-
# contain a <link> tag referring to it. The value of this option must be the
149-
# base URL from which the finished HTML is served.
146+
# If true, an OpenSearch description file will be output, and all pages will contain a
147+
# <link> tag referring to it. The value of this option must be the base URL from which
148+
# the finished HTML is served.
150149
# html_use_opensearch = ''
151150

152151
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
@@ -171,8 +170,8 @@
171170
("index", "GitPython.tex", "GitPython Documentation", "Michael Trier", "manual"),
172171
]
173172

174-
# The name of an image file (relative to this directory) to place at the top of
175-
# the title page.
173+
# The name of an image file (relative to this directory) to place at the top of the
174+
# title page.
176175
# latex_logo = None
177176

178177
# For "manual" documents, if this is true, then toplevel headings are parts,

‎git/cmd.py

Copy file name to clipboardExpand all lines: git/cmd.py
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,8 @@ def working_dir(self) -> Union[None, PathLike]:
901901
def version_info(self) -> Tuple[int, ...]:
902902
"""
903903
:return: Tuple with integers representing the major, minor and additional
904-
version numbers as parsed from ``git version``. Up to four fields are used.
904+
version numbers as parsed from :manpage:`git-version(1)`. Up to four fields
905+
are used.
905906
906907
This value is generated on demand and is cached.
907908
"""
@@ -1038,9 +1039,9 @@ def execute(
10381039
3. Deeper descendants do not receive signals, though they may sometimes
10391040
terminate as a consequence of their parent processes being killed.
10401041
4. `kill_after_timeout` uses ``SIGKILL``, which can have negative side
1041-
effects on a repository. For example, stale locks in case of ``git gc``
1042-
could render the repository incapable of accepting changes until the lock
1043-
is manually removed.
1042+
effects on a repository. For example, stale locks in case of
1043+
:manpage:`git-gc(1)` could render the repository incapable of accepting
1044+
changes until the lock is manually removed.
10441045
10451046
:param with_stdout:
10461047
If ``True``, default ``True``, we open stdout on the created process.

‎git/config.py

Copy file name to clipboardExpand all lines: git/config.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def get_config_path(config_level: Lit_config_levels) -> str:
270270
class GitConfigParser(cp.RawConfigParser, metaclass=MetaParserBuilder):
271271
"""Implements specifics required to read git style configuration files.
272272
273-
This variation behaves much like the ``git config`` command, such that the
273+
This variation behaves much like the :manpage:`git-config(1)` command, such that the
274274
configuration will be read on demand based on the filepath given during
275275
initialization.
276276

‎git/db.py

Copy file name to clipboardExpand all lines: git/db.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def partial_to_complete_sha_hex(self, partial_hexsha: str) -> bytes:
5959
:raise gitdb.exc.BadObject:
6060
6161
:note:
62-
Currently we only raise :class:`~gitdb.exc.BadObject` as git does not
62+
Currently we only raise :exc:`~gitdb.exc.BadObject` as git does not
6363
communicate ambiguous objects separately.
6464
"""
6565
try:

‎git/diff.py

Copy file name to clipboardExpand all lines: git/diff.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ def diff(
222222
to be read and diffed.
223223
224224
:param kwargs:
225-
Additional arguments passed to ``git diff``, such as ``R=True`` to swap both
226-
sides of the diff.
225+
Additional arguments passed to :manpage:`git-diff(1)`, such as ``R=True`` to
226+
swap both sides of the diff.
227227
228228
:return:
229229
A :class:`DiffIndex` representing the computed diff.
@@ -590,7 +590,7 @@ def _index_from_patch_format(cls, repo: "Repo", proc: Union["Popen", "Git.AutoIn
590590
The repository we are operating on.
591591
592592
:param proc:
593-
``git diff`` process to read from
593+
:manpage:`git-diff(1)` process to read from
594594
(supports :class:`Git.AutoInterrupt <git.cmd.Git.AutoInterrupt>` wrapper).
595595
596596
:return:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.