From 9dc9c57bbfef61577ca355127d68ba3685e14173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Thu, 19 Dec 2019 14:20:00 +0100 Subject: [PATCH] patchinstall: Test for .git presence, regardless of its type. It's possible that .git is a file, for example when using multiple worktrees, and in this case git apply will still work fine. --- staging/patchinstall.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staging/patchinstall.sh.in b/staging/patchinstall.sh.in index 4e1fc0cf..ae92ef12 100644 --- a/staging/patchinstall.sh.in +++ b/staging/patchinstall.sh.in @@ -267,7 +267,7 @@ fi # subdirectory of a git tree, which has the effect that no patches # are applied, but the exitcode is zero. To avoid broken builds we # will workaround this issue or abort. -test ! -d ".git" && git rev-parse --git-dir >/dev/null 2>&1 +test ! -e ".git" && git rev-parse --git-dir >/dev/null 2>&1 workaround_git_bug="$?" # Apply the patches using gitapply.sh, a small wrapper around 'patch'