Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
a466b217
Commit
a466b217
authored
Jul 16, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add create_branch, rm_branch methods to Gitlab::Shell class
parent
5768f98d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
lib/gitlab/backend/shell.rb
lib/gitlab/backend/shell.rb
+25
-0
No files found.
lib/gitlab/backend/shell.rb
View file @
a466b217
...
...
@@ -71,6 +71,31 @@ module Gitlab
system
"
#{
gitlab_shell_user_home
}
/gitlab-shell/bin/gitlab-projects"
,
"rm-project"
,
"
#{
name
}
.git"
end
# Add repository branch from passed ref
#
# path - project path with namespace
# branch_name - new branch name
# ref - HEAD for new branch
#
# Ex.
# add_branch("gitlab/gitlab-ci", "4-0-stable", "master")
#
def
add_branch
(
path
,
branch_name
,
ref
)
system
"
#{
gitlab_shell_user_home
}
/gitlab-shell/bin/gitlab-projects"
,
"create-branch"
,
"
#{
path
}
.git"
,
branch_name
,
ref
end
# Remove repository branch
#
# path - project path with namespace
# branch_name - branch name to remove
#
# Ex.
# rm_branch("gitlab/gitlab-ci", "4-0-stable")
#
def
rm_branch
(
path
,
branch_name
)
system
"
#{
gitlab_shell_user_home
}
/gitlab-shell/bin/gitlab-projects"
,
"rm-branch"
,
"
#{
path
}
.git"
,
branch_name
end
# Add new key to gitlab-shell
#
# Ex.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment