Skip to content

Progress parsing #20

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

Closed
wants to merge 6 commits into from
Closed
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
Next Next commit
Rename version to version_info.
  • Loading branch information
int3 committed May 25, 2011
commit 12c93f564b81603f537425b61d8c57b83d9f24c7
8 changes: 4 additions & 4 deletions git/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Git(object):
of the command to stdout.
Set its value to 'full' to see details about the returned values.
"""
__slots__ = ("_working_dir", "cat_file_all", "cat_file_header", "_version")
__slots__ = ("_working_dir", "cat_file_all", "cat_file_header", "_version_info")

# CONFIGURATION
# The size in bytes read from stdout when copying git's output to another stream
Expand Down Expand Up @@ -205,7 +205,7 @@ def __init__(self, working_dir=None):
.git directory in case of bare repositories."""
super(Git, self).__init__()
self._working_dir = working_dir
self._version = self._get_version_as_tuple()
self._version_info = self._get_version_as_tuple()

# cached command slots
self.cat_file_header = None
Expand Down Expand Up @@ -522,5 +522,5 @@ def _get_version_as_tuple(self):
return tuple(version_numbers.split('.'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you forgot to convert the strings to integers.
The line should be something like

tuple(int(n) for n in version_numbers.split('.'))


@property
def version(self):
return self._version
def version_info(self):
return self._version_info