diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-17 15:47:27 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-17 15:47:27 -0400 |
commit | 971cd87cc684556d2daa273937e0f03e0dc5d48e (patch) | |
tree | 5af8000f93a1f22307898d32abece83daf68cb2b /models | |
parent | 9eabbe68a67cf1549c5eae0ef6ff5f2e54d7efbe (diff) | |
download | gitea-971cd87cc684556d2daa273937e0f03e0dc5d48e.tar.gz gitea-971cd87cc684556d2daa273937e0f03e0dc5d48e.zip |
Add log output
Diffstat (limited to 'models')
-rw-r--r-- | models/repo.go | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/models/repo.go b/models/repo.go index 1b74f19d46..3d11d0d011 100644 --- a/models/repo.go +++ b/models/repo.go @@ -182,16 +182,23 @@ func initRepoCommit(tmpPath string, sig *git.Signature) error { } defer os.Chdir(curPath) - if _, _, err := com.ExecCmd("git", "add", "--all"); err != nil { + var stdout, stderr string + if stdout, stderr, err = com.ExecCmd("git", "add", "--all"); err != nil { return err } - if _, _, err := com.ExecCmd("git", "commit", fmt.Sprintf("--author='%s <%s>'", sig.Name, sig.Email), + log.Info("stdout(1): %s", stdout) + log.Info("stderr(1): %s", stderr) + if stdout, stderr, err = com.ExecCmd("git", "commit", fmt.Sprintf("--author='%s <%s>'", sig.Name, sig.Email), "-m", "Init commit"); err != nil { return err } - if _, _, err := com.ExecCmd("git", "push", "origin", "master"); err != nil { + log.Info("stdout(2): %s", stdout) + log.Info("stderr(2): %s", stderr) + if stdout, stderr, err = com.ExecCmd("git", "push", "origin", "master"); err != nil { return err } + log.Info("stdout(3): %s", stdout) + log.Info("stderr(3): %s", stderr) return nil } |