Remove long-dead code that used to be used by git-pull.sh before 49eb8d39c7 ("Remove contrib/examples/*", 2018-03-25). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> --- git-parse-remote.sh | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/git-parse-remote.sh b/git-parse-remote.sh index e3f6195281..864519eecf 100644 --- a/git-parse-remote.sh +++ b/git-parse-remote.sh @@ -8,43 +8,3 @@ get_default_remote () { origin=$(git config --get "branch.$curr_branch.remote") echo ${origin:-origin} } - -get_remote_merge_branch () { - case "$#" in - 0|1) - origin="$1" - default=$(get_default_remote) - test -z "$origin" && origin=$default - curr_branch=$(git symbolic-ref -q HEAD) && - [ "$origin" = "$default" ] && - echo $(git for-each-ref --format='%(upstream)' $curr_branch) - ;; - *) - repo=$1 - shift - ref=$1 - # FIXME: It should return the tracking branch - # Currently only works with the default mapping - case "$ref" in - +*) - ref=$(expr "z$ref" : 'z+\(.*\)') - ;; - esac - expr "z$ref" : 'z.*:' >/dev/null || ref="${ref}:" - remote=$(expr "z$ref" : 'z\([^:]*\):') - case "$remote" in - '' | HEAD ) remote=HEAD ;; - heads/*) remote=${remote#heads/} ;; - refs/heads/*) remote=${remote#refs/heads/} ;; - refs/* | tags/* | remotes/* ) remote= - esac - [ -n "$remote" ] && case "$repo" in - .) - echo "refs/heads/$remote" - ;; - *) - echo "refs/remotes/$repo/$remote" - ;; - esac - esac -} -- 2.29.2.222.g5d2a92d10f8