patch went the wrong way

This commit is contained in:
Michael Zhang 2020-10-14 16:57:15 -05:00
parent 4c7683c65c
commit 172a5265bc
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B
2 changed files with 2 additions and 2 deletions

View file

@ -168,7 +168,7 @@ func (bot *Bot) NotifyNewBeatmap(channels []string, newMaps []osuapi.Beatmapset)
err = fmt.Errorf("couldn't retrieve commit parent: %w", err)
return
} else {
patch, err = commit.Patch(parent)
patch, err = parent.Patch(commit)
if err != nil {
err = fmt.Errorf("couldn't retrieve patch: %w", err)
return

View file

@ -74,7 +74,7 @@ func (web *Web) mapPatch(c *gin.Context) {
hashObj := plumbing.NewHash(hash)
commit, _ := repo.CommitObject(hashObj)
parent, _ := commit.Parent(0)
patch, _ := commit.Patch(parent)
patch, _ := parent.Patch(commit)
c.String(http.StatusOK, "text/plain", patch.String())
}