Files
Honglei Huang 68c8e111ae rocr/format: Fix clang-format-diff.py path in format script (#1757)
Update the format script to use absolute path for clang-format-diff.py
instead of relative path. This ensures the script works correctly
regardless of the current working directory when executed.

- Change from './clang-format-diff.py' to '${root}/projects/rocr-runtime/clang-format-diff.py'
- Improves script reliability and portability

Signed-off-by: Honglei Huang <honghuan@amd.com>
2025-11-28 09:21:12 +08:00

7 строки
188 B
Bash

#!/bin/bash
root=`git rev-parse --show-toplevel`
pushd . > /dev/null
cd $root
git diff -U0 HEAD^ | "${root}/projects/rocr-runtime/clang-format-diff.py" -p1 -i -style=file
popd > /dev/null