conan
conan copied to clipboard
[bug] Failed to fetch correct commit
Describe the bug
Windows10 version 22H2. conan 1.58.0
Description: When start "conan build" with specified gitlab scm, conan did not fetch the correct commit. Seems command "git -c http.sslVerify=true checkout FETCH_HEAD" sets an unexpected commit finally. We have no ideas how this happens, but this for sure brings serious problem.
Conan Infor: INFO :runners.py [87]: Calling command: git -c http.sslVerify=true init > "C:\Users\xxxxxx\AppData\Local\Temp\tmpuzrqlqcj\output" [2024-04-17 11:28:38,853] INFO :runners.py [90]: Return code: 0 [2024-04-17 11:28:39,296] INFO :runners.py [98]: Output: in file:Initialized empty Git repository in D:/myfolder/.conan/data/mypackage/1.12.1/username/stable/source/.git/
stdout: None
stderr:b'' [2024-04-17 11:28:39,304]
INFO :runners.py [87]: Calling command: git -c http.sslVerify=true remote add origin "[email protected]" > "C:\Users\xxxxxx\AppData\Local\Temp\tmp8mmc7u9w\output" [2024-04-17 11:28:39,308]
INFO :runners.py [90]: Return code: 0 [2024-04-17 11:28:39,551]
INFO :runners.py [98]: Output: in file:
stdout: None
stderr:b'' [2024-04-17 11:28:39,551]
INFO :runners.py [87]: Calling command: git -c http.sslVerify=true fetch --depth 1 origin "16759640c58d64b8c735e818eee44208bf24ec8b" > "C:\Users\xxxxxx\AppData\Local\Temp\tmpa54dm62d\output" [2024-04-17 11:28:39,555]
INFO :runners.py [90]: Return code: 0 [2024-04-17 11:28:47,389]
INFO :runners.py [98]: Output: in file:
stdout: None
stderr:b'From mypackage\n * branch
16759640c58d64b8c735e818eee44208bf24ec8b -> FETCH_HEAD\n' [2024-04-17 11:28:47,390]
INFO :runners.py [87]: Calling command: git -c http.sslVerify=true checkout FETCH_HEAD > "C:\Users\xxxxxx\AppData\Local\Temp\tmpuw_a38b5\output" [2024-04-17 11:28:47,393]
INFO :runners.py [90]: Return code: 0 [2024-04-17 11:28:47,683]
INFO :runners.py [98]: Output: in file:
stdout: None
stderr:b"Note: switching to 'FETCH_HEAD'.\n\nYou are in 'detached HEAD' state. You can look around, make experimental\nchanges and commit them, and you can discard any commits you make in this\nstate without impacting any branches by
switching back to a branch.\n\nIf you want to create a new branch to retain commits you create, you may\ndo so (now or later) by using -c with the switch command. Example:\n\n git switch -c
How to reproduce it
No response