CommitService: new word diff option
With the update to Gitaly protocol 13.11.1 comes a new option to generate word-based diffs:
message CommitDiffRequest {
+ enum DiffMode {
+ // DEFAULT is the standard diff mode and results in a linewise diff for textfiles.
+ DEFAULT = 0;
+ // WORDDIFF is a word diff and computes the diff for whitespace separated words instead of for whole lines.
+ WORDDIFF = 1;
+ }
+
Repository repository = 1 [(target_repository)=true];
string left_commit_id = 2;
string right_commit_id = 3;
@@ -65,6 +72,9 @@
int32 safe_max_files = 11;
int32 safe_max_lines = 12;
int32 safe_max_bytes = 13;
+
+ // DiffMode is the mode used for generating the diff. Please refer to the enum declaration for supported modes.
+ DiffMode diff_mode = 15;
}
Task list
-
investigate how soon we need to implement it. In particular is it behind feature flags on the Rails side? -
implementation design: do we have upstream Mercurial options for this, or perhaps some well-maintained extension or should we add a post-treatment of differing lines? -
implementation