mirror of
https://github.com/go-gitea/gitea.git
synced 2024-05-11 05:55:29 +00:00
response 404 for diff/patch of a commit that not exist (#15221)
* response 404 for diff/patch of a commit that not exist fix #15217 Signed-off-by: a1012112796 <[email protected]> * Update routers/repo/commit.go Co-authored-by: silverwind <[email protected]> * use ctx.NotFound() Co-authored-by: zeripath <[email protected]> Co-authored-by: silverwind <[email protected]>
This commit is contained in:
co-authored by
GitHub
zeripath
silverwind
parent
f07b137e04
commit
007fb00c0e
+1
-1
@@ -47,7 +47,7 @@ func GetRawDiffForFile(repoPath, startCommit, endCommit string, diffType RawDiff
|
||||
func GetRepoRawDiffForFile(repo *Repository, startCommit, endCommit string, diffType RawDiffType, file string, writer io.Writer) error {
|
||||
commit, err := repo.GetCommit(endCommit)
|
||||
if err != nil {
|
||||
return fmt.Errorf("GetCommit: %v", err)
|
||||
return err
|
||||
}
|
||||
fileArgs := make([]string, 0)
|
||||
if len(file) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user