diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-07-06 19:28:13 -0400 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-07-06 19:28:13 -0400 |
commit | 228d2a4cb1943c4eda751f80990eed06a3875864 (patch) | |
tree | 402ec01514399a54f51688474ee855c1a30c6782 /app | |
parent | d9c75aec3adf23428e4c85a21ce2c357da006b6c (diff) | |
download | gitlab-ce-228d2a4cb1943c4eda751f80990eed06a3875864.tar.gz |
Add some more code comments.
Diffstat (limited to 'app')
-rw-r--r-- | app/models/concerns/note_on_diff.rb | 1 | ||||
-rw-r--r-- | app/models/merge_request.rb | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/models/concerns/note_on_diff.rb b/app/models/concerns/note_on_diff.rb index b511f33b8fa..6d8b9b76c84 100644 --- a/app/models/concerns/note_on_diff.rb +++ b/app/models/concerns/note_on_diff.rb @@ -31,6 +31,7 @@ module NoteOnDiff false end + # Returns an array of at most 16 highlighted lines above a diff note def truncated_diff_lines prev_match_line = nil prev_lines = [] diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 4624e9d36e9..ed99142902e 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -186,8 +186,9 @@ class MergeRequest < ActiveRecord::Base # This will not be the actual base commit if the target branch was merged into # the source branch after the merge request was created, but it is good enough # for the specific purpose of linking to a commit. - # It is not good enough for use in Gitlab::Git::DiffRefs, which need the - # true base commit. + # It is not good enough for use in `Gitlab::Git::DiffRefs`, which needs the + # true base commit, so we can't simply have `#diff_base_commit` fall back on + # this method. def likely_diff_base_commit first_commit.parent || first_commit end |