diff options
Diffstat (limited to 'git-parse-remote.sh')
-rwxr-xr-x | git-parse-remote.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/git-parse-remote.sh b/git-parse-remote.sh index 187f0883c9..69998169b7 100755 --- a/git-parse-remote.sh +++ b/git-parse-remote.sh @@ -68,6 +68,12 @@ get_remote_url () { esac } +get_default_remote () { + curr_branch=$(git-symbolic-ref HEAD | sed -e 's|^refs/heads/||') + origin=$(git-repo-config --get "branch.$curr_branch.remote") + echo ${origin:-origin} +} + get_remote_default_refs_for_push () { data_source=$(get_data_source "$1") case "$data_source" in |