8000 Recover notes inconsistencies as well · ydah/git.ruby-lang.org@15b4949 · GitHub
[go: up one dir, main page]

Skip to content

Commit 15b4949

Browse files
committed
Recover notes inconsistencies as well
1 parent f7909fe commit 15b4949

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

bin/git-sync-check.rb

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,14 @@ def self.check_consistency
119119
rescue GitSyncCheck::Errors => e
120120
attempts -= 1
121121
if attempts > 0
122-
# Automatically fix inconsistency if it's master, but never sync random new branches.
123-
ref = 'refs/heads/master'
124-
if e.errors.key?(ref)
125-
remote_rev, local_rev = e.errors['refs/heads/master']
126-
puts "Fixing inconsistency ref:#{ref.inspect} remote:#{remote_rev.inspect} local:#{local_rev.inspect}"
127-
unless system('/home/git/git.ruby-lang.org/bin/update-ruby.sh', File.basename(ref))
128-
raise "Failed to execute update-ruby.sh for #{ref}"
122+
# Automatically fix inconsistency if it's master or notes, but never sync random new branches.
123+
['refs/heads/master', 'refs/notes/commits'].each do |ref|
124+
if e.errors.key?(ref)
125+
remote_rev, local_rev = e.errors['refs/heads/master']
126+
puts "Fixing inconsistency ref:#{ref.inspect} remote:#{remote_rev.inspect} local:#{local_rev.inspect}"
127+
unless system('/home/git/git.ruby-lang.org/bin/update-ruby.sh', File.basename(ref))
128+
raise "Failed to execute update-ruby.sh for #{ref}"
129+
end
129130
end
130131
end
131132
sleep 5

0 commit comments

Comments
 (0)
0