aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'local/update-05-manifest')
-rwxr-xr-xlocal/update-05-manifest11
1 files changed, 11 insertions, 0 deletions
diff --git a/local/update-05-manifest b/local/update-05-manifest
index 42afd2a..236c78f 100755
--- a/local/update-05-manifest
+++ b/local/update-05-manifest
@@ -13,6 +13,17 @@ export LC_MESSAGES=C
# enforce only on master branch
[[ ${refname} == refs/heads/master ]] || exit 0
+# special cases
+zeros=0000000000000000000000000000000000000000
+# branch removal
+[[ ${newrev} == "${zeros}" ]] && exit 0
+# new branch; try to find a merge base with master
+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
+
ret=0
while read commithash; do
# check for any Manifest changes