We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d099494 commit c7b6821Copy full SHA for c7b6821
app/services/github_hook/updater.rb
@@ -142,12 +142,13 @@ def time_diff_milli(start, finish)
142
# Fetches updates from the remote repository
143
def update_repository(repository)
144
command = git_command("fetch origin")
145
- if exec(command, repository.url)
146
- command = git_command(
147
- "fetch --prune origin \"+refs/heads/*:refs/heads/*\""
148
- )
149
- exec(command, repository.url)
150
- end
+ fetch = exec(command, repository.url)
+ return nil unless fetch
+
+ command = git_command(
+ "fetch --prune origin \"+refs/heads/*:refs/heads/*\""
+ )
151
+ exec(command, repository.url)
152
end
153
154
0 commit comments