Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ Contributors are:
-A. Jesse Jiryu Davis <jesse _at_ emptysquare.net>
-Steven Whitman <ninloot _at_ gmail.com>
-Stefan Stancu <stefan.stancu _at_ gmail.com>
-César Izurieta <cesar _at_ caih.org>

Portions derived from other open source works and are clearly marked.
9 changes: 6 additions & 3 deletions git/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,9 +864,12 @@ def __init__(self, id_attr, prefix=''):

def __contains__(self, attr):
# first try identity match for performance
rval = list.__contains__(self, attr)
if rval:
return rval
try:
rval = list.__contains__(self, attr)
if rval:
return rval
except (AttributeError, TypeError):
pass
# END handle match

# otherwise make a full name search
Expand Down