-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
restore-file
occasionally restores the wrong commit
#4679
Comments
restore-file
is not compatible with force-pushed branchesrestore-file
occasionally restores the wrong commit
Maybe it's not even due to force pushes. There were no force pushes in npmhub/npmhub#141, but this "Restore" commit is incorrect: The issue specifically is that it "correctly" fetched the file from the base branch ( You can try restoring the same file multiple times but that's what you get. In short, I think we should fetch the file not from the base branch but from the base commit. I think the repro is:
|
"merge base" is what we're looking for: https://stackoverflow.com/q/1549146/288906 v3 seems to have It seems that it also exists on v4 as {
repository(owner: "refined-github", name: "sandbox") {
pullRequest(number: 68) {
baseRefOid
mergeable
viewerCanEditFiles
headRef {
compare(headRef: "default-a") {
status
aheadBy
baseTarget {
oid
}
}
}
}
}
} Edit: no. Both |
Please ensure:
Description
Rare occurrence but:
X
branch frommain
main
to something elseX
Now you'll have a PR with the changes that the force-push made.
You'll notice that the feature "succeeds" but the commits are empty. This is a live example:
419c37c
(#4677)Example URL
#4677, before it was rebased
Browser(s) used
Safari
The text was updated successfully, but these errors were encountered: