[DIM PATCH v2] dim: Fix create-branch dry run
Daniel Vetter
daniel at ffwll.ch
Mon May 14 16:20:28 UTC 2018
On Mon, May 14, 2018 at 10:08:03AM -0400, Sean Paul wrote:
> Using --dry-run for git push on a non-existant branch (since the command
> above doesn't actually create the branch) fails with:
>
> error: src refspec topic/dim_test does not match any.
> error: failed to push some refs to <remote>
Hm yeah that's a bit confusing ...
> So instead of using --dry-run for git push, just echo the command.
>
> Signed-off-by: Sean Paul <seanpaul at chromium.org>
> ---
> Changes in v2:
> - Removed extra whitespace
>
> dim | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/dim b/dim
> index 7d8787d22c8b..4a605d78139c 100755
> --- a/dim
> +++ b/dim
> @@ -1277,7 +1277,7 @@ function dim_create_branch
> fi
>
> $DRY git branch $branch $start
> - git push $DRY_RUN $remote +$branch --set-upstream
Since this is a special case maybe add a comment?
# git push gives confusing error messages for non-existing
# branches, even with --dry-run, hence the even quieter $DRY
With that Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> + $DRY git push $remote +$branch --set-upstream
>
> cd $DIM_PREFIX/drm-rerere
> $DRY sed -i "s/^\() # DO NOT CHANGE THIS LINE\)$/\t\"$repo\t\t${branch//\//\\\/}\"\n\1/" $dim_integration_config
> --
> Sean Paul, Software Engineer, Google / Chromium OS
>
> _______________________________________________
> 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
More information about the dim-tools
mailing list