#[ -n "$$(git status --porcelain)" ]
check-uncommitted:
- @if [ -n "$$(git diff --quiet)" ] && [ -n "$$(git diff --cached --quiet)" ] && [ -n "$$(git ls-files --others --exclude-standard)" ]; then :; else \
- echo "The first checks have been passed, the repo seems to be clean... But... Still, let's check a little more! :)"; \
- @if [ -n "$$(git status --porcelain)" ]; then \
- echo "Repository is clean (no uncommitted or untracked changes). Exit 0."; \
- exit 0; \
+ @if [ -n "$$(git diff --quiet)" ] && [ -n "$$(git diff --cached --quiet)" ] && [ -n "$$(git ls-files --others --exclude-standard)" ]; then \
+ echo "Warning: Uncommitted changes detected! Go to autocommit steps..."; \
else \
- echo "Error! Git status is not porcelain! Check it mannualy. Exit 1."; \
- exit 1; \
- fi
+ echo "The first checks have been passed, the repo seems to be clean... But... Still, let's check a little more! ))"; \
+ @if [ -n "$$(git status --porcelain)" ]; then \
+ echo "Repository is clean (no uncommitted or untracked changes). Exit 0."; \
+ exit 0; \
+ else \
+ echo "Error! Git status is not porcelain! Check it mannualy. Exit 1."; \
+ exit 1; \
+ fi \
+ fi
# if [[ -n "`$(rungit) status --porcelain`" ]];: then \