summaryrefslogtreecommitdiffstats
path: root/modules/git/tree.go
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-09-30 04:39:53 -0400
committerUnknwon <joe2010xtmf@163.com>2014-09-30 04:39:53 -0400
commit2a031c13658458df9f8f56ce295a8ba72bf35dff (patch)
tree5af1a495b55eddef9d8fe8e21d2a0bccc835ec1d /modules/git/tree.go
parent198567eccbd6425235f5c755b5862cbe90b435c2 (diff)
downloadgitea-2a031c13658458df9f8f56ce295a8ba72bf35dff.tar.gz
gitea-2a031c13658458df9f8f56ce295a8ba72bf35dff.zip
Fix #515
Diffstat (limited to 'modules/git/tree.go')
-rw-r--r--modules/git/tree.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/git/tree.go b/modules/git/tree.go
index a3012443d7..be77bfce02 100644
--- a/modules/git/tree.go
+++ b/modules/git/tree.go
@@ -109,9 +109,12 @@ func (t *Tree) ListEntries(relpath string) (Entries, error) {
}
t.entriesParsed = true
- stdout, _, err := com.ExecCmdDirBytes(t.repo.Path,
+ stdout, stderr, err := com.ExecCmdDirBytes(t.repo.Path,
"git", "ls-tree", t.Id.String())
if err != nil {
+ if strings.Contains(err.Error(), "exit status 128") {
+ return nil, errors.New(strings.TrimSpace(string(stderr)))
+ }
return nil, err
}
t.entries, err = parseTreeData(t, stdout)