diff --git a/discord/bot.go b/discord/bot.go index 4221578..f5b53cd 100644 --- a/discord/bot.go +++ b/discord/bot.go @@ -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 diff --git a/web/repo.go b/web/repo.go index 7aa1c6c..77c6ec5 100644 --- a/web/repo.go +++ b/web/repo.go @@ -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()) }