From a6a512f387c15f092f5986695094c0f69b7fa978 Mon Sep 17 00:00:00 2001 From: Jeffrey <22608443+Jefffrey@users.noreply.github.com> Date: Wed, 25 Oct 2023 23:14:55 +1100 Subject: [PATCH] Fix pre commit (#4990) * Fix pre-commit.sh script * Fix --- pre-commit.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pre-commit.sh b/pre-commit.sh index 5ce080793242..f82390e229a9 100755 --- a/pre-commit.sh +++ b/pre-commit.sh @@ -20,7 +20,7 @@ # This file is git pre-commit hook. # # Soft link it as git hook under top dir of apache arrow git repository: -# $ ln -s ../../rust/pre-commit.sh .git/hooks/pre-commit +# $ ln -s ../../pre-commit.sh .git/hooks/pre-commit # # This file be run directly: # $ ./pre-commit.sh @@ -37,14 +37,12 @@ function BYELLOW() { echo "\033[1;33m$@\033[0m" } -RUST_DIR="rust" - # env GIT_DIR is set by git when run a pre-commit hook. if [ -z "${GIT_DIR}" ]; then GIT_DIR=$(git rev-parse --show-toplevel) fi -cd ${GIT_DIR}/${RUST_DIR} +cd ${GIT_DIR} NUM_CHANGES=$(git diff --cached --name-only . | grep -e ".*/*.rs$" |