review-design: report incomplete fix history in a shallow clone
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- git, javascript, node.js
Research direction
Start with tools/review-design/fix-history.mjs and reproduce the shallow clone case using the commands in the issue. Check how the script reads first-parent history and handles Git's shallow boundary. Done means it reports incomplete history and does not claim an unchanged file was added at the boundary.
Written by the indexing model from the issue text.
Description
Problem
Step 1 of review-design uses fix-history.mjs to list the landing commits that changed a path. Its --help text says that it reads the whole first-parent line. In a shallow clone, Git stops at the boundary commit and treats it as a root commit. The script reports success without saying that earlier commits are missing. It can also report an unchanged file as added at the boundary.
The script is introduced in #83. Related: #77 tracks incorrect line attribution in trace-decision at the same Git boundary.
Steps to reproduce
git init review-design-shallow
cd review-design-shallow
git fetch --depth=1 https://github.com/c-w-z/commit-decision-record.git 892a4206a6ced9c9fd629a3749473760a95e344c
git checkout --detach FETCH_HEAD
node tools/review-design/fix-history.mjs CONTRIBUTING.md
Expected and actual result
Expected: The script reports that the history is incomplete. It does not report an addition based on a diff against the empty tree at the shallow boundary.
Actual: The script exits with 0 and reports 105 added lines for CONTRIBUTING.md at 892a420. That commit does not change CONTRIBUTING.md against its parent. The output does not say that the history is incomplete.
Version
892a420
Environment
Windows x64 (build 26300), Git 2.47.1.windows.1, Node.js 24.22.2.
Log
--- first-parent line: HEAD
892a420 fix: list the landing commits of origin/HEAD in the fix history of review-design
105 0 CONTRIBUTING.md
- 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 1/5 Under an hour Newbie friendliness 85/100
521xueweihan/HelloGitHub#4676 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
getsotto/sotto-authenticator#139 ·
Maintainers usually reply within 1 day
-
ci good first issue when-possible
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Battery "top up once" ends immediately when UPower reports fully-charged below 100%Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
omacom/omarchy#21286 · 1 comment ·
Maintainers usually reply within 1 day