Git.pm: do not break inheritance

Make it possible to write subclasses of Git.pm

Signed-off-by: Christian Jaeger <christian@jaeger.mine.nu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Christian Jaeger 2008-10-18 20:25:12 +02:00 коммит произвёл Junio C Hamano
Родитель f430c8e44d
Коммит d8b24b930f
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -1203,8 +1203,7 @@ either version 2, or (at your option) any later version.
# the method was called upon an instance and (undef, @args) if
# it was called directly.
sub _maybe_self {
# This breaks inheritance. Oh well.
ref $_[0] eq 'Git' ? @_ : (undef, @_);
UNIVERSAL::isa($_[0], 'Git') ? @_ : (undef, @_);
}
# Check if the command id is something reasonable.