[PATCH] dim: make update-branches update drm-next

Daniel Vetter daniel at ffwll.ch
Mon Mar 5 08:16:52 UTC 2018


On Thu, Mar 01, 2018 at 05:39:36PM +0200, Jani Nikula wrote:
> On Thu, 01 Mar 2018, Joonas Lahtinen <joonas.lahtinen at linux.intel.com> wrote:
> > Update drm-next branch if it exists, to avoid incomplete backmerges.
> 
> Oh, so you did the backmerge from the *local* branch instead of
> drm-upstream/drm-next? Don't do that then...!
> 
> Should we prevent backmerges from local branches in dim?

The autocomplete for dim backmerge only gives you reasonable options
(either linus' or airlied's remote branches). Might be reasonable to
enforce that in the tooling.

Or maybe tell more people that the autocomplete stuff exists and helps
with this stuff :-)
-Daniel

> 
> > Signed-off-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> > Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
> > ---
> >  dim | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/dim b/dim
> > index ed26033f5aba..071e8d019156 100755
> > --- a/dim
> > +++ b/dim
> > @@ -1862,6 +1862,12 @@ function dim_update_branches
> >  		dim_checkout drm-intel-next
> >  		$DRY git reset --hard $intel_remote/drm-intel-next
> >  	fi
> > +	if git_branch_exists drm-next ; then
> > +		drm_remote=$(repo_to_remote drm-upstream)
> > +
> > +		dim_checkout drm-next
> > +		$DRY git reset --hard $drm_remote/drm-next
> > +	fi
> 
> I guess
> 
> 	for branch in drm-intel-next drm-next; do
>         	if git_branch_exists $branch; then
>                 	...
>                 fi
>         done
> 
> seems better.
> 
> BR,
> Jani.
> 
> >  
> >  	cd $DIM_PREFIX/maintainer-tools
> >  	if git_is_current_branch maintainer-tools ; then
> 
> -- 
> Jani Nikula, Intel Open Source Technology Center

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dim-tools mailing list