From patchwork Fri Jul 1 21:29:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 9210517 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 9B05A607D8 for ; Fri, 1 Jul 2016 21:30:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 901412808F for ; Fri, 1 Jul 2016 21:30:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 84CE9286CA; Fri, 1 Jul 2016 21:30:35 +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=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (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 E465A2808F for ; Fri, 1 Jul 2016 21:30:34 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 840231A1DFB; Fri, 1 Jul 2016 14:31:11 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by ml01.01.org (Postfix) with ESMTP id 68BC01A1DFB for ; Fri, 1 Jul 2016 14:31:10 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 01 Jul 2016 14:30:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.26,559,1459839600"; d="scan'208"; a="1013740680" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.14]) by fmsmga002.fm.intel.com with ESMTP; 01 Jul 2016 14:30:10 -0700 Subject: [ndctl PATCH] build: quiet warnings about missing git repository From: Dan Williams To: linux-nvdimm@lists.01.org Date: Fri, 01 Jul 2016 14:29:28 -0700 Message-ID: <146740856798.33306.12339801003788127221.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.17.1-9-g687f MIME-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yi Zhang Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP The git-version script auto-appends the commit id, but complains if the repository is missing. The complaint is benign, but we should also tag builds outside of git with a '+' because who knows what changes were made locally. Link: https://github.com/pmem/ndctl/issues/5 Reported-by: Yi Zhang Signed-off-by: Dan Williams Reviewed-by: Johannes Thumshirn --- git-version | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/git-version b/git-version index 3823ee29afaf..9eb8fd654e38 100755 --- a/git-version +++ b/git-version @@ -38,9 +38,13 @@ elif test -d ${GIT_DIR:-.git} -o -f .git && VN=$(echo "$VN" | sed -e 's/-/./g'); else read COMMIT COMMIT_SUBJECT </dev/null) EOF - VN="$(dirty ${DEF_VER}.git$COMMIT)" + if [ -z $COMMIT ]; then + VN="${DEF_VER}+" + else + VN="$(dirty ${DEF_VER}.git$COMMIT)" + fi fi echo $VN