This is an automated email from the ASF dual-hosted git repository.

djwang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git


The following commit(s) were added to refs/heads/main by this push:
     new bc7011b50f4 Cleanup: Remove obsolete pre-push git hook
bc7011b50f4 is described below

commit bc7011b50f478f6ba11585a70d364d0b0c94177b
Author: Dianjin Wang <[email protected]>
AuthorDate: Thu Jul 3 13:57:54 2025 +0800

    Cleanup: Remove obsolete pre-push git hook
    
    This commit removes the pre-push git hook and its associated install
    script.
    
    The pre-push hook was originally implemented to validate changes to
    Concourse CI pipeline files before they were pushed to the repository.
    Since the project has fully migrated away from Concourse CI and all
    related pipeline files have been deleted from the codebase, this hook is
    now obsolete and serves no purpose.
---
 pom.xml                  |  1 -
 src/tools/hooks/install  |  6 ------
 src/tools/hooks/pre-push | 47 -----------------------------------------------
 3 files changed, 54 deletions(-)

diff --git a/pom.xml b/pom.xml
index 1e86880177d..5947cdbe45f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -708,7 +708,6 @@ code or new licensing patterns.
             <exclude>src/tools/make_mkid</exclude>
             <exclude>src/tools/tidy</exclude>
             <exclude>src/tools/find_typedef</exclude>
-            <exclude>src/tools/hooks/pre-push</exclude>
             <exclude>src/tools/valgrind.supp</exclude>
             <exclude>src/tools/pgindent/perltidyrc</exclude>
             <exclude>src/tools/pgindent/README.gpdb</exclude>
diff --git a/src/tools/hooks/install b/src/tools/hooks/install
deleted file mode 100755
index ca10e19d00d..00000000000
--- a/src/tools/hooks/install
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-hookdir=$(git rev-parse --git-dir)/hooks
-echo "Creating symlinks in $hookdir"
-
-set -ex
-ln -sf ../../hooks/pre-push $hookdir
diff --git a/src/tools/hooks/pre-push b/src/tools/hooks/pre-push
deleted file mode 100755
index dd7c8d16a7d..00000000000
--- a/src/tools/hooks/pre-push
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/bash
-
-# Hook to try to catch pushing pipelines without running `fly set-pipeline` 
first.
-
-# Refer to .git/hooks/pre-push.sample for more info on how it works.
-
-remote="$1"
-url="$2"
-
-z40=0000000000000000000000000000000000000000
-
-function user_input_to_proceed() {
-  read -p 'Proceed with push? (y/N): ' yesno </dev/tty
-  case "$yesno" in
-    y|Y|yes|Yes|YES) ;;
-    *) echo "Aborting push" >&2; exit 1 ;;
-  esac
-}
-
-while read local_ref local_sha remote_ref remote_sha ; do
-  if [ "$local_sha" = $z40 ] ; then
-    # Handle delete
-    continue
-  fi
-  if [ "$remote_sha" = $z40 ] ; then
-    # New branch
-    continue
-  fi
-  # Update to existing branch, examine new commits
-  range="$remote_sha..$local_sha"
-
-  # Check for changed files in concourse/pipelines
-  changed_pipeline_ymls=$(git rev-list -n 1 "$range" -- 
concourse/pipelines/*.yml)
-  changed_pipeline_pys=$(git rev-list -n 1 "$range" -- 
concourse/pipelines/*.py)
-  changed_pipeline_templates=$(git rev-list -n 1 "$range" -- 
concourse/pipelines/templates/*)
-
-  # if either a change to generators or a change to the templates, but no new 
pipeline file, warn user
-  if [ -n "${changed_pipeline_pys}${changed_pipeline_templates}" ] && [ -z 
"$changed_pipeline_ymls" ] ; then
-    echo 'You appear to have changed pipeline inputs (generator or template). 
Please check in the corresponding generated pipeline.'
-    user_input_to_proceed
-  elif [ -n "$changed_pipeline_ymls" ] ; then
-    echo 'You appear to be pushing a change to a pipeline. Please make sure 
you ran `fly set-pipeline` first.'
-    user_input_to_proceed
-  fi
-done
-
-exit 0


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to