[Intel-gfx] [PATCH maintainer-tools] dim: Replace git commit --amend from dim_apply with dimrc option

Jani Nikula jani.nikula at linux.intel.com
Fri Nov 13 07:36:42 PST 2015


On Fri, 13 Nov 2015, Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com> wrote:
> Introduce DIM_POST_APPLY_ACTION to dimrc that allows the user to specify
> a command to be run after a patch is applied. Use eval so enviroment
> variables can be overriden with the option. For example:
>
> DIM_POST_APPLY_ACTION="EDITOR=\"gedit -w\" git commit --amend"
>
> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>
> ---
>  dim          | 2 +-
>  dimrc.sample | 3 +++
>  2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/dim b/dim
> index db92c57..b7c7ef7 100755
> --- a/dim
> +++ b/dim
> @@ -383,7 +383,7 @@ function dim_apply
>  		commit_add_tag "Link" "http://patchwork.freedesktop.org/patch/msgid/$message_id"
>  	fi
>  
> -	git commit --amend &
> +	eval $DRY $DIM_POST_APPLY_ACTION
>  }
>  
>  function magic_patch
> diff --git a/dimrc.sample b/dimrc.sample
> index 5687eaf..9f30cb2 100644
> --- a/dimrc.sample
> +++ b/dimrc.sample
> @@ -21,3 +21,6 @@
>  # Mail User Agent supporting a subset of mutt(1) command line options:
>  # [-s subject] [-i file] [-c cc-addr] to-addr [...]
>  #DIM_MUA=mutt
> +
> +# Command to run after dim apply
> +#DIM_POST_APPLY_ACTION=git commit --amend

There's a comment earlier that says "Defaults are in the comments
below." I'm fine with changing the default here.


-- 
Jani Nikula, Intel Open Source Technology Center


More information about the Intel-gfx mailing list