Skip to content

0.3 with unicode fixes #200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 12, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix the Repo commit and tree methods to work with unicode revs.
Signed-off-by: David Black <[email protected]>
  • Loading branch information
dbaxa committed Nov 12, 2014
commit c390e223553964fc8577d6837caf19037c4cd6f6
4 changes: 2 additions & 2 deletions git/repo/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def commit(self, rev=None):
if rev is None:
return self.head.commit
else:
return self.rev_parse(str(rev)+"^0")
return self.rev_parse(unicode(rev)+"^0")

def iter_trees(self, *args, **kwargs):
""":return: Iterator yielding Tree objects
Expand All @@ -399,7 +399,7 @@ def tree(self, rev=None):
if rev is None:
return self.head.commit.tree
else:
return self.rev_parse(str(rev)+"^{tree}")
return self.rev_parse(unicode(rev)+"^{tree}")

def iter_commits(self, rev=None, paths='', **kwargs):
"""A list of Commit objects representing the history of a given ref/commit
Expand Down