-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
First call git checkout does not work in Windows Docker container in mounted host volume folder #2778
Comments
Are you able to build Git? It would be interesting to instrument the code (read: litter it with debug print statements) and figure out where the actual root cause lies, and what error code is actually returned (and why). For starters, I would start with these code locations, if I were you: $ git grep "unable to resolve reference" \*.c
refs/files-backend.c: strbuf_addf(err, "unable to resolve reference '%s'",
refs/files-backend.c: strbuf_addf(err, "unable to resolve reference '%s'",
refs/files-backend.c: strbuf_addf(err, "unable to resolve reference '%s'",
refs/files-backend.c: strbuf_addf(err, "unable to resolve reference '%s': "
refs/files-backend.c: strbuf_addf(err, "unable to resolve reference '%s': %s",
refs/files-backend.c: strbuf_addf(err, "unable to resolve reference '%s': %s", |
Error message is from line 706 of refs/files-backend.c file.
More detailed info: after git clone command of repository: a ) in mounted volume also in mounted host volume folder second call command 'git checkout feature/myfeaturename' b) directly in windows host machine: |
So something in |
@mariuszkochanowski did you get a chance to dig further? |
I've prepared a reproducible example:
|
@mariuszkochanowski do you think you will have a chance to test this with |
I tried to dig further using output from my printf function inserts (in files sha1-file.c and files-backend.c) but i didn't find the cause of the problem. I tried to modify mingw.c file but it caused compilation errors. |
@mariuszkochanowski after hours trying to get Docker to run in an Azure VM, I got this:
Any idea what is going wrong? |
I am using docker desktop on windows stable version (switched to windows containers): In thread: You could try run it on image: mcr.microsoft.com/windows/servercore:ltsc2019 List of images: |
Unfortunately, at some stage my Docker for Windows setup broke, and I never managed to get it back to work. And then this ticket got buried in my inbox. @mariuszkochanowski are you still interested in this? I could walk you through building Git, patching it to include tons of debug messages, and then using it in a Docker container via a mapped volume. |
I have found similar issue: Git clone does not work in Windows Docker container in mounted host volume folder #1007
Setup
defaults?
to the issue you're seeing?
Running Git for Windows in a Windows Container directly on a volume mount point.
Details
** insert your response here **
Minimal, Complete, and Verifiable example
this will help us understand the issue.
** insert here **
** insert here **
URL to that repository to help us with testing?
** insert URL here **
The text was updated successfully, but these errors were encountered: