If a rebase has never been done on the branch HEAD is on, use the branch's merge information from .git/config
Remove code that parses remotes from git show-ref
Fix get_upstream_commit_from_config to throw exception; make failed-to-determine-upstream message more helpful