From 691babb1c8316e2f829fbcf9f2aa14f4b7711960 Mon Sep 17 00:00:00 2001
From: Omair Majid <omajid@redhat.com>
Date: Thu, 9 Sep 2021 10:03:36 -0400
Subject: [PATCH] [ArPow] Use --work-tree with git apply
This makes things work bettern in a source-tarball build (where there
may not be a .git directory), or there might be a .git directory but
it's for a different repo than the one we are building.
---
eng/source-build/source-build.proj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/source-build/source-build.proj b/eng/source-build/source-build.proj
index 6f90f9793..72058ac88 100644
--- a/eng/source-build/source-build.proj
+++ b/eng/source-build/source-build.proj
@@ -55,7 +55,7 @@
</ItemGroup>
<Exec
- Command="git apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
+ Command="git --work-tree="$(ProjectRoot)" apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
WorkingDirectory="$(ProjectRoot)"
Condition="'@(SourceBuildPatchFile)' != ''" />
</Target>
--
2.31.1