git-gc-cron 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -17,7 +17,7 @@ As user or as root:
17
17
 
18
18
  Put this into the system crontab (for example fcron on Linux):
19
19
 
20
- %weekly,nice(10),runas(gitosis) * * git-gc-cron /var/spool/gitosis/repositories
20
+ %weekly,nice(10),runas(git) * * git-gc-cron /var/spool/gitosis/repositories
21
21
  %weekly,nice(10),runas(me) * * git-gc-cron /home/me/myprojects /home/me/myotherprojects
22
22
 
23
23
  or into your personal crontab, if you like:
@@ -26,3 +26,9 @@ or into your personal crontab, if you like:
26
26
 
27
27
 
28
28
  git-gc-cron takes any number of paths to traverse as argument.
29
+
30
+ To see the progress you can watch the output of ps or top. For each repo it
31
+ compresses git-gc-cron changes the process name of the subprocess "git gc" to
32
+ something more useful:
33
+
34
+ (#1/10 /var/spool/gitosis/repositories/myproject.git) git
@@ -8,7 +8,7 @@ Feature: CLI
8
8
  And a checked out repo "repos1/def/xyz"
9
9
  And a bare repo "repos2/ghi.git"
10
10
  And a bare repo "repos3/jkl.git"
11
- When I run "git-gc-cron scan repos1 repos2"
11
+ When I run "git-gc-cron repos1 repos2"
12
12
  Then the repo "repos1/abc" should be packed
13
13
  And the repo "repos1/def/xyz" should be packed
14
14
  And the repo "repos2/ghi.git" should be packed
@@ -3,9 +3,10 @@ module GitGcCron
3
3
 
4
4
  def self.start
5
5
  ARGV.each do |base|
6
- Dir["#{base}/**/{.git,*.git}"].each do |repo_path|
6
+ repos = Dir["#{base}/**/{.git,*.git}"]
7
+ repos.each_with_index do |repo_path, i|
7
8
  Dir.chdir(repo_path) do
8
- system "git gc -q"
9
+ system ["git", "(##{i + 1}/#{repos.size + 1} #{repo_path}) git"], "gc", "-q"
9
10
  end
10
11
  end
11
12
  end
@@ -1,3 +1,3 @@
1
1
  module GitGcCron
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: git-gc-cron
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.1
5
+ version: 0.0.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Thomas Ritz