fsprojects / Paket

A dependency manager for .NET with support for NuGet packages and Git repositories.

Home Page:https://fsprojects.github.io/Paket/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

paket update hangs on switching git branch

anpin opened this issue · comments

Description

Paket hangs when given git dependency with branch other than master. I'm using git version 2.40.1.

Repro steps

Run this script

#!/bin/sh
mkdir -p paket-repro && cd paket-repro
dotnet new tool-manifest
dotnet tool install paket
echo -e 'git https://github.com/anpin/Elmish.Bridge ns2.0 build: "./build.sh", Packages: /nugets/, OS: mono\n    nuget Elmish.Bridge.RPC' > paket.dependencies
dotnet paket update -v

Output:

$ ./repro.sh
The template "Dotnet local tool manifest file" was created successfully.

You can invoke the tool from this directory using the following commands: 'dotnet tool run paket' or 'dotnet paket'.
Tool 'paket' (version '7.2.1') was successfully installed. Entry is added to the manifest file /home/a/projects/paket-repro/.config/dotnet-tools.json.
Paket version 7.2.1+8e4eb74b42fbd45f39f7afce9184c16ebb65f16c
found: /home/a/projects/paket-repro/paket.dependencies
Loading /home/a/projects/paket-repro/paket.dependencies
Parsing:
[|"git https://github.com/anpin/Elmish.Bridge ns build: "./build.sh", Packages: /nugets/, OS: mono";
  "    nuget Elmish.Bridge.RPC"|]
Parsed.
5822ee572b945d61ab9e1e88bd65a1d7261478fc	refs/heads/ns
Fetching https://github.com/anpin/Elmish.Bridge to /home/a/.paket/git/db/Elmish.Bridge
Cloning file:////home/a/.paket/git/db/Elmish.Bridge to /home/a/projects/paket-repro/paket-files/github.com/anpin/Elmish.Bridge
Checking for uncommitted changes in /home/a/projects/paket-repro/paket-files/github.com/anpin/Elmish.Bridge
Checking for commits made in detached HEAD state in /home/a/projects/paket-repro/paket-files/github.com/anpin/Elmish.Bridge
HEAD master
Setting /home/a/projects/paket-repro/paket-files/github.com/anpin/Elmish.Bridge to 5822ee572b945d61ab9e1e88bd65a1d7261478fc

Expected behavior

Building any branch or commit works

Actual behavior

It hangs

Known workarounds

Kill the paket, go to /home/a/projects/paket-repro/paket-files/github.com/anpin/Elmish.Bridge and manually switch the branch with git checkout update: workaround doesn't actually work

actually I don't even need to specify a branch, it hangs anyway