Skip to content

Commit bee2bcc

Browse files
author
Douwe Maan
committed
Merge branch '108-pre-receive-undefined-variable' into 'master'
pre-receive: Fix undefined local variable error Closes #108 See merge request gitlab-org/gitlab-shell!169
2 parents 47924c4 + 2d58197 commit bee2bcc

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
v5.9.2
2+
- Fix pre-receive error when gitlab doesn't have /internal/pre_receive (!169)
3+
14
v5.9.1
25
- Adds --force option to push branches
36

hooks/pre-receive

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ protocol = ENV.delete('GL_PROTOCOL')
99
repo_path = Dir.pwd
1010
gl_repository = ENV['GL_REPOSITORY']
1111

12-
def increase_reference_counter(gl_repository)
12+
def increase_reference_counter(gl_repository, repo_path)
1313
result = GitlabNet.new.pre_receive(gl_repository)
1414

1515
result['reference_counter_increased']
@@ -28,7 +28,7 @@ require_relative '../lib/gitlab_net'
2828
# and we don't want to skip it if the custom hook fails.
2929
if GitlabAccess.new(gl_repository, repo_path, key_id, refs, protocol).exec &&
3030
GitlabCustomHook.new(repo_path, key_id).pre_receive(refs) &&
31-
increase_reference_counter(gl_repository)
31+
increase_reference_counter(gl_repository, repo_path)
3232
exit 0
3333
else
3434
exit 1

0 commit comments

Comments
 (0)