Commit e7da4332 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'lefthook-worktree-support' into 'master'

Support worktrees in lefthook/security harness

See merge request gitlab-org/gitlab!62491
parents 817f5b98 a362ad51
...@@ -690,7 +690,7 @@ GEM ...@@ -690,7 +690,7 @@ GEM
rest-client (~> 2.0) rest-client (~> 2.0)
launchy (2.5.0) launchy (2.5.0)
addressable (~> 2.7) addressable (~> 2.7)
lefthook (0.7.2) lefthook (0.7.5)
letter_opener (1.7.0) letter_opener (1.7.0)
launchy (~> 2.2) launchy (~> 2.2)
letter_opener_web (1.4.0) letter_opener_web (1.4.0)
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
require 'digest' require 'digest'
require 'fileutils' require 'fileutils'
require 'open3'
if ENV['NO_COLOR'] if ENV['NO_COLOR']
SHELL_RED = '' SHELL_RED = ''
...@@ -18,7 +19,7 @@ else ...@@ -18,7 +19,7 @@ else
end end
LEFTHOOK_GLOBAL_CONFIG_PATH = File.expand_path("../lefthook.yml", __dir__) LEFTHOOK_GLOBAL_CONFIG_PATH = File.expand_path("../lefthook.yml", __dir__)
HOOK_PATH = File.expand_path("../.git/hooks/pre-push", __dir__) HOOK_PATH = Open3.capture3("git rev-parse --path-format=absolute --git-path hooks/pre-push")[0].strip
HOOK_DATA = <<~HOOK HOOK_DATA = <<~HOOK
#!/usr/bin/env bash #!/usr/bin/env bash
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment