]> source.dussan.org Git - gitea.git/commit
Correctly handle moved files in apply patch (#22118) (#22136)
authorzeripath <art27@cantab.net>
Thu, 15 Dec 2022 15:28:05 +0000 (15:28 +0000)
committerGitHub <noreply@github.com>
Thu, 15 Dec 2022 15:28:05 +0000 (10:28 -0500)
commit721e422fa7a299d0dcfe9fe000c18f5e99380e37
treecac4c89b6b28fc79f0122394e6ac19aecf712b09
parent6f323d13dd0e978a4e3795e93600cb115dbd80a6
Correctly handle moved files in apply patch (#22118) (#22136)

Backport #22118

Moved files in a patch will result in git apply returning:

```
error: {filename}: No such file or directory
```

This wasn't handled by the git apply patch code. This PR adds handling
for this.

Fix #22083

Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
services/pull/patch.go