From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 488B42BB9 for ; Wed, 29 Jun 2016 16:47:33 +0200 (CEST) Received: by mail-wm0-f50.google.com with SMTP id r201so77507413wme.1 for ; Wed, 29 Jun 2016 07:47:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=xhi6qGxmjfITWimjA2OEdd1KRtjTz0xeUVI5tH8TDlM=; b=BC5wnsh1s7vMdLlupKq4HQWg3uQQBmzzIwLatGt65UqpIAwSX9ly96Q7f5DYjnWmsw 3cSE9/hTAzuYCAfRLsh1iI1UyEWOszDbGOyjolPz9TXWJ7eEqX3emXPxRW/p7i/fWm0E sdT0XV+cjGEajDnyIAj41pautvi4TYjrpno8He9rHbYIsKJQrBXV5PdjNZetI5ueEREC /zNbR2LL4FlDJAR735d0oNtxlk+dmaO/ISqOtljiL9OenjKbTcmvbvuxe31ddDy5By4M ymJe4H6dmEw9H0TkyZVK5+tKYNXxnwRa4Qw/zPO78DIdiqZf3LerHle65AbYtJjBVRw+ SG8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=xhi6qGxmjfITWimjA2OEdd1KRtjTz0xeUVI5tH8TDlM=; b=cJNx0D/NBcnQoWLa/8WOYWXEjSeGpcRFIuEWh/Jv7J0gEHoO7yrfFUT9zX/jneuo5P ARlprB+NlGvEnuNd2pGj2HlDhk9oeDOSXTuRGS694eqFFNlavDeVJQDw7gx5m6YNCY3F ya1OB+PVL+BayOPhR+FxjC/XGRcYGvnlkoBSjE5w4r8S8m1op6YpSGwwHNk906kWjaqU momvNZkW4VSIwXw6qHUfBUn9znA/iRe9cmz83/L0g5yoUEEb6Uw/YXIN1SiBA+E86aZG qSLMfwv8qFXGzsxLrzP6qoZhvr/HiTHnKQULcjafC8bXDQQ2EGSdKkmT35ZAl2iVw9kR R20Q== X-Gm-Message-State: ALyK8tJ6yqWssS4t/0yaYN67vTbnP6f7RqDX7IZ1CkzoHkOtTnVFvMh4DOWwGgF6KwkBybaS X-Received: by 10.28.104.214 with SMTP id d205mr9922135wmc.102.1467211652200; Wed, 29 Jun 2016 07:47:32 -0700 (PDT) Received: from XPS13.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id g10sm4065881wjl.25.2016.06.29.07.47.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Jun 2016 07:47:31 -0700 (PDT) From: Thomas Monjalon To: dev@dpdk.org Date: Wed, 29 Jun 2016 16:47:23 +0200 Message-Id: <1467211643-26341-1-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 Subject: [dpdk-dev] [PATCH] scripts: check fixed commit branch X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jun 2016 14:47:33 -0000 The commit id of a fixed commit must be in the current branch. It avoids referencing a local branch or a next-* branch when pushing in the master. Signed-off-by: Thomas Monjalon --- scripts/check-git-log.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/check-git-log.sh b/scripts/check-git-log.sh index 9a0d068..7d2c7ee 100755 --- a/scripts/check-git-log.sh +++ b/scripts/check-git-log.sh @@ -140,7 +140,11 @@ IFS=' fixtags=$(echo "$tags" | grep '^Fixes: ') bad=$(for fixtag in $fixtags ; do hash=$(echo "$fixtag" | sed 's,^Fixes: \([0-9a-f]*\).*,\1,') - good="Fixes: $hash "$(git log --format='("%s")' -1 $hash 2>&-) + if git branch --contains $hash | grep -q '^\*' ; then + good="Fixes: $hash "$(git log --format='("%s")' -1 $hash 2>&-) + else + good="reference not in current branch" + fi printf "$fixtag" | grep -v "^$good$" done | sed 's,^,\t,') [ -z "$bad" ] || printf "Wrong 'Fixes' reference:\n$bad\n" -- 2.7.0