From: Unknown Date: Wed, 26 Mar 2014 10:43:58 +0000 (-0400) Subject: I need to rewrite this X-Git-Tag: v0.9.99~2315 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=78979c6d4c1408910cf12546b26d727752c62250;p=gitea.git I need to rewrite this --- diff --git a/models/git.go b/models/git.go index 0f41a922c1..ce4434ca5f 100644 --- a/models/git.go +++ b/models/git.go @@ -351,8 +351,9 @@ func GetDiff(repoPath, commitid string) (*Diff, error) { return nil, err } + // ???? if commit.ParentCount() == 0 { - return nil, err + return &Diff{}, err } rd, wr := io.Pipe()