let $changeList := proc:execute($gitCmd, ('diff-tree', '--no-commit-id', '--name-status', 'HEAD'), map{'dir' : $repoPath})
dita-now % git diff-tree --no-commit-id --name-status -r HEAD
That’d probably be too simple, but didn’t you forget '-r' in your XQuery function call?