Repository navigation
Conversation
…ytan#4378) git log ends each commit's --format output with a newline, so after split('\0') every entry except the first starts with '\n'. The hash lookup then found that newline at index 0, the label's hash was empty, and mentions from any commit but the newest read `commit :` on stderr and in --json sources. Each entry now drops that one leading newline before the hash is read, which covers both the origin/<base> log and its <base> fallback. A two-commit CLI test checks that both reference lines name their own commit; it fails on main with `reference garrytan#11 <- commit : Refs garrytan#11`.
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
Thank you for this, and for the before/after run and the two-commit test. The fix is right: dropping the one leading newline covers both |
main renamed the list the commit loop fills (mentions to named) for the cross-repo reference work in garrytan#4454, on the lines this branch changes. Keep both: the loop fills named, and still drops the newline git log leaves at the start of every entry after the first.
|
Thank you for this. We're picking up the idea. A maintainer agent working through a batch of fixes (our tracking thread GSTA-796) will first reproduce the problem on current main. If it reproduces, the agent rebuilds the fix on main with you credited as co-author, because we don't merge outside branches directly, and we'll close this PR with a link when it lands. If it no longer reproduces, we'll close this and say what changed. |
|
Thank you, @Davmunrey. Your fix for #4378 is now on main: we rebuilt it on current main in #4672, which keeps your test, uses |
Why (in your own words)
/ship's Issue links step lists each issue mention with the commit it came from, so the user can decide whether to promote a
Refs #NtoFixes #N. Any mention outside the newest commit on the branch readcommit :with an empty id, on stderr and in--jsonsources. The user was not told which commit a candidate came from. git log ends each commit's--formatoutput with a newline, so aftersplit('\0')every entry except the first starts with\nand the hash read as empty. Each entry now drops that one leading newline before the hash is read. The change covers both theorigin/<base>log and its<base>fallback (fixes #4378).Live evidence
Scope
bin/gstack-issue-links(3 lines), a two-commit CLI test intest/ship-issue-intent.test.ts, and a changelog fragment.gstack-issue-linkson a throwaway two-commit repo before and after the change (output above), plus the issue-links test file./shiprun, and the--jsonoutput; that output carries the samesourcestring from the same code path. I did not run the full free suite.Liveness proof (required for external contributors)
Checklist
GSTACK PRtyped live into a real surface) or PR author is @garrytan (owner exemption)