From patchwork Thu Mar 23 21:07:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 9642019 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 971A9602D6 for ; Thu, 23 Mar 2017 21:07:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 890C028460 for ; Thu, 23 Mar 2017 21:07:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7BC532847F; Thu, 23 Mar 2017 21:07:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4A86528460 for ; Thu, 23 Mar 2017 21:07:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9AC216EB50; Thu, 23 Mar 2017 21:07:43 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qt0-x22e.google.com (mail-qt0-x22e.google.com [IPv6:2607:f8b0:400d:c0d::22e]) by gabe.freedesktop.org (Postfix) with ESMTPS id 95C5C6EB50 for ; Thu, 23 Mar 2017 21:07:41 +0000 (UTC) Received: by mail-qt0-x22e.google.com with SMTP id n21so186851260qta.1 for ; Thu, 23 Mar 2017 14:07:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Dr+Sg9uTKK6ocYnm06H4plKAFTMMnYL662t/IbhSX1Y=; b=INYTVOp6ZQdovU3DLqjdXTOCW+ZsQowlV2uHwjdYYcHhvSKWCGwwfhx9dEtQgfqSKw i8MqBL05WT6fVL6pQl9AOqwHoIT1pcmixtME3ssWy+gX3z1NPcen+GghV3SOPFTowh7Z 3pKo3uc76JeAFpnWq3Tm8/e6G4/ofBNRSAI/Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Dr+Sg9uTKK6ocYnm06H4plKAFTMMnYL662t/IbhSX1Y=; b=Swcj8jkSw9LomGvOkGQ3iqLORs6A9qI8WVKR6UlOSRfpy5DHClwLqkHLMFS6NOeia6 EkQQ9rHU2ZWBta2x+1U0kVQKruoQ4ScivIRgTS0PkUkry1daW0K3NMQoE4Z1/RmdLXkk aPKbkZBlwEaMchfl0qlYn9wbME00/s5/V+cWqeYxQknnGHR43tBC4zZLlXhj/041xn92 DgIN/zRQrd+GvP93kmJTuJM/sqoZDVoPa6SXzR5WzbwoM3QUjuxF4epCfp9cXuE9qDww dhX6Ygrudby1oMXYfdLod7DUssYBEFo3d+y4f14aCDW0dbdVUNsQryIS+FZjMotng4bG mZSg== X-Gm-Message-State: AFeK/H1tCwCVg/X2Cd+ULU4EuEywhZ7AOSgKyWgsLPGTbBEkRx6iIX/3q9opY/Dc76igbFhw X-Received: by 10.237.62.176 with SMTP id n45mr4814534qtf.39.1490303259771; Thu, 23 Mar 2017 14:07:39 -0700 (PDT) Received: from boxwood.roam.corp.google.com (cpe-75-189-128-87.nc.res.rr.com. [75.189.128.87]) by smtp.gmail.com with ESMTPSA id d4sm145753qkf.30.2017.03.23.14.07.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Mar 2017 14:07:38 -0700 (PDT) From: Sean Paul To: intel-gfx@lists.freedesktop.org, ville.syrjala@linux.intel.com Date: Thu, 23 Mar 2017 17:07:28 -0400 Message-Id: <20170323210731.38313-2-seanpaul@chromium.org> X-Mailer: git-send-email 2.12.1.500.gab5fba24ee-goog In-Reply-To: <20170323210731.38313-1-seanpaul@chromium.org> References: <20170323210731.38313-1-seanpaul@chromium.org> Subject: [Intel-gfx] [PATCH dim 2/2] dim: Curate and insert tags into patch(es) 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-Virus-Scanned: ClamAV using ClamSMTP Launch $EDITOR when extracting tags to curate the tags immediately. Once the tags are proper, automatically add them before the first Signed-off-by line to all patches in the range. Signed-off-by: Sean Paul Reviewed-by: Tested-by: Acked-by: Signed-off-by: --- dim | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dim b/dim index 43ea794..6a5580a 100755 --- a/dim +++ b/dim @@ -1145,6 +1145,12 @@ function rangeish() fi } +function insert_extracted_tags +{ + new_tabs=`cat $1 | awk '{ORS="\\\\n"} {print $0}' | head -c-3` + awk "/Signed-off-by/{p++} p==1{print \"$new_tabs\"; p++} p!=1{print}" +} + function dim_extract_tags { local branch range file tags @@ -1167,9 +1173,10 @@ function dim_extract_tags return 0 fi - tags=$(printf -- "# *** extracted tags ***\n%s" "$tags") - - git filter-branch -f --msg-filter "cat ; echo \"$tags\"" $range + echo "$tags" > $file + $EDITOR $file + export -f insert_extracted_tags + git filter-branch -f --msg-filter "insert_extracted_tags $file" $range } function dim_extract_queued