diff options
author | ChristopherHX <christopher.homberger@web.de> | 2023-04-07 08:42:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-07 14:42:43 +0800 |
commit | 17623bba0d62e1954031fadc019c3cd104cb5fb8 (patch) | |
tree | da42e41356aabb92d9fe1668bb2cfde101f65d00 /modules/git/repo_commit.go | |
parent | 6148e38b8640f732be41e5cf12b9521e9aa51b17 (diff) | |
download | gitea-17623bba0d62e1954031fadc019c3cd104cb5fb8.tar.gz gitea-17623bba0d62e1954031fadc019c3cd104cb5fb8.zip |
Remove `Repository.getFilesChanged` to fix Actions `paths` and `paths-ignore` filter (#23920)
Remove the misbehaving function and call
Repository.GetFilesChangedBetween instead.
Fixes #23919
---
~~_TODO_ test this~~ `Repository.getFilesChanged` seems to be only used
by Gitea Actions, but a similar function already exists
**Update** I tested this change and the issue is gone.
Diffstat (limited to 'modules/git/repo_commit.go')
-rw-r--r-- | modules/git/repo_commit.go | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/modules/git/repo_commit.go b/modules/git/repo_commit.go index 0e1b00ce08..2b780feb5c 100644 --- a/modules/git/repo_commit.go +++ b/modules/git/repo_commit.go @@ -182,14 +182,6 @@ func (repo *Repository) searchCommits(id SHA1, opts SearchCommitsOptions) ([]*Co return repo.parsePrettyFormatLogToList(bytes.TrimSuffix(stdout, []byte{'\n'})) } -func (repo *Repository) getFilesChanged(id1, id2 string) ([]string, error) { - stdout, _, err := NewCommand(repo.Ctx, "diff", "--name-only").AddDynamicArguments(id1, id2).RunStdBytes(&RunOpts{Dir: repo.Path}) - if err != nil { - return nil, err - } - return strings.Split(string(stdout), "\n"), nil -} - // FileChangedBetweenCommits Returns true if the file changed between commit IDs id1 and id2 // You must ensure that id1 and id2 are valid commit ids. func (repo *Repository) FileChangedBetweenCommits(filename, id1, id2 string) (bool, error) { |