Skip to content

Commit a20d5db

Browse files
committed
typos
1 parent 5d16396 commit a20d5db

18 files changed

+68
-69
lines changed

Diff for: .pre-commit-config.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ repos:
33
rev: v1.16.26
44
hooks:
55
- id: typos
6-
# empty to do not write fixes
7-
# args: []
6+
args: [] # empty to do not write fixes
87
exclude: pyproject.toml
98

109
- repo: https://github.com/astral-sh/ruff-pre-commit

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ In the less common case that you do not want to install test dependencies, `pip
101101

102102
#### With editable *dependencies* (not preferred, and rarely needed)
103103

104-
In rare cases, you may want to work on GitPython and one or both of its [gitdb](https://github.com/gitpython-developers/gitdb) and [smmap](https://github.com/gitpython-developers/smmap) dependencies at the same time, with changes in your local working copy of gitdb or smmap immediatley reflected in the behavior of your local working copy of GitPython. This can be done by making editable installations of those dependencies in the same virtual environment where you install GitPython.
104+
In rare cases, you may want to work on GitPython and one or both of its [gitdb](https://github.com/gitpython-developers/gitdb) and [smmap](https://github.com/gitpython-developers/smmap) dependencies at the same time, with changes in your local working copy of gitdb or smmap immediately reflected in the behavior of your local working copy of GitPython. This can be done by making editable installations of those dependencies in the same virtual environment where you install GitPython.
105105

106106
If you want to do that *and* you want the versions in GitPython's git submodules to be used, then pass `-e git/ext/gitdb` and/or `-e git/ext/gitdb/gitdb/ext/smmap` to `pip install`. This can be done in any order, and in separate `pip install` commands or the same one, so long as `-e` appears before *each* path. For example, you can install GitPython, gitdb, and smmap editably in the currently active virtual environment this way:
107107

@@ -234,7 +234,7 @@ Please have a look at the [contributions file][contributing].
234234
- [Loki](https://github.com/Neo23x0/Loki)
235235
- [Omniwallet](https://github.com/OmniLayer/omniwallet)
236236
- [GitViper](https://github.com/BeayemX/GitViper)
237-
- [Git Gud](https://github.com/bthayer2365/git-gud)
237+
- [Git Good](https://github.com/bthayer2365/git-gud)
238238

239239
### LICENSE
240240

Diff for: doc/source/changes.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ https://github.com/gitpython-developers/GitPython/releases/tag/3.1.42
2020
3.1.41
2121
======
2222

23-
This release is relevant for security as it fixes a possible arbitary
23+
This release is relevant for security as it fixes a possible arbitrary
2424
code execution on Windows.
2525

2626
See this PR for details: https://github.com/gitpython-developers/GitPython/pull/1792

Diff for: git/index/base.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def _delete_entries_cache(self) -> None:
194194

195195
def _deserialize(self, stream: IO) -> "IndexFile":
196196
"""Initialize this instance with index values read from the given stream."""
197-
self.version, self.entries, self._extension_data, _conten_sha = read_cache(stream)
197+
self.version, self.entries, self._extension_data, _contain_sha = read_cache(stream)
198198
return self
199199

200200
def _entries_sorted(self) -> List[IndexEntry]:
@@ -439,9 +439,9 @@ def raise_exc(e: Exception) -> NoReturn:
439439
# END glob handling
440440
try:
441441
for root, _dirs, files in os.walk(abs_path, onerror=raise_exc):
442-
for rela_file in files:
442+
for real_file in files:
443443
# Add relative paths only.
444-
yield osp.join(root.replace(rs, ""), rela_file)
444+
yield osp.join(root.replace(rs, ""), real_file)
445445
# END for each file in subdir
446446
# END for each subdirectory
447447
except OSError:
@@ -951,7 +951,7 @@ def handle_null_entries(self: "IndexFile") -> None:
951951

952952
return entries_added
953953

954-
def _items_to_rela_paths(
954+
def _items_to_real_paths(
955955
self,
956956
items: Union[PathLike, Sequence[Union[PathLike, BaseIndexEntry, Blob, Submodule]]],
957957
) -> List[PathLike]:
@@ -1025,7 +1025,7 @@ def remove(
10251025
args.append("--")
10261026

10271027
# Preprocess paths.
1028-
paths = self._items_to_rela_paths(items)
1028+
paths = self._items_to_real_paths(items)
10291029
removed_paths = self.repo.git.rm(args, paths, **kwargs).splitlines()
10301030

10311031
# Process output to gain proper paths.
@@ -1078,7 +1078,7 @@ def move(
10781078
if skip_errors:
10791079
args.append("-k")
10801080

1081-
paths = self._items_to_rela_paths(items)
1081+
paths = self._items_to_real_paths(items)
10821082
if len(paths) < 2:
10831083
raise ValueError("Please provide at least one source and one destination of the move operation")
10841084

Diff for: git/objects/submodule/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -416,11 +416,11 @@ def _write_git_file_and_module_config(cls, working_tree_dir: PathLike, module_ab
416416
Absolute path to the bare repository.
417417
"""
418418
git_file = osp.join(working_tree_dir, ".git")
419-
rela_path = osp.relpath(module_abspath, start=working_tree_dir)
419+
real_path = osp.relpath(module_abspath, start=working_tree_dir)
420420
if sys.platform == "win32" and osp.isfile(git_file):
421421
os.remove(git_file)
422422
with open(git_file, "wb") as fp:
423-
fp.write(("gitdir: %s" % rela_path).encode(defenc))
423+
fp.write(("gitdir: %s" % real_path).encode(defenc))
424424

425425
with GitConfigParser(osp.join(module_abspath, "config"), read_only=False, merge_includes=False) as writer:
426426
writer.set_value(

Diff for: git/objects/util.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -568,11 +568,11 @@ def addToStack(
568568
yield rval
569569

570570
# Only continue to next level if this is appropriate!
571-
nd = d + 1
572-
if depth > -1 and nd > depth:
571+
nb = d + 1
572+
if depth > -1 and nb > depth:
573573
continue
574574

575-
addToStack(stack, item, branch_first, nd)
575+
addToStack(stack, item, branch_first, nb)
576576
# END for each item on work stack
577577

578578

Diff for: git/refs/symbolic.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def _iter_packed_refs(cls, repo: "Repo") -> Iterator[Tuple[str, str]]:
134134
# that can go on this line, as per comments in git file
135135
# refs/packed-backend.c
136136
# I looked at master on 2017-10-11,
137-
# commit 111ef79afe, after tag v2.15.0-rc1
137+
# commit 111ef79safe, after tag v2.15.0-rc1
138138
# from repo https://github.com/git/git.git
139139
if line.startswith("# pack-refs with:") and "peeled" not in line:
140140
raise TypeError("PackingType of packed-Refs not understood: %r" % line)
@@ -226,7 +226,7 @@ def _get_ref_info_helper(
226226
:return:
227227
*(str(sha), str(target_ref_path))*, where:
228228
229-
* *sha* is of the file at rela_path points to if available, or ``None``.
229+
* *sha* is of the file at real_path points to if available, or ``None``.
230230
* *target_ref_path* is the reference we point to, or ``None``.
231231
"""
232232
if ref_path:
@@ -272,7 +272,7 @@ def _get_ref_info(cls, repo: "Repo", ref_path: Union[PathLike, None]) -> Union[T
272272
:return:
273273
*(str(sha), str(target_ref_path))*, where:
274274
275-
* *sha* is of the file at rela_path points to if available, or ``None``.
275+
* *sha* is of the file at real_path points to if available, or ``None``.
276276
* *target_ref_path* is the reference we point to, or ``None``.
277277
"""
278278
return cls._get_ref_info_helper(repo, ref_path)
@@ -813,7 +813,7 @@ def _iter_items(
813813
) -> Iterator[T_References]:
814814
if common_path is None:
815815
common_path = cls._common_path_default
816-
rela_paths = set()
816+
real_paths = set()
817817

818818
# Walk loose refs.
819819
# Currently we do not follow links.
@@ -828,19 +828,19 @@ def _iter_items(
828828
if f == "packed-refs":
829829
continue
830830
abs_path = to_native_path_linux(join_path(root, f))
831-
rela_paths.add(abs_path.replace(to_native_path_linux(repo.common_dir) + "/", ""))
831+
real_paths.add(abs_path.replace(to_native_path_linux(repo.common_dir) + "/", ""))
832832
# END for each file in root directory
833833
# END for each directory to walk
834834

835835
# Read packed refs.
836-
for _sha, rela_path in cls._iter_packed_refs(repo):
837-
if rela_path.startswith(str(common_path)):
838-
rela_paths.add(rela_path)
836+
for _sha, real_path in cls._iter_packed_refs(repo):
837+
if real_path.startswith(str(common_path)):
838+
real_paths.add(real_path)
839839
# END relative path matches common path
840840
# END packed refs reading
841841

842842
# Yield paths in sorted order.
843-
for path in sorted(rela_paths):
843+
for path in sorted(real_paths):
844844
try:
845845
yield cls.from_path(repo, path)
846846
except ValueError:

Diff for: git/util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ def _parse_progress_line(self, line: AnyStr) -> None:
652652
op_code |= self.CHECKING_OUT
653653
else:
654654
# Note: On Windows it can happen that partial lines are sent.
655-
# Hence we get something like "CompreReceiving objects", which is
655+
# Hence we get something like "CompareReceiving objects", which is
656656
# a blend of "Compressing objects" and "Receiving objects".
657657
# This can't really be prevented, so we drop the line verbosely
658658
# to make sure we get informed in case the process spits out new

Diff for: test/fixtures/commit_with_gpgsig

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ gpgsig -----BEGIN PGP SIGNATURE-----
1313
Tack6sxIdK7NXJhV5gAeAOMJBGhO0fHl8UUr96vGEKwtxyZhWf8cuIPOWLk06jA0
1414
g9DpLqmy/pvyRfiPci+24YdYRBua/vta+yo/Lp85N7Hu/cpIh+q5WSLvUlv09Dmo
1515
TTTG8Hf6s3lEej7W8z2xcNZoB6GwXd8buSDU8cu0I6mEO9sNtAuUOHp2dBvTA6cX
16-
PuQW8jg3zofnx7CyNcd3KF3nh2z8mBcDLgh0Q84srZJCPRuxRcp9ylggvAG7iaNd
16+
PuQW8jg3zofnx7CyNcd3KF3nh2z8mBcDLgh0Q84srZJCPRuxRcp9ylggvAG7iaAnd
1717
XMNvSK8IZtWLkx7k3A3QYt1cN4y1zdSHLR2S+BVCEJea1mvUE+jK5wiB9S4XNtKm
1818
BX/otlTa8pNE3fWYBxURvfHnMY4i3HQT7Bc1QjImAhMnyo2vJk4ORBJIZ1FTNIhJ
1919
JzJMZDRLQLFvnzqZuCjE

Diff for: test/fixtures/diff_mode_only

+9-9
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ index d873924860bf4da06ac93db5c6a188f63dd1c3cc..57da75f05e28e8a256922bf345ccd390
260260
+ # :text:: to_text, text/plain
261261
+ # :html:: to_html, text/html or application/xhtml+xml or application/html
262262
+ # :xml:: to_xml, application/xml or text/xml or application/x-xml, adds "Encoding: UTF-8" response header
263-
+ # :js:: to_json, text/javascript ot application/javascript or application/x-javascript
263+
+ # :js:: to_json, text/javascript to application/javascript or application/x-javascript
264264
+ # :json:: to_json, application/json or text/x-json
265265
+ Merb.available_mime_types.clear
266266
+ Merb.add_mime_type(:all, nil, %w[*/*])
@@ -415,7 +415,7 @@ index d17570786ca318cff7201c4b1e947ae229b01de8..ff9abe4d1c452aeabfcf5f7dc7a2c7cd
415415

416416
# Any specific outgoing headers should be included here. These are not
417417
# the content-type header but anything in addition to it.
418-
- # +tranform_method+ should be set to a symbol of the method used to
418+
- # +transform_method+ should be set to a symbol of the method used to
419419
+ # +transform_method+ should be set to a symbol of the method used to
420420
# transform a resource into this mime type.
421421
# For example for the :xml mime type an object might be transformed by
@@ -433,7 +433,7 @@ index d17570786ca318cff7201c4b1e947ae229b01de8..ff9abe4d1c452aeabfcf5f7dc7a2c7cd
433433
- # :text:: to_text, text/plain
434434
- # :html:: to_html, text/html or application/xhtml+xml or application/html
435435
- # :xml:: to_xml, application/xml or text/xml or application/x-xml, adds "Encoding: UTF-8" response header
436-
- # :js:: to_json, text/javascript ot application/javascript or application/x-javascript
436+
- # :js:: to_json, text/javascript to application/javascript or application/x-javascript
437437
- # :json:: to_json, application/json or text/x-json
438438
- def reset_default_mime_types!
439439
- available_mime_types.clear
@@ -509,15 +509,15 @@ index e910b2b32c844ab51cf2a10d0ad26c314dbb3631..5ac67fb907aaf9f95effc7eb3cbb07b8
509509
- # ==== Returns
510510
- # The current list of formats provided for this instance of the controller.
511511
- # It starts with what has been set in the controller (or :html by default)
512-
- # but can be modifed on a per-action basis.
512+
- # but can be modified on a per-action basis.
513513
- def _provided_formats
514514
- @_provided_formats ||= class_provided_formats.dup
515515
+ end
516516
+
517517
+ # ==== Returns
518518
+ # The current list of formats provided for this instance of the controller.
519519
+ # It starts with what has been set in the controller (or :html by default)
520-
+ # but can be modifed on a per-action basis.
520+
+ # but can be modified on a per-action basis.
521521
+ def _provided_formats
522522
+ @_provided_formats ||= class_provided_formats.dup
523523
+ end
@@ -531,7 +531,7 @@ index e910b2b32c844ab51cf2a10d0ad26c314dbb3631..5ac67fb907aaf9f95effc7eb3cbb07b8
531531
+ #
532532
+ # ==== Raises
533533
+ # Merb::ResponderMixin::ContentTypeAlreadySet::
534-
+ # Content negotiation already occured, and the content_type is set.
534+
+ # Content negotiation already occurred, and the content_type is set.
535535
+ #
536536
+ # ==== Returns
537537
+ # Array:: List of formats passed in
@@ -549,7 +549,7 @@ index e910b2b32c844ab51cf2a10d0ad26c314dbb3631..5ac67fb907aaf9f95effc7eb3cbb07b8
549549
- #
550550
- # ==== Raises
551551
- # Merb::ResponderMixin::ContentTypeAlreadySet::
552-
- # Content negotiation already occured, and the content_type is set.
552+
- # Content negotiation already occurred, and the content_type is set.
553553
- #
554554
- # ==== Returns
555555
- # Array:: List of formats passed in
@@ -574,7 +574,7 @@ index e910b2b32c844ab51cf2a10d0ad26c314dbb3631..5ac67fb907aaf9f95effc7eb3cbb07b8
574574
+ #
575575
+ # ==== Raises
576576
+ # Merb::ResponderMixin::ContentTypeAlreadySet::
577-
+ # Content negotiation already occured, and the content_type is set.
577+
+ # Content negotiation already occurred, and the content_type is set.
578578
+ #
579579
+ # ==== Returns
580580
+ # Array:: List of formats passed in
@@ -597,7 +597,7 @@ index e910b2b32c844ab51cf2a10d0ad26c314dbb3631..5ac67fb907aaf9f95effc7eb3cbb07b8
597597
- #
598598
- # ==== Raises
599599
- # Merb::ResponderMixin::ContentTypeAlreadySet::
600-
- # Content negotiation already occured, and the content_type is set.
600+
- # Content negotiation already occurred, and the content_type is set.
601601
- #
602602
- # ==== Returns
603603
- # Array:: List of formats passed in

0 commit comments

Comments
 (0)