diff --git a/app/models/repository.rb b/app/models/repository.rb
index 0f3e98db420ad41a9fa063983d559f7ffabb30b6..89293fa8b4dec160b101443a0d162e7d2534fe71 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -1215,7 +1215,7 @@ class Repository
 
       unless target
         raise CommitError.new(
-          "Cannot find branch #{branch_name} nor #{source_commit.try(:sha) ||source_branch}")
+          "Cannot find branch #{branch_name} nor #{source_commit.try(:sha) || source_branch}")
       end
 
       update_ref!(ref, target, oldrev)