Skip to content

Commit d8b24b9

Browse files
Christian Jaegergitster
authored andcommitted
Git.pm: do not break inheritance
Make it possible to write subclasses of Git.pm Signed-off-by: Christian Jaeger <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f430c8e commit d8b24b9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

perl/Git.pm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,8 +1203,7 @@ either version 2, or (at your option) any later version.
12031203
# the method was called upon an instance and (undef, @args) if
12041204
# it was called directly.
12051205
sub _maybe_self {
1206-
# This breaks inheritance. Oh well.
1207-
ref $_[0] eq 'Git' ? @_ : (undef, @_);
1206+
UNIVERSAL::isa($_[0], 'Git') ? @_ : (undef, @_);
12081207
}
12091208

12101209
# Check if the command id is something reasonable.

0 commit comments

Comments
 (0)