mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-29 13:31:57 +00:00
refactor: GetDiffShortStat and fix panic caused by inconsistent "changed file number" (#39248)
This commit is contained in:
1 parent
e5e7b2e76e
commit
3bd7ea4c9f
13 files changed
+143
-146
No files matched your search
@@ -330,3 +330,11 @@ func GetAffectedFiles(ctx context.Context, repo *Repository, branchName, oldComm
|
||||
|
||||
return affectedFiles, err
|
||||
}
|
||||
|
||||
// GetReverseRawDiff dumps the reverse diff results of repository in given commit ID to io.Writer.
|
||||
func GetReverseRawDiff(ctx context.Context, repo RepositoryFacade, commitID string, writer io.Writer) error {
|
||||
return gitcmd.NewCommand("show", "--pretty=format:revert %H%n", "-R").
|
||||
AddDynamicArguments(commitID).
|
||||
WithStdoutCopy(writer).
|
||||
WithRepo(repo).RunWithStderr(ctx)
|
||||
}
|
||||
Reference in new issue
Block a user