History

Refactor git command arguments and make all arguments to be safe to be used (#21535)

Follow #21464 Make all git command arguments strictly safe. Most changes are one-to-one replacing, keep all existing logic.

wxiaoguang committed 4 years ago

Commit dcd9fc71 parent 4eeea7b71 files · +424 −390Browse files

Showing the changes to services/gitdiff/gitdiff_test.go (1 of 71 files). Show all

Unified · Split

services/gitdiff/gitdiff_test.go+1−1
@@ -627,7 +627,7 @@ func TestGetDiffRangeWithWhitespaceBehavior(t *testing.T) { · 626 unmodified lines
627 return627 return
628 }628 }
629 defer gitRepo.Close()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 diffs, err := GetDiff(gitRepo,631 diffs, err := GetDiff(gitRepo,
632 &DiffOptions{632 &DiffOptions{
633 AfterCommitID: "bd7063cc7c04689c4d082183d32a604ed27a24f9",633 AfterCommitID: "bd7063cc7c04689c4d082183d32a604ed27a24f9",