-
-
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
Doc missing rebase methods #22556
Doc missing rebase methods #22556
Conversation
base/libgit2/rebase.jl
Outdated
""" | ||
current(rb::GitRebase) -> Csize_t | ||
|
||
Returns the index of the current [`RebaseOperation`](@ref). If no operation has |
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 be in the imperative (this and abort
—finish
already is)
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 catch!
base/libgit2/rebase.jl
Outdated
Returns the index of the current [`RebaseOperation`](@ref). If no operation has | ||
yet been applied (because the [`GitRebase`](@ref) has been constructed but `next` | ||
has not yet been called or iteration over `rb` has not yet begun), this returns | ||
`GIT_REBASE_NO_OPERATION`. |
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.
this doesn't exist under this name in the julia source...
base/libgit2/rebase.jl
Outdated
""" | ||
finish(rb::GitRebase, sig::GitSignature) -> Csize_t | ||
|
||
Complete the rebase described by `rb`. `sig` is an optional [`GitSignature`](@ref) |
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.
where is the one-arg method if the signature is optional?
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.
I went on a bit of a dive through the libgit2
docs and I suspect if you pass NULL
as a pointer it'll use the default sig from config ... but let's remove this language just in case.
|
base/libgit2/rebase.jl
Outdated
has not yet been called or iteration over `rb` has not yet begun), this returns | ||
`GIT_REBASE_NO_OPERATION`. | ||
has not yet been called or iteration over `rb` has not yet begun), return | ||
`GIT_REBASE_NO_OPERATION`, which is equal to `SIZE_MAX` of `Csize_t`. |
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.
is that the same as the julia typemax(Csize_t)
?
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 be, but doesn't this vary by system?
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.
Csize_t
is pointer-sized in Julia, but not sure what width GIT_REBASE_NO_OPERATION
is on the libgit2 side
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.
I think it's really cool that this is documented
Ready to go? |
base/libgit2/rebase.jl
Outdated
""" | ||
abort(rb::GitRebase) -> Csize_t | ||
|
||
Cancels the in-progress rebase, undoing all changes made so far and returning |
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.
"Cancel," perhaps?
Perhaps add them to |
base/libgit2/rebase.jl
Outdated
Return the index of the current [`RebaseOperation`](@ref). If no operation has | ||
yet been applied (because the [`GitRebase`](@ref) has been constructed but `next` | ||
has not yet been called or iteration over `rb` has not yet begun), return | ||
`GIT_REBASE_NO_OPERATION`, which is equal to `SIZE_MAX` of `Csize_t`. |
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.
for someone who knows julia but not C, SIZE_MAX isn't very meaningful - even if you do know C, it's the kind of thing I'd need to look up every time
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 we make it sizemax(Csize_t)
?
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.
typemax, if that's the same value
base/libgit2/rebase.jl
Outdated
|
||
Cancel the in-progress rebase, undoing all changes made so far and returning | ||
the parent repository of `rb` and its working directory to their state before | ||
the rebase was initiated. Returns `0` if the abort is successful, `GIT_ENOTFOUND` |
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.
is this under one of the julia side enums?
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.
ENOTFOUND
? I think so.
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.
if the julia enum name has a different prefix, should use that
|
""" | ||
abort(rb::GitRebase) -> Csize_t | ||
|
||
Cancel the in-progress rebase, undoing all changes made so far and returning |
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.
returning -> return?
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.
That would be weird with "undoing" though, wouldn't it?
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.
yeah, nvm
@tkelman did I get everything for you? |
No description provided.