aboutsummaryrefslogtreecommitdiff
path: root/cmd/update.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/update.go')
-rw-r--r--cmd/update.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/update.go b/cmd/update.go
index 1d27fb3e..aca2a7cb 100644
--- a/cmd/update.go
+++ b/cmd/update.go
@@ -16,7 +16,7 @@ import (
var CmdUpdate = cli.Command{
Name: "update",
- Usage: "This command should only be called by SSH shell",
+ Usage: "This command should only be called by Git hook",
Description: `Update get pushed info and insert into database`,
Action: runUpdate,
Flags: []cli.Flag{
@@ -29,13 +29,13 @@ func runUpdate(c *cli.Context) {
setting.CustomConf = c.String("config")
}
+ setup("update.log")
+
if len(os.Getenv("SSH_ORIGINAL_COMMAND")) == 0 {
log.GitLogger.Trace("SSH_ORIGINAL_COMMAND is empty")
return
}
- setup("update.log")
-
args := c.Args()
if len(args) != 3 {
log.GitLogger.Fatal(2, "Arguments received are not equal to three")