Git plugin: cleanup the environment at startup
Git: workaround an issue with 'diff --shortstat'

Should check further what really happens.