Skip to content
Snippets Groups Projects
Commit a850fc98 authored by Jani Nikula's avatar Jani Nikula
Browse files

dim: use repo_to_remote instead of open-coding it


We have a helper for this, use it.

Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 897985d8
No related branches found
No related tags found
No related merge requests found
...@@ -626,7 +626,7 @@ function commit_rerere_cache ...@@ -626,7 +626,7 @@ function commit_rerere_cache
function dim_rebuild_tip function dim_rebuild_tip
{ {
local integration_branch specfile time first rerere repo url_list remote local integration_branch specfile time first rerere repo remote
integration_branch=drm-tip integration_branch=drm-tip
specfile=$(mktemp) specfile=$(mktemp)
...@@ -653,8 +653,7 @@ function dim_rebuild_tip ...@@ -653,8 +653,7 @@ function dim_rebuild_tip
fi fi
for repo in "${!drm_tip_repos[@]}"; do for repo in "${!drm_tip_repos[@]}"; do
url_list=${drm_tip_repos[$repo]} remote=$(repo_to_remote $repo)
remote=$(url_to_remote $url_list)
echo -n "Fetching $repo (local remote $remote)... " echo -n "Fetching $repo (local remote $remote)... "
git_fetch_helper $remote git_fetch_helper $remote
echo "Done." echo "Done."
...@@ -665,8 +664,7 @@ function dim_rebuild_tip ...@@ -665,8 +664,7 @@ function dim_rebuild_tip
local branch override sha1 fixup_file local branch override sha1 fixup_file
read -r repo branch override <<< $conf read -r repo branch override <<< $conf
url_list=${drm_tip_repos[$repo]} remote=$(repo_to_remote $repo)
remote=$(url_to_remote $url_list)
sha1=$remote/$branch sha1=$remote/$branch
echo -n "Merging $repo (local remote $remote) $branch... " echo -n "Merging $repo (local remote $remote) $branch... "
...@@ -1759,13 +1757,12 @@ function dim_list_branches ...@@ -1759,13 +1757,12 @@ function dim_list_branches
dim_alias_ub=update-branches dim_alias_ub=update-branches
function dim_update_branches function dim_update_branches
{ {
local repo remote url_list intel_remote local repo remote intel_remote
cd $DIM_PREFIX/$DIM_REPO cd $DIM_PREFIX/$DIM_REPO
for repo in "${!drm_tip_repos[@]}"; do for repo in "${!drm_tip_repos[@]}"; do
url_list=${drm_tip_repos[$repo]} remote=$(repo_to_remote $repo)
remote=$(url_to_remote $url_list)
echo -n "Fetching $repo (local remote $remote)... " echo -n "Fetching $repo (local remote $remote)... "
git_fetch_helper $remote git_fetch_helper $remote
echo "Done." echo "Done."
...@@ -1963,11 +1960,10 @@ function dim_tc ...@@ -1963,11 +1960,10 @@ function dim_tc
# not in a tagged release, show upstream branches # not in a tagged release, show upstream branches
remote_branches="origin/master" remote_branches="origin/master"
for conf in "${drm_tip_config[@]}"; do for conf in "${drm_tip_config[@]}"; do
local repo branch override url_list remote local repo branch override remote
read -r repo branch override <<< $conf read -r repo branch override <<< $conf
url_list=${drm_tip_repos[$repo]} remote=$(repo_to_remote $repo)
remote=$(url_to_remote $url_list)
remote_branches="$remote_branches $remote/$branch" remote_branches="$remote_branches $remote/$branch"
done done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment