8 require 'nos_oignons/git'
9 require 'nos_oignons/subscriptions'
11 $stdin.readlines.each do |ref_line|
12 old_value, new_value, ref_name = ref_line.rstrip.split(' ', 3)
13 IO.popen(['git', 'diff', '--name-status', "#{old_value}..#{new_value}"]) do |io|
14 NosOignons::Git.handle_modified_files(io) do |file|
15 next unless file.start_with?("#{NosOignons::SUBSCRIPTIONS_ROOT}/")
17 NosOignons::Subscription.read_from_git(new_value, file)
19 $stderr.puts "Désolé : #{file} n'a pas le bon format !"