-
-
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
Add show methods for GitRebase and RebaseOperation #20834
Conversation
base/libgit2/rebase.jl
Outdated
@@ -41,6 +41,11 @@ function Base.next(rb::GitRebase) | |||
return unsafe_load(rb_op_ptr_ptr[]) | |||
end | |||
|
|||
function Base.show(io::IO, rb::GitRebase) | |||
println(io, "GitRebase:") | |||
println(io, "Number of operations to apply: $(count(rb))") |
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.
Could you just do "Number ...: ", count(rb)
to avoid the interpolation? Might be very marginally faster
This is really cool! Nice work! |
@tkelman does the |
Is PkgDev or any other code expecting that getindex to be returning nothing, or the flags to be constants instead of an Enum? |
PkgDev doesn't include rebasing at all, as far as I can tell. A |
A search for the name of the constants/enum shows nothing in Julia on GH, I can't see into people's private repos, of course. |
d849af9
to
611902f
Compare
base/libgit2/rebase.jl
Outdated
function Base.show(io::IO, rb::GitRebase) | ||
println(io, "GitRebase:") | ||
println(io, "Number: ", count(rb)) | ||
println(io, "Currently performing operation: $(current(rb)+1)") |
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.
Should remove the interpolation here too for consistency since you did so above
Good to go if CI passes? |
It's the |
Now you can see what
RebaseOperation
is happening at any one step!