[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-dim-tools
Subject: [PATCH] dim: Ensure a branch doesn't exist before creating it
From: daniel () ffwll ! ch (Daniel Vetter)
Date: 2018-01-31 18:32:41
Message-ID: CAKMK7uHXsGb-q6hX_qAgzU2QFYm-aoE7Sf9Z8U3=fY2R3eRj3Q () mail ! gmail ! com
[Download RAW message or body]
On Wed, Jan 31, 2018 at 7:22 PM, Sean Paul <seanpaul at chromium.org> wrote:
> On Wed, Jan 31, 2018 at 07:12:13PM +0100, Daniel Vetter wrote:
>> On Wed, Jan 31, 2018 at 11:24:07AM -0500, Sean Paul wrote:
>> > Check the remote for the branch before creating it. Seems like this is
>> > a noop if it does exist, aside from creating duplicate entries in the
>> > integration config.
>> >
>> > Signed-off-by: Sean Paul <seanpaul at chromium.org>
>>
>> Thanks for fixing this.
>>
>> Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
>>
>> I'll also push (note to self: really need to get maintaner-tools out of
>> drm-intel.git).
>
> Yes please! Although I just looked through the history and it's only had 8
> non-intel people contribute for 18 (now 19) commits. I figured there would be
> more, tbh.
Cause&effect? Either way, sent out a patch to make this happen
finally. Please take a look, hopefully it works.
-Daniel
>
> Thanks for the review and push.
>
> Sean
>
>> -Daniel
>>
>> > ---
>> > dim | 4 ++++
>> > 1 file changed, 4 insertions(+)
>> >
>> > diff --git a/dim b/dim
>> > index 73936cea4869..3639ada1854b 100755
>> > --- a/dim
>> > +++ b/dim
>> > @@ -1215,6 +1215,10 @@ function dim_create_branch
>> > fi
>> >
>> > remote=$(repo_to_remote $repo)
>> > + if [[ $(git branch -r | grep "$remote/$branch") ]]; then
>> > + echoerr "$branch already exists on $remote"
>> > + return 1
>> > + fi
>> >
>> > $DRY git branch $branch $start
>> > git push $DRY_RUN $remote +$branch --set-upstream
>> > --
>> > 2.16.0.rc1.238.g530d649a79-goog
>> >
>> > _______________________________________________
>> > dim-tools mailing list
>> > dim-tools at lists.freedesktop.org
>> > https://lists.freedesktop.org/mailman/listinfo/dim-tools
>>
>> --
>> Daniel Vetter
>> Software Engineer, Intel Corporation
>> http://blog.ffwll.ch
>> _______________________________________________
>> dim-tools mailing list
>> dim-tools at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dim-tools
>
> --
> Sean Paul, Software Engineer, Google / Chromium OS
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic