dotnet6.0/command-line-api-use-work-tree-with-git-apply.patch
Omair Majid 70084bd849 Import from Fedora
Resolves: RHBZ#1986211
2022-02-03 14:01:10 -05:00

28 lines
1004 B
Diff

From 7a752928ed3588246c4b296feb6cf4946f1b29b7 Mon Sep 17 00:00:00 2001
From: Omair Majid <omajid@redhat.com>
Date: Thu, 9 Sep 2021 12:11:39 -0400
Subject: [PATCH] [ArPow] Use --work-tree with git apply
This makes things work better in a source-tarball build, where there may
be a .git directory but it's for a different repo than command-line-api.
---
eng/SourceBuild.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props
index 6cc85018..5e223747 100644
--- a/eng/SourceBuild.props
+++ b/eng/SourceBuild.props
@@ -15,7 +15,7 @@
</ItemGroup>
<Exec
- Command="git apply --ignore-whitespace --whitespace=nowarn &quot;%(SourceBuildPatchFile.FullPath)&quot;"
+ Command="git --work-tree=&quot;$(RepoRoot)&quot; apply --ignore-whitespace --whitespace=nowarn &quot;%(SourceBuildPatchFile.FullPath)&quot;"
WorkingDirectory="$(RepoRoot)"
Condition="'@(SourceBuildPatchFile)' != ''" />
</Target>
--
2.31.1