[Intel-gfx] [PATCH 6/6] dim: Don't try to create branches in update_branches

Jani Nikula jani.nikula at linux.intel.com
Thu Jan 26 10:47:37 UTC 2017


On Thu, 26 Jan 2017, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
> Avoids sprawnling branches everywhere, and makes the script faster for
> folks who don't need everything. We already skip remotes, so this is
> in line with what's there.

Seems okay. LGTM.

BR,
Jani.

>
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> ---
>  dim | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/dim b/dim
> index c5c46e9c767a..3991312ee310 100755
> --- a/dim
> +++ b/dim
> @@ -1312,6 +1312,9 @@ function dim_update_branches
>  	assert_repo_clean
>  
>  	for branch in $dim_branches ; do
> +		if ! git_branch_exists $branch ; then
> +			continue
> +		fi
>  		dim_checkout $branch
>  		repo=`branch_to_repo $branch`
>  		remote=`repo_to_remote $repo`
> @@ -1320,8 +1323,10 @@ function dim_update_branches
>  			$DRY git rebase -i
>  		fi
>  	done
> -	dim_checkout drm-intel-next
> -	$DRY git reset --hard $DIM_DRM_INTEL_REMOTE/drm-intel-next
> +	if git_branch_exists drm-intel-next ; then
> +		dim_checkout drm-intel-next
> +		$DRY git reset --hard $DIM_DRM_INTEL_REMOTE/drm-intel-next
> +	fi
>  
>  	cd $DIM_PREFIX/maintainer-tools
>  	if git_is_current_branch maintainer-tools ; then

-- 
Jani Nikula, Intel Open Source Technology Center


More information about the Intel-gfx mailing list