Bug Fixes
-
match Git refspec pattern and exclusion rules.
Git refspec patterns are deliberately narrower than general globs. The
upstream parser accepts exactly one asterisk, requires a patterned fetch
source to have a patterned destination, and only permits the one-sided
pattern form for pushes and negative refspecs.Apply those rules uniformly instead of skipping validation for one-sided
specifications. This rejects general wildcard expressions and one-sided
fetch patterns while retaining valid one-sided push patterns.Accept partial negative refspecs as Git does, and compare their source
literally during matching instead of expanding it through the positive
partial-ref lookup rules. Thus a negative source such as ^main parses but
does not implicitly match refs/heads/main.Remove the now-unreachable wildmatch matcher, its complex-glob tests, and
the direct gix-glob dependency. Update the instruction documentation,
including the fact that deletion destinations cannot be patterns, and fix
the negative-object-hash error text.Extend and regenerate the Git baselines for one-sided fetch and push
patterns, invalid wildcard syntax, and partial negative refspecs. Remove
the baseline exceptions so every recorded result must now agree with Git. -
split refspecs on the last colon, like Git does
parse_refspec()inrefspec.clocates the separator with
rhs = strrchr(lhs, ':'), so everything before the final colon is the source.
That matters for push, where the source is a revision rather than a ref name and
may itself contain a colon -:/messagesearches commit messages,<rev>:<path>
addresses a blob or tree. Both are accepted by Git today.Splitting on the first colon instead made
:/message:refs/heads/xparse as the
destinationmessage:refs/heads/x, which is not a valid reference name, so the
spec was rejected outright.Fetch is unaffected, as its source is a ref name that cannot contain a colon.
Baseline entries cover both operations; both archives are regenerated because the
archive identity derives from the fixture script.
Changed (BREAKING)
-
take any non-glob push source, like Git does.
Git means the source of a push refspec to be an extended SHA-1, but says of it
that "there is no existing way to validate this" and takes whatever is written:-
- otherwise, it must be an extended SHA-1, but
- there is no existing way to validate this.
[...]
else
; /* anything goes, for now */
This crate checked it against a ref name, falling back to parsing it as a
rev-spec, whichgix-revisioncan do without a repository. That is stricter than
Git for seven of the shapes now in the baseline, among them::a,~:x,
a^{bogus}:xanda@{:x.The check is dropped for that one side only. A missing destination still requires
the source to be a ref name, an empty destination is still refused, the
destination itself is still validated, and both glob rules still hold, all as
before. Negative refspecs never reach it, as a destination rejects them first.Ten entries are added to the parse baseline, which records
git's own verdict;
the last two of them are destinations Git refuses, to pin that side. Both
archives are regenerated, sincejust unit-testsruns this crate undersha256
as well.With the rev-spec fallback gone, so is the only use of
gix-revisionhere, the
Error::RevSpecvariant that carried its failures, and the last use of
gix-error. Both dependencies are dropped. -
Commit Statistics
- 11 commits contributed to the release over the course of 30 calendar days.
- 30 days passed between releases.
- 3 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
Commit Details
view details
- Uncategorized
- Update manifests prior to release (ebe9095)
- Merge pull request #2894 from ameyypawar/refspec-push-source (ef41caa)
- Match Git refspec pattern and exclusion rules. (42f742d)
- Review (81883b2)
- Take any non-glob push source, like Git does. (05a126f)
- Merge pull request #2888 from ameyypawar/refspec-last-colon (04b91a1)
- Review (9864e70)
- Split refspecs on the last colon, like Git does (910197f)
- Merge pull request #2886 from ameyypawar/validate-at-refname (12240ab)
- Review (1384133)
- Merge pull request #2812 from GitoxideLabs/report-july (ae8845a)