MetaMask / MetaMask/metamask-extension
[Fitness functions] Support git merge on pre commit hook
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
When using pre-commit hooks, we currently use `git diff --cached HEAD` to get the diff.
When merging develop in, fixing conflicts, and then committing, the diff command fails with a circular reference error.
We should change the command so it supports both rebases and merges.
## Screenshots


Contributor guide
Research direction
Locate the pre-commit hook or fitness-function code that runs `git diff --cached HEAD`, then inspect how it behaves during a merge and a rebase. Reproduce the circular-reference failure and verify that the updated diff command works for both workflows without breaking the existing hook behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100