From patchwork Tue Nov 10 21:32:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 56346 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1014104lbb; Tue, 10 Nov 2015 13:39:33 -0800 (PST) X-Received: by 10.140.42.74 with SMTP id b68mr7186996qga.48.1447191573861; Tue, 10 Nov 2015 13:39:33 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id g106si4774385qgd.63.2015.11.10.13.39.33; Tue, 10 Nov 2015 13:39:33 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Received: by lists.linaro.org (Postfix, from userid 109) id 7780661D25; Tue, 10 Nov 2015 21:39:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 5F1A761D2E; Tue, 10 Nov 2015 21:36:54 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 56C1061B18; Tue, 10 Nov 2015 21:36:44 +0000 (UTC) Received: from mail-lf0-f46.google.com (mail-lf0-f46.google.com [209.85.215.46]) by lists.linaro.org (Postfix) with ESMTPS id 5378461817 for ; Tue, 10 Nov 2015 21:36:43 +0000 (UTC) Received: by lffz63 with SMTP id z63so6137358lff.0 for ; Tue, 10 Nov 2015 13:36:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=W1TRsrk7rUR9/081fRFnr33JvCgNWKnK7EeOd++6JzE=; b=q5ET2S9saL2zOM6ZW42okJl8cwqwCwzVn/Gbp3ernBtyse/nNJEDzyD1WmAmzaiPl9 LMNCEMCFUQ3gfa4wB+4STNwcP57TUty+XS0m5BggswUZaKTbVWelXIgqdqJs73IojXaP TlmedA5XAAKMXO0hgYZTlKJqTpEev8xzf39E51dz27d6rGjnWIAzLNIbO7ShU+k4pfB5 S3/SjQMt6mD/OkQ378S+g4NnCQnx+v3ygo3kx4FjdfnW3UVMd8CbYlbULUPrUumuTm5m 7hfvIr8DXMLiRiRPa8Fpu0bToVOEjeBGTk31IeMdKcdtUHx0j2gh7IK7Z7GCfQVTdLpE ewRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=W1TRsrk7rUR9/081fRFnr33JvCgNWKnK7EeOd++6JzE=; b=a4RG11OWBNmruCJadrxrwf2RDpDCLJ5UqkNIPAUPpYGab1WaIuAoA4D2hoPQhwmU9B YXe1CQBHH/D5pTamDc0uZjHjD95y4OksfSRdJ14X5U1U9b/LIy8Cdxmf3VRDD7SAji63 qmU2cxiJReu1M/gOBVR52/dF6UM+bM3VlcreEoT1e90xbWRZRlTMaCrFnKV5eYHciP4D n6Je3SR9W9SiwEAoF3LGOGS7cOF4DoQcA0kEW1Uzk3orN7VzSmKNT5hkyuGD/Alkd4aU LqPX4NUJ8QZ7GkHt0dkSctbalT62jDX+8zaLBwRRmE6D2W4DAKgJDoLlIRE5oqeKqC7t QOmQ== X-Gm-Message-State: ALoCoQnnkTctiEV+ctpQaOKF6ktlJDxUT43hJbzkbuQy1UBIXGslG9UdjBFVV6eOQ+Glst8yodRm X-Received: by 10.25.206.16 with SMTP id e16mr2776680lfg.39.1447191402216; Tue, 10 Nov 2015 13:36:42 -0800 (PST) Received: from localhost (c-aa3470d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.112.52.170]) by smtp.gmail.com with ESMTPSA id f8sm866777lbv.6.2015.11.10.13.36.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Nov 2015 13:36:41 -0800 (PST) From: Anders Roxell To: lng-odp@lists.linaro.org Date: Tue, 10 Nov 2015 22:32:10 +0100 Message-Id: <1447191136-21213-4-git-send-email-anders.roxell@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1447191136-21213-1-git-send-email-anders.roxell@linaro.org> References: <1447191136-21213-1-git-send-email-anders.roxell@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv3 3/9] scripts/git_hash: fix bug where dirty was always set X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Signed-off-by: Anders Roxell --- scripts/git_hash.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/git_hash.sh b/scripts/git_hash.sh index e15094e..fc0b057 100755 --- a/scripts/git_hash.sh +++ b/scripts/git_hash.sh @@ -9,7 +9,8 @@ ROOTDIR=${1} CUSTOM_STR=${CUSTOM_STR:-https://git.linaro.org/lng/odp.git} if [ -d ${ROOTDIR}/.git ]; then hash=$(git --git-dir=${ROOTDIR}/.git describe | tr -d "\n") - if git --git-dir=${ROOTDIR}/.git diff-index --name-only HEAD &>/dev/null ; then + if [[ $(git --git-dir=${ROOTDIR}/.git diff --shortstat 2> /dev/null \ + | tail -n1) != "" ]]; then dirty=-dirty fi