From 071cca1d48920f24d202149895bb85b664aa025d Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sat, 9 Jan 2021 01:20:08 -0500 Subject: [PATCH] checkPlugin: Don't create an empty commit --- bin/plugins/checkPlugin.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/plugins/checkPlugin.js b/bin/plugins/checkPlugin.js index 629233e6..44a26c45 100755 --- a/bin/plugins/checkPlugin.js +++ b/bin/plugins/checkPlugin.js @@ -467,7 +467,8 @@ fs.readdir(pluginPath, (err, rootFiles) => { const cmd = [ 'git rm -rf node_modules --ignore-unmatch', 'git add -A', - 'git commit --allow-empty -m "autofixes from Etherpad checkPlugin.js"', + '{ ! git diff-index --cached --quiet HEAD || exit 0; }', + 'git commit -m "autofixes from Etherpad checkPlugin.js"', 'git push', ].join(' && '); if (autoCommit) {