progit/progit — pull request #756 by iosias (2014-05-05 17:03:55+00:00)
Title: Update 01-chapter7.markdown

Global variables are not necessary to demonstrate anything in this script. Tested:

% cat foo.rb
#!/usr/bin/env ruby

refname = ARGV[0]
oldrev = ARGV[1]
newrev = ARGV[2]
user = ENV['USER']

puts "Enforcing Policies... \n(#{refname}) (#{oldrev[0,6]}) (#{newrev[0,6]})"

% ./foo.rb refs/heads/what $(git rev-parse HEAD) $(git rev-parse HEAD~~)
Enforcing Policies...
(refs/heads/what) (27240a) (ae2ef7)