mirror of
https://github.com/alibaba/open-code-review.git
synced 2026-07-11 02:09:07 +00:00
strings.Split produces an empty trailing element when the git diff output ends with \n. The empty element was written into the last file's buffer, and TrimSuffix only removed one \n — leaving the last Diff field with an extra trailing newline that earlier files didn't have. Switch to TrimRight so all Diff values are consistently clean. |
||
|---|---|---|
| .. | ||
| git.go | ||
| git_test.go | ||
| hunk.go | ||
| hunk_test.go | ||
| parser.go | ||
| parser_test.go | ||
| relocation.go | ||
| relocation_test.go | ||
| resolver.go | ||
| resolver_test.go | ||
| workspace_file.go | ||
| workspace_file_test.go | ||