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
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
iv
gitlab-shell
Commits
d2b77063
Commit
d2b77063
authored
Oct 21, 2015
by
Jeroen Nijhof
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added git gc for housekeeping
parent
fccdcc07
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
README.md
README.md
+4
-0
lib/gitlab_projects.rb
lib/gitlab_projects.rb
+10
-3
No files found.
README.md
View file @
d2b77063
...
...
@@ -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 @
d2b77063
...
...
@@ -55,11 +55,12 @@ 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
'update-head'
;
update_head
when
'update-head'
;
update_head
when
'gc'
;
gc
else
$logger
.
warn
"Attempt to execute invalid gitlab-projects command
#{
@command
.
inspect
}
."
puts
'not allowed'
...
...
@@ -246,4 +247,10 @@ 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
}
>."
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