checkcommits: Refactor for git log.
checkcommits: Refactor for git log.

Refactor the code to simplify the way git log is called.

Signed-off-by: James O. D. Hunt <348fbaadfbada55ea105602bf5609e23ac1c4898@intel.com>

chavafg/tests,sboeuf/tests,clearcontainers/tests,GabyCT/tests,MarioCarrilloA/tests,bwarden/tests,MarioCarrilloA/tests,sboeuf/tests,GabyCT/tests,devimc/tests,chavafg/tests,devimc/tests,bwarden/tests,clearcontainers/tests