Minor git changes

This pull request contains two commits:
* The first one just reduces the verbosity of git calls:
 * "git status" is replaced by "git status -s" in order to just search '?' to detect untracked files.
 * "git stash list" is replaced by "git stash list -n 1" to avoid the list of all stashes, especially when we only try to detect their existence (and we don't count them).
* The second one just declares has_commit as an integer.