summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-12-07 22:37:43 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-12-07 22:37:43 +0800
commit5ecd0c81af85476c2328d3836cc68b17ebd5a8a6 (patch)
treeca4896ab211f3de60f9ca9a8a19b8db288b5146f /spec/models
parent6ae1a73cfdad4b98176bb99846042d4378119de2 (diff)
downloadgitlab-ce-5ecd0c81af85476c2328d3836cc68b17ebd5a8a6.tar.gz
Commit outside the hooks if possible:
So we still commit outside the hooks, and only update ref inside the hooks. There are only two exceptions: * Whenever it's adding a tag. We can't add a tag without committing, unfortunately. See !7700 * Whenever source project is in another repository. We'll need to fetch ref otherwise commits can't be made. See the whole discussion starting from: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_19210942
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/repository_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb
index e3ec4c85a74..ebd05c946cc 100644
--- a/spec/models/repository_spec.rb
+++ b/spec/models/repository_spec.rb
@@ -695,7 +695,7 @@ describe Repository, models: true do
user,
repository.path_to_repo,
old_rev,
- old_rev,
+ new_rev,
'refs/heads/feature').
and_yield(service).and_return(true)
end