diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-02 23:41:07 -0700 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-02 23:41:07 -0700 |
| commit | f40d4e6685ca749c69bfc480a747a430f6c9825f (patch) | |
| tree | 0cfdb3e6276c6b4cce664b89c4da37f55adaac55 /lib | |
| parent | 36efe0f5807e92c2a0b6ec71b828387e6684a9ab (diff) | |
| parent | ec63804831d1a55171abfb7fc0894af20d4298e8 (diff) | |
| download | gitlab-ce-f40d4e6685ca749c69bfc480a747a430f6c9825f.tar.gz | |
Merge pull request #3597 from amacarthur/fork-pull-request
updated fork feature to use gitlab-shell for v5 of gitlab
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/gitlab/backend/shell.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/gitlab/backend/shell.rb b/lib/gitlab/backend/shell.rb index bae87977e8d..2c3ea902d93 100644 --- a/lib/gitlab/backend/shell.rb +++ b/lib/gitlab/backend/shell.rb @@ -36,6 +36,18 @@ module Gitlab system("#{gitlab_shell_user_home}/gitlab-shell/bin/gitlab-projects mv-project #{path}.git #{new_path}.git") end + # Fork repository to new namespace + # + # path - project path with namespace + # fork_namespace - namespace for forked project + # + # Ex. + # fork_repository("gitlab/gitlab-ci", "randx") + # + def fork_repository(path, fork_namespace) + system("#{gitlab_shell_user_home}/gitlab-shell/bin/gitlab-projects fork-project #{path}.git #{fork_namespace}") + end + # Remove repository from file system # # name - project path with namespace |
