2
0
Unknown 11 жил өмнө
parent
commit
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()