Skip to content

Commit

Permalink
[SourceBuild] Use --work-tree with git apply (#4254)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
omajid authored Sep 10, 2021
1 parent 4ebaa85 commit 267b843
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eng/source-build/source-build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</ItemGroup>

<Exec
Command="git apply --ignore-whitespace --whitespace=nowarn &quot;%(SourceBuildPatchFile.FullPath)&quot;"
Command="git --work-tree=$(ProjectRoot) apply --ignore-whitespace --whitespace=nowarn &quot;%(SourceBuildPatchFile.FullPath)&quot;"
WorkingDirectory="$(ProjectRoot)"
Condition="'@(SourceBuildPatchFile)' != ''" />
</Target>
Expand Down

0 comments on commit 267b843

Please sign in to comment.