if (int($major) >= 2 && int($minor) >= 12) {
">=" compares numerically even when arguments are strings, so the int() calls aren't needed here.
More importantly, this will break when Git 3.0 is released, because int($minor) >= 12 will be no longer true.
-- Jakub Wilk