Skip to content

Commit bcd57e3

Browse files
committed
Corrected a problem with commits_between returning None.
This was caused by calling reverse on the list, which reverses the list in place and returns None. We really need tests for this.
1 parent 0ca61d4 commit bcd57e3

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Diff for: CHANGES

+7
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ Head
4040
* Corrected problem where branches was only returning the last path component
4141
instead of the entire path component following refs/heads/.
4242

43+
Repo
44+
----
45+
* Modified the gzip archive creation to use the python gzip module.
46+
47+
* Corrected ``commits_between`` always returning None instead of the reversed
48+
list.
49+
4350

4451
0.1.5
4552
=====

Diff for: lib/git/repo.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,12 @@ def commits_between(self, frm, to, path = ''):
138138
is the branch/commit name of the older item
139139
140140
``path``
141-
is an optinal path
141+
is an optional path
142142
143143
Returns
144144
``git.Commit[]``
145145
"""
146-
return Commit.find_all(self, "%s..%s" % (frm, to), path).reverse()
146+
return reversed(Commit.find_all(self, "%s..%s" % (frm, to)))
147147

148148
def commits_since(self, start='master', path='', since='1970-01-01'):
149149
"""

0 commit comments

Comments
 (0)