This is an automated email from the ASF dual-hosted git repository.
dcapwell pushed a commit to branch cep-15-accord
in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/cep-15-accord by this push:
new 51b0dca71d Remove git hook for pre-push as it is redundant and causes
issues when merging to mainline
51b0dca71d is described below
commit 51b0dca71df94631519fdf1639aeb5f9ba43c570
Author: David Capwell <[email protected]>
AuthorDate: Thu Mar 9 15:20:48 2023 -0800
Remove git hook for pre-push as it is redundant and causes issues when
merging to mainline
patch by David Capwell; reviewed by Caleb Rackliffe for CASSANDRA-18309
---
.../git/git-hooks/pre-push/100-push-submodules.sh | 51 ----------------------
.build/git/install-git-defaults.sh | 1 -
2 files changed, 52 deletions(-)
diff --git a/.build/git/git-hooks/pre-push/100-push-submodules.sh
b/.build/git/git-hooks/pre-push/100-push-submodules.sh
deleted file mode 100755
index c3daa95597..0000000000
--- a/.build/git/git-hooks/pre-push/100-push-submodules.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/env bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Redirect output to stderr.
-exec 1>&2
-
-#set -o xtrace
-set -o errexit
-set -o pipefail
-set -o nounset
-
-bin="$(cd "$(dirname "$0")" > /dev/null; pwd)"
-
-_main() {
- # In case the usage happens at a different layer, make sure to cd to the
toplevel
- local root_dir
- root_dir="$(git rev-parse --show-toplevel)"
- cd "$root_dir"
-
- if [[ ! -e .gitmodules ]]; then
- # nothing to see here, look away!
- return 0
- fi
-
- local -r cmd='
-branch="$(git rev-parse --abbrev-ref HEAD)"
-[[ "$branch" == "HEAD" ]] && exit 0
-
-default_remote="$(git config --local --get branch."${branch}".remote || true)"
-remote="${default_remote:-origin}"
-
-git push --atomic "$remote" "$branch"
-'
- git submodule foreach --recursive "$cmd"
-}
-
-_main "$@"
diff --git a/.build/git/install-git-defaults.sh
b/.build/git/install-git-defaults.sh
index 00f1dc435d..7c26ed5eda 100755
--- a/.build/git/install-git-defaults.sh
+++ b/.build/git/install-git-defaults.sh
@@ -89,7 +89,6 @@ _install_hooks() {
install_hook "$git_dir" "post-checkout" true
install_hook "$git_dir" "post-switch" false
install_hook "$git_dir" "pre-commit" false
- install_hook "$git_dir" "pre-push" false
}
_git_config_set() {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]