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()