As a git hook, the tracker cannot match files on worktrees due to mismatched path prefixes

Open
#223 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
67/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
git, react, typescript
Domain
devtools, tooling

Research direction

Start by reading getGitPrefix and stage, then trace the git calls they make when invoked as a hook in a worktree. Check how filtered paths lead to the “No files to check” message, and review the integration examples if relevant. Done means the hook handles worktree paths, warns when all supplied paths are filtered out, and standalone and CI behavior remains intact.

Written by the indexing model from the issue text.

Description

As git sets GIT_DIR for hooks in worktrees (e.g. GIT_DIR=.git/worktrees/<name>), this causes the tracker to not match any files, resulting in never catching anything.

It still works when run standalone or in CI, but we need to improve this. This means:

  • Run its git calls in getGitPrefix (and in stage) without GIT_DIR and GIT_WORK_TREE. It should warn when every path it was given gets filtered out, instead of printing "No files to check".
  • Update integration examples, if necesseary
Dominant language
TypeScript
Stars
2
Forks
0
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Doist/react-compiler-tracker

All issues in Doist/react-compiler-tracker

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.