summaryrefslogtreecommitdiff
path: root/lib/gitlab_projects.rb
diff options
context:
space:
mode:
authorCiro Santilli <ciro.santilli@gmail.com>2014-10-31 11:00:57 +0100
committerCiro Santilli <ciro.santilli@gmail.com>2014-10-31 11:00:57 +0100
commitfc5edba6d6712bfc9c49b3f739d2c4037b27274e (patch)
tree02bd9bd4a2ea76755807b4296bff232e473c3e69 /lib/gitlab_projects.rb
parent00b3d2cb7095af3859734c88a7797182e598f047 (diff)
downloadgitlab-shell-fc5edba6d6712bfc9c49b3f739d2c4037b27274e.tar.gz
Delete tags and branches that start with hyphen
Diffstat (limited to 'lib/gitlab_projects.rb')
-rw-r--r--lib/gitlab_projects.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab_projects.rb b/lib/gitlab_projects.rb
index 82ae519..0744317 100644
--- a/lib/gitlab_projects.rb
+++ b/lib/gitlab_projects.rb
@@ -65,7 +65,7 @@ class GitlabProjects
def rm_branch
branch_name = ARGV.shift
- cmd = %W(git --git-dir=#{full_path} branch -D #{branch_name})
+ cmd = %W(git --git-dir=#{full_path} branch -D -- #{branch_name})
system(*cmd)
end
@@ -83,7 +83,7 @@ class GitlabProjects
def rm_tag
tag_name = ARGV.shift
- cmd = %W(git --git-dir=#{full_path} tag -d #{tag_name})
+ cmd = %W(git --git-dir=#{full_path} tag -d -- #{tag_name})
system(*cmd)
end