BigW Consortium Gitlab

Commit 5ba7a8e0 by Dmitriy Zaporozhets

Merge branch 'repo-check-task' into 'master'

Add new rake task to check repo integrity Add a `gitlab:repo:check` task that checks repository integrity with `git fsck`. See #1819. See merge request !1778
parents 5456b00f acd80bdc
...@@ -25,6 +25,7 @@ v 7.10.0 (unreleased) ...@@ -25,6 +25,7 @@ v 7.10.0 (unreleased)
- Don't leak existence of group or project via search. - Don't leak existence of group or project via search.
- Fix bug where Wiki pages that included a '/' were no longer accessible (Stan Hu) - Fix bug where Wiki pages that included a '/' were no longer accessible (Stan Hu)
- Fix bug where error messages from Dropzone would not be displayed on the issues page (Stan Hu) - Fix bug where error messages from Dropzone would not be displayed on the issues page (Stan Hu)
- Add a rake task to check repository integrity with `git fsck`
- Add ability to configure Reply-To address in gitlab.yml (Stan Hu) - Add ability to configure Reply-To address in gitlab.yml (Stan Hu)
- Move current user to the top of the list in assignee/author filters (Stan Hu) - Move current user to the top of the list in assignee/author filters (Stan Hu)
- Fix broken side-by-side diff view on merge request page (Stan Hu) - Fix broken side-by-side diff view on merge request page (Stan Hu)
......
...@@ -687,6 +687,23 @@ namespace :gitlab do ...@@ -687,6 +687,23 @@ namespace :gitlab do
end end
end end
namespace :repo do
desc "GITLAB | Check the integrity of the repositories managed by GitLab"
task check: :environment do
namespace_dirs = Dir.glob(
File.join(Gitlab.config.gitlab_shell.repos_path, '*')
)
namespace_dirs.each do |namespace_dir|
repo_dirs = Dir.glob(File.join(namespace_dir, '*'))
repo_dirs.each do |dir|
puts "\nChecking repo at #{dir}"
system(*%w(git fsck), chdir: dir)
end
end
end
end
# Helper methods # Helper methods
########################## ##########################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment