I added this block because I wanted to achieve the same behaviour as what I saw in msysgit: When a file 'foo' does not exist in HEAD and it is added by calling 'git add foo' there is an error message 'fatal: pathspec 'foo' did not match any files'.

In the new implementation using PathFilterGroup I do not check this anymore and just do nothing.