aboutsummaryrefslogtreecommitdiff
path: root/local
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 12:42:58 -0800
commit93b145f6fcda5903b2d11efe200fed2876a6fc62 (patch)
tree3adfbc244b867862d028a54035b549770fbe3e1f /local
parentpre-receive.gentoo-news: merge-base for new tag/branch (diff)
downloadgithooks-93b145f6fcda5903b2d11efe200fed2876a6fc62.tar.gz
githooks-93b145f6fcda5903b2d11efe200fed2876a6fc62.tar.bz2
githooks-93b145f6fcda5903b2d11efe200fed2876a6fc62.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>
Diffstat (limited to 'local')
-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 2d20068..70e39af 100755
--- a/local/update-06-copyright
+++ b/local/update-06-copyright
@@ -75,6 +75,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