FIX: check if un-pushed commits

- switch the check for un-pushed commits from `diff-index` to more simple check
- still ignores sub-modules

Closes #234

Clarification: 
As pointed by @cristiandouce in #234 - my flow was different (and pretty stupid to be honest on some particular project of mine) so some other work flow scenarios was failing to pass. 

I still feel such check is needed, because it is still populates Changelog|History files with empty lines if no un-pushed commits exist, so @hemanth merge this one or revert the [619232e](619232ef86)
This commit is contained in:
Sasha Khamkov 2014-07-11 23:43:12 +03:00
parent 390ba55211
commit bd80a4e512

View file

@ -5,8 +5,8 @@ LIST=false
TAG="n.n.n"
GIT_LOG_OPTS=""
if git diff-index --quiet --ignore-submodules HEAD --; then
echo 'No changes to log.';
if [[ -z $(git log --ignore-submodules origin..HEAD) ]]; then
echo 'No unpushed commits.';
exit 1;
fi