change git which-branch definition to be compatible with old git.