diff --git a/models/git.go b/models/git.go index 0f41a922..ce4434ca 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()