[DIM PATCH v2 2/2] dim: Fix create-branch dry run
Jani Nikula
jani.nikula at linux.intel.com
Thu May 17 09:28:19 UTC 2018
On Mon, 14 May 2018, Sean Paul <seanpaul at chromium.org> 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>
>
> So instead of using --dry-run for git push, just echo the command.
>
> Changes in v2:
> - Added comment (Daniel)
>
> Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> Signed-off-by: Sean Paul <seanpaul at chromium.org>
> ---
> dim | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/dim b/dim
> index 7d8787d22c8b..71407eb034b4 100755
> --- a/dim
> +++ b/dim
> @@ -1277,7 +1277,10 @@ function dim_create_branch
> fi
>
> $DRY git branch $branch $start
> - git push $DRY_RUN $remote +$branch --set-upstream
> +
> + # git push gives confusing error messages for non-existing
> + # branches, even with --dry-run, hence the even quieter $DRY
> + $DRY git push $remote +$branch --set-upstream
Pushed the two, with trailing space removed from the comment.
BR,
Jani.
>
> cd $DIM_PREFIX/drm-rerere
> $DRY sed -i "s/^\() # DO NOT CHANGE THIS LINE\)$/\t\"$repo\t\t${branch//\//\\\/}\"\n\1/" $dim_integration_config
--
Jani Nikula, Intel Open Source Technology Center
More information about the dim-tools
mailing list