diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-26 06:43:58 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-26 06:43:58 -0400 |
commit | 78979c6d4c1408910cf12546b26d727752c62250 (patch) | |
tree | 2f5646dadf45a059d66d7ecf4c6e9248eadfca5e | |
parent | ac3a653442b8b6a83561e845cc03c5bc3cefc32b (diff) | |
download | gitea-78979c6d4c1408910cf12546b26d727752c62250.tar.gz gitea-78979c6d4c1408910cf12546b26d727752c62250.zip |
I need to rewrite this
-rw-r--r-- | models/git.go | 3 |
1 files changed, 2 insertions, 1 deletions
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() |