From patchwork Mon Nov 16 10:17:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ander Conselvan de Oliveira X-Patchwork-Id: 7623341 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 053559F2EC for ; Mon, 16 Nov 2015 10:17:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 22C74204A9 for ; Mon, 16 Nov 2015 10:17:27 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 3339720454 for ; Mon, 16 Nov 2015 10:17:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2E53E6E044; Mon, 16 Nov 2015 02:17:25 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 01E666E044 for ; Mon, 16 Nov 2015 02:17:23 -0800 (PST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 16 Nov 2015 02:17:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,302,1444719600"; d="scan'208";a="601009583" Received: from linux.intel.com ([10.23.219.25]) by FMSMGA003.fm.intel.com with ESMTP; 16 Nov 2015 02:17:23 -0800 Received: from localhost (unknown [10.237.72.81]) by linux.intel.com (Postfix) with ESMTP id 808A66A4083; Mon, 16 Nov 2015 02:16:17 -0800 (PST) From: Ander Conselvan de Oliveira To: intel-gfx@lists.freedesktop.org Date: Mon, 16 Nov 2015 12:17:15 +0200 Message-Id: <1447669035-6036-1-git-send-email-ander.conselvan.de.oliveira@intel.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <87d1vdj4hh.fsf@intel.com> References: <87d1vdj4hh.fsf@intel.com> Cc: Ander Conselvan de Oliveira Subject: [Intel-gfx] [PATCH v2 maintainer-tools] dim: Replace git commit --amend from dim_apply with dimrc option X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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" v2: Initialize variable with default value. Fix dimrc.sample to match default value. Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Daniel Vetter --- dim | 5 ++++- dimrc.sample | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dim b/dim index db92c57..78b3f30 100755 --- a/dim +++ b/dim @@ -65,6 +65,9 @@ DIM_DRM_UPSTREAM_REMOTE=${DIM_DRM_UPSTREAM_REMOTE:-airlied} # usage: $DIM_MUA [-s subject] [-i file] [-c cc-addr] to-addr [...] DIM_MUA=${DIM_MUA:-mutt} +# command to run after dim apply +DIM_POST_APPLY_ACTION=${DIM_POST_APPLY_ACTION:-} + # greetings pull request template DIM_TEMPLATE_HELLO=${DIM_TEMPLATE_HELLO:-$HOME/.dim.template.hello} @@ -383,7 +386,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..ad463b4 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=