Skip to content

Proposition to make comparisons between GitPython objects and non-GitPython objects possible. #16

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 1 commit into from
May 19, 2011

Conversation

mike-perdide
Copy link

In order to be able to compare for instance None with a Commit, I'm suggesting that we check that 'other' has the attribute binsha before comparing. (also, see issue #15).

Thanks.

@Byron
Copy link
Member

Byron commented May 19, 2011

Hi Mike,

I specifically favored performance when implementing this, hence there are no extra compatibility checks, but the question is where this tad of performance will make an actual difference. People who want performance would save the method call and just do the lhs.binsha == rhs.binsha themselves.

A little bit of convenience is probably not a bad idea in this case, and I merged your request.

Thanks,
Sebastian

Byron added a commit that referenced this pull request May 19, 2011
improved comparison between Object instances to check for compatibility of the other side first. Previously, and exception would be thrown.
This adds convenience in an area which probably is not performance critical.
@Byron Byron merged commit 35bceb1 into gitpython-developers:master May 19, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants