[dim PATCH 3/6] dim: look at all tip branches in dim tc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The hard-coded list of remotes and branches has gone stale.

Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
---
 dim | 25 ++++++++++++++++---------
 1 file changed, 16 insertions(+), 9 deletions(-)

diff --git a/dim b/dim
index ae8f30b8db83..f2cc25fc4ce9 100755
--- a/dim
+++ b/dim
@@ -1953,7 +1953,7 @@ function dim_cat_to_fixup
 
 function dim_tc
 {
-	local sha1 tag dim_drm_upstream_remote
+	local sha1 tag conf remote_branches
 
 	sha1=${1:?$usage}
 
@@ -1961,15 +1961,22 @@ function dim_tc
 	tag=$(git tag --contains $sha1 | grep ^v | sort -V | head -n 1)
 	if [[ -n "$tag" ]]; then
 		echo "$tag"
-	else
-		dim_drm_upstream_remote=$(url_to_remote $drm_upstream_git)
-		# not in a tagged release, show upstream branches
-		git branch -r --contains $sha1 \
-		    $DIM_DRM_INTEL_REMOTE/* \
-		    $dim_drm_upstream_remote/drm-next \
-		    $dim_drm_upstream_remote/drm-fixes \
-		    origin/master | sed 's/^ *//'
+		return 0
 	fi
+
+	# not in a tagged release, show upstream branches
+	remote_branches="origin/master"
+	for conf in "${drm_tip_config[@]}"; do
+		local repo branch override url_list remote
+
+		read -r repo branch override <<< $conf
+		url_list=${drm_tip_repos[$repo]}
+		remote=$(url_to_remote $url_list)
+
+		remote_branches="$remote_branches $remote/$branch"
+	done
+
+	git branch -r --contains $sha1 $remote_branches | sed 's/^ *//' | sort
 }
 
 function dim_cite
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux