Skip to content

Commit 4b04d8a

Browse files
committed
Better clarify Submodule.branch_path documentation
This revisits the changes in 3813bfb and takes a different approach, using the phrase "full repository-relative path" that is used elsewhere in the documentation and seems clear in context. Although this brings back the potential confusion around having the terms "full" and "relative" used together to describe a path, this may no longer be an issue now that the phrase "repository-relative" is used here as it is elsewhere. (In particular, see the SymbolicReference.to_full_path docstring.)
1 parent 5cf5b60 commit 4b04d8a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

git/objects/submodule/base.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def __init__(
134134
The URL to the remote repository which is the submodule.
135135
136136
:param branch_path:
137-
Complete relative path to ref to checkout when cloning the remote
137+
Full repository-relative path to ref to checkout when cloning the remote
138138
repository.
139139
"""
140140
super().__init__(repo, binsha, mode, path)
@@ -1473,8 +1473,8 @@ def branch(self) -> "Head":
14731473
def branch_path(self) -> PathLike:
14741474
"""
14751475
:return:
1476-
Complete relative path as string to the branch we would checkout from the
1477-
remote and track
1476+
Full repository-relative path as string to the branch we would checkout from
1477+
the remote and track
14781478
"""
14791479
return self._branch_path
14801480

0 commit comments

Comments
 (0)