From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id BA8FB2142 for ; Mon, 29 Aug 2016 10:35:46 +0200 (CEST) Received: by mail-wm0-f41.google.com with SMTP id o80so79544822wme.1 for ; Mon, 29 Aug 2016 01:35:46 -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=Qey+xYl0tHNe86ednaH+5GyGC85IJIFoaxbC4uyhGhQ=; b=Li2eqzNn6Aba/o7ZttSfJdG43BsLGEXmVUlPuOE2x7haJz3TkA1WaVT2zewgGWqwxK VH2xlpRECmGmxBdq/jugvSSJDVZtkcfS12bXRsrrYt73doijApsAV8BBuYYuSrKiZYl5 gSdbaiAd4P06GiRY8rtObcDr9yzPxMsMMEjJGwME+AjKKutkCj+dGpjUbbGmAWzU7zM7 UgC+9+gJl/XzSYKGuuJiQ4OO0/0gtRMeUJUeyVSRbjB6Z2DJD5Nunihai7rIqNyeS0Ur McYUw34JqaMzvvLsSfkdrijSWzDpnmXXeHolNv8oHeYZDKWPXRPBvUBpUoik+yCtaZUp 4uaQ== 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=Qey+xYl0tHNe86ednaH+5GyGC85IJIFoaxbC4uyhGhQ=; b=jYIL4MUHg254eEZik5NI3e14DpS6Uv94K1WHxalUXipG1QBJYK4VZY8M8BRxsqx68v NaTI5nM5/pg/OhmfDETsEGi6pSe/EgeICBnKt8Dc2/VfEvSs+czS1z8uUinRwwiv7jPk KOyRMI3hM3Z1y+iOZupZX/Ecgyp67/IIaPNePck5YdxOlaJ44sNdGBrH/0IqAC66T3E8 TWBMmtZ59RUu+QbZPi5O8JSeb6+YYm0kOj0ALLVpUZ+okpz+FIfoA2tZkB8S3xvRTfAK M+u39BfZ89MkC8o06WL/1IX2svxdPyICKGtDjY3HhdeI4HHoM3bBtF4yz3eNy72bD07C 94nA== X-Gm-Message-State: AE9vXwMPhesYJLTaQ7Out7NjWWz9emc5QlAMoC/jmbqL0x5PBf+UXGA9XtIExoii/XMdCVhH X-Received: by 10.194.81.137 with SMTP id a9mr16514256wjy.106.1472459746308; Mon, 29 Aug 2016 01:35:46 -0700 (PDT) Received: from XPS13.localdomain (229.202.154.77.rev.sfr.net. [77.154.202.229]) by smtp.gmail.com with ESMTPSA id d7sm33197973wjg.13.2016.08.29.01.35.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 Aug 2016 01:35:45 -0700 (PDT) From: Thomas Monjalon To: dev@dpdk.org Date: Mon, 29 Aug 2016 10:35:35 +0200 Message-Id: <1472459735-11683-1-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 Subject: [dpdk-dev] [PATCH] scripts: hide double git reference check error 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: Mon, 29 Aug 2016 08:35:46 -0000 When checking a git reference which does not exist, a git error with the long git-branch usage is printed: % scripts/check-git-log.sh '-1 3780cbd' error: malformed object name 2de9f8551ff9 usage: git branch ... [a lot of lines] Wrong 'Fixes' reference: Fixes: 2de9f8551ff9 ("ethdev: fix documentation for queue start/stop") The error from the script is sufficient so the git error can be hidden. Signed-off-by: Thomas Monjalon --- scripts/check-git-log.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check-git-log.sh b/scripts/check-git-log.sh index e416aea..6137098 100755 --- a/scripts/check-git-log.sh +++ b/scripts/check-git-log.sh @@ -180,7 +180,7 @@ IFS=' fixtags=$(echo "$tags" | grep '^Fixes: ') bad=$(for fixtag in $fixtags ; do hash=$(echo "$fixtag" | sed 's,^Fixes: \([0-9a-f]*\).*,\1,') - if git branch --contains $hash | grep -q '^\*' ; then + if git branch --contains $hash 2>&- | grep -q '^\*' ; then good="Fixes: $hash "$(git log --format='("%s")' -1 $hash 2>&-) else good="reference not in current branch" -- 2.7.0