Giteabot 2f1d968b27 Fix GetFilesChangedBetween if the file name may be escaped (#23272) (#23278)
Backport #23272

The code for GetFilesChangedBetween uses `git diff --name-only
base..head` to get the names of files changed between base and head
however this forgets that git will escape certain values.

This PR simply switches to use `-z` which has the `NUL` character as the
separator.

Ref https://github.com/go-gitea/gitea/pull/22568#discussion_r1123138096

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2023-03-04 02:11:50 -05:00
..
2022-08-30 21:15:45 -05:00
2022-06-11 21:50:14 +08:00
2021-10-24 22:12:43 +01:00
2022-08-09 11:22:24 +08:00
2022-01-20 18:46:10 +01:00
2022-01-20 18:46:10 +01:00
2021-10-17 20:47:12 +01:00
2022-01-20 18:46:10 +01:00

Git Module

This module is merged from https://github.com/go-gitea/git which is a Go module to access Git through shell commands. Now it's a part of gitea's main repository for easier pull request.