Skip to content

Conversation

@zingo
Copy link
Collaborator

@zingo zingo commented Feb 12, 2026

This ensure latest checkout versions are always used instead of the version when you last runned the script.

cc @freddan80 @per @oscarandersson8218 @digantdesai

This ensure latests checkout versions are always used instead of the
version when you last runned the script.

Signed-off-by: Zingo Andersen <Zingo.Andersen@arm.com>
Change-Id: Id2200d77c04d6780417d6b5200fe0fbb74cc87ff
@zingo zingo requested a review from digantdesai as a code owner February 12, 2026 08:51
Copilot AI review requested due to automatic review settings February 12, 2026 08:51
@pytorch-bot
Copy link

pytorch-bot bot commented Feb 12, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17411

Note: Links to docs will display an error until the docs builds have been completed.

❌ 3 New Failures

As of commit c5c2d91 with merge base 2478798 (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 12, 2026
@zingo zingo added ciflow/trunk partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: none Do not include this in the release notes and removed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Feb 12, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Switches Arm backend dev hook installation from hard links to symbolic links so Git hooks always point at the current checkout’s hook scripts.

Changes:

  • Update copyright header year range.
  • Replace ln hard-link hook installation with ln -s using resolved paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +8 to +9
ln -s "$(realpath "$git_dir/../backends/arm/scripts/pre-push")" "$(realpath "$git_dir")/hooks"
ln -s "$(realpath "$git_dir/../backends/arm/scripts/pre-commit")" "$(realpath "$git_dir")/hooks" No newline at end of file
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ln -s SOURCE DESTDIR only works as intended if DESTDIR already exists and is a directory; otherwise it will create a symlink named hooks (or fail), which is not what you want for Git hooks. Consider linking to explicit destination filenames (e.g., .../hooks/pre-push and .../hooks/pre-commit) and making the script idempotent by using -f (or removing existing hooks first).

Suggested change
ln -s "$(realpath "$git_dir/../backends/arm/scripts/pre-push")" "$(realpath "$git_dir")/hooks"
ln -s "$(realpath "$git_dir/../backends/arm/scripts/pre-commit")" "$(realpath "$git_dir")/hooks"
hooks_dir="$(realpath "$git_dir")/hooks"
mkdir -p "$hooks_dir"
ln -sf "$(realpath "$git_dir/../backends/arm/scripts/pre-push")" "$hooks_dir/pre-push"
ln -sf "$(realpath "$git_dir/../backends/arm/scripts/pre-commit")" "$hooks_dir/pre-commit"

Copilot uses AI. Check for mistakes.
Comment on lines +8 to +9
ln -s "$(realpath "$git_dir/../backends/arm/scripts/pre-push")" "$(realpath "$git_dir")/hooks"
ln -s "$(realpath "$git_dir/../backends/arm/scripts/pre-commit")" "$(realpath "$git_dir")/hooks" No newline at end of file
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using realpath forces absolute symlink targets, which can break if the repo is moved (e.g., relocating a workspace). A relative symlink (computed from the hooks directory to backends/arm/scripts/...) typically preserves the 'always use latest checkout' behavior while remaining robust to path changes; also note realpath isn’t universally available in minimal environments.

Suggested change
ln -s "$(realpath "$git_dir/../backends/arm/scripts/pre-push")" "$(realpath "$git_dir")/hooks"
ln -s "$(realpath "$git_dir/../backends/arm/scripts/pre-commit")" "$(realpath "$git_dir")/hooks"
mkdir -p "$git_dir/hooks"
(
cd "$git_dir/hooks" || exit 1
ln -s "../../backends/arm/scripts/pre-push" pre-push
ln -s "../../backends/arm/scripts/pre-commit" pre-commit
)

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant