Skip to content

tools: make the pre-commit hook executable so it actually runs (from #92) - #114

Merged
pablogonz12 merged 1 commit into
mainfrom
tools/pre-commit-exec-main
Nov 25, 2026
Merged

pablogonz12 merged 1 commit into
mainfrom
tools/pre-commit-exec-main

Conversation

@pablogonz12

Copy link
Copy Markdown
Owner

What

git only runs .githooks/pre-commit when it is executable; on main it is 100644, so the asset-policy hook never ran for anyone who installed it by hand (cargo xtask install-hooks does not set the bit either). This makes the mode 100755. No content change.

Ported from #92, whose branch is kept; that PR was based 185 commits behind main, so the mode change is reapplied on the unified core (#88).

Credit

Tests

  • git diff --summary hub/main HEAD → mode change 100644 => 100755 .githooks/pre-commit; nothing else changed.
  • No code touched, no game data.

Not tested in a game run.

Ported from #92 (branch kept): the mode change alone, on the unified core.
git refuses to run a non-executable .githooks/pre-commit, so the asset
policy hook never ran for anyone who installed it by hand.
@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Files selected but had no reviewable changes: 1

  • .githooks/pre-commit
Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 668f2ccf-1dce-409c-aade-6480a2c597fa
Commits

Reviewing files that changed from the base of the PR and between 51caf20 and e652ae2.

Files selected for processing: 1

  • .githooks/pre-commit

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@pablogonz12

Copy link
Copy Markdown
Owner Author

@coderabbitai review — a mode-only change ( 100644 -> 100755); CodeRabbit skipped the diff, so the gate wants a review on the head commit.

@pablogonz12

Copy link
Copy Markdown
Owner Author

@coderabbitai review — mode-only change (.githooks/pre-commit 100644 -> 100755). CodeRabbit skipped the diff, so the gate still wants a review on the head commit.

@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

@pablogonz12 I’ll request a review of the mode-only change on the head commit.

Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Analysis chain

Script executed:

#!/bin/bash
set -u
printf '%s\n' '--- Locate hook ---'
fd -H -t f -g pre-commit . || true
printf '%s\n' '--- Hook outline ---'
ast-grep outline .githooks/pre-commit --items all 2>&1 || true
printf '%s\n' '--- Hook contents ---'
if [ -f .githooks/pre-commit ]; then cat -n .githooks/pre-commit; fi
printf '%s\n' '--- Tracked mode ---'
git ls-files --stage -- .githooks/pre-commit
printf '%s\n' '--- PR base and head ---'
pr=$(gh api repos/pablogonz12/Scarlight/pulls/114 2>/dev/null) || pr=''
if [ -n "$pr" ]; then
  printf '%s\n' "$pr" | jq '{base: .base.sha, head: .head.sha}'
  base=$(printf '%s\n' "$pr" | jq -r '.base.sha')
  head=$(printf '%s\n' "$pr" | jq -r '.head.sha')
  if git cat-file -e "$base^{commit}" 2>/dev/null && git cat-file -e "$head^{commit}" 2>/dev/null; then
    printf '%s\n' '--- PR diff summary ---'
    git diff --summary "$base...$head"
    git diff --stat "$base...$head"
  else
    printf '%s\n' 'PR base or head commit is not available locally.'
  fi
else
  printf '%s\n' 'Could not retrieve PR base and head.'
fi

Length of output: 1845


@pablogonz12 The diff confirms that .githooks/pre-commit changes from 100644 to 100755 with no content changes. I’ll request a review of the head commit.

Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@pablogonz12
pablogonz12 merged commit 2644681 into main Nov 25, 2026
3 checks passed
pablogonz12 added a commit that referenced this pull request Nov 25, 2026
Main moved with #114, #119 and #126. Three conflicts:

- `CREDITS.md`: both sides kept — fxceless's fork, Wasler's fork (the
  interval, the gap-coalesced rehash, the integer blend bypass) and
  vitutu1/ZigZagBoi1 beside JMAN730/victory's `project-flamingo#672`.
- `descriptor/host.rs` and `texture.rs`: main's narrowed-SRV work (#672,
  #126) stands on the present-order machinery and the live `switches`
  module this line does not carry (`Order`, `Present`,
  `crate::switches::b`, `copystat::C::ViewNarrowed`, `Staging::present`),
  so the two files stay this line's. Porting that work is its own change,
  not something a merge resolution can decide. `HostHeap::copied`, this
  line's record fingerprint, is kept.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant