Skip to content
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

Transform tag to commit sha when getting notes #1709

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Xunnamius
Copy link

Closes #1708

@Xunnamius Xunnamius changed the title fix(lib/git.js): transform tag to commit sha when getting notes Transform tag to commit sha when getting notes Dec 6, 2020
@Xunnamius Xunnamius force-pushed the contrib branch 2 times, most recently from f43f55c to 29fe376 Compare February 18, 2021 17:49
@@ -306,7 +306,8 @@ async function isBranchUpToDate(repositoryUrl, branch, execaOptions) {
*/
async function getNote(ref, execaOptions) {
try {
return JSON.parse((await execa('git', ['notes', '--ref', GIT_NOTE_REF, 'show', ref], execaOptions)).stdout);
const commit = (await execa('git', ['log', '-1', '--pretty=format:%H', ref], execaOptions)).stdout;
return JSON.parse((await execa('git', ['notes', '--ref', GIT_NOTE_REF, 'show', commit], execaOptions)).stdout);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Xunnamius do you think you could add a test to prevent regressions in future?

As mentioned in #1708 we appreciate your thorough research and when in doubt I'd rather merge your change and trust our test suite that no existing use case broke.

@travi brought up this:

My only concern would be if it is something that considers details across branches. I think we're should keep things working from the history of a single branch.

Any thoughts?

@jonas-martinez
Copy link

Hello, any update ?

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.

Incorrect (duplicate) prerelease version determined even when git notes exist
3 participants