aboutsummaryrefslogtreecommitdiff
path: root/models/repo.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-05-03 01:38:22 -0400
committerUnknown <joe2010xtmf@163.com>2014-05-03 01:38:22 -0400
commitbb0bc0a240acf745001c1cb3f0f64c8fb8ab696b (patch)
tree1c01cccd2fab6896017c1a90f5551d2eda2d0439 /models/repo.go
parent163fcec59fd110db9edd459a06671962d48d87fa (diff)
parent7b60756f2c56314af715fa884388a5654bbfb791 (diff)
Merge branch 'dev' of github.com:gogits/gogs
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/models/repo.go b/models/repo.go
index 35b3fde1..e8baadf6 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -379,10 +379,11 @@ func createHookUpdate(hookPath, content string) error {
}
// SetRepoEnvs sets environment variables for command update.
-func SetRepoEnvs(userId int64, userName, repoName string) {
+func SetRepoEnvs(userId int64, userName, repoName, repoUserName string) {
os.Setenv("userId", base.ToStr(userId))
os.Setenv("userName", userName)
os.Setenv("repoName", repoName)
+ os.Setenv("repoUserName", repoUserName)
}
// InitRepository initializes README and .gitignore if needed.
@@ -459,7 +460,7 @@ func initRepository(f string, user *User, repo *Repository, initReadme bool, rep
return nil
}
- SetRepoEnvs(user.Id, user.Name, repo.Name)
+ SetRepoEnvs(user.Id, user.Name, repo.Name, user.Name)
// Apply changes and commit.
return initRepoCommit(tmpDir, user.NewGitSig())