qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH qemu] configure: Enable werror for git worktrees
@ 2019-02-28  4:35 Alexey Kardashevskiy
  2019-02-28  5:00 ` David Gibson
  2019-02-28 10:03 ` Peter Maydell
  0 siblings, 2 replies; 7+ messages in thread
From: Alexey Kardashevskiy @ 2019-02-28  4:35 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alexey Kardashevskiy, David Gibson

The configure script checks multiple times whether it works in a git
repository and it does this by "test -e "${source_path}/.git" in 4 cases
but in one case where it tries to enable werror "-d" is used there which
fails on git worktrees as .git is a file then and not a directory.

This changes the test to "-e" as other occurrences.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 05d72f1..f481ff9 100755
--- a/configure
+++ b/configure
@@ -1835,7 +1835,7 @@ fi
 # Consult white-list to determine whether to enable werror
 # by default.  Only enable by default for git builds
 if test -z "$werror" ; then
-    if test -d "$source_path/.git" && \
+    if test -e "$source_path/.git" && \
         { test "$linux" = "yes" || test "$mingw32" = "yes"; }; then
         werror="yes"
     else
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-02-28 10:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-28  4:35 [Qemu-devel] [PATCH qemu] configure: Enable werror for git worktrees Alexey Kardashevskiy
2019-02-28  5:00 ` David Gibson
2019-02-28  7:01   ` Thomas Huth
2019-02-28  7:14     ` Gerd Hoffmann
2019-02-28  7:50       ` Thomas Huth
2019-02-28  9:20       ` Paolo Bonzini
2019-02-28 10:03 ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).