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

bneradt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 947da7729d Fixing the git pre-commit hook for yapf (#10895)
947da7729d is described below

commit 947da7729d4f9ceffda7a283104b6ffdb3a18502
Author: Brian Neradt <[email protected]>
AuthorDate: Fri Dec 1 16:07:30 2023 -0600

    Fixing the git pre-commit hook for yapf (#10895)
    
    The REPO_ROOT calculation has to be updated for the pre-commit hook for
    the yapf functionality.
---
 tools/git/pre-commit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/git/pre-commit b/tools/git/pre-commit
index 33e9aaa26e..834ca7152d 100755
--- a/tools/git/pre-commit
+++ b/tools/git/pre-commit
@@ -63,7 +63,7 @@ trap "rm -f $clang_patch_file $yapf_patch_file 
$cmake_format_patch_file" 0 1 2 3
 
 # Loop over all files that are changed, and produce a diff file
 source ${YAPF_VENV}/bin/activate
-REPO_ROOT=$(cd $(dirname $0) && git rev-parse --show-toplevel)
+REPO_ROOT=$(cd $(dirname $0)/../.. && git rev-parse --show-toplevel)
 YAPF_CONFIG=${REPO_ROOT}/.style.yapf
 git diff-index --cached --diff-filter=ACMR --name-only HEAD | grep -vE 
"lib/(catch2|fastlz|swoc|yamlcpp)" | while read file; do
     case "$file" in

Reply via email to