#!/usr/bin/php
<?php

include('Hooks.php');
include('Colors.php');


$hook   = new Hooks();
$colors = new Colors();

$branch = $hook->getBranch();

if (($hook->checkBranch('master') || $hook->checkBranch('stage') || $hook->checkBranch('devel')) && strlen($argv[1]) != 40) {
    echo $colors->getColoredString("Rebase on this branch is disabled", "white", "red") . "\n";
        exit(1);
}
