]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/patches/dnsmasq/0084-Make-get-version-work-when-repo-is-a-git-submodule.patch
dnsmasq: Import latest fixes from upstream
[ipfire-2.x.git] / src / patches / dnsmasq / 0084-Make-get-version-work-when-repo-is-a-git-submodule.patch
diff --git a/src/patches/dnsmasq/0084-Make-get-version-work-when-repo-is-a-git-submodule.patch b/src/patches/dnsmasq/0084-Make-get-version-work-when-repo-is-a-git-submodule.patch
new file mode 100644 (file)
index 0000000..2bb8a43
--- /dev/null
@@ -0,0 +1,28 @@
+From 8efd731cc4ed2baa42aa69d0a9d336392e9987cb Mon Sep 17 00:00:00 2001
+From: "Johnny S. Lee" <_@jsl.io>
+Date: Sun, 26 Apr 2015 22:23:57 +0100
+Subject: [PATCH 84/84] Make get-version work when repo is a git submodule.
+
+---
+ bld/get-version | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/bld/get-version b/bld/get-version
+index 7ab75db729ac..5372869c0852 100755
+--- a/bld/get-version
++++ b/bld/get-version
+@@ -11,8 +11,9 @@
+ # If there is more than one v[0-9].* tag, sort them and use the
+ # first. This favours, eg v2.63 over 2.63rc6.
+-if which git >/dev/null 2>&1 && [ -d $1/.git ]; then
+-     cd $1; git describe | sed 's/^v//'
++if which git >/dev/null 2>&1 && \
++    ([ -d $1/.git ] || grep '^gitdir:' $1/.git >/dev/null 2>&1); then 
++    cd $1; git describe | sed 's/^v//'
+ elif grep '\$Format:%d\$' $1/VERSION >/dev/null 2>&1; then
+ # unsubstituted VERSION, but no git available.
+     echo UNKNOWN
+-- 
+2.1.0
+