From: Dan Williams <dan.j.williams@intel.com>
To: linux-nvdimm@lists.01.org
Cc: Yi Zhang <yi.a.zhang@hotmail.com>
Subject: [ndctl PATCH] build: quiet warnings about missing git repository
Date: Fri, 01 Jul 2016 14:29:28 -0700 [thread overview]
Message-ID: <146740856798.33306.12339801003788127221.stgit@dwillia2-desk3.amr.corp.intel.com> (raw)
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 <yi.a.zhang@hotmail.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
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 <<EOF
- $(git log --oneline --abbrev=8 -n1 HEAD)
+ $(git log --oneline --abbrev=8 -n1 HEAD 2>/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
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
next reply other threads:[~2016-07-01 21:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-01 21:29 Dan Williams [this message]
2016-07-04 7:29 ` [ndctl PATCH] build: quiet warnings about missing git repository Johannes Thumshirn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=146740856798.33306.12339801003788127221.stgit@dwillia2-desk3.amr.corp.intel.com \
--to=dan.j.williams@intel.com \
--cc=linux-nvdimm@lists.01.org \
--cc=yi.a.zhang@hotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.