summaryrefslogtreecommitdiff
path: root/lib/api/files.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-04-24 12:46:39 +0000
committerDouwe Maan <douwe@gitlab.com>2015-04-24 12:46:39 +0000
commit6ae606d81f12d363e02c1dc0b5b9904d431a9a3a (patch)
tree02be1af7cca9197d076db2e926244c496fe72cd9 /lib/api/files.rb
parent9409f2a3b31178448c4f41802d2775ded9095800 (diff)
parent077a8ec270b58ed099d13447841d51b2df70541b (diff)
downloadgitlab-ce-6ae606d81f12d363e02c1dc0b5b9904d431a9a3a.tar.gz
Merge branch 'commit-project' into 'master'
Link cross-project cross-reference notes to correct project. - Fixes #1431: Don't crash when an MR from a fork has a cross-reference comment from the target project on of its commits. - Include commit comments in MR from a forked project. To accomplish this, the Commit model needs to know about its project. Adding this attribute also simplifies a bunch of other methods that deal with a note's target, that previously had to have special logic for when it belonged to a commit. See merge request !554
Diffstat (limited to 'lib/api/files.rb')
-rw-r--r--lib/api/files.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/files.rb b/lib/api/files.rb
index 3176ef0e256..e0ea6d7dd1d 100644
--- a/lib/api/files.rb
+++ b/lib/api/files.rb
@@ -34,7 +34,7 @@ module API
ref = attrs.delete(:ref)
file_path = attrs.delete(:file_path)
- commit = user_project.repository.commit(ref)
+ commit = user_project.commit(ref)
not_found! 'Commit' unless commit
blob = user_project.repository.blob_at(commit.sha, file_path)