From 76ada0a7725f185574a5035bbcaa857756c21c7b Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Sat, 19 Sep 2015 09:21:31 +0200 Subject: [PATCH] MT#15293 commit: [PRO] do pull first Change-Id: I09bd0078f77ef000ff96f3dba38e05d07c698531 --- scripts/commit | 9 +++++++++ 1 file changed, 9 insertions(+) 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