Skip to content

Commit 81dad7e

Browse files
committed
Add missing comment revisions in git/index/base.py
1 parent 1d3f275 commit 81dad7e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Diff for: git/index/base.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -1023,8 +1023,8 @@ def move(
10231023
was_dry_run = kwargs.pop("dry_run", kwargs.pop("n", None))
10241024
kwargs["dry_run"] = True
10251025

1026-
# First execute rename in dryrun so the command tells us what it actually does.
1027-
# (for later output)
1026+
# First execute rename in dryrun so the command tells us what it actually does
1027+
# (for later output).
10281028
out = []
10291029
mvlines = self.repo.git.mv(args, paths, **kwargs).splitlines()
10301030

@@ -1186,7 +1186,7 @@ def checkout(
11861186
def handle_stderr(proc: "Popen[bytes]", iter_checked_out_files: Iterable[PathLike]) -> None:
11871187
stderr_IO = proc.stderr
11881188
if not stderr_IO:
1189-
return None # return early if stderr empty
1189+
return None # Return early if stderr empty.
11901190
else:
11911191
stderr_bytes = stderr_IO.read()
11921192
# line contents:
@@ -1252,9 +1252,9 @@ def handle_stderr(proc: "Popen[bytes]", iter_checked_out_files: Iterable[PathLik
12521252
if isinstance(paths, str):
12531253
paths = [paths]
12541254

1255-
# make sure we have our entries loaded before we start checkout_index
1255+
# Make sure we have our entries loaded before we start checkout_index,
12561256
# which will hold a lock on it. We try to get the lock as well during
1257-
# our entries initialization
1257+
# our entries initialization.
12581258
self.entries
12591259

12601260
args.append("--stdin")
@@ -1267,7 +1267,7 @@ def handle_stderr(proc: "Popen[bytes]", iter_checked_out_files: Iterable[PathLik
12671267

12681268
for path in paths:
12691269
co_path = to_native_path_linux(self._to_relative_path(path))
1270-
# if the item is not in the index, it could be a directory
1270+
# If the item is not in the index, it could be a directory.
12711271
path_is_directory = False
12721272

12731273
try:
@@ -1347,8 +1347,8 @@ def reset(
13471347
If you want git-reset like behaviour, use *HEAD.reset* instead.
13481348
13491349
:return: self"""
1350-
# what we actually want to do is to merge the tree into our existing
1351-
# index, which is what git-read-tree does
1350+
# What we actually want to do is to merge the tree into our existing
1351+
# index, which is what git-read-tree does.
13521352
new_inst = type(self).from_tree(self.repo, commit)
13531353
if not paths:
13541354
self.entries = new_inst.entries
@@ -1360,7 +1360,7 @@ def reset(
13601360
key = entry_key(path, 0)
13611361
self.entries[key] = nie[key]
13621362
except KeyError:
1363-
# if key is not in theirs, it musn't be in ours
1363+
# If key is not in theirs, it musn't be in ours.
13641364
try:
13651365
del self.entries[key]
13661366
except KeyError:
@@ -1391,7 +1391,7 @@ def diff(
13911391
) -> git_diff.DiffIndex:
13921392
"""Diff this index against the working copy or a Tree or Commit object.
13931393
1394-
For a documentation of the parameters and return values, see
1394+
For documentation of the parameters and return values, see
13951395
:meth:`Diffable.diff <git.diff.Diffable.diff>`.
13961396
13971397
:note:
@@ -1413,7 +1413,7 @@ def diff(
14131413
other = self.repo.rev_parse(other)
14141414
# END object conversion
14151415

1416-
if isinstance(other, Object): # for Tree or Commit
1416+
if isinstance(other, Object): # For Tree or Commit.
14171417
# Invert the existing R flag.
14181418
cur_val = kwargs.get("R", False)
14191419
kwargs["R"] = not cur_val

0 commit comments

Comments
 (0)