summaryrefslogtreecommitdiff
path: root/lib/gitlab/diff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-05-24 10:10:10 -0500
committerDouwe Maan <douwe@selenight.nl>2017-05-24 10:10:10 -0500
commit0bf339f0ed2f91a805e99fc7483572ad7d22093a (patch)
treef536be0bb67775cabcc99b7540bcfd7a108bebcf /lib/gitlab/diff
parent6e698b254ecddf23a866d9e98a885912102ccbce (diff)
downloadgitlab-ce-0bf339f0ed2f91a805e99fc7483572ad7d22093a.tar.gz
Address review
Diffstat (limited to 'lib/gitlab/diff')
-rw-r--r--lib/gitlab/diff/position_tracer.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/diff/position_tracer.rb b/lib/gitlab/diff/position_tracer.rb
index 46f8f7e8238..dcabb5f7fe5 100644
--- a/lib/gitlab/diff/position_tracer.rb
+++ b/lib/gitlab/diff/position_tracer.rb
@@ -46,12 +46,14 @@ module Gitlab
# Position
# start_sha - ID of commit A
# head_sha - ID of commit B
+ # base_sha - ID of base commit of A and B
# old_path - path as of A (nil if file was newly created)
# new_path - path as of B (nil if file was deleted)
# old_line - line number as of A (nil if file was newly created)
# new_line - line number as of B (nil if file was deleted)
#
- # We can easily update `start_sha` and `head_sha` to hold the IDs of commits C and D,
+ # We can easily update `start_sha` and `head_sha` to hold the IDs of
+ # commits C and D, and can trivially determine `base_sha` based on those,
# but need to find the paths and line numbers as of C and D.
#
# If the file was unchanged or newly created in A->B, the path as of D can be found