merge_helpers.sh: Introduce NO_REQUIRE_CLEAN_GIT env var

Change-Id: I278b39959c93d95869414ab00577953422057e28
This commit is contained in:
SpiritCroc 2020-11-05 16:46:32 +01:00
parent 54b9cbd653
commit 096e046556
1 changed files with 3 additions and 0 deletions

View File

@ -11,6 +11,9 @@ revert_last() {
} }
require_clean_git() { require_clean_git() {
if [ "$NO_REQUIRE_CLEAN_GIT" = "y" ]; then
return
fi
uncommitted=`git status --porcelain` uncommitted=`git status --porcelain`
if [ ! -z "$uncommitted" ]; then if [ ! -z "$uncommitted" ]; then
echo "Uncommitted changes are present, please commit first!" echo "Uncommitted changes are present, please commit first!"