Skip to content

Commit 1fd8177

Browse files
author
root
committed
Add spaces
1 parent 15a80e4 commit 1fd8177

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

Diff for: app/models/repository_mirror.rb

+8-10
Original file line numberDiff line numberDiff line change
@@ -47,25 +47,23 @@ def push
4747
push_args << "\"#{dequote(url)}\" "
4848
push_args << "\"#{dequote(explicit_refspec)}\" " unless explicit_refspec.blank?
4949

50-
# mycom = %[ echo 'cd "#{repo_path}" ; env GIT_SSH=~/.ssh/run_gitolite_admin_ssh git push #{push_args}2>&1' | #{GitHosting.git_user_runner} "bash" ]
51-
# GitHosting.logger.error "Pushing: #{mycom}"
52-
shellout = %x[ echo 'cd "#{repo_path}" ; env GIT_SSH=~/.ssh/run_gitolite_admin_ssh git push #{push_args}2>&1' | #{GitHosting.git_user_runner} "bash" ].chomp
50+
shellout = %x[ echo 'cd "#{repo_path}" ; env GIT_SSH=~/.ssh/run_gitolite_admin_ssh git push #{push_args} 2>&1' | #{GitHosting.git_user_runner} "bash" ].chomp
5351
push_failed = ($?.to_i!=0) ? true : false
5452

5553
if (push_failed)
5654
GitHosting.logger.error "[ Pushing changes to mirror: #{url} ... Failed!"
57-
GitHosting.logger.error " "+shellout.split("\n").join("\n ")+" ]"
55+
GitHosting.logger.error " " + shellout.split("\n").join("\n ") + " ]"
5856
else
5957
GitHosting.logger.info "[ Pushing changes to mirror: #{url} ... Succeeded! ]"
6058
end
61-
[push_failed,shellout]
59+
[push_failed, shellout]
6260
end
6361

6462
# If we have an explicit refspec, check it against incoming payloads
6563
# Special case: if we do not pass in any payloads, return true
6664
def needs_push(payloads=[])
6765
return true if payloads.empty?
68-
return true if push_mode==PUSHMODE_MIRROR
66+
return true if push_mode == PUSHMODE_MIRROR
6967

7068
refspec_parse = explicit_refspec.match(/^\+?([^:]*)(:[^:]*)?$/)
7169
payloads.each do |payload|
@@ -93,7 +91,7 @@ def strip_whitespace
9391

9492
# Put backquote in front of crucial characters
9593
def dequote(in_string)
96-
in_string.gsub(/[$,"\\\n]/) {|x| "\\"+x}
94+
in_string.gsub(/[$,"\\\n]/) {|x| "\\" + x}
9795
end
9896

9997
def check_refspec
@@ -142,14 +140,14 @@ def refcomp_parse(spec)
142140
if refcomp_parse[1]
143141
# Should be first class. If no type component, return fail
144142
if refcomp_parse[3]
145-
{:type=>refcomp_parse[3], :name=>refcomp_parse[4]}
143+
{:type => refcomp_parse[3], :name => refcomp_parse[4]}
146144
else
147145
nil
148146
end
149147
elsif refcomp_parse[3]
150-
{:type=>nil, :name=>(refcomp_parse[3]+"/"+refcomp_parse[4])}
148+
{:type => nil, :name => (refcomp_parse[3] + "/" + refcomp_parse[4])}
151149
else
152-
{:type=>nil, :name=>refcomp_parse[4]}
150+
{:type => nil, :name => refcomp_parse[4]}
153151
end
154152
else
155153
nil

0 commit comments

Comments
 (0)