trace-decision collector does not read a repository with SHA-256 object names
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- git, javascript
- Domain
- tooling
Research direction
Start with tools/trace-decision/collect-lib.mjs, especially the git blame --porcelain parsing pattern and the NOT_COMMITTED object name. Use git init --object-format=sha256 to reproduce the 64-digit mismatch, or inspect git rev-parse --show-object-format as an alternative source of the object length. Done means SHA-256 repositories produce the same commit assignments as SHA-1 repositories while uncommitted lines remain correctly identified.
Written by the indexing model from the issue text.
Description
What happens
tools/trace-decision/collect-lib.mjs reads the output of git blame --porcelain with the pattern /^([0-9a-f]{40}) \d+ (\d+)/. It also marks lines that are not committed with an object name of 40 zeros (NOT_COMMITTED).
A repository that uses SHA-256 object names (git init --object-format=sha256) gives names of 64 hexadecimal digits. The pattern then matches no line, so the collector finds no commit for the lines. [INFERENCE] The script then fails or gives a wrong result. I did not run it on a SHA-256 repository.
Expected
The collector reads the commits of the lines in a SHA-256 repository as in a SHA-1 repository.
More information
- A fix can read the object name length from
git rev-parse --show-object-format, or accept 40 or 64 digits in the pattern and inNOT_COMMITTED. - Two reviews of the collector found this limit and did not block the merge, because no caller with a SHA-256 repository is known.
- Dominant language
- Shell
- Stars
- 1
- Forks
- 0
- Avg merge
- 6h 59m
- Merged PRs (30d)
- 26
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
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 c-w-z/commit-decision-record
-
type/documentation
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
c-w-z/commit-decision-record#90 · 1 comment ·
Maintainers usually reply within 1 day
-
type/documentation
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
c-w-z/commit-decision-record#85 ·
Maintainers usually reply within 1 day
-
type/documentation
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
c-w-z/commit-decision-record#84 ·
Maintainers usually reply within 1 day
-
type/feature
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
c-w-z/commit-decision-record#35 · 1 comment ·
Maintainers usually reply within 1 day
-
good first issue type/documentation
Difficulty 1/5 1-3 hours Newbie friendliness 95/100
c-w-z/commit-decision-record#33 ·
Maintainers usually reply within 1 day
All issues in c-w-z/commit-decision-record
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
omacom/omarchy#21286 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ChurchCRM/docs.churchcrm.io#328 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
melodic-software/claude-code-plugins#20573 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
bmaltais/StartDrive#17 ·