Simplify dispatch in git wrapper
This commit is contained in:
parent
5dd1092f5f
commit
21c329e0eb
@ -7,15 +7,9 @@ D = File.expand_path(File.dirname(__FILE__)).freeze
|
|||||||
|
|
||||||
def exec *args
|
def exec *args
|
||||||
# prevent fork-bombs
|
# prevent fork-bombs
|
||||||
arg0 = if args.size == 1
|
arg0 = args.first
|
||||||
args.first.split(' ')
|
return if arg0 =~ /^#{F}/i || File.expand_path(arg0) == File.expand_path(__FILE__)
|
||||||
else
|
super
|
||||||
args
|
|
||||||
end.first
|
|
||||||
return if arg0 =~ /^#{F}/i
|
|
||||||
return if File.expand_path(arg0) == File.expand_path(__FILE__)
|
|
||||||
|
|
||||||
Kernel.exec(*args)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
case F.downcase
|
case F.downcase
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user