[dim PATCH 1/3] dim: Move tag_summary and tag_branch functions

Jani Nikula jani.nikula at linux.intel.com
Mon Feb 5 10:46:55 UTC 2018


On Fri, 02 Feb 2018, Sean Paul <seanpaul at chromium.org> wrote:
> Moving these above all call-sites to improve readability when I add
> functionality later in this series
>
> Signed-off-by: Sean Paul <seanpaul at chromium.org>

Reviewed-by: Jani Nikula <jani.nikula at intel.com>

> ---
>  dim | 64 ++++++++++++++++++++++++++++++++--------------------------------
>  1 file changed, 32 insertions(+), 32 deletions(-)
>
> diff --git a/dim b/dim
> index 3639ada1854b..9837729348bb 100755
> --- a/dim
> +++ b/dim
> @@ -1604,6 +1604,38 @@ function dim_for_each_workdir
>  	done
>  }
>  
> +function tag_summary # branch
> +{
> +	local branch tag_template
> +	branch=$1
> +	tag_template=$DIM_PREFIX/drm-rerere/tag-templates/${branch//\//-}.txt
> +
> +	if [ -r $tag_template ]; then
> +		cat $tag_template
> +	else
> +		cat <<-EOF
> +		UAPI Changes:
> +
> +		Cross-subsystem Changes:
> +
> +		Core Changes:
> +
> +		Driver Changes:
> +
> +		EOF
> +	fi
> +}
> +
> +function tag_branch
> +{
> +	local tag branch
> +	tag=$1
> +	branch=$2
> +
> +	tag_summary $branch | $DRY git tag -F- $tag "$branch@{upstream}"
> +	$DRY git tag -a $DIM_GPG_KEYID -f $tag
> +}
> +
>  function dim_update_next
>  {
>  	local remote
> @@ -1706,38 +1738,6 @@ function dim_tag_next
>  
>  }
>  
> -function tag_summary # branch
> -{
> -	local branch tag_template
> -	branch=$1
> -	tag_template=$DIM_PREFIX/drm-rerere/tag-templates/${branch//\//-}.txt
> -
> -	if [ -r $tag_template ]; then
> -		cat $tag_template
> -	else
> -		cat <<-EOF
> -		UAPI Changes:
> -
> -		Cross-subsystem Changes:
> -
> -		Core Changes:
> -
> -		Driver Changes:
> -
> -		EOF
> -	fi
> -}
> -
> -function tag_branch
> -{
> -	local tag branch
> -	tag=$1
> -	branch=$2
> -
> -	tag_summary $branch | $DRY git tag -F- $tag "$branch@{upstream}"
> -	$DRY git tag -a $DIM_GPG_KEYID -f $tag
> -}
> -
>  # dim_pull_request branch upstream
>  function dim_pull_request
>  {

-- 
Jani Nikula, Intel Open Source Technology Center


More information about the dim-tools mailing list