mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-11-29 23:37:41 +00:00
* fix(skills): accept every branch name Git accepts in evidence capture `evidence-provenance.mjs` checked the symbolic HEAD ref against a list of allowed characters, so capturing evidence on a branch such as `feature/c++` or `fix/@scope` failed with "Invalid symbolic HEAD ref". The ref must now start with `refs/`, hold no `..`, and pass `git check-ref-format`. Git's rules are what keep the ref inside the Git directory once it is read as a path, and they also refuse names the list let through, such as `refs/heads/.hidden` and `refs/heads/a.lock`. Closes #3896 * fix(skills): keep the whitespace that ends a branch name in evidence capture `.trim()` removed more than the newline Git ends its answer with. A ref may end with a no-break space, so the helper checked and guarded another ref than the one HEAD names: `release.lock` followed by U+00A0 was refused, and with reflogs off a move of `feature/c++` followed by U+00A0 went unseen. The `symbolic-ref` and `--git-path` answers now lose that one newline only. Tests: a name ending in U+00A0 in the receipt and ref-file guard cases, the guard of the branch's reflog, a branch checked out in a linked worktree, and the refusal cases against both helpers. The stand-in git reaches the real one through PATH instead of a path written into the script. --------- Co-authored-by: Gergő Magyar <gergomagyar@icloud.com> |
||
|---|---|---|
| .. | ||
| evidence-provenance.mjs | ||