@@ -21,7 +21,7 @@ def run
2121 error "Branch '#{ branch_name } ' not found" unless repo . branch_exists? ( branch_name )
2222
2323 if Database . exists? ( repo . git_dir ) && !@options [ :force ]
24- puts "Database already exists. Use --force to rebuild."
24+ info "Database already exists. Use --force to rebuild."
2525 return
2626 end
2727
@@ -33,7 +33,7 @@ def run
3333 branch = Models ::Branch . find_or_create ( branch_name )
3434 analyzer = Analyzer . new ( repo )
3535
36- puts "Analyzing branch: #{ branch_name } "
36+ info "Analyzing branch: #{ branch_name } "
3737
3838 walker = repo . walk ( branch_name , @options [ :since ] )
3939 commits = walker . to_a
@@ -43,17 +43,17 @@ def run
4343
4444 branch . update ( last_analyzed_sha : repo . branch_target ( branch_name ) )
4545
46- print "\r Creating indexes..."
46+ print "\r Creating indexes..." unless Git :: Pkgs . quiet
4747 Database . create_bulk_indexes
4848 Database . optimize_for_reads
4949
5050 cache_stats = analyzer . cache_stats
5151
52- puts "\r Done!#{ ' ' * 20 } "
53- puts "Analyzed #{ total } commits"
54- puts "Found #{ stats [ :dependency_commits ] } commits with dependency changes"
55- puts "Stored #{ stats [ :snapshots_stored ] } snapshots (every #{ SNAPSHOT_INTERVAL } changes)"
56- puts "Blob cache: #{ cache_stats [ :cached_blobs ] } unique blobs, #{ cache_stats [ :blobs_with_hits ] } had cache hits"
52+ info "\r Done!#{ ' ' * 20 } "
53+ info "Analyzed #{ total } commits"
54+ info "Found #{ stats [ :dependency_commits ] } commits with dependency changes"
55+ info "Stored #{ stats [ :snapshots_stored ] } snapshots (every #{ SNAPSHOT_INTERVAL } changes)"
56+ info "Blob cache: #{ cache_stats [ :cached_blobs ] } unique blobs, #{ cache_stats [ :blobs_with_hits ] } had cache hits"
5757
5858 unless @options [ :no_hooks ]
5959 Commands ::Hooks . new ( [ "--install" ] ) . run
@@ -137,7 +137,7 @@ def bulk_process_commits(commits, branch, analyzer, total)
137137
138138 commits . each do |rugged_commit |
139139 processed += 1
140- print "\r Processing commit #{ processed } /#{ total } ..." if processed % 50 == 0 || processed == total
140+ print "\r Processing commit #{ processed } /#{ total } ..." if ! Git :: Pkgs . quiet && ( processed % 50 == 0 || processed == total )
141141
142142 next if rugged_commit . parents . length > 1 # skip merge commits
143143
0 commit comments