index
:
gogs.git
Gogs is a painless self-hosted Git service
log msg
author
committer
range
buildscript
main
mygogs
about
summary
refs
log
tree
commit
diff
path:
root
/
models
/
git.go
diff options
context:
1
2
3
4
5
6
7
8
9
10
15
20
25
30
35
40
space:
include
ignore
mode:
unified
ssdiff
stat only
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
/
models/git.go
parent
ac3a653442b8b6a83561e845cc03c5bc3cefc32b
(
diff
)
I need to rewrite this
Diffstat
(limited to 'models/git.go')
-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 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()