-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix(git/cache): getCachedBehindBaseResult returns true when branch is not modified #16752
fix(git/cache): getCachedBehindBaseResult returns true when branch is not modified #16752
Conversation
2d1d34d
to
3f39f42
Compare
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
dont merge it yet, there is some git/index failing test, i want test it some further |
im just using HEAD's sha instead. |
🎉 This PR is included in version 32.127.5 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Changes
In
isBranchModified
renovate/lib/util/git/index.ts
Lines 591 to 593 in 6246a61
we cache branch data regardless of
repositoryCache
-renovate/lib/util/git/index.ts
Lines 643 to 647 in 6246a61
and
renovate/lib/util/git/index.ts
Line 655 in 6246a61
therefore, if we later query
getCachedBehindBaseResult
it might returntrue
regardless if the branch have been modified or not.this is because
cacheBranch
is defined, butcachedBranch.parentSha
is not.if which case the return statement will always be
true
.renovate/lib/util/git/behind-base-branch-cache.ts
Lines 15 to 20 in 6246a61
This in turn effects
isBehindBase
due to:
renovate/lib/util/git/index.ts
Lines 559 to 566 in 6246a61
Context
closes #16751
Documentation (please check one with an [x])
How I've tested my work (please tick one)
I have verified these changes via: