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

Daniel Vetter daniel at ffwll.ch
Mon Mar 5 18:04:44 UTC 2018


On Mon, Mar 5, 2018 at 10:55 AM, Joonas Lahtinen
<joonas.lahtinen at linux.intel.com> wrote:
> Quoting Daniel Vetter (2018-03-05 10:18:52)
>> On Thu, Mar 01, 2018 at 12:09:39PM +0200, Joonas Lahtinen wrote:
>> > Update drm-next branch if it exists, to avoid incomplete backmerges.
>> >
>> > 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
>>
>> Imo dim should not manage random branches you have lying around which are
>> not managed by dim. You have 0 checks whether the drm-next above is
>> actually the drm-next you think you want to update here.
>>
>> I guess what we could do is a dim helper command that updates _all_ git
>> branches in your repo that have remote tracking branches, irrespective of
>> whether they're managed by dim or not. But drm-next isn't a dim branch, I
>> really want it to not touch that (or anything else that's not a dim
>> branch).
>
> Yeah, makes sense. So I guess Jani's suggestion of refusing any other
> branches would be the way to go.

Yeah I think that makes the most sense. At least I can't think of a
use-case where you want to backmerge anything else than Linus' or
Dave's trees. For everything else (cross-tree topic pulls) we have dim
apply-merge and explicit pull requests on the mailing list. So
enforcing that restriction shouldn't be a problem.
-Daniel

> Regards, Joonas
>
>> -Daniel
>>
>> >
>> >       cd $DIM_PREFIX/maintainer-tools
>> >       if git_is_current_branch maintainer-tools ; then
>> > --
>> > 2.14.3
>> >
>>
>> --
>> Daniel Vetter
>> Software Engineer, Intel Corporation
>> http://blog.ffwll.ch



-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the dim-tools mailing list