|
193 | 193 | Options for connecting through a proxy.
|
194 | 194 |
|
195 | 195 | Matches the [`git_proxy_options`](https://libgit2.github.com/libgit2/#HEAD/type/git_proxy_options) struct.
|
| 196 | +
|
| 197 | +The fields represent: |
| 198 | + * `version`: version of the struct in use, in case this changes later. For now, always `1`. |
| 199 | + * `proxytype`: an `enum` for the type of proxy to use. |
| 200 | + Defined in [`git_proxy_t`](https://libgit2.github.com/libgit2/#HEAD/type/git_proxy_t). |
| 201 | + The corresponding Julia enum is `GIT_PROXY` and has values: |
| 202 | + - `PROXY_NONE`: do not attempt the connection through a proxy. |
| 203 | + - `PROXY_AUTO`: attempt to figure out the proxy configuration from the git configuration. |
| 204 | + - `PROXY_SPECIFIED`: connect using the URL given in the `url` field of this struct. |
| 205 | + Default is to auto-detect the proxy type. |
| 206 | + * `url`: the URL of the proxy. |
| 207 | + * `credential_cb`: a pointer to a callback function which will be called if the remote |
| 208 | + requires authentication to connect. |
| 209 | + * `certificate_cb`: a pointer to a callback function which will be called if certificate |
| 210 | + verification fails. This lets the user decide whether or not to keep connecting. If |
| 211 | + the function returns `1`, connecting will be allowed. If it returns `0`, the connection |
| 212 | + will not be allowed. A negative value can be used to return errors. |
| 213 | + * `payload`: the payload to be provided to the two callback functions. |
| 214 | +
|
| 215 | +# Examples |
| 216 | +```julia-repl |
| 217 | +julia> fo = LibGit2.FetchOptions(); |
| 218 | +
|
| 219 | +julia> fo.proxy_opts = LibGit2.ProxyOptions(url=Cstring("https://my_proxy_url.com")) |
| 220 | +
|
| 221 | +julia> fetch(remote, "master", options=fo) |
| 222 | +``` |
196 | 223 | """
|
197 | 224 | @kwdef struct ProxyOptions
|
198 | 225 | version::Cuint = 1
|
|
287 | 314 | LibGit2.DescribeFormatOptions
|
288 | 315 |
|
289 | 316 | Matches the [`git_describe_format_options`](https://libgit2.github.com/libgit2/#HEAD/type/git_describe_format_options) struct.
|
| 317 | +
|
| 318 | +The fields represent: |
| 319 | + * `version`: version of the struct in use, in case this changes later. For now, always `1`. |
| 320 | + * `abbreviated_size`: lower bound on the size of the abbreviated `GitHash` to use, defaulting to `7`. |
| 321 | + * `always_use_long_format`: set to `1` to use the long format for strings even if a short format can be used. |
| 322 | + * `dirty_suffix`: if set, this will be appended to the end of the description string if the [`workdir`](@ref) is dirty. |
290 | 323 | """
|
291 | 324 | @kwdef struct DescribeFormatOptions
|
292 | 325 | version::Cuint = 1
|
|
300 | 333 |
|
301 | 334 | Description of one side of a delta.
|
302 | 335 | Matches the [`git_diff_file`](https://libgit2.github.com/libgit2/#HEAD/type/git_diff_file) struct.
|
| 336 | +
|
| 337 | +The fields represent: |
| 338 | + * `id`: the [`GitHash`](@ref) of the item in the diff. If the item is empty on this |
| 339 | + side of the diff (for instance, if the diff is of the removal of a file), this will |
| 340 | + be `GitHash(0)`. |
| 341 | + * `path`: a `NULL` terminated path to the item relative to the working directory of the repository. |
| 342 | + * `size`: the size of the item in bytes. |
| 343 | + * `flags`: a combination of the [`git_diff_flag_t`](https://libgit2.github.com/libgit2/#HEAD/type/git_diff_flag_t) |
| 344 | + flags. The `i`th bit of this integer sets the `i`th flag. |
| 345 | + * `mode`: the [`stat`](@ref) mode for the item. |
| 346 | + * `id_abbrev`: only present in LibGit2 versions newer than or equal to `0.25.0`. |
| 347 | + The length of the `id` field when converted using [`hex`](@ref). Usually equal to `OID_HEXSZ` ($OID_HEXSZ). |
303 | 348 | """
|
304 | 349 | struct DiffFile
|
305 | 350 | id::GitHash
|
|
0 commit comments