Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: version test on shallow, dirty git repo#12498

Closed
danielrainer wants to merge 1 commit intofish-shell:masterfrom
danielrainer:fix_version_test_shallow_dirty_repo
Closed

fix: version test on shallow, dirty git repo#12498
danielrainer wants to merge 1 commit intofish-shell:masterfrom
danielrainer:fix_version_test_shallow_dirty_repo

Conversation

@danielrainer
Copy link

In shallow, dirty git repo, the version identifier will look something like fish, version 4.5.0-g971e0b7-dirty, with no commit counter indicating the commits since the last version. Our regex did not handle this case.

Make the commit counter optional, which also allows removing the second alternative in the regex, since it's now subsumed by the first.

Fixes #12497

In shallow, dirty git repo, the version identifier will look something
like `fish, version 4.5.0-g971e0b7-dirty`, with no commit counter
indicating the commits since the last version. Our regex did not handle
this case.

Make the commit counter optional, which also allows removing the second
alternative in the regex, since it's now subsumed by the first.

Fixes fish-shell#12497
@krobelus krobelus added this to the fish 4.6 milestone Mar 3, 2026
@krobelus krobelus closed this in 121b8ff Mar 3, 2026
@danielrainer danielrainer deleted the fix_version_test_shallow_dirty_repo branch March 3, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tests/checks/version.fish fails in shallow, dirty git repository

2 participants