I think we also need to know if the repo was modified or not. Can you make a second call to:

git diff --name-only

and add that info in the version?