summaryrefslogtreecommitdiffstats
path: root/conf
diff options
context:
space:
mode:
authorAndrey Nering <andrey.nering@gmail.com>2016-08-07 13:49:47 -0300
committer无闻 <u@gogs.io>2016-08-07 09:49:47 -0700
commit2772791fdad8f0ec4ae49aad020f8afdff2f9c46 (patch)
treefb07f73dfbab67a42d492009ae97119d39a0587a /conf
parent08c976f8117b92b25ea197e7dc0372b49d9ee412 (diff)
downloadgitea-2772791fdad8f0ec4ae49aad020f8afdff2f9c46.tar.gz
gitea-2772791fdad8f0ec4ae49aad020f8afdff2f9c46.zip
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)
Diffstat (limited to 'conf')
-rw-r--r--conf/app.ini8
1 files changed, 5 insertions, 3 deletions
diff --git a/conf/app.ini b/conf/app.ini
index 6157c08935..3c36195ff6 100644
--- a/conf/app.ini
+++ b/conf/app.ini
@@ -334,11 +334,13 @@ RUN_AT_START = true
SCHEDULE = @every 24h
[git]
-; Max number of lines allowed of a single file in diff view.
+; Disables highlight of added and removed changes
+DISABLE_DIFF_HIGHLIGHT = false
+; Max number of lines allowed of a single file in diff view
MAX_GIT_DIFF_LINES = 1000
-; Max number of characters of a line allowed in diff view.
+; Max number of characters of a line allowed in diff view
MAX_GIT_DIFF_LINE_CHARACTERS = 500
-; Max number of files shown in diff view.
+; Max number of files shown in diff view
MAX_GIT_DIFF_FILES = 100
; Arguments for command 'git gc', e.g. "--aggressive --auto"
; see more on http://git-scm.com/docs/git-gc/1.7.5