Skip to content

Commit 3c19e4c

Browse files
committed
Move exclude_remote_names definition to PrePush base
This doesn't need to be in the base hook since it's used only in `pre-push` hooks.
1 parent 3774e26 commit 3c19e4c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/overcommit/hook/base.rb

-4
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,6 @@ def exclude_branch_patterns
286286
@config['exclude_branch_patterns'] || []
287287
end
288288

289-
def exclude_remote_names
290-
@config['exclude_remote_names'] || []
291-
end
292-
293289
def current_branch
294290
@current_branch ||= Overcommit::GitRepo.current_branch
295291
end

lib/overcommit/hook/pre_push/base.rb

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ def skip_for_remote_branch_deletion?
2121
ignore_branch_deletions? && @context.remote_branch_deletion?
2222
end
2323

24+
def exclude_remote_names
25+
@config['exclude_remote_names'] || []
26+
end
27+
2428
def ignore_branch_deletions?
2529
@config['ignore_branch_deletions'] != false
2630
end

0 commit comments

Comments
 (0)