-
-
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 the fields of some libgit2 types #22543
Changes from 3 commits
293bb5e
943fd2b
c0b45c0
5df68f3
4e29e74
801321c
67ebfcd
7f03f70
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -193,6 +193,18 @@ end | |
Options for connecting through a proxy. | ||
|
||
Matches the [`git_proxy_options`](https://libgit2.github.com/libgit2/#HEAD/type/git_proxy_options) struct. | ||
|
||
The fields represent: | ||
* `version`: version of the struct in use, in case this changes later. For now, always `1`. | ||
* `proxytype`: the type of proxy to use. Default is to auto-detect it. | ||
* `url`: the URL of the proxy. | ||
* `credential_cb`: a pointer to a callback function which will be called if the remote | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. on the julia side this is just a function input, not a pointer right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nope, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do you need to do something with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I think you have to do something much like the stuff in |
||
requires authentication to connect. | ||
* `certificate_cb`: a pointer to a callback function which will be called if certificate | ||
verification fails. This lets the user decide whether or not to keep connecting. If | ||
the function returns `1`, connecting will be allowed. If it returns `0`, the connection | ||
will not be allowed. A negative value can be used to return errors. | ||
* `payload`: the payload to be provided to the two callback functions. | ||
""" | ||
@kwdef struct ProxyOptions | ||
version::Cuint = 1 | ||
|
@@ -287,6 +299,12 @@ end | |
LibGit2.DescribeFormatOptions | ||
|
||
Matches the [`git_describe_format_options`](https://libgit2.github.com/libgit2/#HEAD/type/git_describe_format_options) struct. | ||
|
||
The fields represent: | ||
* `version`: version of the struct in use, in case this changes later. For now, always `1`. | ||
* `abbreviated_size`: lower bound on the size of the abbreviated `GitHash` to use, defaulting to `7`. | ||
* `always_use_long_format`: set to `1` to use the long format for strings even if a short format can be used. | ||
* `dirty_suffix`: if set, this will be appended to the end of the description string if the [`workdir`](@ref) is dirty. | ||
""" | ||
@kwdef struct DescribeFormatOptions | ||
version::Cuint = 1 | ||
|
@@ -300,6 +318,18 @@ end | |
|
||
Description of one side of a delta. | ||
Matches the [`git_diff_file`](https://libgit2.github.com/libgit2/#HEAD/type/git_diff_file) struct. | ||
|
||
The fields represent: | ||
* `id`: the [`GitHash`](@ref) of the item in the diff. If the item is empty on this | ||
side of the diff (for instance, if the diff is of the removal of a file), this will | ||
be `GitHash(0)`. | ||
* `path`: a `NULL` terminated path to the item relative to the working directory of the repository. | ||
* `size`: the size of the item in bytes. | ||
* `flags`: a combination of the [`git_diff_flag_t`](https://libgit2.github.com/libgit2/#HEAD/type/git_diff_flag_t) | ||
flags. The `i`th bit of this integer sets the `i`th flag. | ||
* `mode`: the [`stat`](@ref) mode for the item. | ||
* `id_abbrev`: only present in LibGit2 versions newer than or equal to `0.25.0`. | ||
The length of the `id` field when converted using [`hex`](@ref). Usually equal to `GIT_OID_HEXSZ`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is GIT_OID_HEXSZ a C name or the Julia enum name? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For us it's |
||
""" | ||
struct DiffFile | ||
id::GitHash | ||
|
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 could maybe use a xref to the enum that the values should come from
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's also a Julia enum, right?