aboutsummaryrefslogtreecommitdiffstats
path: root/modules/repofiles
diff options
context:
space:
mode:
Diffstat (limited to 'modules/repofiles')
-rw-r--r--modules/repofiles/temp_repo.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/repofiles/temp_repo.go b/modules/repofiles/temp_repo.go
index e0d6c9fcb6..49a7ddbf19 100644
--- a/modules/repofiles/temp_repo.go
+++ b/modules/repofiles/temp_repo.go
@@ -292,7 +292,7 @@ func (t *TemporaryUploadRepository) DiffIndex() (*gitdiff.Diff, error) {
var diff *gitdiff.Diff
var finalErr error
- if err := git.NewCommand("diff-index", "--cached", "-p", "HEAD").
+ if err := git.NewCommand("diff-index", "--src-prefix=\\a/", "--dst-prefix=\\b/", "--cached", "-p", "HEAD").
RunInDirTimeoutEnvFullPipelineFunc(nil, 30*time.Second, t.basePath, stdoutWriter, stderr, nil, func(ctx context.Context, cancel context.CancelFunc) error {
_ = stdoutWriter.Close()
diff, finalErr = gitdiff.ParsePatch(setting.Git.MaxGitDiffLines, setting.Git.MaxGitDiffLineCharacters, setting.Git.MaxGitDiffFiles, stdoutReader)