Skip to content

Commit 2913a64

Browse files
kianmengByron
authored andcommitted
Fix typos
1 parent 9a28925 commit 2913a64

File tree

9 files changed

+15
-15
lines changed

9 files changed

+15
-15
lines changed

Diff for: gitdb/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def _init_externals():
2121
except ImportError as e:
2222
raise ImportError("'%s' could not be imported, assure it is located in your PYTHONPATH" % module) from e
2323
# END verify import
24-
# END handel imports
24+
# END handle imports
2525

2626
#} END initialization
2727

Diff for: gitdb/db/pack.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def store(self, istream):
131131

132132
def update_cache(self, force=False):
133133
"""
134-
Update our cache with the acutally existing packs on disk. Add new ones,
134+
Update our cache with the actually existing packs on disk. Add new ones,
135135
and remove deleted ones. We keep the unchanged ones
136136
137137
:param force: If True, the cache will be updated even though the directory

Diff for: gitdb/fun.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def delta_chunk_apply(dc, bbuf, write):
103103
write(bbuf[dc.so:dc.so + dc.ts])
104104
else:
105105
# APPEND DATA
106-
# whats faster: if + 4 function calls or just a write with a slice ?
106+
# what's faster: if + 4 function calls or just a write with a slice ?
107107
# Considering data can be larger than 127 bytes now, it should be worth it
108108
if dc.ts < len(dc.data):
109109
write(dc.data[:dc.ts])
@@ -292,7 +292,7 @@ def check_integrity(self, target_size=-1):
292292
"""Verify the list has non-overlapping chunks only, and the total size matches
293293
target_size
294294
:param target_size: if not -1, the total size of the chain must be target_size
295-
:raise AssertionError: if the size doen't match"""
295+
:raise AssertionError: if the size doesn't match"""
296296
if target_size > -1:
297297
assert self[-1].rbound() == target_size
298298
assert reduce(lambda x, y: x + y, (d.ts for d in self), 0) == target_size
@@ -331,7 +331,7 @@ def connect_with_next_base(self, bdcl):
331331
cannot be changed by any of the upcoming bases anymore. Once all our
332332
chunks are marked like that, we can stop all processing
333333
:param bdcl: data chunk list being one of our bases. They must be fed in
334-
consequtively and in order, towards the earliest ancestor delta
334+
consecutively and in order, towards the earliest ancestor delta
335335
:return: True if processing was done. Use it to abort processing of
336336
remaining streams if False is returned"""
337337
nfc = 0 # number of frozen chunks
@@ -624,7 +624,7 @@ def apply_delta_data(src_buf, src_buf_size, delta_buf, delta_buf_size, write):
624624
625625
:param src_buf: random access data from which the delta was created
626626
:param src_buf_size: size of the source buffer in bytes
627-
:param delta_buf_size: size fo the delta buffer in bytes
627+
:param delta_buf_size: size for the delta buffer in bytes
628628
:param delta_buf: random access delta data
629629
:param write: write method taking a chunk of bytes
630630

Diff for: gitdb/pack.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def write(self, pack_sha, write):
224224
if ofs > 0x7fffffff:
225225
tmplist.append(ofs)
226226
ofs = 0x80000000 + len(tmplist) - 1
227-
# END hande 64 bit offsets
227+
# END handle 64 bit offsets
228228
sha_write(pack('>L', ofs & 0xffffffff))
229229
# END for each offset
230230

@@ -506,7 +506,7 @@ class PackFile(LazyMixin):
506506
"""A pack is a file written according to the Version 2 for git packs
507507
508508
As we currently use memory maps, it could be assumed that the maximum size of
509-
packs therefor is 32 bit on 32 bit systems. On 64 bit systems, this should be
509+
packs therefore is 32 bit on 32 bit systems. On 64 bit systems, this should be
510510
fine though.
511511
512512
**Note:** at some point, this might be implemented using streams as well, or

Diff for: gitdb/stream.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ def read(self, size=-1):
289289
# They are thorough, and I assume it is truly working.
290290
# Why is this logic as convoluted as it is ? Please look at the table in
291291
# https://github.com/gitpython-developers/gitdb/issues/19 to learn about the test-results.
292-
# Bascially, on py2.6, you want to use branch 1, whereas on all other python version, the second branch
292+
# Basically, on py2.6, you want to use branch 1, whereas on all other python version, the second branch
293293
# will be the one that works.
294294
# However, the zlib VERSIONs as well as the platform check is used to further match the entries in the
295295
# table in the github issue. This is it ... it was the only way I could make this work everywhere.

Diff for: gitdb/test/db/lib.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def _assert_object_writing(self, db):
107107

108108
# DIRECT STREAM COPY
109109
# our data hase been written in object format to the StringIO
110-
# we pasesd as output stream. No physical database representation
110+
# we passed as output stream. No physical database representation
111111
# was created.
112112
# Test direct stream copy of object streams, the result must be
113113
# identical to what we fed in

Diff for: gitdb/test/db/test_pack.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def test_writing(self, path):
8080
# END for each sha to find
8181

8282
# we should have at least one ambiguous, considering the small sizes
83-
# but in our pack, there is no ambigious ...
83+
# but in our pack, there is no ambiguous ...
8484
# assert num_ambiguous
8585

8686
# non-existing

Diff for: gitdb/test/test_pack.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def _assert_pack_file(self, pack, version, size):
101101
dstream = DeltaApplyReader.new(streams)
102102
except ValueError:
103103
# ignore these, old git versions use only ref deltas,
104-
# which we havent resolved ( as we are without an index )
104+
# which we haven't resolved ( as we are without an index )
105105
# Also ignore non-delta streams
106106
continue
107107
# END get deltastream

Diff for: gitdb/util.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def file_contents_ro(fd, stream=False, allow_mmap=True):
182182
pass
183183
# END exception handling
184184

185-
# read manully
185+
# read manually
186186
contents = os.read(fd, os.fstat(fd).st_size)
187187
if stream:
188188
return _RandomAccessBytesIO(contents)
@@ -248,7 +248,7 @@ class LazyMixin(object):
248248
def __getattr__(self, attr):
249249
"""
250250
Whenever an attribute is requested that we do not know, we allow it
251-
to be created and set. Next time the same attribute is reqeusted, it is simply
251+
to be created and set. Next time the same attribute is requested, it is simply
252252
returned from our dict/slots. """
253253
self._set_cache_(attr)
254254
# will raise in case the cache was not created
@@ -332,7 +332,7 @@ def open(self, write=False, stream=False):
332332

333333
# open actual file if required
334334
if self._fd is None:
335-
# we could specify exlusive here, as we obtained the lock anyway
335+
# we could specify exclusive here, as we obtained the lock anyway
336336
try:
337337
self._fd = os.open(self._filepath, os.O_RDONLY | binary)
338338
except:

0 commit comments

Comments
 (0)