From de7782dfb152dabff0c4d0cd270d9f06eaf38cf1 Mon Sep 17 00:00:00 2001 From: owokitty Date: Thu, 2 Oct 2025 14:30:06 -0500 Subject: [PATCH] test PR #26750 --- packages/grep/test.patch | 13 +++++++++++++ scripts/lint-packages.sh | 18 ++++++++++++++---- 2 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 packages/grep/test.patch diff --git a/packages/grep/test.patch b/packages/grep/test.patch new file mode 100644 index 00000000000000..af4edaa08bbe91 --- /dev/null +++ b/packages/grep/test.patch @@ -0,0 +1,13 @@ +diff --git a/src/grep.h b/src/grep.h +index 6798df5..acd9bf6 100644 +--- a/src/grep.h ++++ b/src/grep.h +@@ -20,6 +20,8 @@ + + #include + ++// this is a test ++ + /* The following flags are exported from grep for the matchers + to look at. */ + extern bool match_icase; /* -i */ diff --git a/scripts/lint-packages.sh b/scripts/lint-packages.sh index 881bc06c60cdf3..d0336365c22c35 100755 --- a/scripts/lint-packages.sh +++ b/scripts/lint-packages.sh @@ -127,9 +127,19 @@ check_indentation() { # - Modify TERMUX_PKG_VERSION # - Or specify one of the CI skip tags check_version_change() { - local base_commit commit_diff package="$1" - base_commit="$(git merge-base 'master@{upstream}' 'HEAD')" - commit_diff="$(git log --patch "${base_commit}.." -- "$package")" + local base_commit commit_diff package_dir="${1%/*}" + base_commit="$(< "$TERMUX_SCRIPTDIR/.git/refs/remotes/origin/master")" + + [[ -z "$base_commit" ]] && { + echo + echo + echo "Couldn't determine base commit of branch." + echo "This shouldn't be able to happen..." + ls -AR "$TERMUX_SCRIPTDIR/.git/refs" + exit 1 + } >&2 + + commit_diff="$(git log --patch "${base_commit}.." -- "$package_dir")" # If the diff is empty there's no commit modifying that package on this branch, which is a PASS. [[ -z "$commit_diff" ]] && return @@ -240,7 +250,7 @@ lint_package() { echo echo "Version of '$package_name' has not changed." echo "Either 'TERMUX_PKG_REVISION' or 'TERMUX_PKG_VERSION'" - echo "need to be modified when changing a package build." + echo "need to be modified in the build.sh when changing a package build." echo "Alternatively you can add '[no version check]'." echo "To the commit message to skip this check." echo