diff options
author | Unknwon <u@gogs.io> | 2015-03-19 16:44:22 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-03-19 16:44:22 -0400 |
commit | 7cf05645873634cd926bb16ff880840330305d5b (patch) | |
tree | b6ea671b0a0552c01f5701810076dccb07ad4af5 /models/repo.go | |
parent | 1cb57b1a440373cec4fcca00aa43ad9000b9b0bb (diff) | |
download | gitea-7cf05645873634cd926bb16ff880840330305d5b.tar.gz gitea-7cf05645873634cd926bb16ff880840330305d5b.zip |
update gopmfile
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/models/repo.go b/models/repo.go index 947667b644..cfab329bab 100644 --- a/models/repo.go +++ b/models/repo.go @@ -396,16 +396,14 @@ func createUpdateHook(repoPath string) error { } // InitRepository initializes README and .gitignore if needed. -func initRepository(e Engine, f string, u *User, repo *Repository, initReadme bool, repoLang, license string) error { - repoPath := RepoPath(u.Name, repo.Name) - +func initRepository(e Engine, repoPath string, u *User, repo *Repository, initReadme bool, repoLang, license string) error { // Init bare new repository. os.MkdirAll(repoPath, os.ModePerm) _, stderr, err := process.ExecDir(-1, repoPath, fmt.Sprintf("initRepository(git init --bare): %s", repoPath), "git", "init", "--bare") if err != nil { - return errors.New("initRepository(git init --bare): " + stderr) + return errors.New("git init --bare: " + stderr) } if err := createUpdateHook(repoPath); err != nil { @@ -432,7 +430,7 @@ func initRepository(e Engine, f string, u *User, repo *Repository, initReadme bo fmt.Sprintf("initRepository(git clone): %s", repoPath), "git", "clone", repoPath, tmpDir) if err != nil { - return errors.New("initRepository(git clone): " + stderr) + return errors.New("git clone: " + stderr) } // README |