githook remove: put a parked pre-commit.coco-chained back when the wrapper is already gone
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- cli, developer-experience, testing
Research direction
Start with the remove behavior in scripts/coco_githook.py and the install tests in tests/check-coco-githook-install.sh. Reproduce the case by deleting the wrapper while leaving pre-commit.coco-chained, then run the test script. Done means remove restores the original hook byte for byte and preserves its mode; the test also covers this case.
Written by the indexing model from the issue text.
Description
From the review of #404. If the coco pre-commit wrapper was deleted by hand and only pre-commit.coco-chained is left, coco-gate githook remove prints "nothing to remove" and exits 0. The user's original hook stays parked under a name git never runs.
Fix:
- when
pre-commitis missing andpre-commit.coco-chainedexists,removerenames it back topre-commitand says so; - one test case in
tests/check-coco-githook-install.sh: delete the wrapper by hand, runremove, and check that the user hook is back byte for byte with its mode.
Also low: that test's hooks_of helper uses git rev-parse --path-format=absolute, which needs git 2.31 or later. It could fall back the way scripts/coco_githook.py does.
- Dominant language
- HTML
- Stars
- 347
- Forks
- 12
- Avg merge
- 23h 6m
- Merged PRs (30d)
- 117
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from coco-research/coco
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
coco-research/coco#374 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
coco-research/coco#312 ·
Maintainers usually reply within 1 day
-
dogfood P1
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
coco-research/coco#257 ·
Maintainers usually reply within 1 day
-
dogfood P2
Difficulty 1/5 Under an hour Newbie friendliness 95/100
coco-research/coco#249 ·
Maintainers usually reply within 1 day
-
dogfood P2
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
coco-research/coco#246 ·
Maintainers usually reply within 1 day
All issues in coco-research/coco
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
localstack/localstack-mcp-server#110 ·
Maintainers usually reply within 1 day
-
dotfiles: failed batch untrack removes earlier tracking declarationsPossibly taken @jdx claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
schema-drift
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
stefanhoth/paperless-ngx-cli#61 ·
Maintainers usually reply within 1 day
-
enhancement nav-pilot
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day