Skip to content

Commit

Permalink
Git.pm: do not break inheritance
Browse files Browse the repository at this point in the history
Make it possible to write subclasses of Git.pm

Signed-off-by: Christian Jaeger <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
Christian Jaeger authored and gitster committed Oct 19, 2008
1 parent f430c8e commit d8b24b9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions perl/Git.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d8b24b9

Please sign in to comment.