summaryrefslogtreecommitdiff
path: root/git
diff options
context:
space:
mode:
Diffstat (limited to 'git')
-rw-r--r--git/config.py2
-rw-r--r--git/index/base.py8
-rw-r--r--git/index/fun.py2
-rw-r--r--git/objects/base.py2
-rw-r--r--git/objects/commit.py4
-rw-r--r--git/objects/submodule/root.py2
-rw-r--r--git/objects/util.py4
-rw-r--r--git/refs/symbolic.py2
-rw-r--r--git/refs/tag.py4
-rw-r--r--git/repo/base.py4
-rw-r--r--git/repo/fun.py2
-rw-r--r--git/types.py2
12 files changed, 19 insertions, 19 deletions
diff --git a/git/config.py b/git/config.py
index cbd66022..1ac3c9ce 100644
--- a/git/config.py
+++ b/git/config.py
@@ -71,7 +71,7 @@ CONDITIONAL_INCLUDE_REGEXP = re.compile(r"(?<=includeIf )\"(gitdir|gitdir/i|onbr
class MetaParserBuilder(abc.ABCMeta):
- """Utlity class wrapping base-class methods into decorators that assure read-only properties"""
+ """Utility class wrapping base-class methods into decorators that assure read-only properties"""
def __new__(cls, name: str, bases: Tuple, clsdict: Dict[str, Any]) -> 'MetaParserBuilder':
"""
Equip all base-class methods with a needs_values decorator, and all non-const methods
diff --git a/git/index/base.py b/git/index/base.py
index 209bfa8d..00e51bf5 100644
--- a/git/index/base.py
+++ b/git/index/base.py
@@ -579,7 +579,7 @@ class IndexFile(LazyMixin, git_diff.Diffable, Serializable):
def _to_relative_path(self, path: PathLike) -> PathLike:
"""
:return: Version of path relative to our git directory or raise ValueError
- if it is not within our git direcotory"""
+ if it is not within our git directory"""
if not osp.isabs(path):
return path
if self.repo.bare:
@@ -682,7 +682,7 @@ class IndexFile(LazyMixin, git_diff.Diffable, Serializable):
into the object database.
PathStrings may contain globs, such as 'lib/__init__*' or can be directories
- like 'lib', the latter ones will add all the files within the dirctory and
+ like 'lib', the latter ones will add all the files within the directory and
subdirectories.
This equals a straight git-add.
@@ -779,7 +779,7 @@ class IndexFile(LazyMixin, git_diff.Diffable, Serializable):
"At least one Entry has a null-mode - please use index.remove to remove files for clarity")
# END null mode should be remove
- # HANLDE ENTRY OBJECT CREATION
+ # HANDLE ENTRY OBJECT CREATION
# create objects if required, otherwise go with the existing shas
null_entries_indices = [i for i, e in enumerate(entries) if e.binsha == Object.NULL_BIN_SHA]
if null_entries_indices:
@@ -813,7 +813,7 @@ class IndexFile(LazyMixin, git_diff.Diffable, Serializable):
fprogress(entry.path, False, entry)
fprogress(entry.path, True, entry)
# END handle progress
- # END for each enty
+ # END for each entry
entries_added.extend(entries)
# END if there are base entries
diff --git a/git/index/fun.py b/git/index/fun.py
index 59fa1be1..acab7423 100644
--- a/git/index/fun.py
+++ b/git/index/fun.py
@@ -314,7 +314,7 @@ def write_tree_from_cache(entries: List[IndexEntry], odb: 'GitCmdObjectDB', sl:
# finally create the tree
sio = BytesIO()
- tree_to_stream(tree_items, sio.write) # writes to stream as bytes, but doesnt change tree_items
+ tree_to_stream(tree_items, sio.write) # writes to stream as bytes, but doesn't change tree_items
sio.seek(0)
istream = odb.store(IStream(str_tree_type, len(sio.getvalue()), sio))
diff --git a/git/objects/base.py b/git/objects/base.py
index a3b0f230..66e15a8f 100644
--- a/git/objects/base.py
+++ b/git/objects/base.py
@@ -32,7 +32,7 @@ IndexObjUnion = Union['Tree', 'Blob', 'Submodule']
# --------------------------------------------------------------------------
-_assertion_msg_format = "Created object %r whose python type %r disagrees with the acutual git object type %r"
+_assertion_msg_format = "Created object %r whose python type %r disagrees with the actual git object type %r"
__all__ = ("Object", "IndexObject")
diff --git a/git/objects/commit.py b/git/objects/commit.py
index 07355e7e..96a2a8e5 100644
--- a/git/objects/commit.py
+++ b/git/objects/commit.py
@@ -322,7 +322,7 @@ class Commit(base.Object, TraversableIterableObj, Diffable, Serializable):
Git messages can contain trailer information that are similar to RFC 822
e-mail headers (see: https://git-scm.com/docs/git-interpret-trailers).
- This funcions calls ``git interpret-trailers --parse`` onto the message
+ This functions calls ``git interpret-trailers --parse`` onto the message
to extract the trailer information. The key value pairs are stripped of
leading and trailing whitespaces before they get saved into a dictionary.
@@ -461,7 +461,7 @@ class Commit(base.Object, TraversableIterableObj, Diffable, Serializable):
# * Environment variables override configuration values
# * Sensible defaults are set according to the git documentation
- # COMMITER AND AUTHOR INFO
+ # COMMITTER AND AUTHOR INFO
cr = repo.config_reader()
env = os.environ
diff --git a/git/objects/submodule/root.py b/git/objects/submodule/root.py
index 5e84d161..08e1f954 100644
--- a/git/objects/submodule/root.py
+++ b/git/objects/submodule/root.py
@@ -338,7 +338,7 @@ class RootModule(Submodule):
sm.update(recursive=False, init=init, to_latest_revision=to_latest_revision,
progress=progress, dry_run=dry_run, force=force_reset, keep_going=keep_going)
- # update recursively depth first - question is which inconsitent
+ # update recursively depth first - question is which inconsistent
# state will be better in case it fails somewhere. Defective branch
# or defective depth. The RootSubmodule type will never process itself,
# which was done in the previous expression
diff --git a/git/objects/util.py b/git/objects/util.py
index 187318fe..800eccdf 100644
--- a/git/objects/util.py
+++ b/git/objects/util.py
@@ -37,7 +37,7 @@ if TYPE_CHECKING:
from .submodule.base import Submodule
from git.types import Protocol, runtime_checkable
else:
- # Protocol = Generic[_T] # NNeeded for typing bug #572?
+ # Protocol = Generic[_T] # Needed for typing bug #572?
Protocol = ABC
def runtime_checkable(f):
@@ -359,7 +359,7 @@ class Traversable(Protocol):
out: IterableList[Union['Commit', 'Submodule', 'Tree', 'Blob']] = IterableList(id)
out.extend(self.traverse(as_edge=as_edge, *args, **kwargs))
return out
- # overloads in subclasses (mypy does't allow typing self: subclass)
+ # overloads in subclasses (mypy doesn't allow typing self: subclass)
# Union[IterableList['Commit'], IterableList['Submodule'], IterableList[Union['Submodule', 'Tree', 'Blob']]]
else:
# Raise deprecationwarning, doesn't make sense to use this
diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py
index 1c550673..8d869173 100644
--- a/git/refs/symbolic.py
+++ b/git/refs/symbolic.py
@@ -298,7 +298,7 @@ class SymbolicReference(object):
logmsg: Union[str, None] = None) -> 'SymbolicReference':
"""Set ourselves to the given ref. It will stay a symbol if the ref is a Reference.
Otherwise an Object, given as Object instance or refspec, is assumed and if valid,
- will be set which effectively detaches the refererence if it was a purely
+ will be set which effectively detaches the reference if it was a purely
symbolic one.
:param ref: SymbolicReference instance, Object instance or refspec string
diff --git a/git/refs/tag.py b/git/refs/tag.py
index edfab33d..8cc79edd 100644
--- a/git/refs/tag.py
+++ b/git/refs/tag.py
@@ -36,7 +36,7 @@ class TagReference(Reference):
_common_path_default = Reference._common_path_default + "/" + _common_default
@property
- def commit(self) -> 'Commit': # type: ignore[override] # LazyMixin has unrelated comit method
+ def commit(self) -> 'Commit': # type: ignore[override] # LazyMixin has unrelated commit method
""":return: Commit object the tag ref points to
:raise ValueError: if the tag points to a tree or blob"""
@@ -91,7 +91,7 @@ class TagReference(Reference):
:param message:
Synonym for :param logmsg:
- Included for backwards compatability. :param logmsg is used in preference if both given.
+ Included for backwards compatibility. :param logmsg is used in preference if both given.
:param force:
If True, to force creation of a tag even though that tag already exists.
diff --git a/git/repo/base.py b/git/repo/base.py
index f8bc8128..bea0dcb5 100644
--- a/git/repo/base.py
+++ b/git/repo/base.py
@@ -711,7 +711,7 @@ class Repo(object):
index or the working copy have changes."""
if self._bare:
# Bare repositories with no associated working directory are
- # always consired to be clean.
+ # always considered to be clean.
return False
# start from the one which is fastest to evaluate
@@ -760,7 +760,7 @@ class Repo(object):
untracked_files=True,
as_process=True,
**kwargs)
- # Untracked files preffix in porcelain mode
+ # Untracked files prefix in porcelain mode
prefix = "?? "
untracked_files = []
for line in proc.stdout:
diff --git a/git/repo/fun.py b/git/repo/fun.py
index 1a83dd3d..74c0657d 100644
--- a/git/repo/fun.py
+++ b/git/repo/fun.py
@@ -266,7 +266,7 @@ def rev_parse(repo: 'Repo', rev: str) -> Union['Commit', 'Tag', 'Tree', 'Blob']:
# END handle tag
elif token == '@':
# try single int
- assert ref is not None, "Requre Reference to access reflog"
+ assert ref is not None, "Require Reference to access reflog"
revlog_index = None
try:
# transform reversed index into the format of our revlog
diff --git a/git/types.py b/git/types.py
index 64bf3d96..7f44ba24 100644
--- a/git/types.py
+++ b/git/types.py
@@ -54,7 +54,7 @@ ConfigLevels_Tup = Tuple[Literal['system'], Literal['user'], Literal['global'],
def assert_never(inp: NoReturn, raise_error: bool = True, exc: Union[Exception, None] = None) -> None:
"""For use in exhaustive checking of literal or Enum in if/else chain.
- Should only be reached if all memebers not handled OR attempt to pass non-members through chain.
+ Should only be reached if all members not handled OR attempt to pass non-members through chain.
If all members handled, type is Empty. Otherwise, will cause mypy error.
If non-members given, should cause mypy error at variable creation.