| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,37 +3,40 @@ | |||
| 3 | 3 | API Reference | |
| 4 | 4 | ============= | |
| 5 | 5 | ||
| 6 | - Version | ||
| 7 | - ------- | ||
| 6 | + Top-Level | ||
| 7 | + --------- | ||
| 8 | 8 | ||
| 9 | 9 | .. py:data:: git.__version__ | |
| 10 | 10 | ||
| 11 | 11 | Current GitPython version. | |
| 12 | 12 | ||
| 13 | + .. automodule:: git | ||
| 14 | + :members: refresh | ||
| 15 | + | ||
| 13 | 16 | Objects.Base | |
| 14 | 17 | ------------ | |
| 15 | 18 | ||
| 16 | 19 | .. automodule:: git.objects.base | |
| 17 | 20 | :members: | |
| 18 | 21 | :undoc-members: | |
| 19 | 22 | :special-members: | |
| 20 | - | ||
| 23 | + | ||
| 21 | 24 | Objects.Blob | |
| 22 | 25 | ------------ | |
| 23 | 26 | ||
| 24 | 27 | .. automodule:: git.objects.blob | |
| 25 | 28 | :members: | |
| 26 | 29 | :undoc-members: | |
| 27 | 30 | :special-members: | |
| 28 | - | ||
| 31 | + | ||
| 29 | 32 | Objects.Commit | |
| 30 | 33 | -------------- | |
| 31 | 34 | ||
| 32 | 35 | .. automodule:: git.objects.commit | |
| 33 | 36 | :members: | |
| 34 | 37 | :undoc-members: | |
| 35 | 38 | :special-members: | |
| 36 | - | ||
| 39 | + | ||
| 37 | 40 | Objects.Tag | |
| 38 | 41 | ----------- | |
| 39 | 42 | ||
@@ -73,15 +76,15 @@ Objects.Submodule.root | |||
| 73 | 76 | :members: | |
| 74 | 77 | :undoc-members: | |
| 75 | 78 | :special-members: | |
| 76 | - | ||
| 79 | + | ||
| 77 | 80 | Objects.Submodule.util | |
| 78 | 81 | ---------------------- | |
| 79 | 82 | ||
| 80 | 83 | .. automodule:: git.objects.submodule.util | |
| 81 | 84 | :members: | |
| 82 | 85 | :undoc-members: | |
| 83 | 86 | :special-members: | |
| 84 | - | ||
| 87 | + | ||
| 85 | 88 | Objects.Util | |
| 86 | 89 | ------------- | |
| 87 | 90 | ||
@@ -105,23 +108,23 @@ Index.Functions | |||
| 105 | 108 | :members: | |
| 106 | 109 | :undoc-members: | |
| 107 | 110 | :special-members: | |
| 108 | - | ||
| 111 | + | ||
| 109 | 112 | Index.Types | |
| 110 | 113 | ----------- | |
| 111 | 114 | ||
| 112 | 115 | .. automodule:: git.index.typ | |
| 113 | 116 | :members: | |
| 114 | 117 | :undoc-members: | |
| 115 | 118 | :special-members: | |
| 116 | - | ||
| 119 | + | ||
| 117 | 120 | Index.Util | |
| 118 | 121 | ------------- | |
| 119 | 122 | ||
| 120 | 123 | .. automodule:: git.index.util | |
| 121 | 124 | :members: | |
| 122 | 125 | :undoc-members: | |
| 123 | 126 | :special-members: | |
| 124 | - | ||
| 127 | + | ||
| 125 | 128 | GitCmd | |
| 126 | 129 | ------ | |
| 127 | 130 | ||
@@ -137,7 +140,7 @@ Config | |||
| 137 | 140 | :members: | |
| 138 | 141 | :undoc-members: | |
| 139 | 142 | :special-members: | |
| 140 | - | ||
| 143 | + | ||
| 141 | 144 | Diff | |
| 142 | 145 | ---- | |
| 143 | 146 | ||
@@ -154,15 +157,15 @@ Exceptions | |||
| 154 | 157 | :undoc-members: | |
| 155 | 158 | :special-members: | |
| 156 | 159 | ||
| 157 | - | ||
| 160 | + | ||
| 158 | 161 | Refs.symbolic | |
| 159 | 162 | ------------- | |
| 160 | 163 | ||
| 161 | 164 | .. automodule:: git.refs.symbolic | |
| 162 | 165 | :members: | |
| 163 | 166 | :undoc-members: | |
| 164 | 167 | :special-members: | |
| 165 | - | ||
| 168 | + | ||
| 166 | 169 | Refs.reference | |
| 167 | 170 | -------------- | |
| 168 | 171 | ||
@@ -178,31 +181,31 @@ Refs.head | |||
| 178 | 181 | :members: | |
| 179 | 182 | :undoc-members: | |
| 180 | 183 | :special-members: | |
| 181 | - | ||
| 184 | + | ||
| 182 | 185 | Refs.tag | |
| 183 | 186 | ------------ | |
| 184 | 187 | ||
| 185 | 188 | .. automodule:: git.refs.tag | |
| 186 | 189 | :members: | |
| 187 | 190 | :undoc-members: | |
| 188 | 191 | :special-members: | |
| 189 | - | ||
| 192 | + | ||
| 190 | 193 | Refs.remote | |
| 191 | 194 | ------------ | |
| 192 | 195 | ||
| 193 | 196 | .. automodule:: git.refs.remote | |
| 194 | 197 | :members: | |
| 195 | 198 | :undoc-members: | |
| 196 | 199 | :special-members: | |
| 197 | - | ||
| 200 | + | ||
| 198 | 201 | Refs.log | |
| 199 | 202 | ------------ | |
| 200 | 203 | ||
| 201 | 204 | .. automodule:: git.refs.log | |
| 202 | 205 | :members: | |
| 203 | 206 | :undoc-members: | |
| 204 | 207 | :special-members: | |
| 205 | - | ||
| 208 | + | ||
| 206 | 209 | Remote | |
| 207 | 210 | ------ | |
| 208 | 211 | ||
@@ -218,7 +221,7 @@ Repo.Base | |||
| 218 | 221 | :members: | |
| 219 | 222 | :undoc-members: | |
| 220 | 223 | :special-members: | |
| 221 | - | ||
| 224 | + | ||
| 222 | 225 | Repo.Functions | |
| 223 | 226 | -------------- | |
| 224 | 227 | ||
@@ -227,6 +230,30 @@ Repo.Functions | |||
| 227 | 230 | :undoc-members: | |
| 228 | 231 | :special-members: | |
| 229 | 232 | ||
| 233 | + Compat | ||
| 234 | + ------ | ||
| 235 | + | ||
| 236 | + .. automodule:: git.compat | ||
| 237 | + :members: | ||
| 238 | + :undoc-members: | ||
| 239 | + :special-members: | ||
| 240 | + | ||
| 241 | + DB | ||
| 242 | + -- | ||
| 243 | + | ||
| 244 | + .. automodule:: git.db | ||
| 245 | + :members: | ||
| 246 | + :undoc-members: | ||
| 247 | + :special-members: | ||
| 248 | + | ||
| 249 | + Types | ||
| 250 | + ----- | ||
| 251 | + | ||
| 252 | + .. automodule:: git.types | ||
| 253 | + :members: | ||
| 254 | + :undoc-members: | ||
| 255 | + :special-members: | ||
| 256 | + | ||
| 230 | 257 | Util | |
| 231 | 258 | ---- | |
| 232 | 259 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -389,7 +389,9 @@ def __setstate__(self, d: Dict[str, Any]) -> None: | |||
| 389 | 389 | ||
| 390 | 390 | @classmethod | |
| 391 | 391 | def refresh(cls, path: Union[None, PathLike] = None) -> bool: | |
| 392 | - """This gets called by the refresh function (see the top level ``__init__``). | ||
| 392 | + """Update information about the git executable :class:`Git` objects will use. | ||
| 393 | + | ||
| 394 | + Called by the :func:`git.refresh` function in the top level ``__init__``. | ||
| 393 | 395 | ||
| 394 | 396 | :param path: | |
| 395 | 397 | Optional path to the git executable. If not absolute, it is resolved | |
@@ -1486,7 +1488,9 @@ def _call_process( | |||
| 1486 | 1488 | def _parse_object_header(self, header_line: str) -> Tuple[str, str, int]: | |
| 1487 | 1489 | """ | |
| 1488 | 1490 | :param header_line: | |
| 1489 | - <hex_sha> type_string size_as_int | ||
| 1491 | + A line of the form:: | ||
| 1492 | + | ||
| 1493 | + <hex_sha> type_string size_as_int | ||
| 1490 | 1494 | ||
| 1491 | 1495 | :return: | |
| 1492 | 1496 | (hex_sha, type_string, size_as_int) | |
@@ -1576,7 +1580,7 @@ def get_object_data(self, ref: str) -> Tuple[str, str, int, bytes]: | |||
| 1576 | 1580 | return (hexsha, typename, size, data) | |
| 1577 | 1581 | ||
| 1578 | 1582 | def stream_object_data(self, ref: str) -> Tuple[str, str, int, "Git.CatFileContentStream"]: | |
| 1579 | - """Similar to :meth:`get_object_header`, but returns the data as a stream. | ||
| 1583 | + """Similar to :meth:`get_object_data`, but returns the data as a stream. | ||
| 1580 | 1584 | ||
| 1581 | 1585 | :return: | |
| 1582 | 1586 | (hexsha, type_string, size_as_int, stream) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -61,7 +61,7 @@ | |||
| 61 | 61 | ||
| 62 | 62 | :note: | |
| 63 | 63 | For macOS (Darwin), ``os.name == "posix"`` as in other Unix-like systems, while | |
| 64 | - ``sys.platform == "darwin"`. | ||
| 64 | + ``sys.platform == "darwin"``. | ||
| 65 | 65 | """ | |
| 66 | 66 | ||
| 67 | 67 | defenc = sys.getfilesystemencoding() | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -38,11 +38,12 @@ def __init__(self, root_path: PathLike, git: "Git") -> None: | |||
| 38 | 38 | self._git = git | |
| 39 | 39 | ||
| 40 | 40 | def info(self, binsha: bytes) -> OInfo: | |
| 41 | + """Get a git object header (using git itself).""" | ||
| 41 | 42 | hexsha, typename, size = self._git.get_object_header(bin_to_hex(binsha)) | |
| 42 | 43 | return OInfo(hex_to_bin(hexsha), typename, size) | |
| 43 | 44 | ||
| 44 | 45 | def stream(self, binsha: bytes) -> OStream: | |
| 45 | - """For now, all lookup is done by git itself""" | ||
| 46 | + """Get git object data as a stream supporting ``read()`` (using git itself).""" | ||
| 46 | 47 | hexsha, typename, size, stream = self._git.stream_object_data(bin_to_hex(binsha)) | |
| 47 | 48 | return OStream(hex_to_bin(hexsha), typename, size, stream) | |
| 48 | 49 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -338,7 +338,11 @@ class FetchInfo(IterableObj): | |||
| 338 | 338 | ||
| 339 | 339 | @classmethod | |
| 340 | 340 | def refresh(cls) -> Literal[True]: | |
| 341 | - """This gets called by the refresh function (see the top level ``__init__``).""" | ||
| 341 | + """Update information about which ``git fetch`` flags are supported by the git | ||
| 342 | + executable being used. | ||
| 343 | + | ||
| 344 | + Called by the :func:`git.refresh` function in the top level ``__init__``. | ||
| 345 | + """ | ||
| 342 | 346 | # Clear the old values in _flag_map. | |
| 343 | 347 | with contextlib.suppress(KeyError): | |
| 344 | 348 | del cls._flag_map["t"] | |
| Back | FazBrowse Home | New Git URL |
0 commit comments