Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git-filter-repo hangs on Windows, works on Ubuntu (WSL2) #232

Closed
kaby76 opened this issue Apr 1, 2021 · 2 comments
Closed

git-filter-repo hangs on Windows, works on Ubuntu (WSL2) #232

kaby76 opened this issue Apr 1, 2021 · 2 comments

Comments

@kaby76
Copy link

kaby76 commented Apr 1, 2021

I'm trying to split up a small git repo using this tool, and I'm having difficulty with it. Here is a script that I run that hangs on Windows Msys2 64-bit.

set -x
rm -rf tools

# Split the Antlr4BuildTasks repo into
# "tools" for dotnet tools,
# "msbuild" for the msbuild tool.

# tools
time git clone https://github.com/kaby76/Antlr4BuildTasks.git tools
cd tools
time git filter-repo --path csxml2/ --path dotnet-antlr/ --path dotnet-antlr-test/ --path .gitignore --path clean.sh --path license
cd ..

What I'm seeing is the "git filter-repo" command hanging. I notice that there are three processes spawned with the last git command, which is the actual command that hangs:

c:\msys64\usr\bin\git.exe filter-repo --path csxml2/ --path dotnet-antlr/ --path dotnet-antlr-test/  --path .gitignore --path clean.sh --path license

c:\msys64\usr\lib\git-core\git.exe pack-refs --all --prune
git gc --prune=now

I'm not sure why the last process in this list is "git" vs "c:\msys64\usr\bin\git.exe. That seems different, and likely the problem because it may then be trying to execute the wrong git.

Other info: "which git" outputs /usr/bin/git. "git --version" outputs "2.30.0". "python --version" outputs Python 3.8.7. When I kill the process in Msys2 bash via control-c, the process tree is not entirely killed: the middle of the three processes that I list above is not killed, and it is marked "Suspended".

On Ubuntu WSL2 this works fine. In fact, this is a great, indispensable tool. Well done.

@newren
Copy link
Owner

newren commented Jun 12, 2021

I don't have access to a Windows system, and the hanging sounds a bit weird to me, but looking at this ticket yet again I'm reminded of #36 (comment). I also know that Git for Windows fixed a few issues relating to running Python in its recent release. Does a newer version of Git for Windows fix this for you? If not, does the other comment I linked help at all? (I hope so, because I don't have any other ideas...)

Glad you at least got this working under WSL, though it would be nice to have it working outside WSL as well.

@newren
Copy link
Owner

newren commented Oct 14, 2022

No response; I'll go ahead and close.

@newren newren closed this as completed Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants