build(vim-patch.sh): use bundled uncrustify (#23770)

This commit is contained in:
zeertzjq
2023-05-26 22:22:56 +08:00
committed by GitHub
parent a24dd0392b
commit d3a22ff242

View File

@@ -297,7 +297,7 @@ uncrustify_patch() {
# Rename path to check_colors.vim # Rename path to check_colors.vim
LC_ALL=C sed -e 's@\( [ab]/runtime\)/colors/\(tools/check_colors\.vim\)@\1/\2@g' \ LC_ALL=C sed -e 's@\( [ab]/runtime\)/colors/\(tools/check_colors\.vim\)@\1/\2@g' \
"$file" > "$file".tmp && mv "$file".tmp "$file" "$file" > "$file".tmp && mv "$file".tmp "$file"
} }
uncrustify_patch() { uncrustify_patch() {
@@ -314,7 +314,7 @@ uncrustify_patch() {
for file in $(git diff-tree --name-only --no-commit-id -r --diff-filter=a "$commit"); do for file in $(git diff-tree --name-only --no-commit-id -r --diff-filter=a "$commit"); do
git --work-tree="$patch_path"/a checkout --quiet "$commit"~ -- "$file" git --work-tree="$patch_path"/a checkout --quiet "$commit"~ -- "$file"
done done
for file in $(git diff-tree --name-only --no-commit-id -r --diff-filter=d "$commit"); do for file in $(git diff-tree --name-only --no-commit-id -r --diff-filter=d "$commit"); do
git --work-tree="$patch_path"/b checkout --quiet "$commit" -- "$file" git --work-tree="$patch_path"/b checkout --quiet "$commit" -- "$file"
done done
git reset --quiet --hard HEAD git reset --quiet --hard HEAD
@@ -328,7 +328,7 @@ get_vimpatch() {
(cd "$patch_path" && (git --no-pager diff --no-index --no-prefix --patch --unified=5 --color=never a/ b/ || true)) (cd "$patch_path" && (git --no-pager diff --no-index --no-prefix --patch --unified=5 --color=never a/ b/ || true))
} }
get_vimpatch() { get_vimpatch() {
get_vim_sources get_vim_sources