[Intel-gfx] [maintainer-tools PATCH 1/3] dim: Autocreate tracking branch in checkout

Daniel Vetter daniel.vetter at ffwll.ch
Wed Oct 21 00:48:30 PDT 2015


Tvrtko stumbled over this one.

Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
 dim | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dim b/dim
index 1fd0217588f6..98efba80d9a4 100755
--- a/dim
+++ b/dim
@@ -417,7 +417,11 @@ function dim_cd
 function dim_co
 {
 	dim_cd $1
-	git checkout $1
+	if ! git branch | grep $1 > /dev/null ; then
+		git checkout -t $DIM_DRM_INTEL_REMOTE/$1
+	else
+		git checkout $1
+	fi
 }
 
 function check_repo_clean
-- 
2.5.1



More information about the Intel-gfx mailing list