Bug Fixes
-
resolve the empty pattern in
<rev>^{/}like Git, instead of skipping it.
The parser dropped thefind()delegate call whenever the pattern in
<rev>^{/<pattern>}was empty, turning the whole navigation step into a
no-op on the grounds that an empty pattern matches everything.That reasoning only holds for a commit anchor and a non-negated pattern.
Git routes<rev>^{/...}throughGET_OID_COMMITTISHand searches from
the peeled commit even when the pattern is empty - object-name.c notes
"$commit^{/}. Some regex implementation may reject empty regex, but this
is safe". Thusgit rev-parse 'b-tag^{/}'yields the commit the
annotated tag points at, whilegixreturned the tag object itself. A
negated empty pattern matches no commit at all, so Git failsHEAD^{/!-}
whilegixsilently succeeded with HEAD.Now the parser always forwards the pattern to
Navigate::find(), whose
implementation ingixalready handles the empty case correctly on both
therevparse-regexand the substring fallback paths: it peels the
anchor to a commit first and treats an empty pattern as match-all, which
fails naturally when negated. The delegate behindgix revision explain
makes no assumption about patterns and needs no change.The
make_rev_spec_parse_reposfixture gains baselines for@^{/},
@^{/!-}andb-tag^{/}; its archive needs regeneration.
Other
- delegate zero ancestor traversal
~0is a no-op only after resolving its anchor to a commit. The parser cannot
know whether the anchor is an annotated tag, and suppressingNthAncestor(0)
prevents higher-level delegates from peeling it as Git does. Always forward zero
so eachNavigateimplementation can apply its own object semantics.
Changed (BREAKING)
-
accept
:3:<path>for the 'theirs' index stage, like Git does.
The parser had arms for stages 0, 1 and 2 and let everything else fall through
to the catch-all, so:3:filewas looked up as a path literally named
3:fileat stage 0.gitrevisions(7)documents a stage number of 0 to 3, and
Git resolves:3:fileto the blob from the branch being merged.The trait's own docs said stages range from 0 to 2 and labelled them base, ours
and theirs. That is off by one: 0 is unconflicted, and 1, 2 and 3 are the common
ancestor, the target branch and the branch being merged. The docs came first, in
cee04e1, and the arms written twenty minutes later in ea22d3e matched them.This is marked breaking because a
Navigateimplementation written against the
old documented range can now be handed a stage it does not expect. The one in
gixalready maps 3 toStage::Theirs, but the one behindgix revision explaindid not, which the next commit addresses.
Commit Statistics
- 17 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 #2911 from codeAnqiang-ma/fix/empty-regex-revspec (05f905e)
- Merge pull request #2910 from codeAnqiang-ma/fix/relative-date-month-rollover (566fea1)
- Review (a8b1be5)
- Resolve the empty pattern in
<rev>^{/}like Git, instead of skipping it. (6746715) - Adapt to changes in
gix-date(613ff86) - Merge pull request #2901 from cruessler/switch-to-gix-odb-at-opts (2a4d996)
- Introduce
Store::at()where possible (17fea2a) - Merge pull request #2897 from cruessler/run-more-tests-with-sha-256 (59f2d61)
- Review (98c29f6)
- Use
GIX_TEST_FIXTURE_HASHfor more tests (bbea2c4) - Merge pull request #2892 from ameyypawar/rev-conformity (453c17c)
- Review (5a4e97b)
- Accept
:3:<path>for the 'theirs' index stage, like Git does. (8640d5b) - Merge pull request #2871 from shuvamk/fix/revspec-peel-tag-before-traversal (d14aefb)
- Delegate zero ancestor traversal (548cb68)
- Merge pull request #2812 from GitoxideLabs/report-july (ae8845a)