lib/overcommit/hook_context/pre_push.rb in overcommit-0.51.0 vs lib/overcommit/hook_context/pre_push.rb in overcommit-0.52.0
- old
+ new
@@ -11,9 +11,18 @@
def remote_url
@args[1]
end
+ def remote_ref_deletion?
+ return @remote_ref_deletion if defined?(@remote_ref_deletion)
+
+ @remote_ref_deletion ||= input_lines.
+ first.
+ split(' ').
+ first == '(deleted)'
+ end
+
def pushed_refs
input_lines.map do |line|
PushedRef.new(*line.split(' '))
end
end