aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2019-12-15 12:42:58 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2019-12-15 22:22:29 -0800
commit2e99113cba721517265cf06dc431f53e6b614b1a (patch)
tree86115739cc84301dd73bed4775572d666f5f930f
parentlocal: resync from git-gx86-tools/49b86a7418e68de3cf90ec88add3ac08630b7f0b, n... (diff)
downloadgithooks-2e99113cba721517265cf06dc431f53e6b614b1a.tar.gz
githooks-2e99113cba721517265cf06dc431f53e6b614b1a.tar.bz2
githooks-2e99113cba721517265cf06dc431f53e6b614b1a.zip
local/update-06-copyright: detect if a new ref has no common commits to master
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> (cherry picked from commit 93b145f6fcda5903b2d11efe200fed2876a6fc62)
-rwxr-xr-xlocal/update-06-copyright1
1 files changed, 1 insertions, 0 deletions
diff --git a/local/update-06-copyright b/local/update-06-copyright
index 82cba58..dc0bb4a 100755
--- a/local/update-06-copyright
+++ b/local/update-06-copyright
@@ -74,6 +74,7 @@ zeros=0000000000000000000000000000000000000000
if [[ ${oldrev} == "${zeros}" && ${refname} != refs/heads/master ]]; then
mergebase=$(git merge-base refs/heads/master "${newrev}")
[[ -n ${mergebase} ]] && oldrev=${mergebase}
+ [[ -z ${mergebase} ]] && echo "WARNING: No common commits with master!"
fi
rev_list_arg="${oldrev}..${newrev}"
# new and no common commit? gotta check them all