My bet there is a stale sh.exe somewhere. FPC makefile's unix detection is based on finding a "sh" iirc.
And the Oscar goes to...Marcov
It's documented:
http://www.stack.nl/~marcov/buildfaq/#toc-Subsection-2.6.4It is a good habit to make a batchfile that sets a minimal PATH, and when problems occur execute it in a shell (won't change the global default). Having all kinds of programs add to the shell and many never removing them makes the PATH an accident waiting to happen.
just see what paths to the windows directory are in the global PATH (classically c:\windows and c:\windows\system32, but newer window versions add powershell and wbem), and add the fpc dir to it:
path c:\windows\system32;c:\windows;d:\fpc\2.6.2\bin\i386-win32
stuff this line into a batchfile (e.g. dofpc.bat), and when in doubt call it. It also saves you from accidentally calling MAKE's from other toolchains.
A good tool is also
http://www.robvanderwoude.com/files/which_nt.txt an NT (cmd.exe) batchfile version of the unix which command.
which sh.exe would have printed the git directory.