Alexandros Kosiaris has submitted this change and it was merged.
Change subject: puppet-merge: submodule diff should honor QUIET
......................................................................
puppet-merge: submodule diff should honor QUIET
We were not honoring the QUIET parameter on puppet-merge for submodule
diffs. Honor it. Also force temporary directory removal in order to
avoid prompts
Change-Id: I317e3c7399bdb7172d37986b2b20855c12995206
---
M modules/puppetmaster/templates/puppet-merge.erb
1 file changed, 20 insertions(+), 18 deletions(-)
Approvals:
Alexandros Kosiaris: Verified; Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/puppetmaster/templates/puppet-merge.erb
b/modules/puppetmaster/templates/puppet-merge.erb
index 29a30db..3a40ae9 100755
--- a/modules/puppetmaster/templates/puppet-merge.erb
+++ b/modules/puppetmaster/templates/puppet-merge.erb
@@ -93,26 +93,28 @@
git diff --color HEAD..${fetch_head_sha1} | cat
fi
else
- # Else there are submodule changes.
- # Do some fancy stuff to show diffs
- # of submodule changes.
-
- # clone the puppet working directory to a temp directory, excludiing
private/
- tmpdir=$(mktemp -d /tmp/puppet-merge.XXXXXXXXXX)
- git clone --quiet "${BASEDIR}" "${tmpdir}"
-
- # merge and update submodules in $tmpdir
- (cd "${tmpdir}" && \
- git merge --quiet --ff-only "${fetch_head_sha1}" && \
- git submodule update --quiet --init)
-
- # show the diff between the $BASEDIR puppet directory and the $tmpdir
puppet directory
if [ $QUIET -eq 0 ]; then
- diff -uNr -x "private" -x ".git" "${BASEDIR}" "${tmpdir}" || true
- fi
+ # Else there are submodule changes.
+ # Do some fancy stuff to show diffs
+ # of submodule changes.
- # We've shown the diff so we are done with $tmpdir. Remove it.
- rm -r "${tmpdir}"
+ # clone the puppet working directory to a temp directory, excludiing
private/
+ tmpdir=$(mktemp -d /tmp/puppet-merge.XXXXXXXXXX)
+ git clone --quiet "${BASEDIR}" "${tmpdir}"
+
+ # merge and update submodules in $tmpdir
+ (cd "${tmpdir}" && \
+ git merge --quiet --ff-only "${fetch_head_sha1}" && \
+ git submodule update --quiet --init)
+
+ # show the diff between the $BASEDIR puppet directory and the $tmpdir
puppet directory
+ if [ $QUIET -eq 0 ]; then
+ diff -uNr -x "private" -x ".git" "${BASEDIR}" "${tmpdir}" || true
+ fi
+
+ # We've shown the diff so we are done with $tmpdir. Remove it.
+ rm -rf "${tmpdir}"
+ fi
fi
--
To view, visit https://gerrit.wikimedia.org/r/311691
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I317e3c7399bdb7172d37986b2b20855c12995206
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits