aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorChristian Muehlhaeuser <muesli@gmail.com>2019-07-22 11:35:54 +0200
committerLunny Xiao <xiaolunwen@gmail.com>2019-07-22 17:35:53 +0800
commitb0cd3b8ab9b174f11fd4db8737106be5caf9cc1c (patch)
tree357b210567a95a33667e9441062584abdd799951 /models
parent9a965035f0e485b2f4b69b76441949c264499c2b (diff)
downloadgitea-b0cd3b8ab9b174f11fd4db8737106be5caf9cc1c.tar.gz
gitea-b0cd3b8ab9b174f11fd4db8737106be5caf9cc1c.zip
Fixed ineffectual assignments (#7555)
Don't assign values we never use.
Diffstat (limited to 'models')
-rw-r--r--models/git_diff.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/git_diff.go b/models/git_diff.go
index 2f48f1b6fa..518d543e7b 100644
--- a/models/git_diff.go
+++ b/models/git_diff.go
@@ -543,7 +543,7 @@ func ParsePatch(maxLines, maxLineCharacters, maxFiles int, reader io.Reader) (*D
// Get new file.
if strings.HasPrefix(line, cmdDiffHead) {
- middle := -1
+ var middle int
// Note: In case file name is surrounded by double quotes (it happens only in git-shell).
// e.g. diff --git "a/xxx" "b/xxx"