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
Show 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:
...
@@ -121,6 +121,10 @@ Remove tag:
./bin/gitlab-projects rm-tag gitlab/gitlab-ci.git v3.0.0
./bin/gitlab-projects rm-tag gitlab/gitlab-ci.git v3.0.0
Gc repo:
./bin/gitlab-projects gc gitlab/gitlab-ci.git
## Keys
## Keys
Add key:
Add key:
...
...
lib/gitlab_projects.rb
View file @
d2b77063
...
@@ -60,6 +60,7 @@ class GitlabProjects
...
@@ -60,6 +60,7 @@ class GitlabProjects
when
'import-project'
;
import_project
when
'import-project'
;
import_project
when
'fork-project'
;
fork_project
when
'fork-project'
;
fork_project
when
'update-head'
;
update_head
when
'update-head'
;
update_head
when
'gc'
;
gc
else
else
$logger
.
warn
"Attempt to execute invalid gitlab-projects command
#{
@command
.
inspect
}
."
$logger
.
warn
"Attempt to execute invalid gitlab-projects command
#{
@command
.
inspect
}
."
puts
'not allowed'
puts
'not allowed'
...
@@ -246,4 +247,10 @@ class GitlabProjects
...
@@ -246,4 +247,10 @@ class GitlabProjects
$logger
.
info
"Update head in project
#{
project_name
}
to <
#{
new_head
}
>."
$logger
.
info
"Update head in project
#{
project_name
}
to <
#{
new_head
}
>."
true
true
end
end
def
gc
$logger
.
info
"Running git gc for <
#{
full_path
}
>."
cmd
=
%W(git --git-dir=
#{
full_path
}
gc)
system
(
*
cmd
)
end
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