Skip to content

Switch Unix tools from Git internal tools to MSYS2 tools on Windows images #1525

@AlenaSviridenko

Description

@AlenaSviridenko

Breaking changes

"Git For Windows" Unix tools will be replaced by "MSYS2" Unix tools on Windows images.
Currently, folders C:\Program Files\Git\bin and C:\Program Files\Git\usr\bin and C:\Program Files\Git\mingw64\bin are added to PATH and it expose a ton of Unix tools (Git For Windows Internal tools) to PATH. We would like to remove those folders from PATH because one day they can be removed by Git maintainers.
A lot of people already depend on those tools so we would like to replace Git Unix tools by MSYS2 Unix tools to reduce impact.

Target date

Deployment will start on November, 2 and changes propagation will take 2-3 days.
This change was rolled back and should be reevaluated

The motivation for the changes

Per communication with Git For Windows maintainers, we should not add Git Internal tools to PATH and rely on it. They could be removed in future and break a lot of people.

More details can be found in this PR by @dscho #1435.

All discussions can be found in this issue, also in MSYS2 issue #1572 and in the final PR #1648

Possible impact

The most of the tools are identical between "Git For Windows" Internal and MSYS2 but some minor versions could be different and it can affect some builds.

  • Windows 2016
  • Windows 2019

Mitigation ways

You will be able to return "Git For Windows" Unix tools to PATH using the following powershell step:

  • GitHub Actions:
echo "C:\Program Files\Git\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "C:\Program Files\Git\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
  • Azure Pipelines
echo "##vso[task.prependpath]C:\Program Files\Git\mingw64\bin"
echo "##vso[task.prependpath]C:\Program Files\Git\usr\bin"

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions