@@ -225,11 +225,11 @@ def write(
225
225
226
226
:param ignore_extension_data:
227
227
If ``True``, the TREE type extension data read in the index will not be
228
- written to disk. NOTE that no extension data is actually written.
229
- Use this if you have altered the index and would like to use
230
- `` git write-tree`` afterwards to create a tree representing your written
231
- changes. If this data is present in the written index, ``git write-tree``
232
- will instead write the stored/cached tree.
228
+ written to disk. NOTE that no extension data is actually written. Use this
229
+ if you have altered the index and would like to use
230
+ :manpage:` git- write-tree(1)` afterwards to create a tree representing your
231
+ written changes. If this data is present in the written index,
232
+ :manpage:`git-write-tree(1)` will instead write the stored/cached tree.
233
233
Alternatively, use :meth:`write_tree` to handle this case automatically.
234
234
"""
235
235
# Make sure we have our entries read before getting a write lock.
@@ -343,7 +343,7 @@ def from_tree(cls, repo: "Repo", *treeish: Treeish, **kwargs: Any) -> "IndexFile
343
343
tree, tree 3 is the 'other' one.
344
344
345
345
:param kwargs:
346
- Additional arguments passed to `` git read-tree` `.
346
+ Additional arguments passed to :manpage:` git- read-tree(1) `.
347
347
348
348
:return:
349
349
New :class:`IndexFile` instance. It will point to a temporary index location
@@ -355,9 +355,9 @@ def from_tree(cls, repo: "Repo", *treeish: Treeish, **kwargs: Any) -> "IndexFile
355
355
automatically resolve more cases in a commonly correct manner. Specify
356
356
``trivial=True`` as a keyword argument to override that.
357
357
358
- As the underlying `` git read-tree`` command takes into account the current
359
- index, it will be temporarily moved out of the way to prevent any unexpected
360
- interference.
358
+ As the underlying :manpage:` git- read-tree(1)` command takes into account the
359
+ current index, it will be temporarily moved out of the way to prevent any
360
+ unexpected interference.
361
361
"""
362
362
if len (treeish ) == 0 or len (treeish ) > 3 :
363
363
raise ValueError ("Please specify between 1 and 3 treeish, got %i" % len (treeish ))
@@ -470,10 +470,10 @@ def _write_path_to_stdin(
470
470
In that case, it will return ``None``.
471
471
472
472
:note:
473
- There is a bug in git-update-index that prevents it from sending reports
474
- just in time. This is why we have a version that tries to read stdout and
475
- one which doesn't. In fact, the stdout is not important as the piped-in
476
- files are processed anyway and just in time.
473
+ There is a bug in :manpage:` git-update-index(1)` that prevents it from
474
+ sending reports just in time. This is why we have a version that tries to
475
+ read stdout and one which doesn't. In fact, the stdout is not important as
476
+ the piped-in files are processed anyway and just in time.
477
477
478
478
:note:
479
479
Newlines are essential here, git's behaviour is somewhat inconsistent on
@@ -782,11 +782,12 @@ def add(
782
782
directories like ``lib``, which will add all the files within the
783
783
directory and subdirectories.
784
784
785
- This equals a straight `` git add` `.
785
+ This equals a straight :manpage:` git- add(1) `.
786
786
787
787
They are added at stage 0.
788
788
789
- - :class:~`git.objects.blob.Blob` or :class:`~git.objects.submodule.base.Submodule` object
789
+ - :class:~`git.objects.blob.Blob` or
790
+ :class:`~git.objects.submodule.base.Submodule` object
790
791
791
792
Blobs are added as they are assuming a valid mode is set.
792
793
@@ -818,8 +819,8 @@ def add(
818
819
:param force:
819
820
**CURRENTLY INEFFECTIVE**
820
821
If ``True``, otherwise ignored or excluded files will be added anyway. As
821
- opposed to the `` git add`` command, we enable this flag by default as the
822
- API user usually wants the item to be added even though they might be
822
+ opposed to the :manpage:` git- add(1)` command, we enable this flag by default
823
+ as the API user usually wants the item to be added even though they might be
823
824
excluded.
824
825
825
826
:param fprogress:
@@ -850,8 +851,8 @@ def add(
850
851
:param write_extension_data:
851
852
If ``True``, extension data will be written back to the index. This can lead
852
853
to issues in case it is containing the 'TREE' extension, which will cause
853
- the `` git commit`` command to write an old tree, instead of a new one
854
- representing the now changed index.
854
+ the :manpage:` git- commit(1)` command to write an old tree, instead of a new
855
+ one representing the now changed index.
855
856
856
857
This doesn't matter if you use :meth:`IndexFile.commit`, which ignores the
857
858
'TREE' extension altogether. You should set it to ``True`` if you intend to
@@ -1008,8 +1009,8 @@ def remove(
1008
1009
uncommitted changes in it.
1009
1010
1010
1011
:param kwargs:
1011
- Additional keyword arguments to be passed to `` git rm`` , such as ``r`` to
1012
- allow recursive removal.
1012
+ Additional keyword arguments to be passed to :manpage:` git-rm(1)` , such as
1013
+ ``r`` to allow recursive removal.
1013
1014
1014
1015
:return:
1015
1016
List(path_string, ...) list of repository relative paths that have been
@@ -1058,7 +1059,7 @@ def move(
1058
1059
skipped.
1059
1060
1060
1061
:param kwargs:
1061
- Additional arguments you would like to pass to `` git mv` `, such as
1062
+ Additional arguments you would like to pass to :manpage:` git-mv(1) `, such as
1062
1063
``dry_run`` or ``force``.
1063
1064
1064
1065
:return:
@@ -1224,7 +1225,7 @@ def checkout(
1224
1225
prior and after a file has been checked out.
1225
1226
1226
1227
:param kwargs:
1227
- Additional arguments to be passed to `` git checkout-index` `.
1228
+ Additional arguments to be passed to :manpage:` git- checkout-index(1) `.
1228
1229
1229
1230
:return:
1230
1231
Iterable yielding paths to files which have been checked out and are
@@ -1243,8 +1244,8 @@ def checkout(
1243
1244
The checkout is limited to checking out the files in the index. Files which
1244
1245
are not in the index anymore and exist in the working tree will not be
1245
1246
deleted. This behaviour is fundamentally different to ``head.checkout``,
1246
- i.e. if you want `` git checkout`` like behaviour, use ``head.checkout``
1247
- instead of ``index.checkout``.
1247
+ i.e. if you want :manpage:` git- checkout(1)`- like behaviour, use
1248
+ ``head.checkout`` instead of ``index.checkout``.
1248
1249
"""
1249
1250
args = ["--index" ]
1250
1251
if force :
@@ -1416,14 +1417,14 @@ def reset(
1416
1417
raised.
1417
1418
1418
1419
:param kwargs:
1419
- Additional keyword arguments passed to `` git reset` `.
1420
+ Additional keyword arguments passed to :manpage:` git- reset(1) `.
1420
1421
1421
1422
:note:
1422
1423
:meth:`IndexFile.reset`, as opposed to
1423
1424
:meth:`HEAD.reset <git.refs.head.HEAD.reset>`, will not delete any files in
1424
1425
order to maintain a consistent working tree. Instead, it will just check out
1425
1426
the files according to their state in the index.
1426
- If you want `` git reset` `-like behaviour, use
1427
+ If you want :manpage:` git- reset(1) `-like behaviour, use
1427
1428
:meth:`HEAD.reset <git.refs.head.HEAD.reset>` instead.
1428
1429
1429
1430
:return:
0 commit comments