Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-shell
Commits
b1d8db4f
Commit
b1d8db4f
authored
Jan 04, 2016
by
Jeroen Nijhof
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://gitlab.com/jnijhof/gitlab-shell
Conflicts: lib/gitlab_projects.rb
parents
962f7a31
f487dcb0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
README.md
README.md
+4
-0
lib/gitlab_projects.rb
lib/gitlab_projects.rb
+13
-2
No files found.
README.md
View file @
b1d8db4f
...
...
@@ -121,6 +121,10 @@ Remove tag:
./bin/gitlab-projects rm-tag gitlab/gitlab-ci.git v3.0.0
Gc repo:
./bin/gitlab-projects gc gitlab/gitlab-ci.git
## Keys
Add key:
...
...
lib/gitlab_projects.rb
View file @
b1d8db4f
...
...
@@ -55,12 +55,13 @@ class GitlabProjects
when
'rm-tag'
;
rm_tag
when
'add-project'
;
add_project
when
'list-projects'
;
puts
list_projects
when
'rm-project'
;
rm_project
when
'mv-project'
;
mv_project
when
'rm-project'
;
rm_project
when
'mv-project'
;
mv_project
when
'import-project'
;
import_project
when
'fork-project'
;
fork_project
when
'fetch-remote'
;
fetch_remote
when
'update-head'
;
update_head
when
'gc'
;
gc
else
$logger
.
warn
"Attempt to execute invalid gitlab-projects command
#{
@command
.
inspect
}
."
puts
'not allowed'
...
...
@@ -275,4 +276,14 @@ class GitlabProjects
$logger
.
info
"Update head in project
#{
project_name
}
to <
#{
new_head
}
>."
true
end
def
gc
$logger
.
info
"Running git gc for <
#{
full_path
}
>."
unless
File
.
exists?
(
full_path
)
$logger
.
error
"gc failed: destination path <
#{
full_path
}
> does not exist."
return
false
end
cmd
=
%W(git --git-dir=
#{
full_path
}
gc)
system
(
*
cmd
)
end
end
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