Skip to content

Commit f913b57

Browse files
committed
manual fixing
1 parent a20d5db commit f913b57

File tree

11 files changed

+48
-48
lines changed

11 files changed

+48
-48
lines changed

Diff for: .pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/crate-ci/typos
3-
rev: v1.16.26
3+
rev: v1.19.0
44
hooks:
55
- id: typos
66
args: [] # empty to do not write fixes

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, _contain_sha = read_cache(stream)
197+
self.version, self.entries, self._extension_data, _content_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 real_file in files:
442+
for relative_fpath in files:
443443
# Add relative paths only.
444-
yield osp.join(root.replace(rs, ""), real_file)
444+
yield osp.join(root.replace(rs, ""), relative_fpath)
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_real_paths(
954+
def _items_to_relative_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_real_paths(items)
1028+
paths = self._items_to_relative_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_real_paths(items)
1081+
paths = self._items_to_relative_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-
real_path = osp.relpath(module_abspath, start=working_tree_dir)
419+
relative_fpath = 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" % real_path).encode(defenc))
423+
fp.write(("gitdir: %s" % relative_fpath).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/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 111ef79safe, after tag v2.15.0-rc1
137+
# commit 111ef79afe, 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 real_path points to if available, or ``None``.
229+
* *sha* is of the file at relative_fpath 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 real_path points to if available, or ``None``.
275+
* *sha* is of the file at relative_fpath 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-
real_paths = set()
816+
relative_fpaths = 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-
real_paths.add(abs_path.replace(to_native_path_linux(repo.common_dir) + "/", ""))
831+
relative_fpaths.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, real_path in cls._iter_packed_refs(repo):
837-
if real_path.startswith(str(common_path)):
838-
real_paths.add(real_path)
836+
for _sha, relative_fpath in cls._iter_packed_refs(repo):
837+
if relative_fpath.startswith(str(common_path)):
838+
relative_fpaths.add(relative_fpath)
839839
# END relative path matches common path
840840
# END packed refs reading
841841

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

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-
PuQW8jg3zofnx7CyNcd3KF3nh2z8mBcDLgh0Q84srZJCPRuxRcp9ylggvAG7iaAnd
16+
PuQW8jg3zofnx7CyNcd3KF3nh2z8mBcDLgh0Q84srZJCPRuxRcp9ylggvAG7iaNd
1717
XMNvSK8IZtWLkx7k3A3QYt1cN4y1zdSHLR2S+BVCEJea1mvUE+jK5wiB9S4XNtKm
1818
BX/otlTa8pNE3fWYBxURvfHnMY4i3HQT7Bc1QjImAhMnyo2vJk4ORBJIZ1FTNIhJ
1919
JzJMZDRLQLFvnzqZuCjE

0 commit comments

Comments
 (0)