summaryrefslogtreecommitdiffstats
path: root/serve.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2014-02-20 17:52:07 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2014-02-20 17:52:07 +0800
commit104aa23a9ed5ac01377eda1e421f1f3f43163c99 (patch)
tree9801de9a55b7dd720acdf94294ab8bd41092dd74 /serve.go
parentfee3bd0a93ac810c53bf083e38f3c5de61ef1065 (diff)
downloadgitea-104aa23a9ed5ac01377eda1e421f1f3f43163c99.tar.gz
gitea-104aa23a9ed5ac01377eda1e421f1f3f43163c99.zip
improved ssh supports
Diffstat (limited to 'serve.go')
-rw-r--r--serve.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/serve.go b/serve.go
index 6b4caa1dd7..b0e258e3f4 100644
--- a/serve.go
+++ b/serve.go
@@ -65,7 +65,7 @@ func runServ(*cli.Context) {
return
}
- println(cmd)
+ //println(cmd)
verb, args := parseCmd(cmd)
rr := strings.SplitN(strings.Trim(args, "'"), "/", 2)
@@ -80,13 +80,13 @@ func runServ(*cli.Context) {
isWrite := In(verb, COMMANDS_WRITE)
isRead := In(verb, COMMANDS_READONLY)
- println("repoPath:", models.RepoPath(user.Name, repoName))
+ //println("repoPath:", models.RepoPath(user.Name, repoName))
switch {
case isWrite:
has, err := models.HasAccess(user.Name, repoName, COMMANDS_WRITE[verb])
if err != nil {
- fmt.Println("Inernel error")
+ fmt.Println("Inernel error:", err)
return
}
if !has {
@@ -136,7 +136,7 @@ func runServ(*cli.Context) {
fullPath := models.RepoPath(user.Name, repoName)
newcmd := fmt.Sprintf("%s '%s'", verb, fullPath)
- println(newcmd)
+ //println(newcmd)
gitcmd := exec.Command("git", "shell", "-c", newcmd)
gitcmd.Stdout = os.Stdout
gitcmd.Stderr = os.Stderr