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

Doc missing rebase methods #22556

Merged
merged 5 commits into from
Jun 28, 2017
Merged

Doc missing rebase methods #22556

merged 5 commits into from
Jun 28, 2017

Conversation

kshyatt
Copy link
Contributor

@kshyatt kshyatt commented Jun 26, 2017

No description provided.

@kshyatt kshyatt added docs This change adds or pertains to documentation libgit2 The libgit2 library or the LibGit2 stdlib module labels Jun 26, 2017
@kshyatt kshyatt requested review from tkelman and ararslan June 26, 2017 18:24
"""
current(rb::GitRebase) -> Csize_t

Returns the index of the current [`RebaseOperation`](@ref). If no operation has
Copy link
Member

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 abortfinish already is)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch!

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`.
Copy link
Contributor

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...

"""
finish(rb::GitRebase, sig::GitSignature) -> Csize_t

Complete the rebase described by `rb`. `sig` is an optional [`GitSignature`](@ref)
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@kshyatt
Copy link
Contributor Author

kshyatt commented Jun 26, 2017

make check-whitespace passes locally

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`.
Copy link
Contributor

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) ?

Copy link
Contributor Author

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?

Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

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

@kshyatt
Copy link
Contributor Author

kshyatt commented Jun 26, 2017

Ready to go?

"""
abort(rb::GitRebase) -> Csize_t

Cancels the in-progress rebase, undoing all changes made so far and returning
Copy link
Member

Choose a reason for hiding this comment

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

"Cancel," perhaps?

@fredrikekre
Copy link
Member

Perhaps add them to devdocs/libgit2.md?

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`.
Copy link
Contributor

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

Copy link
Contributor Author

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)?

Copy link
Contributor

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


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`
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ENOTFOUND? I think so.

Copy link
Contributor

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

@kshyatt
Copy link
Contributor Author

kshyatt commented Jun 27, 2017

make docs passes

"""
abort(rb::GitRebase) -> Csize_t

Cancel the in-progress rebase, undoing all changes made so far and returning
Copy link
Member

Choose a reason for hiding this comment

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

returning -> return?

Copy link
Member

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?

Copy link
Member

Choose a reason for hiding this comment

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

yeah, nvm

@kshyatt
Copy link
Contributor Author

kshyatt commented Jun 27, 2017

@tkelman did I get everything for you?

@tkelman tkelman merged commit 7b78316 into master Jun 28, 2017
@tkelman tkelman deleted the ksh/docrebase branch June 28, 2017 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation libgit2 The libgit2 library or the LibGit2 stdlib module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants