mirror of
https://github.com/git/git
synced 2024-08-28 12:09:19 +00:00
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:
parent
f430c8e44d
commit
d8b24b930f
|
@ -1203,8 +1203,7 @@ =head1 COPYRIGHT
|
||||||
# the method was called upon an instance and (undef, @args) if
|
# the method was called upon an instance and (undef, @args) if
|
||||||
# it was called directly.
|
# it was called directly.
|
||||||
sub _maybe_self {
|
sub _maybe_self {
|
||||||
# This breaks inheritance. Oh well.
|
UNIVERSAL::isa($_[0], 'Git') ? @_ : (undef, @_);
|
||||||
ref $_[0] eq 'Git' ? @_ : (undef, @_);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check if the command id is something reasonable.
|
# Check if the command id is something reasonable.
|
||||||
|
|
Loading…
Reference in a new issue