From patchwork Fri Nov 13 15:05:09 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: 7612241 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AAD0BBF90C for ; Fri, 13 Nov 2015 15:05:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D99362041A for ; Fri, 13 Nov 2015 15:05:58 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 0485D203ED for ; Fri, 13 Nov 2015 15:05:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2B80A6F074; Fri, 13 Nov 2015 07:05:57 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTP id 234176F074 for ; Fri, 13 Nov 2015 07:05:55 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 13 Nov 2015 07:05:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,287,1444719600"; d="scan'208";a="850420755" Received: from linux.intel.com ([10.23.219.25]) by fmsmga002.fm.intel.com with ESMTP; 13 Nov 2015 07:05:39 -0800 Received: from localhost (unknown [10.237.72.163]) by linux.intel.com (Postfix) with ESMTP id 7DD846A4005; Fri, 13 Nov 2015 07:04:34 -0800 (PST) From: Ander Conselvan de Oliveira To: intel-gfx@lists.freedesktop.org Date: Fri, 13 Nov 2015 17:05:09 +0200 Message-Id: <1447427109-5526-1-git-send-email-ander.conselvan.de.oliveira@intel.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <87fv0ahstt.fsf@intel.com> References: <87fv0ahstt.fsf@intel.com> Cc: Ander Conselvan de Oliveira Subject: [Intel-gfx] [PATCH 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=-4.5 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" Signed-off-by: Ander Conselvan de Oliveira --- 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