This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: v4l-utils: fix SHA detection
Author:  Hans Verkuil <[email protected]>
Date:    Tue Nov 13 18:11:53 2018 +0100

Check if there is a .git directory at the top-level, and only
then get the SHA of the HEAD.

If the release tarball (which doesn't have a .git directory) is
extracted inside another git repo, then the current SHA code
would find the SHA of the enclosing git repo, which is not what
you want.

Signed-off-by: Hans Verkuil <[email protected]>

 utils/cec-compliance/Makefile.am  | 4 ++--
 utils/cec-follower/Makefile.am    | 4 ++--
 utils/v4l2-compliance/Makefile.am | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=98b4c9f276a18535b5691e5f350f59ffbf5a9aa5
diff --git a/utils/cec-compliance/Makefile.am b/utils/cec-compliance/Makefile.am
index 5217046c25ea..0c18a9aba1cb 100644
--- a/utils/cec-compliance/Makefile.am
+++ b/utils/cec-compliance/Makefile.am
@@ -17,9 +17,9 @@ cec-table.h: $(top_srcdir)/utils/cec-ctl/msg2ctl.pl 
$(top_srcdir)/include/linux/
 cec-compliance.cpp: version.h
 
 version.h:
-       @if git -C $(srcdir) rev-parse HEAD >/dev/null 2>&1; then \
+       @if [ -d $(top_srcdir)/.git ]; then \
                echo -n "#define SHA " >$@ ; \
-               git -C $(srcdir) rev-parse HEAD >>$@ ; \
+               git -C $(top_srcdir) rev-parse HEAD >>$@ ; \
        else \
                touch $@ ; \
        fi
diff --git a/utils/cec-follower/Makefile.am b/utils/cec-follower/Makefile.am
index 3a99fea7b09a..9b0a48b06157 100644
--- a/utils/cec-follower/Makefile.am
+++ b/utils/cec-follower/Makefile.am
@@ -24,9 +24,9 @@ cec-table.h: $(top_srcdir)/utils/cec-ctl/msg2ctl.pl 
$(top_srcdir)/include/linux/
                $(top_srcdir)/utils/common/cec-htng-funcs.h >$@
 
 version.h:
-       @if git -C $(srcdir) rev-parse HEAD >/dev/null 2>&1; then \
+       @if [ -d $(top_srcdir)/.git ]; then \
                echo -n "#define SHA " >$@ ; \
-               git -C $(srcdir) rev-parse HEAD >>$@ ; \
+               git -C $(top_srcdir) rev-parse HEAD >>$@ ; \
        else \
                touch $@ ; \
        fi
diff --git a/utils/v4l2-compliance/Makefile.am 
b/utils/v4l2-compliance/Makefile.am
index 68d376ae8a5b..dd5d20ca1329 100644
--- a/utils/v4l2-compliance/Makefile.am
+++ b/utils/v4l2-compliance/Makefile.am
@@ -21,9 +21,9 @@ EXTRA_DIST = Android.mk fixme.txt v4l2-compliance.1
 v4l2-compliance.cpp: version.h
 
 version.h:
-       @if git -C $(srcdir) rev-parse HEAD >/dev/null 2>&1; then \
+       @if [ -d $(top_srcdir)/.git ]; then \
                echo -n "#define SHA " >$@ ; \
-               git -C $(srcdir) rev-parse HEAD >>$@ ; \
+               git -C $(top_srcdir) rev-parse HEAD >>$@ ; \
        else \
                touch $@ ; \
        fi

_______________________________________________
linuxtv-commits mailing list
[email protected]
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to