Improve diff highlight (#3390)

- Try to reduce memory allocations
- Add possibility to disable diff highlight (can improve performance for large diffs)
- Tweaking with cost for prettier (cleaner) diffs
- Do not calculate diff when the number of removed lines in a block is not equal to the number of added lines (this usually resulted in ugly diffs)
This commit is contained in:
Andrey Nering 2016-08-07 13:49:47 -03:00 committed by 无闻
parent 08c976f811
commit 2772791fda
4 changed files with 60 additions and 66 deletions

View file

@ -191,6 +191,7 @@ var (
// Git settings
Git struct {
DisableDiffHighlight bool
MaxGitDiffLines int
MaxGitDiffLineCharacters int
MaxGitDiffFiles int