Using posh-git in powershell I am able to list all the items in the working tree that have changed, by using the collection variable $GitStatus.Working, I can use this list in a where clause to filter a directory listing like so
dir | where {$GitStatus.Working -contains $_.Name}
this works really well to display all the files in the current directory that are altered but not yet in the index, however when I run this same command with the -recurse directive the file(s) no longer match. I don't understand why. Any ideas?
(Note Posh-GiTDir from Scott Hanselman suffers from the same problem, not surprisingly as he uses basically the same technique, to show the "Git" column)
Edit: This started when I noticed that the Posh-GitDir Git column did not display anything when I did a recursive directory listing. It's useful to be able to quickly see what's changed "from this folder down", I looked at how Posh-GitDir gets its info to try and debug why it wasn't working for a recurse.