loresoft/msbuildtasks — pull request #103 by joelverhagen (2013-11-24 19:30:26+00:00)
Title: Added GitPendingChanges task

##### Summary
I've added a new Git task called `GitPendingChanges`. This task exposes a `bool` property called `HasPendingChanges`. This property is `true` when there are uncommitted changes to the Git repository.

I have added associated tests and updated the `MSBuild.Community.Tasks.Targets` file.

##### Use Case
Currently, it's very easy to include the Git commit hash to the assembly version (using the `GitVersion` task). However, to improve debugging, it could be helpful to know whether an output assembly was built from a "dirty" repository. `GitPendingChanges` solves this problem.

##### Implementation
The task internally uses `git status --porcelain`. If all of the output lines are empty, then there are no pending changes.