Function EditorVCSInterface.getFileDiff
Returns an Array
of Dictionary
objects containing the diff output from the VCS in use, if a VCS addon is initialized, else returns an empty Array
object. The diff contents also consist of some contextual lines which provide context to the observed line change in the file.
Each Dictionary
object has the line diff contents under the keys:
- "content"
to store a String
containing the line contents
- "status"
to store a String
which contains "+"
in case the content is a line addition but it stores a "-"
in case of deletion and an empty string in the case the line content is neither an addition nor a deletion.
- "new_line_number"
to store an integer containing the new line number of the line content.
- "line_count"
to store an integer containing the number of lines in the line content.
- "old_line_number"
to store an integer containing the old line number of the line content.
- "offset"
to store the offset of the line change since the first contextual line content.