-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Throw error on aborted rebase #19651
Conversation
`LibGit2.rebase!` will no longer silently abort if an error occurs. This changes the behaviour of one of the tests: for some reason LibGit2 is unable to automatically rebase this branch.
what's the error? does it need a change in merge options or something? |
It gives I'm not sure if it can be fixed by different merge options. |
any idea why command line git works but libgit2 doesn't then? is this a bug in libgit2? |
Okay, it seemed to be due to a problem with how we were setting up remote tracking branches in the test case. Unfortunately fixing this exposed another problem with how we handle merge when the tracking branch has no commits. Anyway, this should fix them both. |
end | ||
else # try to get tracking remote branch for the head | ||
if !isattached(repo) | ||
if m == nothing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
===
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nothing is a singleton, so it just cuts out one level of inlining
obj = with(GitReference(repo, "refs/remotes/$remotename/$branchname")) do ref | ||
LibGit2.Oid(ref) | ||
end | ||
with(get(GitCommit, repo, obj)) do cmt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have you been able to come up with any scheme or logic for when and what needs management like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It happens in our tests: basically whenever you clone a repository without any commits.
Bump? |
end | ||
end | ||
|
||
""" git rebase --merge [--onto <newbase>] [<upstream>] """ | ||
function rebase!(repo::GitRepo, upstream::AbstractString="", newbase::AbstractString="") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was newbase not hooked up at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
guess we should add that to the list in #19839 since it would be a useful feature to have at some point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point.
It should be safe to ignore the travis failures here. It passed last time this ran a few weeks ago, I restarted two of the jobs just in case anything on master would have caused issues when this is merged. The failures on the restarted builds are just that changes to |
… a concrete subtype of Number (JuliaLang#19651, later part).
LibGit2.rebase!
will no longer silently abort if an error occurs.This changes the behaviour of one of the tests: for some reason LibGit2 is unable to automatically rebase this branch (previously it would silently abort).
follows on from #19624