I just tried landing something right now, and I got this error 4 times in a row (literally running arc land immediately after each failure):
juner@pu-ws-170 /c/Code/....... (.......) $ arc land Landing current branch '.......'. TARGET Landing onto "master", selected by following tracking branches upstream to the closest remote. REMOTE Using remote "origin", selected by following tracking branches upstream to the closest remote. FETCH Fetching origin/master... This commit will be landed: - 4a4256a ....... Landing revision 'D10305: .......'... BUILDS PASSED Harbormaster builds for the active diff completed successfully. Exception Command failed with error #128! COMMAND git checkout "origin/master" -- STDOUT (empty) STDERR fatal: Unable to create 'C:/Code/......./.git/index.lock': File exists. If no other git process is currently running, this probably means a git process crashed in this repository earlier. Make sure no other git process is running and remove the file manually to continue. (Run with `--trace` for a full exception trace.) juner@pu-ws-170 /c/Code/....... (.......) $ arc land Landing current branch '.......'. TARGET Landing onto "master", selected by following tracking branches upstream to the closest remote. REMOTE Using remote "origin", selected by following tracking branches upstream to the closest remote. FETCH Fetching origin/master... This commit will be landed: - 4a4256a ....... Landing revision 'D10305: .......'... BUILDS PASSED Harbormaster builds for the active diff completed successfully. Exception Command failed with error #128! COMMAND git checkout "......." -- STDOUT (empty) STDERR fatal: Unable to create 'C:/Code/......./.git/index.lock': File exists. If no other git process is currently running, this probably means a git process crashed in this repository earlier. Make sure no other git process is running and remove the file manually to continue. (Run with `--trace` for a full exception trace.) INTERRUPTED! Restoring working copy to its original state. juner@pu-ws-170 /c/Code/....... (.......) $ arc land Landing current branch '.......'. TARGET Landing onto "master", selected by following tracking branches upstream to the closest remote. REMOTE Using remote "origin", selected by following tracking branches upstream to the closest remote. FETCH Fetching origin/master... This commit will be landed: - 4a4256a ....... Landing revision 'D10305: .......'... BUILDS PASSED Harbormaster builds for the active diff completed successfully. Exception Command failed with error #128! COMMAND git checkout "origin/master" -- STDOUT (empty) STDERR fatal: Unable to create 'C:/Code/......./.git/index.lock': File exists. If no other git process is currently running, this probably means a git process crashed in this repository earlier. Make sure no other git process is running and remove the file manually to continue. (Run with `--trace` for a full exception trace.) juner@pu-ws-170 /c/Code/....... (.......) $ arc land Landing current branch '.......'. TARGET Landing onto "master", selected by following tracking branches upstream to the closest remote. REMOTE Using remote "origin", selected by following tracking branches upstream to the closest remote. FETCH Fetching origin/master... This commit will be landed: - 4a4256a ....... Landing revision 'D10305: .......'... BUILDS PASSED Harbormaster builds for the active diff completed successfully. PUSHING Pushing changes to "origin/master". Counting objects: 12, done. Delta compression using up to 8 threads. Compressing objects: 100% (12/12), done. Writing objects: 100% (12/12), 1.21 KiB | 0 bytes/s, done. Total 12 (delta 11), reused 0 (delta 0) To ssh://......./diffusion/P/....... abe06dd..2573940 2573940a7301f0a4fadd1dda3e18ddb534a66eb0 -> master UPDATE Local "master" tracks target remote "origin/master", checking out and pulling changes. PULL Checking out and pulling "master". Cleaning up branch "......."... (Use `git checkout -b ....... 4a4256a31e1ce90b4b178a6bd54884fe8fb16ad6` if you want it back.) DONE Landed changes.
On Windows, it's very often (almost always) that there'll be some sort of UI for Git running (whether it's Git Extensions, SourceTree or the Visual Studio Git plugin). When these UIs periodically run git status, they block arc land from working properly.
It would be better if arc land automatically retried (up to a limit) when index.lock exists so I don't have to run arc land 4 times to land my code.