EXCEPTION: The current working directory is not part of a working copy for a supported version control system(Git, Subversion or Mercurial). at [<arcanist>\src\repository\api\ArcanistRepositoryAPI.php:85] arcanist(head=stable, ref.master=7d15b85a1bc0, ref.stable=7b0aac5c6f31), phutil(head=stable, ref.master=92882eb9404d, re f.stable=52748950bb36) #0 ArcanistRepositoryAPI::newAPIFromConfigurationManager(ArcanistConfigurationManager) called at [<arcanist>\src\workflow\ArcanistVersionWorkflow.php:48] #1 ArcanistVersionWorkflow::run() called at [<arcanist>\scripts\arcanist.php:394]
This occurs on Windows 7 running php5 or php7 and is reliably repeatable on many clients. It does not occur on linux clients.
arcanist and php installed on C:\Program Files (x86)\arcanist\arcanist\ Git repo either on drive D: or drive C: makes no difference.
Analysis of the issue is that the failure is a consequence of calling newFromPathWithConfig() with path set to C:\Program Files (x86)\arcanist\arcanist
This calls walkToRoot() with the default root parameter '/'
This function calls resolvePath() (which btw erroneously under windows does not think / is an absolute path!) and subsequently concludes in any case that the "root" is not / but the git repo root.
The net result is that the FileList::contains() tries to compare these disconnected paths and returns false which then returns an empty array of possible locations for .arcconfig to exist in. This prevents newFromPathWithConfig() from successfully finding .arcconfig (in the arcanist install directory) even though it is present.
I dont know enough about the wider use of these lower level functions to know how to fix it reliably but replacing '/' with 'C:\' in walToRoot() as T8821 suggested as a "Shameful fix" does not fix the problem but at least gets you a little further but then subsequently exhibits the failure described earlier in that task and in T8291 with the an instance of bad git log -1 --format=" H ct" command parameters.