-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an option to not have full depth when no tag matches the expression and config to limit the depth #336
Open
mrozanc
wants to merge
8
commits into
qoomon:master
Choose a base branch
from
mrozanc:feature/distanceOrZero
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mrozanc
changed the title
Add an option to not have full depth when no tag matches the expression
Add an option to not have full depth when no tag matches the expression and config to limit the descibe depth
Sep 22, 2024
In case we have a more specific tag pattern to search on a branch, and this pattern does not match any tag in the branch, it's preferable to have a limit to the describe search for performance reasons.
mrozanc
force-pushed
the
feature/distanceOrZero
branch
from
September 22, 2024 13:34
fbdf016
to
b9bd821
Compare
As the implementation was a counter, when visiting many parents without resetting the counter, the returned distance was not correct. Using the DepthWalk.RevWalk has two benefits: - it can limit the depths - it allows accessing the depth of the current commit instead of trying to do it with custom code
Added a fix for distance as it seemed incorrect for scenarios walking through many parents:
|
- Tags at same depth: no logic implemented to specify which one is selected, so I put one more commit in the test to have different depths. - Version from label=0 plus distance=0 (single commit, no tag), not sure why the test was expecting "1" as a version.
mrozanc
changed the title
Add an option to not have full depth when no tag matches the expression and config to limit the descibe depth
Add an option to not have full depth when no tag matches the expression and config to limit the describe depth
Sep 25, 2024
mrozanc
changed the title
Add an option to not have full depth when no tag matches the expression and config to limit the describe depth
Add an option to not have full depth when no tag matches the expression and config to limit the depth
Sep 25, 2024
mrozanc
commented
Sep 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello, I'm very interested by your extension and I like the way we can configure it, however I see some use cases I'd need to resolve, so I propose a few pull requests with feature I could use for my pipelines.
This first one is to get the describe distance only if a matching tag was found. This way if I don't have a matching tag I have a 0 value I can work with to start a new version.
This is implemented by checking if the tag was found and proposing an additional distance value called
distanceOrZero
.This is the 1st feature of 3 I need in a scenario where I want to set my RC versions on a release branch. The goal is to have a specific that acts as a marker at the start of the release branch and to use that as an expression to start incrementing RCs.