Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

githook remove: put a parked pre-commit.coco-chained back when the wrapper is already gone

Open Beginner friendly
#405 0 comments 0 reactions 0 assignees View on GitHub

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
Tech stack
git, python, shell

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

bug

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-commit is missing and pre-commit.coco-chained exists, remove renames it back to pre-commit and says so;
  • one test case in tests/check-coco-githook-install.sh: delete the wrapper by hand, run remove, 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

  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 coco-research/coco

All issues in coco-research/coco

Similar issues

More CLI issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.