Common option parsing for "git log --diff" and friends