Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GetFilesChangedBetween if the file name may be escaped (#23272) #23279

Merged

Commits on Mar 3, 2023

  1. Fix GetFilesChangedBetween if the file name may be escaped (go-gitea#…

    …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 go-gitea#22568 (comment)
    
    Signed-off-by: Andrew Thornton <art27@cantab.net>
    Co-authored-by: techknowlogick <techknowlogick@gitea.io>
    2 people authored and GiteaBot committed Mar 3, 2023
    Configuration menu
    Copy the full SHA
    ca45891 View commit details
    Browse the repository at this point in the history