From 5232d2a29506ee30bf54336acf9998684a3b1cd9 Mon Sep 17 00:00:00 2001 From: Théo Zimmermann Date: Thu, 6 Oct 2016 18:54:21 +0200 Subject: Fix git recognition when in worktrees. git worktrees have a .git file instead of a .git directory. Using Sys.file_exists is a more general solution which gives true in both cases. --- configure.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ml b/configure.ml index 23ec93e078..507fd351a7 100644 --- a/configure.ml +++ b/configure.ml @@ -430,7 +430,7 @@ let dll = if os_type_win32 then ".dll" else ".so" let vcs = let git_dir = try Sys.getenv "GIT_DIR" with Not_found -> ".git" in - if dir_exists git_dir then "git" + if Sys.file_exists git_dir then "git" else if Sys.file_exists ".svn/entries" then "svn" else if dir_exists "{arch}" then "gnuarch" else "none" -- cgit v1.2.3