diff options
author | Parabola git <git@parabola.nu> | 2020-12-15 13:00:02 +0000 |
---|---|---|
committer | Parabola git <git@parabola.nu> | 2020-12-15 13:00:02 +0000 |
commit | 5acc2bb7fad592a58c2932314384c39843859355 (patch) | |
tree | ca0118e16420fcc71d7b360f504d85aac0aeb040 | |
parent | e89a1c1d95eca461c0c6f2691c0392339f9b177a (diff) |
Update from cron
-rwxr-xr-x | .config/git/hooks/run-parts.sh | 4 | ||||
-rwxr-xr-x | .config/git/hooks/update.d/per-branch-no-ff | 8 |
2 files changed, 5 insertions, 7 deletions
diff --git a/.config/git/hooks/run-parts.sh b/.config/git/hooks/run-parts.sh index d2a1e0b..c1692b1 100755 --- a/.config/git/hooks/run-parts.sh +++ b/.config/git/hooks/run-parts.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash if [[ -d "$0.d" ]]; then - run-parts "${@/#/--arg=}" -- "$0.d" + run-parts "${@/#/--arg=}" --exit-on-error -- "$0.d" || exit 1 fi file="$GIT_DIR/hooks/${0##*/}" if [[ -x "$file" && -f "$file" ]]; then - "$file" "$@" + "$file" "$@" || exit 1 fi diff --git a/.config/git/hooks/update.d/per-branch-no-ff b/.config/git/hooks/update.d/per-branch-no-ff index a459a62..1e40921 100755 --- a/.config/git/hooks/update.d/per-branch-no-ff +++ b/.config/git/hooks/update.d/per-branch-no-ff @@ -4,11 +4,9 @@ ref=$1 prev_sha=$2 next_sha=$3 - -echo "ref=$ref prev_sha=${prev_sha} next_sha=${next_sha}" >> ~git/update-hook.log -exit 1 - # prevent re-writing history on master branch # autobuilder can not handle non-fast-forward commits -[[ "${ref}" != 'master' ]] || \ +[[ "${ref}" != 'refs/heads/master' ]] || \ git merge-base --is-ancestor "${prev_sha}" "${next_sha}" + +exit $? |