瀏覽代碼

I need to rewrite this

Unknown 11 年之前
父節點
當前提交
78979c6d4c
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      models/git.go

+ 2 - 1
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()