Skip to content

Commit 8dffba5

Browse files
scopByron
authored andcommitted
Spelling fixes
1 parent c23ae3a commit 8dffba5

17 files changed

+30
-30
lines changed

git/cmd.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ def execute(self, command,
540540
* str(output) if extended_output = False (Default)
541541
* tuple(int(status), str(stdout), str(stderr)) if extended_output = True
542542
543-
if ouput_stream is True, the stdout value will be your output stream:
543+
if output_stream is True, the stdout value will be your output stream:
544544
* output_stream if extended_output = False
545545
* tuple(int(status), output_stream, str(stderr)) if extended_output = True
546546

git/config.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,9 @@ def __init__(self, file_or_files, read_only=True, merge_includes=True):
212212
self._is_initialized = False
213213
self._merge_includes = merge_includes
214214
self._lock = None
215-
self._aquire_lock()
215+
self._acquire_lock()
216216

217-
def _aquire_lock(self):
217+
def _acquire_lock(self):
218218
if not self._read_only:
219219
if not self._lock:
220220
if isinstance(self._file_or_files, (tuple, list)):
@@ -239,7 +239,7 @@ def __del__(self):
239239
self.release()
240240

241241
def __enter__(self):
242-
self._aquire_lock()
242+
self._acquire_lock()
243243
return self
244244

245245
def __exit__(self, exception_type, exception_value, traceback):

git/exc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def __init__(self, command, status, stderr=None, stdout=None):
118118

119119

120120
class RepositoryDirtyError(Exception):
121-
"""Thrown whenever an operation on a repository fails as it has uncommited changes that would be overwritten"""
121+
"""Thrown whenever an operation on a repository fails as it has uncommitted changes that would be overwritten"""
122122

123123
def __init__(self, repo, message):
124124
self.repo = repo

git/index/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ def _write_path_to_stdin(self, proc, filepath, item, fmakeexc, fprogress,
433433
try:
434434
proc.stdin.write(("%s\n" % filepath).encode(defenc))
435435
except IOError:
436-
# pipe broke, usually because some error happend
436+
# pipe broke, usually because some error happened
437437
raise fmakeexc()
438438
# END write exception handling
439439
proc.stdin.flush()
@@ -846,7 +846,7 @@ def remove(self, items, working_tree=False, **kwargs):
846846
847847
:param working_tree:
848848
If True, the entry will also be removed from the working tree, physically
849-
removing the respective file. This may fail if there are uncommited changes
849+
removing the respective file. This may fail if there are uncommitted changes
850850
in it.
851851
852852
:param kwargs:

git/index/typ.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def __call__(self, stage_blob):
5151
class BaseIndexEntry(tuple):
5252

5353
"""Small Brother of an index entry which can be created to describe changes
54-
done to the index in which case plenty of additional information is not requried.
54+
done to the index in which case plenty of additional information is not required.
5555
5656
As the first 4 data members match exactly to the IndexEntry type, methods
5757
expecting a BaseIndexEntry can also handle full IndexEntries even if they

git/objects/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def __init__(self, repo, binsha, mode=None, path=None):
152152
def __hash__(self):
153153
"""
154154
:return:
155-
Hash of our path as index items are uniquely identifyable by path, not
155+
Hash of our path as index items are uniquely identifiable by path, not
156156
by their data !"""
157157
return hash(self.path)
158158

git/objects/commit.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def count(self, paths='', **kwargs):
168168
169169
:param kwargs:
170170
Additional options to be passed to git-rev-list. They must not alter
171-
the ouput style of the command, or parsing will yield incorrect results
171+
the output style of the command, or parsing will yield incorrect results
172172
:return: int defining the number of reachable commits"""
173173
# yes, it makes a difference whether empty paths are given or not in our case
174174
# as the empty paths version will ignore merge commits for some reason.

git/objects/submodule/base.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class Submodule(IndexObject, Iterable, Traversable):
9292
k_head_default = 'master'
9393
k_default_mode = stat.S_IFDIR | stat.S_IFLNK # submodules are directories with link-status
9494

95-
# this is a bogus type for base class compatability
95+
# this is a bogus type for base class compatibility
9696
type = 'submodule'
9797

9898
__slots__ = ('_parent_commit', '_url', '_branch_path', '_name', '__weakref__')
@@ -423,7 +423,7 @@ def add(cls, repo, name, path, url=None, branch=None, no_checkout=False):
423423
writer.set_value(cls.k_head_option, br.path)
424424
sm._branch_path = br.path
425425

426-
# we deliberatly assume that our head matches our index !
426+
# we deliberately assume that our head matches our index !
427427
sm.binsha = mrepo.head.commit.binsha
428428
index.add([sm], write=True)
429429

@@ -551,7 +551,7 @@ def update(self, recursive=False, init=True, to_latest_revision=False, progress=
551551
with self.repo.config_writer() as writer:
552552
writer.set_value(sm_section(self.name), 'url', self.url)
553553
# END handle dry_run
554-
# END handle initalization
554+
# END handle initialization
555555

556556
# DETERMINE SHAS TO CHECKOUT
557557
############################

git/refs/log.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class RefLog(list, Serializable):
133133
of the head in question. Custom query methods allow to retrieve log entries
134134
by date or by other criteria.
135135
136-
Reflog entries are orded, the first added entry is first in the list, the last
136+
Reflog entries are ordered, the first added entry is first in the list, the last
137137
entry, i.e. the last change of the head or reference, is last in the list."""
138138

139139
__slots__ = ('_path', )
@@ -209,7 +209,7 @@ def entry_at(cls, filepath, index):
209209
""":return: RefLogEntry at the given index
210210
:param filepath: full path to the index file from which to read the entry
211211
:param index: python list compatible index, i.e. it may be negative to
212-
specifiy an entry counted from the end of the list
212+
specify an entry counted from the end of the list
213213
214214
:raise IndexError: If the entry didn't exist
215215

git/repo/base.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
log = logging.getLogger(__name__)
4141

4242
DefaultDBType = GitCmdObjectDB
43-
if sys.version_info[:2] < (2, 5): # python 2.4 compatiblity
43+
if sys.version_info[:2] < (2, 5): # python 2.4 compatibility
4444
DefaultDBType = GitCmdObjectDB
4545
# END handle python 2.4
4646

@@ -418,7 +418,7 @@ def config_writer(self, config_level="repository"):
418418
419419
:param config_level:
420420
One of the following values
421-
system = sytem wide configuration file
421+
system = system wide configuration file
422422
global = user level configuration file
423423
repository = configuration file for this repostory only"""
424424
return GitConfigParser(self._get_config_path(config_level), read_only=False)
@@ -564,7 +564,7 @@ def _set_alternates(self, alts):
564564
565565
:raise NoSuchPathError:
566566
:note:
567-
The method does not check for the existance of the paths in alts
567+
The method does not check for the existence of the paths in alts
568568
as the caller is responsible."""
569569
alternates_path = osp.join(self.git_dir, 'objects', 'info', 'alternates')
570570
if not alts:
@@ -629,7 +629,7 @@ def untracked_files(self):
629629
return self._get_untracked_files()
630630

631631
def _get_untracked_files(self, *args, **kwargs):
632-
# make sure we get all files, no only untracked directores
632+
# make sure we get all files, not only untracked directories
633633
proc = self.git.status(*args,
634634
porcelain=True,
635635
untracked_files=True,
@@ -681,7 +681,7 @@ def blame_incremental(self, rev, file, **kwargs):
681681

682682
stream = (line for line in data.split(b'\n') if line)
683683
while True:
684-
line = next(stream) # when exhausted, casues a StopIteration, terminating this function
684+
line = next(stream) # when exhausted, causes a StopIteration, terminating this function
685685
hexsha, orig_lineno, lineno, num_lines = line.split()
686686
lineno = int(lineno)
687687
num_lines = int(num_lines)
@@ -952,7 +952,7 @@ def archive(self, ostream, treeish=None, prefix=None, **kwargs):
952952
* Use the 'format' argument to define the kind of format. Use
953953
specialized ostreams to write any format supported by python.
954954
* You may specify the special **path** keyword, which may either be a repository-relative
955-
path to a directory or file to place into the archive, or a list or tuple of multipe paths.
955+
path to a directory or file to place into the archive, or a list or tuple of multiple paths.
956956
957957
:raise GitCommandError: in case something went wrong
958958
:return: self"""
@@ -972,7 +972,7 @@ def archive(self, ostream, treeish=None, prefix=None, **kwargs):
972972
def has_separate_working_tree(self):
973973
"""
974974
:return: True if our git_dir is not at the root of our working_tree_dir, but a .git file with a
975-
platform agnositic symbolic link. Our git_dir will be whereever the .git file points to
975+
platform agnositic symbolic link. Our git_dir will be wherever the .git file points to
976976
:note: bare repositories will always return False here
977977
"""
978978
if self.bare:

git/test/lib/helper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def with_rw_and_rw_remote_repo(working_tree_ref):
227227
Same as with_rw_repo, but also provides a writable remote repository from which the
228228
rw_repo has been forked as well as a handle for a git-daemon that may be started to
229229
run the remote_repo.
230-
The remote repository was cloned as bare repository from the rorepo, wheras
230+
The remote repository was cloned as bare repository from the rorepo, whereas
231231
the rw repo has a working tree and was cloned from the remote repository.
232232
233233
remote_repo has two remotes: origin and daemon_origin. One uses a local url,

git/test/test_config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def check_test_value(cr, value):
216216
with self.assertRaises(cp.NoSectionError):
217217
check_test_value(cr, tv)
218218

219-
# But can make it skip includes alltogether, and thus allow write-backs
219+
# But can make it skip includes altogether, and thus allow write-backs
220220
with GitConfigParser(fpa, read_only=False, merge_includes=False) as cw:
221221
write_test_value(cw, tv)
222222

git/test/test_docs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ def test_references_and_objects(self, rw_dir):
433433
# reset the index and working tree to match the pointed-to commit
434434
repo.head.reset(index=True, working_tree=True)
435435

436-
# To detach your head, you have to point to a commit directy
436+
# To detach your head, you have to point to a commit directly
437437
repo.head.reference = repo.commit('HEAD~5')
438438
assert repo.head.is_detached
439439
# now our head points 15 commits into the past, whereas the working tree

git/test/test_git.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def test_persistent_cat_file_command(self):
131131
g.stdin.flush()
132132
self.assertEqual(g.stdout.readline(), obj_info)
133133

134-
# same can be achived using the respective command functions
134+
# same can be achieved using the respective command functions
135135
hexsha, typename, size = self.git.get_object_header(hexsha)
136136
hexsha, typename_two, size_two, data = self.git.get_object_data(hexsha) # @UnusedVariable
137137
self.assertEqual(typename, typename_two)
@@ -189,7 +189,7 @@ def test_insert_after_kwarg_raises(self):
189189
self.failUnlessRaises(ValueError, self.git.remote, 'add', insert_kwargs_after='foo')
190190

191191
def test_env_vars_passed_to_git(self):
192-
editor = 'non_existant_editor'
192+
editor = 'non_existent_editor'
193193
with mock.patch.dict('os.environ', {'GIT_EDITOR': editor}): # @UndefinedVariable
194194
self.assertEqual(self.git.var("GIT_EDITOR"), editor)
195195

git/test/test_remote.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def _do_test_fetch_info(self, repo):
163163

164164
def _commit_random_file(self, repo):
165165
# Create a file with a random name and random data and commit it to repo.
166-
# Return the commited absolute file path
166+
# Return the committed absolute file path
167167
index = repo.index
168168
new_file = self._make_file(osp.basename(tempfile.mktemp()), str(random.random()), repo)
169169
index.add([new_file])

git/test/test_repo.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def test_new_should_raise_on_invalid_repo_location(self):
9696
Repo(tempfile.gettempdir())
9797

9898
@raises(NoSuchPathError)
99-
def test_new_should_raise_on_non_existant_path(self):
99+
def test_new_should_raise_on_non_existent_path(self):
100100
Repo("repos/foobar")
101101

102102
@with_rw_repo('0.3.2.1')

git/util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ def __init__(self, file_path, check_interval_s=0.3, max_block_time_s=MAXSIZE):
809809
def _obtain_lock(self):
810810
"""This method blocks until it obtained the lock, or raises IOError if
811811
it ran out of time or if the parent directory was not available anymore.
812-
If this method returns, you are guranteed to own the lock"""
812+
If this method returns, you are guaranteed to own the lock"""
813813
starttime = time.time()
814814
maxtime = starttime + float(self._max_block_time)
815815
while True:

0 commit comments

Comments
 (0)