Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4786d19

Browse files
Julien MiotteByron
Julien Miotte
authored andcommitted
Making comparisons with non-GitPython objects more tolerant.
1 parent410cf1e commit4786d19

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎git/objects/base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,14 @@ def _set_cache_(self, attr):
8484

8585
def__eq__(self,other):
8686
""":return: True if the objects have the same SHA1"""
87+
ifnothasattr(other,'binsha'):
88+
returnFalse
8789
returnself.binsha==other.binsha
8890

8991
def__ne__(self,other):
9092
""":return: True if the objects do not have the same SHA1 """
93+
ifnothasattr(other,'binsha'):
94+
returnTrue
9195
returnself.binsha!=other.binsha
9296

9397
def__hash__(self):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp