worktree-setup warns of a pin mismatch that does not exist: it reads the superproject HEAD for a plain extern copy
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Start with tools/worktree-setup.sh around lines 415–416 and the fixture patterns in tools/tests/test_worktree_setup.py. Add the matching-pin plain-copy case described in the issue and run that test to confirm it fails with the current rev-parse lookup. Done means matching pins produce no warning and differing pins produce one warning.
Written by the indexing model from the issue text.
Description
Evidence at a852ca694
tools/worktree-setup.sh warns that a branch pins a submodule at a different commit than the build checkout has, and it reads the build checkout's commit in the wrong place:
- tools/worktree-setup.sh:415 reads this branch's pin:
mine=$(git ls-tree HEAD "extern/$d" ...). That is the pin, a commit in the superproject's tree. - tools/worktree-setup.sh:416 reads the build checkout's commit:
theirs=$(git -C "$fill_from/extern/$d" rev-parse HEAD ...). - An
extern/<d>copy that is not its own repository (the copyjust worktree-setupmakes; it has no.git) has no HEAD of its own.git -Cthen reports the enclosing repository's HEAD. Measured in this worktree:git ls-tree HEAD extern/minhookgives 1e9ad1eb42db, andgit -C extern/minhook rev-parse HEADgives 5fc77e1e9f79 (the superproject's HEAD); extern/breakpad and extern/lss give the same enclosing HEAD. - So
theirsis never a pin, and the warning fires whenever the build checkout's copy is a plain copy and the branch's pin differs from the superproject's HEAD.
Not shown
- Whether every build checkout's extern copies are plain. Measured here, in one worktree, not in the build checkout itself.
- Whether a real submodule checkout (with its own
.git) reports the pin correctly underrev-parse. The fix below reads the pin from the build checkout's tree, which does not depend on that.
Falsifier
With a build checkout whose superproject pins the same extern commits as the branch, tools/worktree-setup.sh prints no line beginning warning: this branch pins. At a852ca694 it prints one for each extern copy whose pin differs from the superproject's HEAD.
Work
- Test first, in tools/tests/test_worktree_setup.py: a fixture whose build checkout pins an extern commit equal to the branch's pin, with a plain copy under extern/, prints no pin warning. Red at a852ca694.
- tools/worktree-setup.sh: read the build checkout's pin with
git -C "$fill_from" ls-tree HEAD "extern/$d"(the same form as line 415), and warn only when the two pins differ. - Mutant: restore the
rev-parse HEADform; the test fails with the false warning. Restore the fix; it passes. - Proof: the setup run in a fixture with matching pins prints nothing about pins; with differing pins it prints the warning once.
- Dominant language
- C++
- Stars
- 3
- Forks
- 5
- Avg merge
- 4h 37m
- Merged PRs (30d)
- 524
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 EchoTools/nevr-runtime
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
EchoTools/nevr-runtime#2912 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
EchoTools/nevr-runtime#2910 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
EchoTools/nevr-runtime#2909 ·
Maintainers usually reply within 1 day
-
build: the generated defaults header is written 0600, so a seat outside nevr-build cannot read itOpenbacklog
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
EchoTools/nevr-runtime#2901 · 1 comment ·
Maintainers usually reply within 1 day
-
backlog
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
EchoTools/nevr-runtime#2897 ·
Maintainers usually reply within 1 day
All issues in EchoTools/nevr-runtime
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
category:port-update
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
bug-unconfirmed
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
libc++
Difficulty 1/5 Under an hour Newbie friendliness 88/100
llvm/llvm-project#246508 ·
Maintainers usually reply within 1 day
-
good first issue help wanted phase:0 priority:P3 type:task
Difficulty 2/5 1-3 hours Newbie friendliness 67/100