Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a25365f

Browse files
committedOct 22, 2016
Merge remote-tracking branch 'origin/master' into exp_git_dir
2 parents 76ac61a + caa0ea7 commit a25365f

File tree

25 files changed

+80
-82
lines changed

25 files changed

+80
-82
lines changed
 

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ exists in `Git\mingw64\libexec\git-core\`; CYGWIN has no daemon, but should get
8383
with MINGW's.
8484

8585
The easiest way to run tests is by using [tox](https://pypi.python.org/pypi/tox)
86-
a wrapper around virtualenv. It will take care of setting up environnements with the proper
86+
a wrapper around virtualenv. It will take care of setting up environments with the proper
8787
dependencies installed and execute test commands. To install it simply:
8888

8989
pip install tox

‎doc/source/changes.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,11 @@ It follows the `semantic version scheme <http://semver.org>`_, and thus will not
185185

186186
0.3.3
187187
=====
188-
* When fetching, pulling or pushing, and an error occours, it will not be reported on stdout anymore. However, if there is a fatal error, it will still result in a GitCommandError to be thrown. This goes hand in hand with improved fetch result parsing.
188+
* When fetching, pulling or pushing, and an error occurs, it will not be reported on stdout anymore. However, if there is a fatal error, it will still result in a GitCommandError to be thrown. This goes hand in hand with improved fetch result parsing.
189189
* Code Cleanup (in preparation for python 3 support)
190190

191191
* Applied autopep8 and cleaned up code
192-
* Using python logging module instead of print statments to signal certain kinds of errors
192+
* Using python logging module instead of print statements to signal certain kinds of errors
193193

194194
0.3.2.1
195195
=======
@@ -268,7 +268,7 @@ It follows the `semantic version scheme <http://semver.org>`_, and thus will not
268268
* Head Type changes
269269

270270
* config_reader() & config_writer() methods added for access to head specific options.
271-
* tracking_branch() & set_tracking_branch() methods addded for easy configuration of tracking branches.
271+
* tracking_branch() & set_tracking_branch() methods added for easy configuration of tracking branches.
272272

273273

274274
0.3.0 Beta 2
@@ -300,13 +300,13 @@ General
300300
0.2 Beta 2
301301
===========
302302
* Commit objects now carry the 'encoding' information of their message. It wasn't parsed previously, and defaults to UTF-8
303-
* Commit.create_from_tree now uses a pure-python implementation, mimicing git-commit-tree
303+
* Commit.create_from_tree now uses a pure-python implementation, mimicking git-commit-tree
304304

305305
0.2
306306
=====
307307
General
308308
-------
309-
* file mode in Tree, Blob and Diff objects now is an int compatible to definintiions
309+
* file mode in Tree, Blob and Diff objects now is an int compatible to definitions
310310
in the stat module, allowing you to query whether individual user, group and other
311311
read, write and execute bits are set.
312312
* Adjusted class hierarchy to generally allow comparison and hash for Objects and Refs
@@ -320,12 +320,12 @@ General
320320
may change without prior notice.
321321
* Renamed all find_all methods to list_items - this method is part of the Iterable interface
322322
that also provides a more efficients and more responsive iter_items method
323-
* All dates, like authored_date and committer_date, are stored as seconds since epoc
323+
* All dates, like authored_date and committer_date, are stored as seconds since epoch
324324
to consume less memory - they can be converted using time.gmtime in a more suitable
325325
presentation format if needed.
326326
* Named method parameters changed on a wide scale to unify their use. Now git specific
327327
terms are used everywhere, such as "Reference" ( ref ) and "Revision" ( rev ).
328-
Prevously multiple terms where used making it harder to know which type was allowed
328+
Previously multiple terms where used making it harder to know which type was allowed
329329
or not.
330330
* Unified diff interface to allow easy diffing between trees, trees and index, trees
331331
and working tree, index and working tree, trees and index. This closely follows
@@ -355,7 +355,7 @@ Blob
355355
GitCommand
356356
-----------
357357
* git.subcommand call scheme now prunes out None from the argument list, allowing
358-
to be called more confortably as None can never be a valid to the git command
358+
to be called more comfortably as None can never be a valid to the git command
359359
if converted to a string.
360360
* Renamed 'git_dir' attribute to 'working_dir' which is exactly how it is used
361361

@@ -382,19 +382,19 @@ Diff
382382
Diffing
383383
-------
384384
* Commit and Tree objects now support diffing natively with a common interface to
385-
compare agains other Commits or Trees, against the working tree or against the index.
385+
compare against other Commits or Trees, against the working tree or against the index.
386386

387387
Index
388388
-----
389389
* A new Index class allows to read and write index files directly, and to perform
390390
simple two and three way merges based on an arbitrary index.
391391

392-
Referernces
392+
References
393393
------------
394394
* References are object that point to a Commit
395395
* SymbolicReference are a pointer to a Reference Object, which itself points to a specific
396396
Commit
397-
* They will dynmically retrieve their object at the time of query to assure the information
397+
* They will dynamically retrieve their object at the time of query to assure the information
398398
is actual. Recently objects would be cached, hence ref object not be safely kept
399399
persistent.
400400

@@ -403,7 +403,7 @@ Repo
403403
* Moved blame method from Blob to repo as it appeared to belong there much more.
404404
* active_branch method now returns a Head object instead of a string with the name
405405
of the active branch.
406-
* tree method now requires a Ref instance as input and defaults to the active_branche
406+
* tree method now requires a Ref instance as input and defaults to the active_branch
407407
instead of master
408408
* is_dirty now takes additional arguments allowing fine-grained control about what is
409409
considered dirty
@@ -479,7 +479,7 @@ General
479479
* Removed ambiguity between paths and treeishs. When calling commands that
480480
accept treeish and path arguments and there is a path with the same name as
481481
a treeish git cowardly refuses to pick one and asks for the command to use
482-
the unambiguous syntax where '--' seperates the treeish from the paths.
482+
the unambiguous syntax where '--' separates the treeish from the paths.
483483

484484
* ``Repo.commits``, ``Repo.commits_between``, ``Repo.commits_since``,
485485
``Repo.commit_count``, ``Repo.commit``, ``Commit.count`` and
@@ -627,7 +627,7 @@ Tree
627627
----
628628
* Corrected problem with ``Tree.__div__`` not working with zero length files.
629629
Removed ``__len__`` override and replaced with size instead. Also made size
630-
cach properly. This is a breaking change.
630+
cache properly. This is a breaking change.
631631

632632
0.1.1
633633
=====

‎doc/source/intro.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Getting Started
9292
API Reference
9393
=============
9494

95-
An organized section of the GitPthon API is at :ref:`api_reference_toplevel`.
95+
An organized section of the GitPython API is at :ref:`api_reference_toplevel`.
9696

9797
.. _source-code-label:
9898

‎git/cmd.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ def handle_process_output(process, stdout_handler, stderr_handler,
6969
:return: result of finalizer
7070
:param process: subprocess.Popen instance
7171
:param stdout_handler: f(stdout_line_string), or None
72-
:param stderr_hanlder: f(stderr_line_string), or None
72+
:param stderr_handler: f(stderr_line_string), or None
7373
:param finalizer: f(proc) - wait for proc to finish
7474
:param decode_streams:
75-
Assume stdout/stderr streams are binary and decode them vefore pushing \
75+
Assume stdout/stderr streams are binary and decode them before pushing \
7676
their contents to handlers.
7777
Set it to False if `universal_newline == True` (then streams are in text-mode)
7878
or if decoding must happen later (i.e. for Diffs).
@@ -438,7 +438,7 @@ def set_persistent_git_options(self, **kwargs):
438438

439439
def _set_cache_(self, attr):
440440
if attr == '_version_info':
441-
# We only use the first 4 numbers, as everthing else could be strings in fact (on windows)
441+
# We only use the first 4 numbers, as everything else could be strings in fact (on windows)
442442
version_numbers = self._call_process('version').split(' ')[2]
443443
self._version_info = tuple(int(n) for n in version_numbers.split('.')[:4] if n.isdigit())
444444
else:

‎git/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def __init__(self, file_or_files, read_only=True, merge_includes=True):
198198
configuration files have been included
199199
:param merge_includes: if True, we will read files mentioned in [include] sections and merge their
200200
contents into ours. This makes it impossible to write back an individual configuration file.
201-
Thus, if you want to modify a single conifguration file, turn this off to leave the original
201+
Thus, if you want to modify a single configuration file, turn this off to leave the original
202202
dataset unaltered when reading it."""
203203
cp.RawConfigParser.__init__(self, dict_type=OrderedDict)
204204

@@ -275,7 +275,7 @@ def _read(self, fp, fpname):
275275
"""A direct copy of the py2.4 version of the super class's _read method
276276
to assure it uses ordered dicts. Had to change one line to make it work.
277277
278-
Future versions have this fixed, but in fact its quite embarassing for the
278+
Future versions have this fixed, but in fact its quite embarrassing for the
279279
guys not to have done it right in the first place !
280280
281281
Removed big comments to make it more compact.
@@ -472,7 +472,7 @@ def write(self):
472472
# end assert multiple files
473473

474474
if self._has_includes():
475-
log.debug("Skipping write-back of confiuration file as include files were merged in." +
475+
log.debug("Skipping write-back of configuration file as include files were merged in." +
476476
"Set merge_includes=False to prevent this.")
477477
return
478478
# end

‎git/diff.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ def diff(self, other=Index, paths=None, create_patch=False, **kwargs):
9090
9191
:param paths:
9292
is a list of paths or a single path to limit the diff to.
93-
It will only include at least one of the givne path or paths.
93+
It will only include at least one of the given path or paths.
9494
9595
:param create_patch:
9696
If True, the returned Diff contains a detailed patch that if applied
97-
makes the self to other. Patches are somwhat costly as blobs have to be read
97+
makes the self to other. Patches are somewhat costly as blobs have to be read
9898
and diffed.
9999
100100
:param kwargs:
@@ -105,7 +105,7 @@ def diff(self, other=Index, paths=None, create_patch=False, **kwargs):
105105
106106
:note:
107107
On a bare repository, 'other' needs to be provided as Index or as
108-
as Tree/Commit, or a git command error will occour"""
108+
as Tree/Commit, or a git command error will occur"""
109109
args = list()
110110
args.append("--abbrev=40") # we need full shas
111111
args.append("--full-index") # get full index paths, not only filenames
@@ -171,7 +171,7 @@ class DiffIndex(list):
171171
def iter_change_type(self, change_type):
172172
"""
173173
:return:
174-
iterator yieling Diff instances that match the given change_type
174+
iterator yielding Diff instances that match the given change_type
175175
176176
:param change_type:
177177
Member of DiffIndex.change_type, namely:
@@ -346,7 +346,7 @@ def __str__(self):
346346
msg += '\n---'
347347
# END diff info
348348

349-
# Python2 sillyness: have to assure we convert our likely to be unicode object to a string with the
349+
# Python2 silliness: have to assure we convert our likely to be unicode object to a string with the
350350
# right encoding. Otherwise it tries to convert it using ascii, which may fail ungracefully
351351
res = h + msg
352352
if not PY3:
@@ -426,7 +426,7 @@ def _index_from_patch_format(cls, repo, proc):
426426
b_path = cls._pick_best_path(b_path, rename_to, b_path_fallback)
427427

428428
# Our only means to find the actual text is to see what has not been matched by our regex,
429-
# and then retro-actively assin it to our index
429+
# and then retro-actively assign it to our index
430430
if previous_header is not None:
431431
index[-1].diff = text[previous_header.end():header.start()]
432432
# end assign actual diff
@@ -479,7 +479,7 @@ def handle_diff_line(line):
479479
rename_from = None
480480
rename_to = None
481481

482-
# NOTE: We cannot conclude from the existance of a blob to change type
482+
# NOTE: We cannot conclude from the existence of a blob to change type
483483
# as diffs with the working do not have blobs yet
484484
if change_type == 'D':
485485
b_blob_id = None

‎git/exc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# This module is part of GitPython and is released under
55
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
6-
""" Module containing all exceptions thrown througout the git package, """
6+
""" Module containing all exceptions thrown throughout the git package, """
77

88
from gitdb.exc import * # NOQA @UnusedWildImport
99
from git.compat import UnicodeMixin, safe_decode, string_types

‎git/index/base.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def _set_cache_(self, attr):
140140
self._deserialize(stream)
141141
finally:
142142
lfd.rollback()
143-
# The handles will be closed on desctruction
143+
# The handles will be closed on destruction
144144
# END read from default index on demand
145145
else:
146146
super(IndexFile, self)._set_cache_(attr)
@@ -876,7 +876,7 @@ def remove(self, items, working_tree=False, **kwargs):
876876
def move(self, items, skip_errors=False, **kwargs):
877877
"""Rename/move the items, whereas the last item is considered the destination of
878878
the move operation. If the destination is a file, the first item ( of two )
879-
must be a file as well. If the destination is a directory, it may be preceeded
879+
must be a file as well. If the destination is a directory, it may be preceded
880880
by one or more directories or files.
881881
882882
The working tree will be affected in non-bare repositories.
@@ -886,7 +886,7 @@ def move(self, items, skip_errors=False, **kwargs):
886886
for reference.
887887
:param skip_errors:
888888
If True, errors such as ones resulting from missing source files will
889-
be skpped.
889+
be skipped.
890890
:param kwargs:
891891
Additional arguments you would like to pass to git-mv, such as dry_run
892892
or force.
@@ -895,7 +895,7 @@ def move(self, items, skip_errors=False, **kwargs):
895895
A list of pairs, containing the source file moved as well as its
896896
actual destination. Relative to the repository root.
897897
898-
:raise ValueErorr: If only one item was given
898+
:raise ValueError: If only one item was given
899899
GitCommandError: If git could not handle your request"""
900900
args = list()
901901
if skip_errors:
@@ -991,7 +991,7 @@ def checkout(self, paths=None, force=False, fprogress=lambda *args: None, **kwar
991991
prior and after a file has been checked out
992992
993993
:param kwargs:
994-
Additional arguments to be pasesd to git-checkout-index
994+
Additional arguments to be passed to git-checkout-index
995995
996996
:return:
997997
iterable yielding paths to files which have been checked out and are
@@ -1219,7 +1219,7 @@ def diff(self, other=diff.Diffable.Index, paths=None, create_patch=False, **kwar
12191219
cur_val = kwargs.get('R', False)
12201220
kwargs['R'] = not cur_val
12211221
return other.diff(self.Index, paths, create_patch, **kwargs)
1222-
# END diff against other item handlin
1222+
# END diff against other item handling
12231223

12241224
# if other is not None here, something is wrong
12251225
if other is not None:

‎git/index/fun.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def aggressive_tree_merge(odb, tree_shas):
355355
out_append(_tree_entry_to_baseindexentry(theirs, 3))
356356
# END theirs changed
357357
# else:
358-
# theirs didnt change
358+
# theirs didn't change
359359
# pass
360360
# END handle theirs
361361
# END handle ours

‎git/index/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def check_default_index(self, *args, **kwargs):
7474
raise AssertionError(
7575
"Cannot call %r on indices that do not represent the default git index" % func.__name__)
7676
return func(self, *args, **kwargs)
77-
# END wrpaper method
77+
# END wrapper method
7878

7979
return check_default_index
8080

‎git/objects/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class IndexObject(Object):
126126
SubModule objects"""
127127
__slots__ = ("path", "mode")
128128

129-
# for compatability with iterable lists
129+
# for compatibility with iterable lists
130130
_id_attribute_ = 'path'
131131

132132
def __init__(self, repo, binsha, mode=None, path=None):
@@ -136,7 +136,7 @@ def __init__(self, repo, binsha, mode=None, path=None):
136136
:param binsha: 20 byte sha1
137137
:param mode:
138138
is the stat compatible file mode as int, use the stat module
139-
to evaluate the infomration
139+
to evaluate the information
140140
:param path:
141141
is the path to the file in the file system, relative to the git repository root, i.e.
142142
file.ext or folder/other.ext
@@ -164,7 +164,7 @@ def _set_cache_(self, attr):
164164
% (attr, type(self).__name__))
165165
else:
166166
super(IndexObject, self)._set_cache_(attr)
167-
# END hanlde slot attribute
167+
# END handle slot attribute
168168

169169
@property
170170
def name(self):

‎git/objects/commit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def count(self, paths='', **kwargs):
163163
"""Count the number of commits reachable from this commit
164164
165165
:param paths:
166-
is an optinal path or a list of paths restricting the return value
166+
is an optional path or a list of paths restricting the return value
167167
to commits actually containing the paths
168168
169169
:param kwargs:
@@ -192,7 +192,7 @@ def iter_items(cls, repo, rev, paths='', **kwargs):
192192
:param repo: is the Repo
193193
:param rev: revision specifier, see git-rev-parse for viable options
194194
:param paths:
195-
is an optinal path or list of paths, if set only Commits that include the path
195+
is an optional path or list of paths, if set only Commits that include the path
196196
or paths will be considered
197197
:param kwargs:
198198
optional keyword arguments to git rev-list where

‎git/objects/submodule/base.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class UpdateProgress(RemoteProgress):
7272

7373
# IndexObject comes via util module, its a 'hacky' fix thanks to pythons import
7474
# mechanism which cause plenty of trouble of the only reason for packages and
75-
# modules is refactoring - subpackages shoudn't depend on parent packages
75+
# modules is refactoring - subpackages shouldn't depend on parent packages
7676
class Submodule(IndexObject, Iterable, Traversable):
7777

7878
"""Implements access to a git submodule. They are special in that their sha
@@ -140,7 +140,7 @@ def _get_intermediate_items(self, item):
140140
return type(self).list_items(item.module())
141141
except InvalidGitRepositoryError:
142142
return list()
143-
# END handle intermeditate items
143+
# END handle intermediate items
144144

145145
@classmethod
146146
def _need_gitfile_submodules(cls, git):
@@ -181,7 +181,7 @@ def _config_parser(cls, repo, parent_commit, read_only):
181181
except ValueError:
182182
# We are most likely in an empty repository, so the HEAD doesn't point to a valid ref
183183
pass
184-
# end hanlde parent_commit
184+
# end handle parent_commit
185185

186186
if not repo.bare and parent_matches_head:
187187
fp_module = osp.join(repo.working_tree_dir, cls.k_modules_file)
@@ -224,7 +224,7 @@ def _config_parser_constrained(self, read_only):
224224
pc = self.parent_commit
225225
except ValueError:
226226
pc = None
227-
# end hande empty parent repository
227+
# end handle empty parent repository
228228
parser = self._config_parser(self.repo, pc, read_only)
229229
parser.set_submodule(self)
230230
return SectionConstraint(parser, sm_section(self.name))
@@ -943,7 +943,7 @@ def set_parent_commit(self, commit, check=True):
943943
# END handle checking mode
944944

945945
# update our sha, it could have changed
946-
# If check is False, we might see a parent-commit that doens't even contain the submodule anymore.
946+
# If check is False, we might see a parent-commit that doesn't even contain the submodule anymore.
947947
# in that case, mark our sha as being NULL
948948
try:
949949
self.binsha = pctree[self.path].binsha

‎git/objects/tree.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class TreeModifier(object):
7777

7878
"""A utility class providing methods to alter the underlying cache in a list-like fashion.
7979
80-
Once all adjustments are complete, the _cache, which really is a refernce to
80+
Once all adjustments are complete, the _cache, which really is a reference to
8181
the cache of a tree, will be sorted. Assuring it will be in a serializable state"""
8282
__slots__ = '_cache'
8383

@@ -294,7 +294,7 @@ def __getitem__(self, item):
294294
return self._map_id_to_type[info[1] >> 12](self.repo, info[0], info[1], join_path(self.path, info[2]))
295295

296296
if isinstance(item, string_types):
297-
# compatability
297+
# compatibility
298298
return self.join(item)
299299
# END index is basestring
300300

@@ -308,7 +308,7 @@ def __contains__(self, item):
308308
# END compare sha
309309
# END for each entry
310310
# END handle item is index object
311-
# compatability
311+
# compatibility
312312

313313
# treat item as repo-relative path
314314
path = self.path

‎git/objects/util.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def list_traverse(self, *args, **kwargs):
270270
def traverse(self, predicate=lambda i, d: True,
271271
prune=lambda i, d: False, depth=-1, branch_first=True,
272272
visit_once=True, ignore_self=1, as_edge=False):
273-
""":return: iterator yieling of items found when traversing self
273+
""":return: iterator yielding of items found when traversing self
274274
275275
:param predicate: f(i,d) returns False if item i at depth d should not be included in the result
276276
@@ -282,7 +282,7 @@ def traverse(self, predicate=lambda i, d: True,
282282
define at which level the iteration should not go deeper
283283
if -1, there is no limit
284284
if 0, you would effectively only get self, the root of the iteration
285-
i.e. if 1, you would only get the first level of predessessors/successors
285+
i.e. if 1, you would only get the first level of predecessors/successors
286286
287287
:param branch_first:
288288
if True, items will be returned branch first, otherwise depth first
@@ -298,7 +298,7 @@ def traverse(self, predicate=lambda i, d: True,
298298
299299
:param as_edge:
300300
if True, return a pair of items, first being the source, second the
301-
destinatination, i.e. tuple(src, dest) with the edge spanning from
301+
destination, i.e. tuple(src, dest) with the edge spanning from
302302
source to destination"""
303303
visited = set()
304304
stack = Deque()
@@ -348,7 +348,7 @@ class Serializable(object):
348348

349349
def _serialize(self, stream):
350350
"""Serialize the data of this object into the given data stream
351-
:note: a serialized object would ``_deserialize`` into the same objet
351+
:note: a serialized object would ``_deserialize`` into the same object
352352
:param stream: a file-like object
353353
:return: self"""
354354
raise NotImplementedError("To be implemented in subclass")

‎git/refs/head.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,7 @@ def checkout(self, force=False, **kwargs):
216216
else:
217217
return self.repo.active_branch
218218

219-
#{ Configruation
220-
219+
#{ Configuration
221220
def _config_parser(self, read_only):
222221
if read_only:
223222
parser = self.repo.config_reader()
@@ -235,7 +234,7 @@ def config_reader(self):
235234

236235
def config_writer(self):
237236
"""
238-
:return: A configuration writer instance with read-and write acccess
237+
:return: A configuration writer instance with read-and write access
239238
to options of this head"""
240239
return self._config_parser(read_only=False)
241240

‎git/refs/reference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def wrapper(self, *args):
2020
# END wrapper
2121
wrapper.__name__ = func.__name__
2222
return wrapper
23-
#}END utilites
23+
#}END utilities
2424

2525

2626
class Reference(SymbolicReference, LazyMixin, Iterable):

‎git/refs/remote.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def delete(cls, repo, *refs, **kwargs):
2929
"""Delete the given remote references
3030
3131
:note:
32-
kwargs are given for compatability with the base class method as we
32+
kwargs are given for comparability with the base class method as we
3333
should not narrow the signature."""
3434
repo.git.branch("-d", "-r", *refs)
3535
# the official deletion method will ignore remote symbolic refs - these

‎git/refs/symbolic.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def _iter_packed_refs(cls, repo):
105105
return
106106
# END no packed-refs file handling
107107
# NOTE: Had try-finally block around here to close the fp,
108-
# but some python version woudn't allow yields within that.
108+
# but some python version wouldn't allow yields within that.
109109
# I believe files are closing themselves on destruction, so it is
110110
# alright.
111111

@@ -137,7 +137,7 @@ def _get_ref_info(cls, repo, ref_path):
137137
except (OSError, IOError):
138138
# Probably we are just packed, find our entry in the packed refs file
139139
# NOTE: We are not a symbolic ref if we are in a packed file, as these
140-
# are excluded explictly
140+
# are excluded explicitly
141141
for sha, path in cls._iter_packed_refs(repo):
142142
if path != ref_path:
143143
continue
@@ -258,7 +258,7 @@ def set_reference(self, ref, logmsg=None):
258258
symbolic one.
259259
260260
:param ref: SymbolicReference instance, Object instance or refspec string
261-
Only if the ref is a SymbolicRef instance, we will point to it. Everthing
261+
Only if the ref is a SymbolicRef instance, we will point to it. Everything
262262
else is dereferenced to obtain the actual object.
263263
:param logmsg: If set to a string, the message will be used in the reflog.
264264
Otherwise, a reflog entry is not written for the changed reference.
@@ -448,7 +448,7 @@ def delete(cls, repo, path):
448448
fd.writelines(l.encode(defenc) for l in new_lines)
449449

450450
except (OSError, IOError):
451-
pass # it didnt exist at all
451+
pass # it didn't exist at all
452452

453453
# delete the reflog
454454
reflog_path = RefLog.path(cls(repo, full_ref_path))
@@ -619,7 +619,7 @@ def iter_items(cls, repo, common_path=None):
619619
git.SymbolicReference[], each of them is guaranteed to be a symbolic
620620
ref which is not detached and pointing to a valid ref
621621
622-
List is lexigraphically sorted
622+
List is lexicographically sorted
623623
The returned objects represent actual subclasses, such as Head or TagReference"""
624624
return (r for r in cls._iter_items(repo, common_path) if r.__class__ == SymbolicReference or not r.is_detached)
625625

‎git/refs/tag.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class TagReference(Reference):
99
,a tag object or any other object. In the latter case additional information,
1010
like the signature or the tag-creator, is available.
1111
12-
This tag object will always point to a commit object, but may carray additional
12+
This tag object will always point to a commit object, but may carry additional
1313
information in a tag object::
1414
1515
tagref = TagReference.list_items(repo)[0]

‎git/remote.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ def _from_line(cls, repo, line, fetch_line):
276276
flags |= cls._flag_map[control_character]
277277
except KeyError:
278278
raise ValueError("Control character %r unknown as parsed from line %r" % (control_character, line))
279-
# END control char exception hanlding
279+
# END control char exception handling
280280

281281
# parse operation string for more info - makes no sense for symbolic refs, but we parse it anyway
282282
old_commit = None
@@ -538,7 +538,7 @@ def stale_refs(self):
538538
The IterableList is prefixed, hence the 'origin' must be omitted. See
539539
'refs' property for an example.
540540
541-
To make things more complicated, it can be possble for the list to include
541+
To make things more complicated, it can be possible for the list to include
542542
other kinds of references, for example, tag references, if these are stale
543543
as well. This is a fix for the issue described here:
544544
https://github.com/gitpython-developers/GitPython/issues/260
@@ -557,7 +557,7 @@ def stale_refs(self):
557557
else:
558558
fqhn = "%s/%s" % (RemoteReference._common_path_default, ref_name)
559559
out_refs.append(RemoteReference(self.repo, fqhn))
560-
# end special case handlin
560+
# end special case handling
561561
# END for each line
562562
return out_refs
563563

@@ -781,7 +781,7 @@ def push(self, refspec=None, progress=None, **kwargs):
781781
Can take one of many value types:
782782
783783
* None to discard progress information
784-
* A function (callable) that is called with the progress infomation.
784+
* A function (callable) that is called with the progress information.
785785
786786
Signature: ``progress(op_code, cur_count, max_count=None, message='')``.
787787
@@ -826,7 +826,7 @@ def config_writer(self):
826826
:return: GitConfigParser compatible object able to write options for this remote.
827827
:note:
828828
You can only own one writer at a time - delete it to release the
829-
configuration file and make it useable by others.
829+
configuration file and make it usable by others.
830830
831831
To assure consistent results, you should only query options through the
832832
writer. Once you are done writing, you are free to use the config reader

‎git/repo/fun.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ def rev_parse(repo, rev):
253253

254254
# empty output types don't require any specific type, its just about dereferencing tags
255255
if output_type and obj.type != output_type:
256-
raise ValueError("Could not accomodate requested object type %r, got %s" % (output_type, obj.type))
257-
# END verify ouput type
256+
raise ValueError("Could not accommodate requested object type %r, got %s" % (output_type, obj.type))
257+
# END verify output type
258258

259259
start = end + 1 # skip brace
260260
parsed_to = start
@@ -283,7 +283,7 @@ def rev_parse(repo, rev):
283283
# END number parsing only if non-blob mode
284284

285285
parsed_to = start
286-
# handle hiererarchy walk
286+
# handle hierarchy walk
287287
try:
288288
if token == "~":
289289
obj = to_commit(obj)

‎git/test/lib/helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ def with_rw_and_rw_remote_repo(working_tree_ref):
227227
and should be an inetd service that serves tempdir.gettempdir() and all
228228
directories in it.
229229
230-
The following scetch demonstrates this::
231-
rorepo ---<bare clone>---> rw_daemon_repo ---<clone>---> rw_repo
230+
The following sketch demonstrates this::
231+
rorepo ---<bare clone>---> rw_remote_repo ---<clone>---> rw_repo
232232
233233
The test case needs to support the following signature::
234234
def case(self, rw_repo, rw_daemon_repo)

‎git/test/performance/lib.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
TestBase
1515
)
1616
from git.util import rmtree
17-
1817
import os.path as osp
1918

19+
#{ Invariants
2020

21-
#{ Invvariants
2221
k_env_git_repo = "GIT_PYTHON_TEST_GIT_REPO_BASE"
2322

2423
#} END invariants

‎git/util.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ def _parse_progress_line(self, line):
387387
sub_lines = line.split('\r')
388388
failed_lines = list()
389389
for sline in sub_lines:
390-
# find esacpe characters and cut them away - regex will not work with
390+
# find escape characters and cut them away - regex will not work with
391391
# them as they are non-ascii. As git might expect a tty, it will send them
392392
last_valid_index = None
393393
for i, c in enumerate(reversed(sline)):
@@ -682,7 +682,7 @@ class IndexFileSHA1Writer(object):
682682

683683
"""Wrapper around a file-like object that remembers the SHA1 of
684684
the data written to it. It will write a sha when the stream is closed
685-
or if the asked for explicitly usign write_sha.
685+
or if the asked for explicitly using write_sha.
686686
687687
Only useful to the indexfile
688688
@@ -812,7 +812,7 @@ def _obtain_lock(self):
812812
super(BlockingLockFile, self)._obtain_lock()
813813
except IOError:
814814
# synity check: if the directory leading to the lockfile is not
815-
# readable anymore, raise an execption
815+
# readable anymore, raise an exception
816816
curtime = time.time()
817817
if not osp.isdir(osp.dirname(self._lock_file_path())):
818818
msg = "Directory containing the lockfile %r was not readable anymore after waiting %g seconds" % (
@@ -856,7 +856,7 @@ def __init__(self, id_attr, prefix=''):
856856
self._prefix = prefix
857857

858858
def __contains__(self, attr):
859-
# first try identy match for performance
859+
# first try identity match for performance
860860
rval = list.__contains__(self, attr)
861861
if rval:
862862
return rval

0 commit comments

Comments
 (0)
Please sign in to comment.