diff options
author | Bwko <bouwko@gmail.com> | 2016-12-08 23:08:28 +0100 |
---|---|---|
committer | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2016-12-09 20:13:48 +0100 |
commit | cbcb4361d5fa554b707b28055aed33629a34d60c (patch) | |
tree | 0b804b838ef6a6d3b64590f74fda367f111ea2d9 /models/pull.go | |
parent | 7b5b5178e1b8becd8df8cef0348e68173267a730 (diff) | |
download | gitea-cbcb4361d5fa554b707b28055aed33629a34d60c.tar.gz gitea-cbcb4361d5fa554b707b28055aed33629a34d60c.zip |
Fixes issue #283
Delete old temp local copy before we create a new temp local copy
Diffstat (limited to 'models/pull.go')
-rw-r--r-- | models/pull.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/models/pull.go b/models/pull.go index b7a1ce5d2e..9ffbfe0286 100644 --- a/models/pull.go +++ b/models/pull.go @@ -429,6 +429,9 @@ func (pr *PullRequest) testPatch() (err error) { log.Trace("PullRequest[%d].testPatch (patchPath): %s", pr.ID, patchPath) + // Delete old temp local copy before we create a new temp local copy + RemoveAllWithNotice("Deleting old local copy", pr.BaseRepo.LocalCopyPath()) + if err := pr.BaseRepo.UpdateLocalCopyBranch(pr.BaseBranch); err != nil { return fmt.Errorf("UpdateLocalCopy: %v", err) } |