#!/bin/bash

# DESCRIPTION:
#
# Get branch pull url.

function git_branch_remote_url {
    git -C "$GIT_ROOT" config --get remote."$(git -C "$GIT_ROOT" config --get branch."$GIT_BRANCH".remote)".url
}

url="$(git_branch_remote_url)"

if [ -n "$url" ]; then
    echo "$url"
fi
