fsprojects / Paket

A dependency manager for .NET with support for NuGet packages and Git repositories.
https://fsprojects.github.io/Paket/
MIT License
1.99k stars 520 forks source link

paket restore with git as source changes remote url of gitconfig #4188

Open sebingel opened 1 year ago

sebingel commented 1 year ago

Description

With a git source configured in paket.dependencies (like this) and a local repository that uses a git worktree workflow (like this) and paket in magic mode: 'paket restore' sometimes changes the remote URL configured in .gitconfig to the URL of the configured source from paket.dependencies. This renders the repository unusable until manual correction of the URL.

Repro steps

Unfortunately, I cannot reproduce this reliably.

Expected behavior

'paket restore' should not change the .gitconfig-file of the project you are working on.

Actual behavior

'paket restore' changes the .gitconfig-file of the project you are working on.

Known workarounds

Somentimes this issue can be fixed by cloning a new copy of the repository. But this is as unreliable as trying to reproduce the problem.