Follow #21464 Make all git command arguments strictly safe. Most changes are one-to-one replacing, keep all existing logic.
Showing the changes to services/gitdiff/gitdiff_test.go (1 of 71 files). Show all
Unified · Split
| @@ -627,7 +627,7 @@ func TestGetDiffRangeWithWhitespaceBehavior(t *testing.T) { · 626 unmodified lines | ||
| 627 | 627 | return |
| 628 | 628 | } |
| 629 | 629 | defer gitRepo.Close() |
| 630 | − for _, behavior := range []string{"-w", "--ignore-space-at-eol", "-b", ""} { | |
| 630 | + for _, behavior := range []git.CmdArg{"-w", "--ignore-space-at-eol", "-b", ""} { | |
| 631 | 631 | diffs, err := GetDiff(gitRepo, |
| 632 | 632 | &DiffOptions{ |
| 633 | 633 | AfterCommitID: "bd7063cc7c04689c4d082183d32a604ed27a24f9", |