diff --git a/scripts/commit b/scripts/commit index afd3a8cc..25b1ee46 100755 --- a/scripts/commit +++ b/scripts/commit @@ -59,6 +59,15 @@ log_debug "git status | grep -q 'working directory clean'" if git status | grep -q 'working directory clean' ; then log_info "OK: nothing to commit." else + if [ -f /usr/share/ngcp-ngcpcfg/scripts/pull ] ; then + log_debug 'git stash' + git stash >/dev/null + if ! /usr/share/ngcp-ngcpcfg/scripts/pull ; then + exit 1 + fi + log_debug 'git stash pop' + git stash pop >/dev/null + fi log_debug 'git add . ; git commit -a -m "$msg [$(date --rfc-3339=ns)]"' git add . git commit -a -m "$msg [$(date --rfc-3339=ns)]" >/dev/null