def git_get_branch_default(key, default):
    branch = GetCurrentBranch()
    if branch:
        git_key = ('branch.%s.%s' % (branch, key))
        (_, stdout) = RunGitWithCode(['config', '--int', '--get', git_key])
        try:
            return int(stdout.strip())
        except ValueError:
            pass
    return default
def git_get_branch_default(key, default):
    branch = GetCurrentBranch()
    if branch:
        git_key = ('branch.%s.%s' % (branch, key))
        (_, stdout) = RunGitWithCode(['config', '--int', '--get', git_key])
        try:
            return int(stdout.strip())
        except ValueError:
            pass
    return default