[PATCH] dim: allow tags in backmerges

Daniel Vetter daniel.vetter at ffwll.ch
Mon Aug 6 20:05:50 UTC 2018


Linus prefers that we backmerge a specific tag instead of a random
point in his branch. Allow that.

I guess it'd be nice to somehow figure out where a tag came from, but
git doesn't namespace tags. So that idea is out of the window
unfortunately.

Requested-by: Dave Airlie <airlied at redhat.com>
Cc: Dave Airlie <airlied at redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
 dim | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dim b/dim
index e477d043458b..d4a1efc50d2a 100755
--- a/dim
+++ b/dim
@@ -1011,7 +1011,9 @@ function dim_backmerge
 	upstream=${2:?$usage}
 
 	if ! dim_list_upstreams | grep -q "^$upstream\$"; then
-		warn_or_fail "$upstream is not an upstream branch"
+		if ! git rev-parse --verify -q "refs/tags/$upstream" > /dev/null ; then
+			warn_or_fail "$upstream is neither an upstream branch nor a tag"
+		fi
 	fi
 
 	cd $DIM_PREFIX/drm-tip
-- 
2.18.0



More information about the dim-tools mailing list