[INFO] cloning repository https://github.com/hsmtkk/automatic-system
[INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/hsmtkk/automatic-system" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhsmtkk%2Fautomatic-system", kill_on_drop: false }`
[INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhsmtkk%2Fautomatic-system'...
[INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }`
[INFO] [stdout] b8c601a5e87ed7c757fb12bfd98267068150d837
[INFO] documenting hsmtkk/automatic-system against 1.69.0 for beta-1.70-rustdoc-1
[INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhsmtkk%2Fautomatic-system" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }`
[INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'...
[INFO] [stderr] done.
[INFO] validating manifest of git repo https://github.com/hsmtkk/automatic-system on toolchain 1.69.0
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+1.69.0" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }`
[INFO] started tweaking git repo https://github.com/hsmtkk/automatic-system
[INFO] finished tweaking git repo https://github.com/hsmtkk/automatic-system
[INFO] tweaked toml for git repo https://github.com/hsmtkk/automatic-system written to /workspace/builds/worker-1-tc1/source/Cargo.toml
[INFO] crate git repo https://github.com/hsmtkk/automatic-system already has a lockfile, it will not be regenerated
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+1.69.0" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:5ff2268d62e97bff2cde7d5815dd6ed5b47097566f13b8d0ca110b04b60e07ed" "/opt/rustwide/cargo-home/bin/cargo" "+1.69.0" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }`
[INFO] [stdout] edd85712348174bbb423a65b2d09b55a946358d2a37f80402297ccb3c590f9ea
[INFO] running `Command { std: "docker" "start" "-a" "edd85712348174bbb423a65b2d09b55a946358d2a37f80402297ccb3c590f9ea", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "edd85712348174bbb423a65b2d09b55a946358d2a37f80402297ccb3c590f9ea", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "edd85712348174bbb423a65b2d09b55a946358d2a37f80402297ccb3c590f9ea", kill_on_drop: false }`
[INFO] [stdout] edd85712348174bbb423a65b2d09b55a946358d2a37f80402297ccb3c590f9ea
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:5ff2268d62e97bff2cde7d5815dd6ed5b47097566f13b8d0ca110b04b60e07ed" "/opt/rustwide/cargo-home/bin/cargo" "+1.69.0" "doc" "--frozen" "--no-deps" "--document-private-items" "--message-format=json", kill_on_drop: false }`
[INFO] [stdout] b041fadc8833d87c27407131973e97a925c28d079d972aee6efed554fe323a76
[INFO] running `Command { std: "docker" "start" "-a" "b041fadc8833d87c27407131973e97a925c28d079d972aee6efed554fe323a76", kill_on_drop: false }`
[INFO] [stderr]    Compiling libc v0.2.116
[INFO] [stderr]    Compiling memchr v2.4.1
[INFO] [stderr]    Compiling glob v0.3.0
[INFO] [stderr]    Compiling version_check v0.9.4
[INFO] [stderr]    Compiling cfg-if v1.0.0
[INFO] [stderr]    Compiling proc-macro2 v1.0.36
[INFO] [stderr]    Compiling log v0.4.14
[INFO] [stderr]    Compiling unicode-width v0.1.9
[INFO] [stderr]    Compiling minimal-lexical v0.2.1
[INFO] [stderr]    Compiling regex-syntax v0.6.25
[INFO] [stderr]    Compiling nom v7.1.0
[INFO] [stderr]    Compiling clang-sys v1.3.0
[INFO] [stderr]    Compiling textwrap v0.11.0
[INFO] [stderr]    Compiling libloading v0.7.3
[INFO] [stderr]    Compiling humantime v2.1.0
[INFO] [stderr]    Compiling aho-corasick v0.7.18
[INFO] [stderr]    Compiling bindgen v0.59.2
[INFO] [stderr]    Compiling atty v0.2.14
[INFO] [stderr]    Compiling strsim v0.8.0
[INFO] [stderr]    Compiling either v1.6.1
[INFO] [stderr]    Compiling bitflags v1.3.2
[INFO] [stderr]    Compiling vec_map v0.8.2
[INFO] [stderr]    Compiling ansi_term v0.12.1
[INFO] [stderr]    Compiling termcolor v1.1.2
[INFO] [stderr]    Compiling which v4.2.4
[INFO] [stderr]    Compiling clap v2.34.0
[INFO] [stderr]    Compiling quote v1.0.15
[INFO] [stderr]    Compiling peeking_take_while v0.1.2
[INFO] [stderr]    Compiling rustc-hash v1.1.0
[INFO] [stderr]    Compiling lazycell v1.3.0
[INFO] [stderr]    Compiling shlex v1.1.0
[INFO] [stderr]    Compiling example v0.1.0 (/opt/rustwide/workdir/example)
[INFO] [stderr]    Compiling regex v1.5.4
[INFO] [stderr]    Compiling cexpr v0.6.0
[INFO] [stderr]    Compiling env_logger v0.9.0
[INFO] [stderr]    Compiling bridge v0.1.0 (/opt/rustwide/workdir/bridge)
[INFO] [stderr]  Documenting bridge v0.1.0 (/opt/rustwide/workdir/bridge)
[INFO] [stdout] warning: `extern` block uses type `u128`, which is not FFI-safe
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/bridge-df7b094c03dd306a/out/bindings.rs:3:37559
[INFO] [stdout]   |
[INFO] [stdout] 3 | ... __endptr : * mut * mut :: std :: os :: raw :: c_char) -> u128 ; } extern "C" { pub fn strtol (__nptr : * const :: std :: os :: raw ::...
[INFO] [stdout]   |                                                              ^^^^ not FFI-safe
[INFO] [stdout]   |
[INFO] [stdout]   = note: 128-bit integers don't currently have a known stable ABI
[INFO] [stdout]   = note: `#[warn(improper_ctypes)]` on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: `extern` block uses type `u128`, which is not FFI-safe
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/bridge-df7b094c03dd306a/out/bindings.rs:3:78564
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...:: raw :: c_char ; } extern "C" { pub fn qecvt (__value : u128 , __ndigit : :: std :: os :: raw :: c_int , __decpt : * mut :: std :: o...
[INFO] [stdout]   |                                                              ^^^^ not FFI-safe
[INFO] [stdout]   |
[INFO] [stdout]   = note: 128-bit integers don't currently have a known stable ABI
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: `extern` block uses type `u128`, which is not FFI-safe
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/bridge-df7b094c03dd306a/out/bindings.rs:3:78785
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...:: raw :: c_char ; } extern "C" { pub fn qfcvt (__value : u128 , __ndigit : :: std :: os :: raw :: c_int , __decpt : * mut :: std :: o...
[INFO] [stdout]   |                                                              ^^^^ not FFI-safe
[INFO] [stdout]   |
[INFO] [stdout]   = note: 128-bit integers don't currently have a known stable ABI
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: `extern` block uses type `u128`, which is not FFI-safe
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/bridge-df7b094c03dd306a/out/bindings.rs:3:79006
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...:: raw :: c_char ; } extern "C" { pub fn qgcvt (__value : u128 , __ndigit : :: std :: os :: raw :: c_int , __buf : * mut :: std :: os ...
[INFO] [stdout]   |                                                              ^^^^ not FFI-safe
[INFO] [stdout]   |
[INFO] [stdout]   = note: 128-bit integers don't currently have a known stable ABI
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: `extern` block uses type `u128`, which is not FFI-safe
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/bridge-df7b094c03dd306a/out/bindings.rs:3:79736
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...: raw :: c_int ; } extern "C" { pub fn qecvt_r (__value : u128 , __ndigit : :: std :: os :: raw :: c_int , __decpt : * mut :: std :: o...
[INFO] [stdout]   |                                                              ^^^^ not FFI-safe
[INFO] [stdout]   |
[INFO] [stdout]   = note: 128-bit integers don't currently have a known stable ABI
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: `extern` block uses type `u128`, which is not FFI-safe
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/bridge-df7b094c03dd306a/out/bindings.rs:3:80015
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...: raw :: c_int ; } extern "C" { pub fn qfcvt_r (__value : u128 , __ndigit : :: std :: os :: raw :: c_int , __decpt : * mut :: std :: o...
[INFO] [stdout]   |                                                              ^^^^ not FFI-safe
[INFO] [stdout]   |
[INFO] [stdout]   = note: 128-bit integers don't currently have a known stable ABI
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: 6 warnings emitted
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stderr]  Documenting example v0.1.0 (/opt/rustwide/workdir/example)
[INFO] [stdout] warning: unresolved link to `PATCH`
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/bridge-df7b094c03dd306a/out/bindings.rs:3:793806
[INFO] [stdout]   |
[INFO] [stdout] 3 | ... git_diff_format_email_flags_t = 0 ; # [doc = " Don't insert \"[PATCH]\" in the subject header"] pub const git_diff_format_email_flags...
[INFO] [stdout]   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout]   = note: the link appears in this line:
[INFO] [stdout]           
[INFO] [stdout]           Don't insert "[PATCH]" in the subject header
[INFO] [stdout]                          ^^^^^
[INFO] [stdout]   = note: no item named `PATCH` in scope
[INFO] [stdout]   = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
[INFO] [stdout]   = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: this URL is not a hyperlink
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/bridge-df7b094c03dd306a/out/bindings.rs:3:180801
[INFO] [stdout]   |
[INFO] [stdout] 3 | ... { # [doc = " Creates a `git_annotated_commit` from a revision string."] # [doc = ""] # [doc = " See `man gitrevisions`, or"] # [doc = " http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for"] # [doc = " information on the syntax accepted."] # [doc = ""] # [doc = " @param out pointer to store the git_annotated_commit result in"] # [doc = " @param repo repository that contains the given commit"] # [doc = " @param revspec the extended sha syntax string to use to lookup the commit"] # [doc = " @return 0 on success or error code"] pu...
[INFO] [stdout]   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<http://git-scm.com/docs/git-rev-parse.html#>`
[INFO] [stdout]   |
[INFO] [stdout]   = note: bare URLs are not automatically turned into clickable links
[INFO] [stdout]   = note: `#[warn(rustdoc::bare_urls)]` on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unclosed HTML tag `name`
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/bridge-df7b094c03dd306a/out/bindings.rs:3:572007
[INFO] [stdout]   |
[INFO] [stdout] 3 | ... { # [doc = " Update the tips to the new state"] # [doc = ""] # [doc = " @param remote the remote to update"] # [doc = " @param reflog_message The message to insert into the reflogs. If"] # [doc = " NULL and fetching, the default is \"fetch <name>\", where <name> is"] # [doc = " the name of the remote (or its url, for in-memory remotes). This"] # [doc = " parameter is ignored when pushing."] # [doc = " @param callbacks  pointer to the callback structure to use"] # [doc = " @param update_fetchhead whether to write to FETCH_HEAD. Pass 1 to behave like git."] # [doc = " @param download_tags what the behaviour for downloading tags is for this fetch. This is"] # [doc = " ignored for push. This must be the same value passed to `git_remote_download()`."] # [doc = " @return 0 or an error code"] pu...
[INFO] [stdout]   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout]   = note: `#[warn(rustdoc::invalid_html_tags)]` on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unclosed HTML tag `n`
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/bridge-df7b094c03dd306a/out/bindings.rs:3:598162
[INFO] [stdout]   |
[INFO] [stdout] 3 | ... { # [doc = " Get the commit object that is the <n>th generation ancestor"] # [doc = " of the named commit object, following only the first parents."] # [doc = " The returned commit has to be freed by the caller."] # [doc = ""] # [doc = " Passing `0` as the generation number returns another instance of the"] # [doc = " base commit itself."] # [doc = ""] # [doc = " @param ancestor Pointer where to store the ancestor commit"] # [doc = " @param commit a previously loaded commit."] # [doc = " @param n the requested generation"] # [doc = " @return 0 on success; GIT_ENOTFOUND if no matching ancestor exists"] # [doc = " or an error code"] pu...
[INFO] [stdout]   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: this URL is not a hyperlink
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/bridge-df7b094c03dd306a/out/bindings.rs:3:699496
[INFO] [stdout]   |
[INFO] [stdout] 3 | ... { # [doc = " Find a single object, as specified by a revision string."] # [doc = ""] # [doc = " See `man gitrevisions`, or"] # [doc = " http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for"] # [doc = " information on the syntax accepted."] # [doc = ""] # [doc = " The returned object should be released with `git_object_free` when no"] # [doc = " longer needed."] # [doc = ""] # [doc = " @param out pointer to output object"] # [doc = " @param repo the repository to search in"] # [doc = " @param spec the textual specification for an object"] # [doc = " @return 0 on success, GIT_ENOTFOUND, GIT_EAMBIGUOUS, GIT_EINVALIDSPEC or an error code"] pu...
[INFO] [stdout]   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<http://git-scm.com/docs/git-rev-parse.html#>`
[INFO] [stdout]   |
[INFO] [stdout]   = note: bare URLs are not automatically turned into clickable links
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: this URL is not a hyperlink
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/bridge-df7b094c03dd306a/out/bindings.rs:3:700338
[INFO] [stdout]   |
[INFO] [stdout] 3 | ... { # [doc = " Find a single object and intermediate reference by a revision string."] # [doc = ""] # [doc = " See `man gitrevisions`, or"] # [doc = " http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for"] # [doc = " information on the syntax accepted."] # [doc = ""] # [doc = " In some cases (`@{<-n>}` or `<branchname>@{upstream}`), the expression may"] # [doc = " point to an intermediate reference. When such expressions are being passed"] # [doc = " in, `reference_out` will be valued as well."] # [doc = ""] # [doc = " The returned object should be released with `git_object_free` and the"] # [doc = " returned reference with `git_reference_free` when no longer needed."] # [doc = ""] # [doc = " @param object_out pointer to output object"] # [doc = " @param reference_out pointer to output reference or NULL"] # [doc = " @param repo the repository to search in"] # [doc = " @param spec the textual specification for an object"] # [doc = " @return 0 on success, GIT_ENOTFOUND, GIT_EAMBIGUOUS, GIT_EINVALIDSPEC"] # [doc = " or an error code"] pu...
[INFO] [stdout]   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<http://git-scm.com/docs/git-rev-parse.html#>`
[INFO] [stdout]   |
[INFO] [stdout]   = note: bare URLs are not automatically turned into clickable links
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: this URL is not a hyperlink
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/bridge-df7b094c03dd306a/out/bindings.rs:3:703567
[INFO] [stdout]   |
[INFO] [stdout] 3 | ... { # [doc = " Parse a revision string for `from`, `to`, and intent."] # [doc = ""] # [doc = " See `man gitrevisions` or"] # [doc = " http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for"] # [doc = " information on the syntax accepted."] # [doc = ""] # [doc = " @param revspec Pointer to an user-allocated git_revspec struct where"] # [doc = "\t              the result of the rev-parse will be stored"] # [doc = " @param repo the repository to search in"] # [doc = " @param spec the rev-parse spec to parse"] # [doc = " @return 0 on success, GIT_INVALIDSPEC, GIT_ENOTFOUND, GIT_EAMBIGUOUS or an error code"] pu...
[INFO] [stdout]   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<http://git-scm.com/docs/git-rev-parse.html#>`
[INFO] [stdout]   |
[INFO] [stdout]   = note: bare URLs are not automatically turned into clickable links
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unclosed HTML tag `name`
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/bridge-df7b094c03dd306a/out/bindings.rs:3:759451
[INFO] [stdout]   |
[INFO] [stdout] 3 | ... { # [doc = " Read the fetchRecurseSubmodules rule for a submodule."] # [doc = ""] # [doc = " This accesses the submodule.<name>.fetchRecurseSubmodules value for"] # [doc = " the submodule that controls fetching behavior for the submodule."] # [doc = ""] # [doc = " Note that at this time, libgit2 does not honor this setting and the"] # [doc = " fetch functionality current ignores submodules."] # [doc = ""] # [doc = " @return 0 if fetchRecurseSubmodules is false, 1 if true"] pu...
[INFO] [stdout]   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: could not parse code block as Rust code
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/bridge-df7b094c03dd306a/out/bindings.rs:3:860091
[INFO] [stdout]   |
[INFO] [stdout] 3 | ... { # [doc = " Open a stream to read an object from the ODB"] # [doc = ""] # [doc = " Note that most backends do *not* support streaming reads"] # [doc = " because they store their objects as compressed/delta'ed blobs."] # [doc = ""] # [doc = " It's recommended to use `git_odb_read` instead, which is"] # [doc = " assured to work on all backends."] # [doc = ""] # [doc = " The returned stream will be of type `GIT_STREAM_RDONLY` and"] # [doc = " will have the following methods:"] # [doc = ""] # [doc = "\t\t- stream->read: read `n` bytes from the stream"] # [doc = "\t\t- stream->free: free the stream"] # [doc = ""] # [doc = " The stream must always be free'd or will leak memory."] # [doc = ""] # [doc = " @see git_odb_stream"] # [doc = ""] # [doc = " @param out pointer where to store the stream"] # [doc = " @param len pointer where to store the length of the object"] # [doc = " @param type pointer where to store the type of the object"] # [doc = " @param db object database where the stream will read from"] # [doc = " @param oid oid of the object the stream will read from"] # [doc = " @return 0 if the stream was created, error code otherwise"] pu...
[INFO] [stdout]   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout]   = note: error from rustc: unknown start of token: `
[INFO] [stdout]   = note: error from rustc: unknown start of token: `
[INFO] [stdout]   = note: `#[warn(rustdoc::invalid_rust_codeblocks)]` on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unclosed HTML tag `commit`
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/bridge-df7b094c03dd306a/out/bindings.rs:3:919975
[INFO] [stdout]   |
[INFO] [stdout] 3 | ... { # [doc = " Push and hide the respective endpoints of the given range."] # [doc = ""] # [doc = " The range should be of the form"] # [doc = "   <commit>..<commit>"] # [doc = " where each <commit> is in the form accepted by 'git_revparse_single'."] # [doc = " The left-hand commit will be hidden and the right-hand commit pushed."] # [doc = ""] # [doc = " @param walk the walker being used for the traversal"] # [doc = " @param range the range"] # [doc = " @return 0 or an error code"] # [doc = ""] pu...
[INFO] [stdout]   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unclosed HTML tag `email`
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/bridge-df7b094c03dd306a/out/bindings.rs:3:924646
[INFO] [stdout]   |
[INFO] [stdout] 3 | ... { # [doc = " Create a new signature by parsing the given buffer, which is"] # [doc = " expected to be in the format \"Real Name <email> timestamp tzoffset\","] # [doc = " where `timestamp` is the number of seconds since the Unix epoch and"] # [doc = " `tzoffset` is the timezone offset in `hhmm` format (note the lack"] # [doc = " of a colon separator)."] # [doc = ""] # [doc = " @param out new signature"] # [doc = " @param buf signature string"] # [doc = " @return 0 on success, or an error code"] pu...
[INFO] [stdout]   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unclosed HTML tag `star`
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/bridge-df7b094c03dd306a/out/bindings.rs:3:243055
[INFO] [stdout]   |
[INFO] [stdout] 3 | ... ; # [doc = " Interpret the provided name as a reference pattern for a"] # [doc = " refspec (as used with remote repositories). If this option"] # [doc = " is enabled, the name is allowed to contain a single * (<star>)"] # [doc = " in place of a one full pathname component"] # [doc = " (e.g., foo/<star>/bar but not foo/bar<star>)."] pu...
[INFO] [stdout]   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unclosed HTML tag `star`
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/bridge-df7b094c03dd306a/out/bindings.rs:3:243055
[INFO] [stdout]   |
[INFO] [stdout] 3 | ... ; # [doc = " Interpret the provided name as a reference pattern for a"] # [doc = " refspec (as used with remote repositories). If this option"] # [doc = " is enabled, the name is allowed to contain a single * (<star>)"] # [doc = " in place of a one full pathname component"] # [doc = " (e.g., foo/<star>/bar but not foo/bar<star>)."] pu...
[INFO] [stdout]   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout] help: try marking as source code
[INFO] [stdout]   |
[INFO] [stdout] 3 | pub const _TIME_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; pub const __GLIBC_USE_ISOC2X : u32 = 0 ; pub const __USE_ISOC11 : u32 = 1 ; pub const __USE_ISOC99 : u32 = 1 ; pub const __USE_ISOC95 : u32 = 1 ; pub const __USE_POSIX_IMPLICITLY : u32 = 1 ; pub const _POSIX_SOURCE : u32 = 1 ; pub const _POSIX_C_SOURCE : u32 = 200809 ; pub const __USE_POSIX : u32 = 1 ; pub const __USE_POSIX2 : u32 = 1 ; pub const __USE_POSIX199309 : u32 = 1 ; pub const __USE_POSIX199506 : u32 = 1 ; pub const __USE_XOPEN2K : u32 = 1 ; pub const __USE_XOPEN2K8 : u32 = 1 ; pub const _ATFILE_SOURCE : u32 = 1 ; pub const __WORDSIZE : u32 = 64 ; pub const __WORDSIZE_TIME64_COMPAT32 : u32 = 1 ; pub const __SYSCALL_WORDSIZE : u32 = 64 ; pub const __TIMESIZE : u32 = 64 ; pub const __USE_MISC : u32 = 1 ; pub const __USE_ATFILE : u32 = 1 ; pub const __USE_FORTIFY_LEVEL : u32 = 0 ; pub const __GLIBC_USE_DEPRECATED_GETS : u32 = 0 ; pub const __GLIBC_USE_DEPRECATED_SCANF : u32 = 0 ; pub const _STDC_PREDEF_H : u32 = 1 ; pub const __STDC_IEC_559__ : u32 = 1 ; pub const __STDC_IEC_60559_BFP__ : u32 = 201404 ; pub const __STDC_IEC_559_COMPLEX__ : u32 = 1 ; pub const __STDC_IEC_60559_COMPLEX__ : u32 = 201404 ; pub const __STDC_ISO_10646__ : u32 = 201706 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 35 ; pub const _SYS_CDEFS_H : u32 = 1 ; pub const __glibc_c99_flexarr_available : u32 = 1 ; pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI : u32 = 0 ; pub const __HAVE_GENERIC_SELECTION : u32 = 1 ; pub const _BITS_TIME_H : u32 = 1 ; pub const _BITS_TYPES_H : u32 = 1 ; pub const _BITS_TYPESIZES_H : u32 = 1 ; pub const __OFF_T_MATCHES_OFF64_T : u32 = 1 ; pub const __INO_T_MATCHES_INO64_T : u32 = 1 ; pub const __RLIM_T_MATCHES_RLIM64_T : u32 = 1 ; pub const __STATFS_MATCHES_STATFS64 : u32 = 1 ; pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 : u32 = 1 ; pub const __FD_SETSIZE : u32 = 1024 ; pub const _BITS_TIME64_H : u32 = 1 ; pub const CLOCK_REALTIME : u32 = 0 ; pub const CLOCK_MONOTONIC : u32 = 1 ; pub const CLOCK_PROCESS_CPUTIME_ID : u32 = 2 ; pub const CLOCK_THREAD_CPUTIME_ID : u32 = 3 ; pub const CLOCK_MONOTONIC_RAW : u32 = 4 ; pub const CLOCK_REALTIME_COARSE : u32 = 5 ; pub const CLOCK_MONOTONIC_COARSE : u32 = 6 ; pub const CLOCK_BOOTTIME : u32 = 7 ; pub const CLOCK_REALTIME_ALARM : u32 = 8 ; pub const CLOCK_BOOTTIME_ALARM : u32 = 9 ; pub const CLOCK_TAI : u32 = 11 ; pub const TIMER_ABSTIME : u32 = 1 ; pub const __clock_t_defined : u32 = 1 ; pub const __time_t_defined : u32 = 1 ; pub const __struct_tm_defined : u32 = 1 ; pub const _STRUCT_TIMESPEC : u32 = 1 ; pub const _BITS_ENDIAN_H : u32 = 1 ; pub const __LITTLE_ENDIAN : u32 = 1234 ; pub const __BIG_ENDIAN : u32 = 4321 ; pub const __PDP_ENDIAN : u32 = 3412 ; pub const _BITS_ENDIANNESS_H : u32 = 1 ; pub const __BYTE_ORDER : u32 = 1234 ; pub const __FLOAT_WORD_ORDER : u32 = 1234 ; pub const __clockid_t_defined : u32 = 1 ; pub const __timer_t_defined : u32 = 1 ; pub const __itimerspec_defined : u32 = 1 ; pub const _BITS_TYPES_LOCALE_T_H : u32 = 1 ; pub const _BITS_TYPES___LOCALE_T_H : u32 = 1 ; pub const TIME_UTC : u32 = 1 ; pub const __GLIBC_USE_LIB_EXT2 : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_BFP_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _STDLIB_H : u32 = 1 ; pub const WNOHANG : u32 = 1 ; pub const WUNTRACED : u32 = 2 ; pub const WSTOPPED : u32 = 2 ; pub const WEXITED : u32 = 4 ; pub const WCONTINUED : u32 = 8 ; pub const WNOWAIT : u32 = 16777216 ; pub const __WNOTHREAD : u32 = 536870912 ; pub const __WALL : u32 = 1073741824 ; pub const __WCLONE : u32 = 2147483648 ; pub const __W_CONTINUED : u32 = 65535 ; pub const __WCOREFLAG : u32 = 128 ; pub const __HAVE_FLOAT128 : u32 = 0 ; pub const __HAVE_DISTINCT_FLOAT128 : u32 = 0 ; pub const __HAVE_FLOAT64X : u32 = 1 ; pub const __HAVE_FLOAT64X_LONG_DOUBLE : u32 = 1 ; pub const __HAVE_FLOAT16 : u32 = 0 ; pub const __HAVE_FLOAT32 : u32 = 1 ; pub const __HAVE_FLOAT64 : u32 = 1 ; pub const __HAVE_FLOAT32X : u32 = 1 ; pub const __HAVE_FLOAT128X : u32 = 0 ; pub const __HAVE_DISTINCT_FLOAT16 : u32 = 0 ; pub const __HAVE_DISTINCT_FLOAT32 : u32 = 0 ; pub const __HAVE_DISTINCT_FLOAT64 : u32 = 0 ; pub const __HAVE_DISTINCT_FLOAT32X : u32 = 0 ; pub const __HAVE_DISTINCT_FLOAT64X : u32 = 0 ; pub const __HAVE_DISTINCT_FLOAT128X : u32 = 0 ; pub const __HAVE_FLOATN_NOT_TYPEDEF : u32 = 0 ; pub const __ldiv_t_defined : u32 = 1 ; pub const __lldiv_t_defined : u32 = 1 ; pub const RAND_MAX : u32 = 2147483647 ; pub const EXIT_FAILURE : u32 = 1 ; pub const EXIT_SUCCESS : u32 = 0 ; pub const _SYS_TYPES_H : u32 = 1 ; pub const _BITS_STDINT_INTN_H : u32 = 1 ; pub const __BIT_TYPES_DEFINED__ : u32 = 1 ; pub const _ENDIAN_H : u32 = 1 ; pub const LITTLE_ENDIAN : u32 = 1234 ; pub const BIG_ENDIAN : u32 = 4321 ; pub const PDP_ENDIAN : u32 = 3412 ; pub const BYTE_ORDER : u32 = 1234 ; pub const _BITS_BYTESWAP_H : u32 = 1 ; pub const _BITS_UINTN_IDENTITY_H : u32 = 1 ; pub const _SYS_SELECT_H : u32 = 1 ; pub const __sigset_t_defined : u32 = 1 ; pub const __timeval_defined : u32 = 1 ; pub const FD_SETSIZE : u32 = 1024 ; pub const _BITS_PTHREADTYPES_COMMON_H : u32 = 1 ; pub const _THREAD_SHARED_TYPES_H : u32 = 1 ; pub const _BITS_PTHREADTYPES_ARCH_H : u32 = 1 ; pub const __SIZEOF_PTHREAD_MUTEX_T : u32 = 40 ; pub const __SIZEOF_PTHREAD_ATTR_T : u32 = 56 ; pub const __SIZEOF_PTHREAD_RWLOCK_T : u32 = 56 ; pub const __SIZEOF_PTHREAD_BARRIER_T : u32 = 32 ; pub const __SIZEOF_PTHREAD_MUTEXATTR_T : u32 = 4 ; pub const __SIZEOF_PTHREAD_COND_T : u32 = 48 ; pub const __SIZEOF_PTHREAD_CONDATTR_T : u32 = 4 ; pub const __SIZEOF_PTHREAD_RWLOCKATTR_T : u32 = 8 ; pub const __SIZEOF_PTHREAD_BARRIERATTR_T : u32 = 4 ; pub const _THREAD_MUTEX_INTERNAL_H : u32 = 1 ; pub const __PTHREAD_MUTEX_HAVE_PREV : u32 = 1 ; pub const __have_pthread_attr_t : u32 = 1 ; pub const _ALLOCA_H : u32 = 1 ; pub const _INTTYPES_H : u32 = 1 ; pub const _STDINT_H : u32 = 1 ; pub const _BITS_WCHAR_H : u32 = 1 ; pub const _BITS_STDINT_UINTN_H : u32 = 1 ; pub const INT8_MIN : i32 = - 128 ; pub const INT16_MIN : i32 = - 32768 ; pub const INT32_MIN : i32 = - 2147483648 ; pub const INT8_MAX : u32 = 127 ; pub const INT16_MAX : u32 = 32767 ; pub const INT32_MAX : u32 = 2147483647 ; pub const UINT8_MAX : u32 = 255 ; pub const UINT16_MAX : u32 = 65535 ; pub const UINT32_MAX : u32 = 4294967295 ; pub const INT_LEAST8_MIN : i32 = - 128 ; pub const INT_LEAST16_MIN : i32 = - 32768 ; pub const INT_LEAST32_MIN : i32 = - 2147483648 ; pub const INT_LEAST8_MAX : u32 = 127 ; pub const INT_LEAST16_MAX : u32 = 32767 ; pub const INT_LEAST32_MAX : u32 = 2147483647 ; pub const UINT_LEAST8_MAX : u32 = 255 ; pub const UINT_LEAST16_MAX : u32 = 65535 ; pub const UINT_LEAST32_MAX : u32 = 4294967295 ; pub const INT_FAST8_MIN : i32 = - 128 ; pub const INT_FAST16_MIN : i64 = - 9223372036854775808 ; pub const INT_FAST32_MIN : i64 = - 9223372036854775808 ; pub const INT_FAST8_MAX : u32 = 127 ; pub const INT_FAST16_MAX : u64 = 9223372036854775807 ; pub const INT_FAST32_MAX : u64 = 9223372036854775807 ; pub const UINT_FAST8_MAX : u32 = 255 ; pub const UINT_FAST16_MAX : i32 = - 1 ; pub const UINT_FAST32_MAX : i32 = - 1 ; pub const INTPTR_MIN : i64 = - 9223372036854775808 ; pub const INTPTR_MAX : u64 = 9223372036854775807 ; pub const UINTPTR_MAX : i32 = - 1 ; pub const PTRDIFF_MIN : i64 = - 9223372036854775808 ; pub const PTRDIFF_MAX : u64 = 9223372036854775807 ; pub const SIG_ATOMIC_MIN : i32 = - 2147483648 ; pub const SIG_ATOMIC_MAX : u32 = 2147483647 ; pub const SIZE_MAX : i32 = - 1 ; pub const WINT_MIN : u32 = 0 ; pub const WINT_MAX : u32 = 4294967295 ; pub const ____gwchar_t_defined : u32 = 1 ; pub const __PRI64_PREFIX : & [u8 ; 2usize] = b"l\0" ; pub const __PRIPTR_PREFIX : & [u8 ; 2usize] = b"l\0" ; pub const PRId8 : & [u8 ; 2usize] = b"d\0" ; pub const PRId16 : & [u8 ; 2usize] = b"d\0" ; pub const PRId32 : & [u8 ; 2usize] = b"d\0" ; pub const PRId64 : & [u8 ; 3usize] = b"ld\0" ; pub const PRIdLEAST8 : & [u8 ; 2usize] = b"d\0" ; pub const PRIdLEAST16 : & [u8 ; 2usize] = b"d\0" ; pub const PRIdLEAST32 : & [u8 ; 2usize] = b"d\0" ; pub const PRIdLEAST64 : & [u8 ; 3usize] = b"ld\0" ; pub const PRIdFAST8 : & [u8 ; 2usize] = b"d\0" ; pub const PRIdFAST16 : & [u8 ; 3usize] = b"ld\0" ; pub const PRIdFAST32 : & [u8 ; 3usize] = b"ld\0" ; pub const PRIdFAST64 : & [u8 ; 3usize] = b"ld\0" ; pub const PRIi8 : & [u8 ; 2usize] = b"i\0" ; pub const PRIi16 : & [u8 ; 2usize] = b"i\0" ; pub const PRIi32 : & [u8 ; 2usize] = b"i\0" ; pub const PRIi64 : & [u8 ; 3usize] = b"li\0" ; pub const PRIiLEAST8 : & [u8 ; 2usize] = b"i\0" ; pub const PRIiLEAST16 : & [u8 ; 2usize] = b"i\0" ; pub const PRIiLEAST32 : & [u8 ; 2usize] = b"i\0" ; pub const PRIiLEAST64 : & [u8 ; 3usize] = b"li\0" ; pub const PRIiFAST8 : & [u8 ; 2usize] = b"i\0" ; pub const PRIiFAST16 : & [u8 ; 3usize] = b"li\0" ; pub const PRIiFAST32 : & [u8 ; 3usize] = b"li\0" ; pub const PRIiFAST64 : & [u8 ; 3usize] = b"li\0" ; pub const PRIo8 : & [u8 ; 2usize] = b"o\0" ; pub const PRIo16 : & [u8 ; 2usize] = b"o\0" ; pub const PRIo32 : & [u8 ; 2usize] = b"o\0" ; pub const PRIo64 : & [u8 ; 3usize] = b"lo\0" ; pub const PRIoLEAST8 : & [u8 ; 2usize] = b"o\0" ; pub const PRIoLEAST16 : & [u8 ; 2usize] = b"o\0" ; pub const PRIoLEAST32 : & [u8 ; 2usize] = b"o\0" ; pub const PRIoLEAST64 : & [u8 ; 3usize] = b"lo\0" ; pub const PRIoFAST8 : & [u8 ; 2usize] = b"o\0" ; pub const PRIoFAST16 : & [u8 ; 3usize] = b"lo\0" ; pub const PRIoFAST32 : & [u8 ; 3usize] = b"lo\0" ; pub const PRIoFAST64 : & [u8 ; 3usize] = b"lo\0" ; pub const PRIu8 : & [u8 ; 2usize] = b"u\0" ; pub const PRIu16 : & [u8 ; 2usize] = b"u\0" ; pub const PRIu32 : & [u8 ; 2usize] = b"u\0" ; pub const PRIu64 : & [u8 ; 3usize] = b"lu\0" ; pub const PRIuLEAST8 : & [u8 ; 2usize] = b"u\0" ; pub const PRIuLEAST16 : & [u8 ; 2usize] = b"u\0" ; pub const PRIuLEAST32 : & [u8 ; 2usize] = b"u\0" ; pub const PRIuLEAST64 : & [u8 ; 3usize] = b"lu\0" ; pub const PRIuFAST8 : & [u8 ; 2usize] = b"u\0" ; pub const PRIuFAST16 : & [u8 ; 3usize] = b"lu\0" ; pub const PRIuFAST32 : & [u8 ; 3usize] = b"lu\0" ; pub const PRIuFAST64 : & [u8 ; 3usize] = b"lu\0" ; pub const PRIx8 : & [u8 ; 2usize] = b"x\0" ; pub const PRIx16 : & [u8 ; 2usize] = b"x\0" ; pub const PRIx32 : & [u8 ; 2usize] = b"x\0" ; pub const PRIx64 : & [u8 ; 3usize] = b"lx\0" ; pub const PRIxLEAST8 : & [u8 ; 2usize] = b"x\0" ; pub const PRIxLEAST16 : & [u8 ; 2usize] = b"x\0" ; pub const PRIxLEAST32 : & [u8 ; 2usize] = b"x\0" ; pub const PRIxLEAST64 : & [u8 ; 3usize] = b"lx\0" ; pub const PRIxFAST8 : & [u8 ; 2usize] = b"x\0" ; pub const PRIxFAST16 : & [u8 ; 3usize] = b"lx\0" ; pub const PRIxFAST32 : & [u8 ; 3usize] = b"lx\0" ; pub const PRIxFAST64 : & [u8 ; 3usize] = b"lx\0" ; pub const PRIX8 : & [u8 ; 2usize] = b"X\0" ; pub const PRIX16 : & [u8 ; 2usize] = b"X\0" ; pub const PRIX32 : & [u8 ; 2usize] = b"X\0" ; pub const PRIX64 : & [u8 ; 3usize] = b"lX\0" ; pub const PRIXLEAST8 : & [u8 ; 2usize] = b"X\0" ; pub const PRIXLEAST16 : & [u8 ; 2usize] = b"X\0" ; pub const PRIXLEAST32 : & [u8 ; 2usize] = b"X\0" ; pub const PRIXLEAST64 : & [u8 ; 3usize] = b"lX\0" ; pub const PRIXFAST8 : & [u8 ; 2usize] = b"X\0" ; pub const PRIXFAST16 : & [u8 ; 3usize] = b"lX\0" ; pub const PRIXFAST32 : & [u8 ; 3usize] = b"lX\0" ; pub const PRIXFAST64 : & [u8 ; 3usize] = b"lX\0" ; pub const PRIdMAX : & [u8 ; 3usize] = b"ld\0" ; pub const PRIiMAX : & [u8 ; 3usize] = b"li\0" ; pub const PRIoMAX : & [u8 ; 3usize] = b"lo\0" ; pub const PRIuMAX : & [u8 ; 3usize] = b"lu\0" ; pub const PRIxMAX : & [u8 ; 3usize] = b"lx\0" ; pub const PRIXMAX : & [u8 ; 3usize] = b"lX\0" ; pub const PRIdPTR : & [u8 ; 3usize] = b"ld\0" ; pub const PRIiPTR : & [u8 ; 3usize] = b"li\0" ; pub const PRIoPTR : & [u8 ; 3usize] = b"lo\0" ; pub const PRIuPTR : & [u8 ; 3usize] = b"lu\0" ; pub const PRIxPTR : & [u8 ; 3usize] = b"lx\0" ; pub const PRIXPTR : & [u8 ; 3usize] = b"lX\0" ; pub const SCNd8 : & [u8 ; 4usize] = b"hhd\0" ; pub const SCNd16 : & [u8 ; 3usize] = b"hd\0" ; pub const SCNd32 : & [u8 ; 2usize] = b"d\0" ; pub const SCNd64 : & [u8 ; 3usize] = b"ld\0" ; pub const SCNdLEAST8 : & [u8 ; 4usize] = b"hhd\0" ; pub const SCNdLEAST16 : & [u8 ; 3usize] = b"hd\0" ; pub const SCNdLEAST32 : & [u8 ; 2usize] = b"d\0" ; pub const SCNdLEAST64 : & [u8 ; 3usize] = b"ld\0" ; pub const SCNdFAST8 : & [u8 ; 4usize] = b"hhd\0" ; pub const SCNdFAST16 : & [u8 ; 3usize] = b"ld\0" ; pub const SCNdFAST32 : & [u8 ; 3usize] = b"ld\0" ; pub const SCNdFAST64 : & [u8 ; 3usize] = b"ld\0" ; pub const SCNi8 : & [u8 ; 4usize] = b"hhi\0" ; pub const SCNi16 : & [u8 ; 3usize] = b"hi\0" ; pub const SCNi32 : & [u8 ; 2usize] = b"i\0" ; pub const SCNi64 : & [u8 ; 3usize] = b"li\0" ; pub const SCNiLEAST8 : & [u8 ; 4usize] = b"hhi\0" ; pub const SCNiLEAST16 : & [u8 ; 3usize] = b"hi\0" ; pub const SCNiLEAST32 : & [u8 ; 2usize] = b"i\0" ; pub const SCNiLEAST64 : & [u8 ; 3usize] = b"li\0" ; pub const SCNiFAST8 : & [u8 ; 4usize] = b"hhi\0" ; pub const SCNiFAST16 : & [u8 ; 3usize] = b"li\0" ; pub const SCNiFAST32 : & [u8 ; 3usize] = b"li\0" ; pub const SCNiFAST64 : & [u8 ; 3usize] = b"li\0" ; pub const SCNu8 : & [u8 ; 4usize] = b"hhu\0" ; pub const SCNu16 : & [u8 ; 3usize] = b"hu\0" ; pub const SCNu32 : & [u8 ; 2usize] = b"u\0" ; pub const SCNu64 : & [u8 ; 3usize] = b"lu\0" ; pub const SCNuLEAST8 : & [u8 ; 4usize] = b"hhu\0" ; pub const SCNuLEAST16 : & [u8 ; 3usize] = b"hu\0" ; pub const SCNuLEAST32 : & [u8 ; 2usize] = b"u\0" ; pub const SCNuLEAST64 : & [u8 ; 3usize] = b"lu\0" ; pub const SCNuFAST8 : & [u8 ; 4usize] = b"hhu\0" ; pub const SCNuFAST16 : & [u8 ; 3usize] = b"lu\0" ; pub const SCNuFAST32 : & [u8 ; 3usize] = b"lu\0" ; pub const SCNuFAST64 : & [u8 ; 3usize] = b"lu\0" ; pub const SCNo8 : & [u8 ; 4usize] = b"hho\0" ; pub const SCNo16 : & [u8 ; 3usize] = b"ho\0" ; pub const SCNo32 : & [u8 ; 2usize] = b"o\0" ; pub const SCNo64 : & [u8 ; 3usize] = b"lo\0" ; pub const SCNoLEAST8 : & [u8 ; 4usize] = b"hho\0" ; pub const SCNoLEAST16 : & [u8 ; 3usize] = b"ho\0" ; pub const SCNoLEAST32 : & [u8 ; 2usize] = b"o\0" ; pub const SCNoLEAST64 : & [u8 ; 3usize] = b"lo\0" ; pub const SCNoFAST8 : & [u8 ; 4usize] = b"hho\0" ; pub const SCNoFAST16 : & [u8 ; 3usize] = b"lo\0" ; pub const SCNoFAST32 : & [u8 ; 3usize] = b"lo\0" ; pub const SCNoFAST64 : & [u8 ; 3usize] = b"lo\0" ; pub const SCNx8 : & [u8 ; 4usize] = b"hhx\0" ; pub const SCNx16 : & [u8 ; 3usize] = b"hx\0" ; pub const SCNx32 : & [u8 ; 2usize] = b"x\0" ; pub const SCNx64 : & [u8 ; 3usize] = b"lx\0" ; pub const SCNxLEAST8 : & [u8 ; 4usize] = b"hhx\0" ; pub const SCNxLEAST16 : & [u8 ; 3usize] = b"hx\0" ; pub const SCNxLEAST32 : & [u8 ; 2usize] = b"x\0" ; pub const SCNxLEAST64 : & [u8 ; 3usize] = b"lx\0" ; pub const SCNxFAST8 : & [u8 ; 4usize] = b"hhx\0" ; pub const SCNxFAST16 : & [u8 ; 3usize] = b"lx\0" ; pub const SCNxFAST32 : & [u8 ; 3usize] = b"lx\0" ; pub const SCNxFAST64 : & [u8 ; 3usize] = b"lx\0" ; pub const SCNdMAX : & [u8 ; 3usize] = b"ld\0" ; pub const SCNiMAX : & [u8 ; 3usize] = b"li\0" ; pub const SCNoMAX : & [u8 ; 3usize] = b"lo\0" ; pub const SCNuMAX : & [u8 ; 3usize] = b"lu\0" ; pub const SCNxMAX : & [u8 ; 3usize] = b"lx\0" ; pub const SCNdPTR : & [u8 ; 3usize] = b"ld\0" ; pub const SCNiPTR : & [u8 ; 3usize] = b"li\0" ; pub const SCNoPTR : & [u8 ; 3usize] = b"lo\0" ; pub const SCNuPTR : & [u8 ; 3usize] = b"lu\0" ; pub const SCNxPTR : & [u8 ; 3usize] = b"lx\0" ; pub const GIT_PATH_LIST_SEPARATOR : u8 = 58u8 ; pub const GIT_PATH_MAX : u32 = 4096 ; pub const GIT_OID_HEX_ZERO : & [u8 ; 41usize] = b"0000000000000000000000000000000000000000\0" ; pub const GIT_OID_RAWSZ : u32 = 20 ; pub const GIT_OID_HEXSZ : u32 = 40 ; pub const GIT_OID_MINPREFIXLEN : u32 = 4 ; pub const GIT_REPOSITORY_INIT_OPTIONS_VERSION : u32 = 1 ; pub const GIT_DIFF_OPTIONS_VERSION : u32 = 1 ; pub const GIT_DIFF_HUNK_HEADER_SIZE : u32 = 128 ; pub const GIT_DIFF_FIND_OPTIONS_VERSION : u32 = 1 ; pub const GIT_DIFF_PATCHID_OPTIONS_VERSION : u32 = 1 ; pub const GIT_APPLY_OPTIONS_VERSION : u32 = 1 ; pub const GIT_ATTR_CHECK_FILE_THEN_INDEX : u32 = 0 ; pub const GIT_ATTR_CHECK_INDEX_THEN_FILE : u32 = 1 ; pub const GIT_ATTR_CHECK_INDEX_ONLY : u32 = 2 ; pub const GIT_ATTR_CHECK_NO_SYSTEM : u32 = 4 ; pub const GIT_ATTR_CHECK_INCLUDE_HEAD : u32 = 8 ; pub const GIT_ATTR_CHECK_INCLUDE_COMMIT : u32 = 16 ; pub const GIT_ATTR_OPTIONS_VERSION : u32 = 1 ; pub const GIT_BLOB_FILTER_OPTIONS_VERSION : u32 = 1 ; pub const GIT_BLAME_OPTIONS_VERSION : u32 = 1 ; pub const GIT_CHECKOUT_OPTIONS_VERSION : u32 = 1 ; pub const GIT_INDEXER_OPTIONS_VERSION : u32 = 1 ; pub const GIT_INDEX_ENTRY_NAMEMASK : u32 = 4095 ; pub const GIT_INDEX_ENTRY_STAGEMASK : u32 = 12288 ; pub const GIT_INDEX_ENTRY_STAGESHIFT : u32 = 12 ; pub const GIT_MERGE_FILE_INPUT_VERSION : u32 = 1 ; pub const GIT_MERGE_CONFLICT_MARKER_SIZE : u32 = 7 ; pub const GIT_MERGE_FILE_OPTIONS_VERSION : u32 = 1 ; pub const GIT_MERGE_OPTIONS_VERSION : u32 = 1 ; pub const GIT_CHERRYPICK_OPTIONS_VERSION : u32 = 1 ; pub const GIT_DEFAULT_PORT : & [u8 ; 5usize] = b"9418\0" ; pub const GIT_PROXY_OPTIONS_VERSION : u32 = 1 ; pub const GIT_REMOTE_CREATE_OPTIONS_VERSION : u32 = 1 ; pub const GIT_REMOTE_CALLBACKS_VERSION : u32 = 1 ; pub const GIT_FETCH_OPTIONS_VERSION : u32 = 1 ; pub const GIT_PUSH_OPTIONS_VERSION : u32 = 1 ; pub const GIT_CLONE_OPTIONS_VERSION : u32 = 1 ; pub const GIT_DESCRIBE_DEFAULT_MAX_CANDIDATES_TAGS : u32 = 10 ; pub const GIT_DESCRIBE_DEFAULT_ABBREVIATED_SIZE : u32 = 7 ; pub const GIT_DESCRIBE_OPTIONS_VERSION : u32 = 1 ; pub const GIT_DESCRIBE_FORMAT_OPTIONS_VERSION : u32 = 1 ; pub const GIT_FILTER_OPTIONS_VERSION : u32 = 1 ; pub const GIT_REBASE_OPTIONS_VERSION : u32 = 1 ; pub const GIT_REBASE_NO_OPERATION : i32 = - 1 ; pub const GIT_REVERT_OPTIONS_VERSION : u32 = 1 ; pub const GIT_STASH_APPLY_OPTIONS_VERSION : u32 = 1 ; pub const GIT_STATUS_OPTIONS_VERSION : u32 = 1 ; pub const GIT_SUBMODULE_STATUS__IN_FLAGS : u32 = 15 ; pub const GIT_SUBMODULE_STATUS__INDEX_FLAGS : u32 = 112 ; pub const GIT_SUBMODULE_STATUS__WD_FLAGS : u32 = 16256 ; pub const GIT_SUBMODULE_UPDATE_OPTIONS_VERSION : u32 = 1 ; pub const GIT_WORKTREE_ADD_OPTIONS_VERSION : u32 = 1 ; pub const GIT_WORKTREE_PRUNE_OPTIONS_VERSION : u32 = 1 ; pub const GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION : u32 = 1 ; pub const GIT_IDXENTRY_NAMEMASK : u32 = 4095 ; pub const GIT_IDXENTRY_STAGEMASK : u32 = 12288 ; pub const GIT_IDXENTRY_STAGESHIFT : u32 = 12 ; pub const GIT_IDXENTRY_EXTENDED2 : u32 = 32768 ; pub const GIT_IDXENTRY_UPDATE : u32 = 1 ; pub const GIT_IDXENTRY_REMOVE : u32 = 2 ; pub const GIT_IDXENTRY_UPTODATE : u32 = 4 ; pub const GIT_IDXENTRY_ADDED : u32 = 8 ; pub const GIT_IDXENTRY_HASHED : u32 = 16 ; pub const GIT_IDXENTRY_UNHASHED : u32 = 32 ; pub const GIT_IDXENTRY_WT_REMOVE : u32 = 64 ; pub const GIT_IDXENTRY_CONFLICTED : u32 = 128 ; pub const GIT_IDXENTRY_UNPACKED : u32 = 256 ; pub const GIT_IDXENTRY_NEW_SKIP_WORKTREE : u32 = 512 ; pub const GIT_OBJ__EXT1 : u32 = 0 ; pub const GIT_OBJ__EXT2 : u32 = 5 ; pub const GIT_EMAIL_CREATE_OPTIONS_VERSION : u32 = 1 ; pub const LIBGIT2_VERSION : & [u8 ; 6usize] = b"1.3.0\0" ; pub const LIBGIT2_VER_MAJOR : u32 = 1 ; pub const LIBGIT2_VER_MINOR : u32 = 3 ; pub const LIBGIT2_VER_REVISION : u32 = 0 ; pub const LIBGIT2_VER_PATCH : u32 = 0 ; pub const LIBGIT2_SOVERSION : & [u8 ; 4usize] = b"1.3\0" ; pub type size_t = :: std :: os :: raw :: c_ulong ; pub type __u_char = :: std :: os :: raw :: c_uchar ; pub type __u_short = :: std :: os :: raw :: c_ushort ; pub type __u_int = :: std :: os :: raw :: c_uint ; pub type __u_long = :: std :: os :: raw :: c_ulong ; pub type __int8_t = :: std :: os :: raw :: c_schar ; pub type __uint8_t = :: std :: os :: raw :: c_uchar ; pub type __int16_t = :: std :: os :: raw :: c_short ; pub type __uint16_t = :: std :: os :: raw :: c_ushort ; pub type __int32_t = :: std :: os :: raw :: c_int ; pub type __uint32_t = :: std :: os :: raw :: c_uint ; pub type __int64_t = :: std :: os :: raw :: c_long ; pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __int_least8_t = __int8_t ; pub type __uint_least8_t = __uint8_t ; pub type __int_least16_t = __int16_t ; pub type __uint_least16_t = __uint16_t ; pub type __int_least32_t = __int32_t ; pub type __uint_least32_t = __uint32_t ; pub type __int_least64_t = __int64_t ; pub type __uint_least64_t = __uint64_t ; pub type __quad_t = :: std :: os :: raw :: c_long ; pub type __u_quad_t = :: std :: os :: raw :: c_ulong ; pub type __intmax_t = :: std :: os :: raw :: c_long ; pub type __uintmax_t = :: std :: os :: raw :: c_ulong ; pub type __dev_t = :: std :: os :: raw :: c_ulong ; pub type __uid_t = :: std :: os :: raw :: c_uint ; pub type __gid_t = :: std :: os :: raw :: c_uint ; pub type __ino_t = :: std :: os :: raw :: c_ulong ; pub type __ino64_t = :: std :: os :: raw :: c_ulong ; pub type __mode_t = :: std :: os :: raw :: c_uint ; pub type __nlink_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __pid_t = :: std :: os :: raw :: c_int ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct __fsid_t { pub __val : [:: std :: os :: raw :: c_int ; 2usize] , } # [test] fn bindgen_test_layout___fsid_t () { assert_eq ! (:: std :: mem :: size_of :: < __fsid_t > () , 8usize , concat ! ("Size of: " , stringify ! (__fsid_t))) ; assert_eq ! (:: std :: mem :: align_of :: < __fsid_t > () , 4usize , concat ! ("Alignment of " , stringify ! (__fsid_t))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __fsid_t > ())) . __val as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (__fsid_t) , "::" , stringify ! (__val))) ; } pub type __clock_t = :: std :: os :: raw :: c_long ; pub type __rlim_t = :: std :: os :: raw :: c_ulong ; pub type __rlim64_t = :: std :: os :: raw :: c_ulong ; pub type __id_t = :: std :: os :: raw :: c_uint ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type __useconds_t = :: std :: os :: raw :: c_uint ; pub type __suseconds_t = :: std :: os :: raw :: c_long ; pub type __suseconds64_t = :: std :: os :: raw :: c_long ; pub type __daddr_t = :: std :: os :: raw :: c_int ; pub type __key_t = :: std :: os :: raw :: c_int ; pub type __clockid_t = :: std :: os :: raw :: c_int ; pub type __timer_t = * mut :: std :: os :: raw :: c_void ; pub type __blksize_t = :: std :: os :: raw :: c_long ; pub type __blkcnt_t = :: std :: os :: raw :: c_long ; pub type __blkcnt64_t = :: std :: os :: raw :: c_long ; pub type __fsblkcnt_t = :: std :: os :: raw :: c_ulong ; pub type __fsblkcnt64_t = :: std :: os :: raw :: c_ulong ; pub type __fsfilcnt_t = :: std :: os :: raw :: c_ulong ; pub type __fsfilcnt64_t = :: std :: os :: raw :: c_ulong ; pub type __fsword_t = :: std :: os :: raw :: c_long ; pub type __ssize_t = :: std :: os :: raw :: c_long ; pub type __syscall_slong_t = :: std :: os :: raw :: c_long ; pub type __syscall_ulong_t = :: std :: os :: raw :: c_ulong ; pub type __loff_t = __off64_t ; pub type __caddr_t = * mut :: std :: os :: raw :: c_char ; pub type __intptr_t = :: std :: os :: raw :: c_long ; pub type __socklen_t = :: std :: os :: raw :: c_uint ; pub type __sig_atomic_t = :: std :: os :: raw :: c_int ; pub type clock_t = __clock_t ; pub type time_t = __time_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct tm { pub tm_sec : :: std :: os :: raw :: c_int , pub tm_min : :: std :: os :: raw :: c_int , pub tm_hour : :: std :: os :: raw :: c_int , pub tm_mday : :: std :: os :: raw :: c_int , pub tm_mon : :: std :: os :: raw :: c_int , pub tm_year : :: std :: os :: raw :: c_int , pub tm_wday : :: std :: os :: raw :: c_int , pub tm_yday : :: std :: os :: raw :: c_int , pub tm_isdst : :: std :: os :: raw :: c_int , pub tm_gmtoff : :: std :: os :: raw :: c_long , pub tm_zone : * const :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_tm () { assert_eq ! (:: std :: mem :: size_of :: < tm > () , 56usize , concat ! ("Size of: " , stringify ! (tm))) ; assert_eq ! (:: std :: mem :: align_of :: < tm > () , 8usize , concat ! ("Alignment of " , stringify ! (tm))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < tm > ())) . tm_sec as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (tm) , "::" , stringify ! (tm_sec))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < tm > ())) . tm_min as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (tm) , "::" , stringify ! (tm_min))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < tm > ())) . tm_hour as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (tm) , "::" , stringify ! (tm_hour))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < tm > ())) . tm_mday as * const _ as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (tm) , "::" , stringify ! (tm_mday))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < tm > ())) . tm_mon as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (tm) , "::" , stringify ! (tm_mon))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < tm > ())) . tm_year as * const _ as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (tm) , "::" , stringify ! (tm_year))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < tm > ())) . tm_wday as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (tm) , "::" , stringify ! (tm_wday))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < tm > ())) . tm_yday as * const _ as usize } , 28usize , concat ! ("Offset of field: " , stringify ! (tm) , "::" , stringify ! (tm_yday))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < tm > ())) . tm_isdst as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (tm) , "::" , stringify ! (tm_isdst))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < tm > ())) . tm_gmtoff as * const _ as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (tm) , "::" , stringify ! (tm_gmtoff))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < tm > ())) . tm_zone as * const _ as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (tm) , "::" , stringify ! (tm_zone))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct timespec { pub tv_sec : __time_t , pub tv_nsec : __syscall_slong_t , } # [test] fn bindgen_test_layout_timespec () { assert_eq ! (:: std :: mem :: size_of :: < timespec > () , 16usize , concat ! ("Size of: " , stringify ! (timespec))) ; assert_eq ! (:: std :: mem :: align_of :: < timespec > () , 8usize , concat ! ("Alignment of " , stringify ! (timespec))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < timespec > ())) . tv_sec as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (timespec) , "::" , stringify ! (tv_sec))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < timespec > ())) . tv_nsec as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (timespec) , "::" , stringify ! (tv_nsec))) ; } pub type clockid_t = __clockid_t ; pub type timer_t = __timer_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct itimerspec { pub it_interval : timespec , pub it_value : timespec , } # [test] fn bindgen_test_layout_itimerspec () { assert_eq ! (:: std :: mem :: size_of :: < itimerspec > () , 32usize , concat ! ("Size of: " , stringify ! (itimerspec))) ; assert_eq ! (:: std :: mem :: align_of :: < itimerspec > () , 8usize , concat ! ("Alignment of " , stringify ! (itimerspec))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < itimerspec > ())) . it_interval as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (itimerspec) , "::" , stringify ! (it_interval))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < itimerspec > ())) . it_value as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (itimerspec) , "::" , stringify ! (it_value))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct sigevent { _unused : [u8 ; 0] , } pub type pid_t = __pid_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct __locale_struct { pub __locales : [* mut __locale_data ; 13usize] , pub __ctype_b : * const :: std :: os :: raw :: c_ushort , pub __ctype_tolower : * const :: std :: os :: raw :: c_int , pub __ctype_toupper : * const :: std :: os :: raw :: c_int , pub __names : [* const :: std :: os :: raw :: c_char ; 13usize] , } # [test] fn bindgen_test_layout___locale_struct () { assert_eq ! (:: std :: mem :: size_of :: < __locale_struct > () , 232usize , concat ! ("Size of: " , stringify ! (__locale_struct))) ; assert_eq ! (:: std :: mem :: align_of :: < __locale_struct > () , 8usize , concat ! ("Alignment of " , stringify ! (__locale_struct))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __locale_struct > ())) . __locales as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (__locale_struct) , "::" , stringify ! (__locales))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __locale_struct > ())) . __ctype_b as * const _ as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (__locale_struct) , "::" , stringify ! (__ctype_b))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __locale_struct > ())) . __ctype_tolower as * const _ as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (__locale_struct) , "::" , stringify ! (__ctype_tolower))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __locale_struct > ())) . __ctype_toupper as * const _ as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (__locale_struct) , "::" , stringify ! (__ctype_toupper))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __locale_struct > ())) . __names as * const _ as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (__locale_struct) , "::" , stringify ! (__names))) ; } pub type __locale_t = * mut __locale_struct ; pub type locale_t = __locale_t ; extern "C" { pub fn clock () -> clock_t ; } extern "C" { pub fn time (__timer : * mut time_t) -> time_t ; } extern "C" { pub fn difftime (__time1 : time_t , __time0 : time_t) -> f64 ; } extern "C" { pub fn mktime (__tp : * mut tm) -> time_t ; } extern "C" { pub fn strftime (__s : * mut :: std :: os :: raw :: c_char , __maxsize : size_t , __format : * const :: std :: os :: raw :: c_char , __tp : * const tm) -> size_t ; } extern "C" { pub fn strftime_l (__s : * mut :: std :: os :: raw :: c_char , __maxsize : size_t , __format : * const :: std :: os :: raw :: c_char , __tp : * const tm , __loc : locale_t) -> size_t ; } extern "C" { pub fn gmtime (__timer : * const time_t) -> * mut tm ; } extern "C" { pub fn localtime (__timer : * const time_t) -> * mut tm ; } extern "C" { pub fn gmtime_r (__timer : * const time_t , __tp : * mut tm) -> * mut tm ; } extern "C" { pub fn localtime_r (__timer : * const time_t , __tp : * mut tm) -> * mut tm ; } extern "C" { pub fn asctime (__tp : * const tm) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn ctime (__timer : * const time_t) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn asctime_r (__tp : * const tm , __buf : * mut :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn ctime_r (__timer : * const time_t , __buf : * mut :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub static mut __tzname : [* mut :: std :: os :: raw :: c_char ; 2usize] ; } extern "C" { pub static mut __daylight : :: std :: os :: raw :: c_int ; } extern "C" { pub static mut __timezone : :: std :: os :: raw :: c_long ; } extern "C" { pub static mut tzname : [* mut :: std :: os :: raw :: c_char ; 2usize] ; } extern "C" { pub fn tzset () ; } extern "C" { pub static mut daylight : :: std :: os :: raw :: c_int ; } extern "C" { pub static mut timezone : :: std :: os :: raw :: c_long ; } extern "C" { pub fn timegm (__tp : * mut tm) -> time_t ; } extern "C" { pub fn timelocal (__tp : * mut tm) -> time_t ; } extern "C" { pub fn dysize (__year : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn nanosleep (__requested_time : * const timespec , __remaining : * mut timespec) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn clock_getres (__clock_id : clockid_t , __res : * mut timespec) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn clock_gettime (__clock_id : clockid_t , __tp : * mut timespec) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn clock_settime (__clock_id : clockid_t , __tp : * const timespec) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn clock_nanosleep (__clock_id : clockid_t , __flags : :: std :: os :: raw :: c_int , __req : * const timespec , __rem : * mut timespec) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn clock_getcpuclockid (__pid : pid_t , __clock_id : * mut clockid_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn timer_create (__clock_id : clockid_t , __evp : * mut sigevent , __timerid : * mut timer_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn timer_delete (__timerid : timer_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn timer_settime (__timerid : timer_t , __flags : :: std :: os :: raw :: c_int , __value : * const itimerspec , __ovalue : * mut itimerspec) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn timer_gettime (__timerid : timer_t , __value : * mut itimerspec) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn timer_getoverrun (__timerid : timer_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn timespec_get (__ts : * mut timespec , __base : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } pub type wchar_t = :: std :: os :: raw :: c_int ; pub type _Float32 = f32 ; pub type _Float64 = f64 ; pub type _Float32x = f64 ; pub type _Float64x = u128 ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct div_t { pub quot : :: std :: os :: raw :: c_int , pub rem : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_div_t () { assert_eq ! (:: std :: mem :: size_of :: < div_t > () , 8usize , concat ! ("Size of: " , stringify ! (div_t))) ; assert_eq ! (:: std :: mem :: align_of :: < div_t > () , 4usize , concat ! ("Alignment of " , stringify ! (div_t))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < div_t > ())) . quot as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (div_t) , "::" , stringify ! (quot))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < div_t > ())) . rem as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (div_t) , "::" , stringify ! (rem))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct ldiv_t { pub quot : :: std :: os :: raw :: c_long , pub rem : :: std :: os :: raw :: c_long , } # [test] fn bindgen_test_layout_ldiv_t () { assert_eq ! (:: std :: mem :: size_of :: < ldiv_t > () , 16usize , concat ! ("Size of: " , stringify ! (ldiv_t))) ; assert_eq ! (:: std :: mem :: align_of :: < ldiv_t > () , 8usize , concat ! ("Alignment of " , stringify ! (ldiv_t))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < ldiv_t > ())) . quot as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (ldiv_t) , "::" , stringify ! (quot))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < ldiv_t > ())) . rem as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (ldiv_t) , "::" , stringify ! (rem))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct lldiv_t { pub quot : :: std :: os :: raw :: c_longlong , pub rem : :: std :: os :: raw :: c_longlong , } # [test] fn bindgen_test_layout_lldiv_t () { assert_eq ! (:: std :: mem :: size_of :: < lldiv_t > () , 16usize , concat ! ("Size of: " , stringify ! (lldiv_t))) ; assert_eq ! (:: std :: mem :: align_of :: < lldiv_t > () , 8usize , concat ! ("Alignment of " , stringify ! (lldiv_t))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < lldiv_t > ())) . quot as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (lldiv_t) , "::" , stringify ! (quot))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < lldiv_t > ())) . rem as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (lldiv_t) , "::" , stringify ! (rem))) ; } extern "C" { pub fn __ctype_get_mb_cur_max () -> size_t ; } extern "C" { pub fn atof (__nptr : * const :: std :: os :: raw :: c_char) -> f64 ; } extern "C" { pub fn atoi (__nptr : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn atol (__nptr : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_long ; } extern "C" { pub fn atoll (__nptr : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_longlong ; } extern "C" { pub fn strtod (__nptr : * const :: std :: os :: raw :: c_char , __endptr : * mut * mut :: std :: os :: raw :: c_char) -> f64 ; } extern "C" { pub fn strtof (__nptr : * const :: std :: os :: raw :: c_char , __endptr : * mut * mut :: std :: os :: raw :: c_char) -> f32 ; } extern "C" { pub fn strtold (__nptr : * const :: std :: os :: raw :: c_char , __endptr : * mut * mut :: std :: os :: raw :: c_char) -> u128 ; } extern "C" { pub fn strtol (__nptr : * const :: std :: os :: raw :: c_char , __endptr : * mut * mut :: std :: os :: raw :: c_char , __base : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_long ; } extern "C" { pub fn strtoul (__nptr : * const :: std :: os :: raw :: c_char , __endptr : * mut * mut :: std :: os :: raw :: c_char , __base : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_ulong ; } extern "C" { pub fn strtoq (__nptr : * const :: std :: os :: raw :: c_char , __endptr : * mut * mut :: std :: os :: raw :: c_char , __base : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_longlong ; } extern "C" { pub fn strtouq (__nptr : * const :: std :: os :: raw :: c_char , __endptr : * mut * mut :: std :: os :: raw :: c_char , __base : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_ulonglong ; } extern "C" { pub fn strtoll (__nptr : * const :: std :: os :: raw :: c_char , __endptr : * mut * mut :: std :: os :: raw :: c_char , __base : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_longlong ; } extern "C" { pub fn strtoull (__nptr : * const :: std :: os :: raw :: c_char , __endptr : * mut * mut :: std :: os :: raw :: c_char , __base : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_ulonglong ; } extern "C" { pub fn l64a (__n : :: std :: os :: raw :: c_long) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn a64l (__s : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_long ; } pub type u_char = __u_char ; pub type u_short = __u_short ; pub type u_int = __u_int ; pub type u_long = __u_long ; pub type quad_t = __quad_t ; pub type u_quad_t = __u_quad_t ; pub type fsid_t = __fsid_t ; pub type loff_t = __loff_t ; pub type ino_t = __ino_t ; pub type dev_t = __dev_t ; pub type gid_t = __gid_t ; pub type mode_t = __mode_t ; pub type nlink_t = __nlink_t ; pub type uid_t = __uid_t ; pub type off_t = __off_t ; pub type id_t = __id_t ; pub type ssize_t = __ssize_t ; pub type daddr_t = __daddr_t ; pub type caddr_t = __caddr_t ; pub type key_t = __key_t ; pub type ulong = :: std :: os :: raw :: c_ulong ; pub type ushort = :: std :: os :: raw :: c_ushort ; pub type uint = :: std :: os :: raw :: c_uint ; pub type u_int8_t = __uint8_t ; pub type u_int16_t = __uint16_t ; pub type u_int32_t = __uint32_t ; pub type u_int64_t = __uint64_t ; pub type register_t = :: std :: os :: raw :: c_long ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct __sigset_t { pub __val : [:: std :: os :: raw :: c_ulong ; 16usize] , } # [test] fn bindgen_test_layout___sigset_t () { assert_eq ! (:: std :: mem :: size_of :: < __sigset_t > () , 128usize , concat ! ("Size of: " , stringify ! (__sigset_t))) ; assert_eq ! (:: std :: mem :: align_of :: < __sigset_t > () , 8usize , concat ! ("Alignment of " , stringify ! (__sigset_t))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __sigset_t > ())) . __val as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (__sigset_t) , "::" , stringify ! (__val))) ; } pub type sigset_t = __sigset_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct timeval { pub tv_sec : __time_t , pub tv_usec : __suseconds_t , } # [test] fn bindgen_test_layout_timeval () { assert_eq ! (:: std :: mem :: size_of :: < timeval > () , 16usize , concat ! ("Size of: " , stringify ! (timeval))) ; assert_eq ! (:: std :: mem :: align_of :: < timeval > () , 8usize , concat ! ("Alignment of " , stringify ! (timeval))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < timeval > ())) . tv_sec as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (timeval) , "::" , stringify ! (tv_sec))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < timeval > ())) . tv_usec as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (timeval) , "::" , stringify ! (tv_usec))) ; } pub type suseconds_t = __suseconds_t ; pub type __fd_mask = :: std :: os :: raw :: c_long ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct fd_set { pub __fds_bits : [__fd_mask ; 16usize] , } # [test] fn bindgen_test_layout_fd_set () { assert_eq ! (:: std :: mem :: size_of :: < fd_set > () , 128usize , concat ! ("Size of: " , stringify ! (fd_set))) ; assert_eq ! (:: std :: mem :: align_of :: < fd_set > () , 8usize , concat ! ("Alignment of " , stringify ! (fd_set))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < fd_set > ())) . __fds_bits as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (fd_set) , "::" , stringify ! (__fds_bits))) ; } pub type fd_mask = __fd_mask ; extern "C" { pub fn select (__nfds : :: std :: os :: raw :: c_int , __readfds : * mut fd_set , __writefds : * mut fd_set , __exceptfds : * mut fd_set , __timeout : * mut timeval) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn pselect (__nfds : :: std :: os :: raw :: c_int , __readfds : * mut fd_set , __writefds : * mut fd_set , __exceptfds : * mut fd_set , __timeout : * const timespec , __sigmask : * const __sigset_t) -> :: std :: os :: raw :: c_int ; } pub type blksize_t = __blksize_t ; pub type blkcnt_t = __blkcnt_t ; pub type fsblkcnt_t = __fsblkcnt_t ; pub type fsfilcnt_t = __fsfilcnt_t ; # [repr (C)] # [derive (Copy , Clone)] pub union __atomic_wide_counter { pub __value64 : :: std :: os :: raw :: c_ulonglong , pub __value32 : __atomic_wide_counter__bindgen_ty_1 , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct __atomic_wide_counter__bindgen_ty_1 { pub __low : :: std :: os :: raw :: c_uint , pub __high : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout___atomic_wide_counter__bindgen_ty_1 () { assert_eq ! (:: std :: mem :: size_of :: < __atomic_wide_counter__bindgen_ty_1 > () , 8usize , concat ! ("Size of: " , stringify ! (__atomic_wide_counter__bindgen_ty_1))) ; assert_eq ! (:: std :: mem :: align_of :: < __atomic_wide_counter__bindgen_ty_1 > () , 4usize , concat ! ("Alignment of " , stringify ! (__atomic_wide_counter__bindgen_ty_1))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __atomic_wide_counter__bindgen_ty_1 > ())) . __low as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (__atomic_wide_counter__bindgen_ty_1) , "::" , stringify ! (__low))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __atomic_wide_counter__bindgen_ty_1 > ())) . __high as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (__atomic_wide_counter__bindgen_ty_1) , "::" , stringify ! (__high))) ; } # [test] fn bindgen_test_layout___atomic_wide_counter () { assert_eq ! (:: std :: mem :: size_of :: < __atomic_wide_counter > () , 8usize , concat ! ("Size of: " , stringify ! (__atomic_wide_counter))) ; assert_eq ! (:: std :: mem :: align_of :: < __atomic_wide_counter > () , 8usize , concat ! ("Alignment of " , stringify ! (__atomic_wide_counter))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __atomic_wide_counter > ())) . __value64 as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (__atomic_wide_counter) , "::" , stringify ! (__value64))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __atomic_wide_counter > ())) . __value32 as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (__atomic_wide_counter) , "::" , stringify ! (__value32))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct __pthread_internal_list { pub __prev : * mut __pthread_internal_list , pub __next : * mut __pthread_internal_list , } # [test] fn bindgen_test_layout___pthread_internal_list () { assert_eq ! (:: std :: mem :: size_of :: < __pthread_internal_list > () , 16usize , concat ! ("Size of: " , stringify ! (__pthread_internal_list))) ; assert_eq ! (:: std :: mem :: align_of :: < __pthread_internal_list > () , 8usize , concat ! ("Alignment of " , stringify ! (__pthread_internal_list))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_internal_list > ())) . __prev as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (__pthread_internal_list) , "::" , stringify ! (__prev))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_internal_list > ())) . __next as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (__pthread_internal_list) , "::" , stringify ! (__next))) ; } pub type __pthread_list_t = __pthread_internal_list ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct __pthread_internal_slist { pub __next : * mut __pthread_internal_slist , } # [test] fn bindgen_test_layout___pthread_internal_slist () { assert_eq ! (:: std :: mem :: size_of :: < __pthread_internal_slist > () , 8usize , concat ! ("Size of: " , stringify ! (__pthread_internal_slist))) ; assert_eq ! (:: std :: mem :: align_of :: < __pthread_internal_slist > () , 8usize , concat ! ("Alignment of " , stringify ! (__pthread_internal_slist))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_internal_slist > ())) . __next as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (__pthread_internal_slist) , "::" , stringify ! (__next))) ; } pub type __pthread_slist_t = __pthread_internal_slist ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct __pthread_mutex_s { pub __lock : :: std :: os :: raw :: c_int , pub __count : :: std :: os :: raw :: c_uint , pub __owner : :: std :: os :: raw :: c_int , pub __nusers : :: std :: os :: raw :: c_uint , pub __kind : :: std :: os :: raw :: c_int , pub __spins : :: std :: os :: raw :: c_short , pub __elision : :: std :: os :: raw :: c_short , pub __list : __pthread_list_t , } # [test] fn bindgen_test_layout___pthread_mutex_s () { assert_eq ! (:: std :: mem :: size_of :: < __pthread_mutex_s > () , 40usize , concat ! ("Size of: " , stringify ! (__pthread_mutex_s))) ; assert_eq ! (:: std :: mem :: align_of :: < __pthread_mutex_s > () , 8usize , concat ! ("Alignment of " , stringify ! (__pthread_mutex_s))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_mutex_s > ())) . __lock as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (__pthread_mutex_s) , "::" , stringify ! (__lock))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_mutex_s > ())) . __count as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (__pthread_mutex_s) , "::" , stringify ! (__count))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_mutex_s > ())) . __owner as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (__pthread_mutex_s) , "::" , stringify ! (__owner))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_mutex_s > ())) . __nusers as * const _ as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (__pthread_mutex_s) , "::" , stringify ! (__nusers))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_mutex_s > ())) . __kind as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (__pthread_mutex_s) , "::" , stringify ! (__kind))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_mutex_s > ())) . __spins as * const _ as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (__pthread_mutex_s) , "::" , stringify ! (__spins))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_mutex_s > ())) . __elision as * const _ as usize } , 22usize , concat ! ("Offset of field: " , stringify ! (__pthread_mutex_s) , "::" , stringify ! (__elision))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_mutex_s > ())) . __list as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (__pthread_mutex_s) , "::" , stringify ! (__list))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct __pthread_rwlock_arch_t { pub __readers : :: std :: os :: raw :: c_uint , pub __writers : :: std :: os :: raw :: c_uint , pub __wrphase_futex : :: std :: os :: raw :: c_uint , pub __writers_futex : :: std :: os :: raw :: c_uint , pub __pad3 : :: std :: os :: raw :: c_uint , pub __pad4 : :: std :: os :: raw :: c_uint , pub __cur_writer : :: std :: os :: raw :: c_int , pub __shared : :: std :: os :: raw :: c_int , pub __rwelision : :: std :: os :: raw :: c_schar , pub __pad1 : [:: std :: os :: raw :: c_uchar ; 7usize] , pub __pad2 : :: std :: os :: raw :: c_ulong , pub __flags : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout___pthread_rwlock_arch_t () { assert_eq ! (:: std :: mem :: size_of :: < __pthread_rwlock_arch_t > () , 56usize , concat ! ("Size of: " , stringify ! (__pthread_rwlock_arch_t))) ; assert_eq ! (:: std :: mem :: align_of :: < __pthread_rwlock_arch_t > () , 8usize , concat ! ("Alignment of " , stringify ! (__pthread_rwlock_arch_t))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_rwlock_arch_t > ())) . __readers as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (__pthread_rwlock_arch_t) , "::" , stringify ! (__readers))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_rwlock_arch_t > ())) . __writers as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (__pthread_rwlock_arch_t) , "::" , stringify ! (__writers))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_rwlock_arch_t > ())) . __wrphase_futex as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (__pthread_rwlock_arch_t) , "::" , stringify ! (__wrphase_futex))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_rwlock_arch_t > ())) . __writers_futex as * const _ as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (__pthread_rwlock_arch_t) , "::" , stringify ! (__writers_futex))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_rwlock_arch_t > ())) . __pad3 as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (__pthread_rwlock_arch_t) , "::" , stringify ! (__pad3))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_rwlock_arch_t > ())) . __pad4 as * const _ as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (__pthread_rwlock_arch_t) , "::" , stringify ! (__pad4))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_rwlock_arch_t > ())) . __cur_writer as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (__pthread_rwlock_arch_t) , "::" , stringify ! (__cur_writer))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_rwlock_arch_t > ())) . __shared as * const _ as usize } , 28usize , concat ! ("Offset of field: " , stringify ! (__pthread_rwlock_arch_t) , "::" , stringify ! (__shared))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_rwlock_arch_t > ())) . __rwelision as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (__pthread_rwlock_arch_t) , "::" , stringify ! (__rwelision))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_rwlock_arch_t > ())) . __pad1 as * const _ as usize } , 33usize , concat ! ("Offset of field: " , stringify ! (__pthread_rwlock_arch_t) , "::" , stringify ! (__pad1))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_rwlock_arch_t > ())) . __pad2 as * const _ as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (__pthread_rwlock_arch_t) , "::" , stringify ! (__pad2))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_rwlock_arch_t > ())) . __flags as * const _ as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (__pthread_rwlock_arch_t) , "::" , stringify ! (__flags))) ; } # [repr (C)] # [derive (Copy , Clone)] pub struct __pthread_cond_s { pub __wseq : __atomic_wide_counter , pub __g1_start : __atomic_wide_counter , pub __g_refs : [:: std :: os :: raw :: c_uint ; 2usize] , pub __g_size : [:: std :: os :: raw :: c_uint ; 2usize] , pub __g1_orig_size : :: std :: os :: raw :: c_uint , pub __wrefs : :: std :: os :: raw :: c_uint , pub __g_signals : [:: std :: os :: raw :: c_uint ; 2usize] , } # [test] fn bindgen_test_layout___pthread_cond_s () { assert_eq ! (:: std :: mem :: size_of :: < __pthread_cond_s > () , 48usize , concat ! ("Size of: " , stringify ! (__pthread_cond_s))) ; assert_eq ! (:: std :: mem :: align_of :: < __pthread_cond_s > () , 8usize , concat ! ("Alignment of " , stringify ! (__pthread_cond_s))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_cond_s > ())) . __wseq as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (__pthread_cond_s) , "::" , stringify ! (__wseq))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_cond_s > ())) . __g1_start as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (__pthread_cond_s) , "::" , stringify ! (__g1_start))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_cond_s > ())) . __g_refs as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (__pthread_cond_s) , "::" , stringify ! (__g_refs))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_cond_s > ())) . __g_size as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (__pthread_cond_s) , "::" , stringify ! (__g_size))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_cond_s > ())) . __g1_orig_size as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (__pthread_cond_s) , "::" , stringify ! (__g1_orig_size))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_cond_s > ())) . __wrefs as * const _ as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (__pthread_cond_s) , "::" , stringify ! (__wrefs))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __pthread_cond_s > ())) . __g_signals as * const _ as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (__pthread_cond_s) , "::" , stringify ! (__g_signals))) ; } pub type __tss_t = :: std :: os :: raw :: c_uint ; pub type __thrd_t = :: std :: os :: raw :: c_ulong ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct __once_flag { pub __data : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout___once_flag () { assert_eq ! (:: std :: mem :: size_of :: < __once_flag > () , 4usize , concat ! ("Size of: " , stringify ! (__once_flag))) ; assert_eq ! (:: std :: mem :: align_of :: < __once_flag > () , 4usize , concat ! ("Alignment of " , stringify ! (__once_flag))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < __once_flag > ())) . __data as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (__once_flag) , "::" , stringify ! (__data))) ; } pub type pthread_t = :: std :: os :: raw :: c_ulong ; # [repr (C)] # [derive (Copy , Clone)] pub union pthread_mutexattr_t { pub __size : [:: std :: os :: raw :: c_char ; 4usize] , pub __align : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_pthread_mutexattr_t () { assert_eq ! (:: std :: mem :: size_of :: < pthread_mutexattr_t > () , 4usize , concat ! ("Size of: " , stringify ! (pthread_mutexattr_t))) ; assert_eq ! (:: std :: mem :: align_of :: < pthread_mutexattr_t > () , 4usize , concat ! ("Alignment of " , stringify ! (pthread_mutexattr_t))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < pthread_mutexattr_t > ())) . __size as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (pthread_mutexattr_t) , "::" , stringify ! (__size))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < pthread_mutexattr_t > ())) . __align as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (pthread_mutexattr_t) , "::" , stringify ! (__align))) ; } # [repr (C)] # [derive (Copy , Clone)] pub union pthread_condattr_t { pub __size : [:: std :: os :: raw :: c_char ; 4usize] , pub __align : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_pthread_condattr_t () { assert_eq ! (:: std :: mem :: size_of :: < pthread_condattr_t > () , 4usize , concat ! ("Size of: " , stringify ! (pthread_condattr_t))) ; assert_eq ! (:: std :: mem :: align_of :: < pthread_condattr_t > () , 4usize , concat ! ("Alignment of " , stringify ! (pthread_condattr_t))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < pthread_condattr_t > ())) . __size as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (pthread_condattr_t) , "::" , stringify ! (__size))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < pthread_condattr_t > ())) . __align as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (pthread_condattr_t) , "::" , stringify ! (__align))) ; } pub type pthread_key_t = :: std :: os :: raw :: c_uint ; pub type pthread_once_t = :: std :: os :: raw :: c_int ; # [repr (C)] # [derive (Copy , Clone)] pub union pthread_attr_t { pub __size : [:: std :: os :: raw :: c_char ; 56usize] , pub __align : :: std :: os :: raw :: c_long , } # [test] fn bindgen_test_layout_pthread_attr_t () { assert_eq ! (:: std :: mem :: size_of :: < pthread_attr_t > () , 56usize , concat ! ("Size of: " , stringify ! (pthread_attr_t))) ; assert_eq ! (:: std :: mem :: align_of :: < pthread_attr_t > () , 8usize , concat ! ("Alignment of " , stringify ! (pthread_attr_t))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < pthread_attr_t > ())) . __size as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (pthread_attr_t) , "::" , stringify ! (__size))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < pthread_attr_t > ())) . __align as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (pthread_attr_t) , "::" , stringify ! (__align))) ; } # [repr (C)] # [derive (Copy , Clone)] pub union pthread_mutex_t { pub __data : __pthread_mutex_s , pub __size : [:: std :: os :: raw :: c_char ; 40usize] , pub __align : :: std :: os :: raw :: c_long , } # [test] fn bindgen_test_layout_pthread_mutex_t () { assert_eq ! (:: std :: mem :: size_of :: < pthread_mutex_t > () , 40usize , concat ! ("Size of: " , stringify ! (pthread_mutex_t))) ; assert_eq ! (:: std :: mem :: align_of :: < pthread_mutex_t > () , 8usize , concat ! ("Alignment of " , stringify ! (pthread_mutex_t))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < pthread_mutex_t > ())) . __data as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (pthread_mutex_t) , "::" , stringify ! (__data))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < pthread_mutex_t > ())) . __size as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (pthread_mutex_t) , "::" , stringify ! (__size))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < pthread_mutex_t > ())) . __align as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (pthread_mutex_t) , "::" , stringify ! (__align))) ; } # [repr (C)] # [derive (Copy , Clone)] pub union pthread_cond_t { pub __data : __pthread_cond_s , pub __size : [:: std :: os :: raw :: c_char ; 48usize] , pub __align : :: std :: os :: raw :: c_longlong , } # [test] fn bindgen_test_layout_pthread_cond_t () { assert_eq ! (:: std :: mem :: size_of :: < pthread_cond_t > () , 48usize , concat ! ("Size of: " , stringify ! (pthread_cond_t))) ; assert_eq ! (:: std :: mem :: align_of :: < pthread_cond_t > () , 8usize , concat ! ("Alignment of " , stringify ! (pthread_cond_t))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < pthread_cond_t > ())) . __data as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (pthread_cond_t) , "::" , stringify ! (__data))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < pthread_cond_t > ())) . __size as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (pthread_cond_t) , "::" , stringify ! (__size))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < pthread_cond_t > ())) . __align as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (pthread_cond_t) , "::" , stringify ! (__align))) ; } # [repr (C)] # [derive (Copy , Clone)] pub union pthread_rwlock_t { pub __data : __pthread_rwlock_arch_t , pub __size : [:: std :: os :: raw :: c_char ; 56usize] , pub __align : :: std :: os :: raw :: c_long , } # [test] fn bindgen_test_layout_pthread_rwlock_t () { assert_eq ! (:: std :: mem :: size_of :: < pthread_rwlock_t > () , 56usize , concat ! ("Size of: " , stringify ! (pthread_rwlock_t))) ; assert_eq ! (:: std :: mem :: align_of :: < pthread_rwlock_t > () , 8usize , concat ! ("Alignment of " , stringify ! (pthread_rwlock_t))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < pthread_rwlock_t > ())) . __data as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (pthread_rwlock_t) , "::" , stringify ! (__data))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < pthread_rwlock_t > ())) . __size as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (pthread_rwlock_t) , "::" , stringify ! (__size))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < pthread_rwlock_t > ())) . __align as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (pthread_rwlock_t) , "::" , stringify ! (__align))) ; } # [repr (C)] # [derive (Copy , Clone)] pub union pthread_rwlockattr_t { pub __size : [:: std :: os :: raw :: c_char ; 8usize] , pub __align : :: std :: os :: raw :: c_long , } # [test] fn bindgen_test_layout_pthread_rwlockattr_t () { assert_eq ! (:: std :: mem :: size_of :: < pthread_rwlockattr_t > () , 8usize , concat ! ("Size of: " , stringify ! (pthread_rwlockattr_t))) ; assert_eq ! (:: std :: mem :: align_of :: < pthread_rwlockattr_t > () , 8usize , concat ! ("Alignment of " , stringify ! (pthread_rwlockattr_t))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < pthread_rwlockattr_t > ())) . __size as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (pthread_rwlockattr_t) , "::" , stringify ! (__size))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < pthread_rwlockattr_t > ())) . __align as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (pthread_rwlockattr_t) , "::" , stringify ! (__align))) ; } pub type pthread_spinlock_t = :: std :: os :: raw :: c_int ; # [repr (C)] # [derive (Copy , Clone)] pub union pthread_barrier_t { pub __size : [:: std :: os :: raw :: c_char ; 32usize] , pub __align : :: std :: os :: raw :: c_long , } # [test] fn bindgen_test_layout_pthread_barrier_t () { assert_eq ! (:: std :: mem :: size_of :: < pthread_barrier_t > () , 32usize , concat ! ("Size of: " , stringify ! (pthread_barrier_t))) ; assert_eq ! (:: std :: mem :: align_of :: < pthread_barrier_t > () , 8usize , concat ! ("Alignment of " , stringify ! (pthread_barrier_t))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < pthread_barrier_t > ())) . __size as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (pthread_barrier_t) , "::" , stringify ! (__size))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < pthread_barrier_t > ())) . __align as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (pthread_barrier_t) , "::" , stringify ! (__align))) ; } # [repr (C)] # [derive (Copy , Clone)] pub union pthread_barrierattr_t { pub __size : [:: std :: os :: raw :: c_char ; 4usize] , pub __align : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_pthread_barrierattr_t () { assert_eq ! (:: std :: mem :: size_of :: < pthread_barrierattr_t > () , 4usize , concat ! ("Size of: " , stringify ! (pthread_barrierattr_t))) ; assert_eq ! (:: std :: mem :: align_of :: < pthread_barrierattr_t > () , 4usize , concat ! ("Alignment of " , stringify ! (pthread_barrierattr_t))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < pthread_barrierattr_t > ())) . __size as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (pthread_barrierattr_t) , "::" , stringify ! (__size))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < pthread_barrierattr_t > ())) . __align as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (pthread_barrierattr_t) , "::" , stringify ! (__align))) ; } extern "C" { pub fn random () -> :: std :: os :: raw :: c_long ; } extern "C" { pub fn srandom (__seed : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn initstate (__seed : :: std :: os :: raw :: c_uint , __statebuf : * mut :: std :: os :: raw :: c_char , __statelen : size_t) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn setstate (__statebuf : * mut :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_char ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct random_data { pub fptr : * mut i32 , pub rptr : * mut i32 , pub state : * mut i32 , pub rand_type : :: std :: os :: raw :: c_int , pub rand_deg : :: std :: os :: raw :: c_int , pub rand_sep : :: std :: os :: raw :: c_int , pub end_ptr : * mut i32 , } # [test] fn bindgen_test_layout_random_data () { assert_eq ! (:: std :: mem :: size_of :: < random_data > () , 48usize , concat ! ("Size of: " , stringify ! (random_data))) ; assert_eq ! (:: std :: mem :: align_of :: < random_data > () , 8usize , concat ! ("Alignment of " , stringify ! (random_data))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < random_data > ())) . fptr as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (random_data) , "::" , stringify ! (fptr))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < random_data > ())) . rptr as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (random_data) , "::" , stringify ! (rptr))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < random_data > ())) . state as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (random_data) , "::" , stringify ! (state))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < random_data > ())) . rand_type as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (random_data) , "::" , stringify ! (rand_type))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < random_data > ())) . rand_deg as * const _ as usize } , 28usize , concat ! ("Offset of field: " , stringify ! (random_data) , "::" , stringify ! (rand_deg))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < random_data > ())) . rand_sep as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (random_data) , "::" , stringify ! (rand_sep))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < random_data > ())) . end_ptr as * const _ as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (random_data) , "::" , stringify ! (end_ptr))) ; } extern "C" { pub fn random_r (__buf : * mut random_data , __result : * mut i32) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn srandom_r (__seed : :: std :: os :: raw :: c_uint , __buf : * mut random_data) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn initstate_r (__seed : :: std :: os :: raw :: c_uint , __statebuf : * mut :: std :: os :: raw :: c_char , __statelen : size_t , __buf : * mut random_data) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn setstate_r (__statebuf : * mut :: std :: os :: raw :: c_char , __buf : * mut random_data) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn rand () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn srand (__seed : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn rand_r (__seed : * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn drand48 () -> f64 ; } extern "C" { pub fn erand48 (__xsubi : * mut :: std :: os :: raw :: c_ushort) -> f64 ; } extern "C" { pub fn lrand48 () -> :: std :: os :: raw :: c_long ; } extern "C" { pub fn nrand48 (__xsubi : * mut :: std :: os :: raw :: c_ushort) -> :: std :: os :: raw :: c_long ; } extern "C" { pub fn mrand48 () -> :: std :: os :: raw :: c_long ; } extern "C" { pub fn jrand48 (__xsubi : * mut :: std :: os :: raw :: c_ushort) -> :: std :: os :: raw :: c_long ; } extern "C" { pub fn srand48 (__seedval : :: std :: os :: raw :: c_long) ; } extern "C" { pub fn seed48 (__seed16v : * mut :: std :: os :: raw :: c_ushort) -> * mut :: std :: os :: raw :: c_ushort ; } extern "C" { pub fn lcong48 (__param : * mut :: std :: os :: raw :: c_ushort) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct drand48_data { pub __x : [:: std :: os :: raw :: c_ushort ; 3usize] , pub __old_x : [:: std :: os :: raw :: c_ushort ; 3usize] , pub __c : :: std :: os :: raw :: c_ushort , pub __init : :: std :: os :: raw :: c_ushort , pub __a : :: std :: os :: raw :: c_ulonglong , } # [test] fn bindgen_test_layout_drand48_data () { assert_eq ! (:: std :: mem :: size_of :: < drand48_data > () , 24usize , concat ! ("Size of: " , stringify ! (drand48_data))) ; assert_eq ! (:: std :: mem :: align_of :: < drand48_data > () , 8usize , concat ! ("Alignment of " , stringify ! (drand48_data))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < drand48_data > ())) . __x as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__x))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < drand48_data > ())) . __old_x as * const _ as usize } , 6usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__old_x))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < drand48_data > ())) . __c as * const _ as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__c))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < drand48_data > ())) . __init as * const _ as usize } , 14usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__init))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < drand48_data > ())) . __a as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__a))) ; } extern "C" { pub fn drand48_r (__buffer : * mut drand48_data , __result : * mut f64) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn erand48_r (__xsubi : * mut :: std :: os :: raw :: c_ushort , __buffer : * mut drand48_data , __result : * mut f64) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn lrand48_r (__buffer : * mut drand48_data , __result : * mut :: std :: os :: raw :: c_long) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn nrand48_r (__xsubi : * mut :: std :: os :: raw :: c_ushort , __buffer : * mut drand48_data , __result : * mut :: std :: os :: raw :: c_long) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn mrand48_r (__buffer : * mut drand48_data , __result : * mut :: std :: os :: raw :: c_long) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn jrand48_r (__xsubi : * mut :: std :: os :: raw :: c_ushort , __buffer : * mut drand48_data , __result : * mut :: std :: os :: raw :: c_long) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn srand48_r (__seedval : :: std :: os :: raw :: c_long , __buffer : * mut drand48_data) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn seed48_r (__seed16v : * mut :: std :: os :: raw :: c_ushort , __buffer : * mut drand48_data) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn lcong48_r (__param : * mut :: std :: os :: raw :: c_ushort , __buffer : * mut drand48_data) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn malloc (__size : :: std :: os :: raw :: c_ulong) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn calloc (__nmemb : :: std :: os :: raw :: c_ulong , __size : :: std :: os :: raw :: c_ulong) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn realloc (__ptr : * mut :: std :: os :: raw :: c_void , __size : :: std :: os :: raw :: c_ulong) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn free (__ptr : * mut :: std :: os :: raw :: c_void) ; } extern "C" { pub fn reallocarray (__ptr : * mut :: std :: os :: raw :: c_void , __nmemb : size_t , __size : size_t) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn alloca (__size : :: std :: os :: raw :: c_ulong) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn valloc (__size : size_t) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn posix_memalign (__memptr : * mut * mut :: std :: os :: raw :: c_void , __alignment : size_t , __size : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aligned_alloc (__alignment : :: std :: os :: raw :: c_ulong , __size : :: std :: os :: raw :: c_ulong) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn abort () ; } extern "C" { pub fn atexit (__func : :: std :: option :: Option < unsafe extern "C" fn () >) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn at_quick_exit (__func : :: std :: option :: Option < unsafe extern "C" fn () >) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn on_exit (__func : :: std :: option :: Option < unsafe extern "C" fn (__status : :: std :: os :: raw :: c_int , __arg : * mut :: std :: os :: raw :: c_void) > , __arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn exit (__status : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn quick_exit (__status : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn _Exit (__status : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn getenv (__name : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn putenv (__string : * mut :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn setenv (__name : * const :: std :: os :: raw :: c_char , __value : * const :: std :: os :: raw :: c_char , __replace : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn unsetenv (__name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn clearenv () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn mktemp (__template : * mut :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn mkstemp (__template : * mut :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn mkstemps (__template : * mut :: std :: os :: raw :: c_char , __suffixlen : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn mkdtemp (__template : * mut :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn system (__command : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn realpath (__name : * const :: std :: os :: raw :: c_char , __resolved : * mut :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_char ; } pub type __compar_fn_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * const :: std :: os :: raw :: c_void , arg2 : * const :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; extern "C" { pub fn bsearch (__key : * const :: std :: os :: raw :: c_void , __base : * const :: std :: os :: raw :: c_void , __nmemb : size_t , __size : size_t , __compar : __compar_fn_t) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn qsort (__base : * mut :: std :: os :: raw :: c_void , __nmemb : size_t , __size : size_t , __compar : __compar_fn_t) ; } extern "C" { pub fn abs (__x : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn labs (__x : :: std :: os :: raw :: c_long) -> :: std :: os :: raw :: c_long ; } extern "C" { pub fn llabs (__x : :: std :: os :: raw :: c_longlong) -> :: std :: os :: raw :: c_longlong ; } extern "C" { pub fn div (__numer : :: std :: os :: raw :: c_int , __denom : :: std :: os :: raw :: c_int) -> div_t ; } extern "C" { pub fn ldiv (__numer : :: std :: os :: raw :: c_long , __denom : :: std :: os :: raw :: c_long) -> ldiv_t ; } extern "C" { pub fn lldiv (__numer : :: std :: os :: raw :: c_longlong , __denom : :: std :: os :: raw :: c_longlong) -> lldiv_t ; } extern "C" { pub fn ecvt (__value : f64 , __ndigit : :: std :: os :: raw :: c_int , __decpt : * mut :: std :: os :: raw :: c_int , __sign : * mut :: std :: os :: raw :: c_int) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn fcvt (__value : f64 , __ndigit : :: std :: os :: raw :: c_int , __decpt : * mut :: std :: os :: raw :: c_int , __sign : * mut :: std :: os :: raw :: c_int) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn gcvt (__value : f64 , __ndigit : :: std :: os :: raw :: c_int , __buf : * mut :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn qecvt (__value : u128 , __ndigit : :: std :: os :: raw :: c_int , __decpt : * mut :: std :: os :: raw :: c_int , __sign : * mut :: std :: os :: raw :: c_int) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn qfcvt (__value : u128 , __ndigit : :: std :: os :: raw :: c_int , __decpt : * mut :: std :: os :: raw :: c_int , __sign : * mut :: std :: os :: raw :: c_int) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn qgcvt (__value : u128 , __ndigit : :: std :: os :: raw :: c_int , __buf : * mut :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn ecvt_r (__value : f64 , __ndigit : :: std :: os :: raw :: c_int , __decpt : * mut :: std :: os :: raw :: c_int , __sign : * mut :: std :: os :: raw :: c_int , __buf : * mut :: std :: os :: raw :: c_char , __len : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn fcvt_r (__value : f64 , __ndigit : :: std :: os :: raw :: c_int , __decpt : * mut :: std :: os :: raw :: c_int , __sign : * mut :: std :: os :: raw :: c_int , __buf : * mut :: std :: os :: raw :: c_char , __len : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn qecvt_r (__value : u128 , __ndigit : :: std :: os :: raw :: c_int , __decpt : * mut :: std :: os :: raw :: c_int , __sign : * mut :: std :: os :: raw :: c_int , __buf : * mut :: std :: os :: raw :: c_char , __len : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn qfcvt_r (__value : u128 , __ndigit : :: std :: os :: raw :: c_int , __decpt : * mut :: std :: os :: raw :: c_int , __sign : * mut :: std :: os :: raw :: c_int , __buf : * mut :: std :: os :: raw :: c_char , __len : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn mblen (__s : * const :: std :: os :: raw :: c_char , __n : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn mbtowc (__pwc : * mut wchar_t , __s : * const :: std :: os :: raw :: c_char , __n : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn wctomb (__s : * mut :: std :: os :: raw :: c_char , __wchar : wchar_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn mbstowcs (__pwcs : * mut wchar_t , __s : * const :: std :: os :: raw :: c_char , __n : size_t) -> size_t ; } extern "C" { pub fn wcstombs (__s : * mut :: std :: os :: raw :: c_char , __pwcs : * const wchar_t , __n : size_t) -> size_t ; } extern "C" { pub fn rpmatch (__response : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn getsubopt (__optionp : * mut * mut :: std :: os :: raw :: c_char , __tokens : * const * mut :: std :: os :: raw :: c_char , __valuep : * mut * mut :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn getloadavg (__loadavg : * mut f64 , __nelem : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } pub type int_least8_t = __int_least8_t ; pub type int_least16_t = __int_least16_t ; pub type int_least32_t = __int_least32_t ; pub type int_least64_t = __int_least64_t ; pub type uint_least8_t = __uint_least8_t ; pub type uint_least16_t = __uint_least16_t ; pub type uint_least32_t = __uint_least32_t ; pub type uint_least64_t = __uint_least64_t ; pub type int_fast8_t = :: std :: os :: raw :: c_schar ; pub type int_fast16_t = :: std :: os :: raw :: c_long ; pub type int_fast32_t = :: std :: os :: raw :: c_long ; pub type int_fast64_t = :: std :: os :: raw :: c_long ; pub type uint_fast8_t = :: std :: os :: raw :: c_uchar ; pub type uint_fast16_t = :: std :: os :: raw :: c_ulong ; pub type uint_fast32_t = :: std :: os :: raw :: c_ulong ; pub type uint_fast64_t = :: std :: os :: raw :: c_ulong ; pub type intmax_t = __intmax_t ; pub type uintmax_t = __uintmax_t ; pub type __gwchar_t = :: std :: os :: raw :: c_int ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct imaxdiv_t { pub quot : :: std :: os :: raw :: c_long , pub rem : :: std :: os :: raw :: c_long , } # [test] fn bindgen_test_layout_imaxdiv_t () { assert_eq ! (:: std :: mem :: size_of :: < imaxdiv_t > () , 16usize , concat ! ("Size of: " , stringify ! (imaxdiv_t))) ; assert_eq ! (:: std :: mem :: align_of :: < imaxdiv_t > () , 8usize , concat ! ("Alignment of " , stringify ! (imaxdiv_t))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < imaxdiv_t > ())) . quot as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (imaxdiv_t) , "::" , stringify ! (quot))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < imaxdiv_t > ())) . rem as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (imaxdiv_t) , "::" , stringify ! (rem))) ; } extern "C" { pub fn imaxabs (__n : intmax_t) -> intmax_t ; } extern "C" { pub fn imaxdiv (__numer : intmax_t , __denom : intmax_t) -> imaxdiv_t ; } extern "C" { pub fn strtoimax (__nptr : * const :: std :: os :: raw :: c_char , __endptr : * mut * mut :: std :: os :: raw :: c_char , __base : :: std :: os :: raw :: c_int) -> intmax_t ; } extern "C" { pub fn strtoumax (__nptr : * const :: std :: os :: raw :: c_char , __endptr : * mut * mut :: std :: os :: raw :: c_char , __base : :: std :: os :: raw :: c_int) -> uintmax_t ; } extern "C" { pub fn wcstoimax (__nptr : * const __gwchar_t , __endptr : * mut * mut __gwchar_t , __base : :: std :: os :: raw :: c_int) -> intmax_t ; } extern "C" { pub fn wcstoumax (__nptr : * const __gwchar_t , __endptr : * mut * mut __gwchar_t , __base : :: std :: os :: raw :: c_int) -> uintmax_t ; } extern "C" { # [doc = " Return the version of the libgit2 library"] # [doc = " being currently used."] # [doc = ""] # [doc = " @param major Store the major version number"] # [doc = " @param minor Store the minor version number"] # [doc = " @param rev Store the revision (patch) number"] # [doc = " @return 0 on success or an error code on failure"] pub fn git_libgit2_version (major : * mut :: std :: os :: raw :: c_int , minor : * mut :: std :: os :: raw :: c_int , rev : * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } # [doc = " If set, libgit2 was built thread-aware and can be safely used from multiple"] # [doc = " threads."] pub const git_feature_t_GIT_FEATURE_THREADS : git_feature_t = 1 ; # [doc = " If set, libgit2 was built with and linked against a TLS implementation."] # [doc = " Custom TLS streams may still be added by the user to support HTTPS"] # [doc = " regardless of this."] pub const git_feature_t_GIT_FEATURE_HTTPS : git_feature_t = 2 ; # [doc = " If set, libgit2 was built with and linked against libssh2. A custom"] # [doc = " transport may still be added by the user to support libssh2 regardless of"] # [doc = " this."] pub const git_feature_t_GIT_FEATURE_SSH : git_feature_t = 4 ; # [doc = " If set, libgit2 was built with support for sub-second resolution in file"] # [doc = " modification times."] pub const git_feature_t_GIT_FEATURE_NSEC : git_feature_t = 8 ; # [doc = " Combinations of these values describe the features with which libgit2"] # [doc = " was compiled"] pub type git_feature_t = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = " Query compile time options for libgit2."] # [doc = ""] # [doc = " @return A combination of GIT_FEATURE_* values."] # [doc = ""] # [doc = " - GIT_FEATURE_THREADS"] # [doc = "   Libgit2 was compiled with thread support. Note that thread support is"] # [doc = "   still to be seen as a 'work in progress' - basic object lookups are"] # [doc = "   believed to be threadsafe, but other operations may not be."] # [doc = ""] # [doc = " - GIT_FEATURE_HTTPS"] # [doc = "   Libgit2 supports the https:// protocol. This requires the openssl"] # [doc = "   library to be found when compiling libgit2."] # [doc = ""] # [doc = " - GIT_FEATURE_SSH"] # [doc = "   Libgit2 supports the SSH protocol for network operations. This requires"] # [doc = "   the libssh2 library to be found when compiling libgit2"] pub fn git_libgit2_features () -> :: std :: os :: raw :: c_int ; } pub const git_libgit2_opt_t_GIT_OPT_GET_MWINDOW_SIZE : git_libgit2_opt_t = 0 ; pub const git_libgit2_opt_t_GIT_OPT_SET_MWINDOW_SIZE : git_libgit2_opt_t = 1 ; pub const git_libgit2_opt_t_GIT_OPT_GET_MWINDOW_MAPPED_LIMIT : git_libgit2_opt_t = 2 ; pub const git_libgit2_opt_t_GIT_OPT_SET_MWINDOW_MAPPED_LIMIT : git_libgit2_opt_t = 3 ; pub const git_libgit2_opt_t_GIT_OPT_GET_SEARCH_PATH : git_libgit2_opt_t = 4 ; pub const git_libgit2_opt_t_GIT_OPT_SET_SEARCH_PATH : git_libgit2_opt_t = 5 ; pub const git_libgit2_opt_t_GIT_OPT_SET_CACHE_OBJECT_LIMIT : git_libgit2_opt_t = 6 ; pub const git_libgit2_opt_t_GIT_OPT_SET_CACHE_MAX_SIZE : git_libgit2_opt_t = 7 ; pub const git_libgit2_opt_t_GIT_OPT_ENABLE_CACHING : git_libgit2_opt_t = 8 ; pub const git_libgit2_opt_t_GIT_OPT_GET_CACHED_MEMORY : git_libgit2_opt_t = 9 ; pub const git_libgit2_opt_t_GIT_OPT_GET_TEMPLATE_PATH : git_libgit2_opt_t = 10 ; pub const git_libgit2_opt_t_GIT_OPT_SET_TEMPLATE_PATH : git_libgit2_opt_t = 11 ; pub const git_libgit2_opt_t_GIT_OPT_SET_SSL_CERT_LOCATIONS : git_libgit2_opt_t = 12 ; pub const git_libgit2_opt_t_GIT_OPT_SET_USER_AGENT : git_libgit2_opt_t = 13 ; pub const git_libgit2_opt_t_GIT_OPT_ENABLE_STRICT_OBJECT_CREATION : git_libgit2_opt_t = 14 ; pub const git_libgit2_opt_t_GIT_OPT_ENABLE_STRICT_SYMBOLIC_REF_CREATION : git_libgit2_opt_t = 15 ; pub const git_libgit2_opt_t_GIT_OPT_SET_SSL_CIPHERS : git_libgit2_opt_t = 16 ; pub const git_libgit2_opt_t_GIT_OPT_GET_USER_AGENT : git_libgit2_opt_t = 17 ; pub const git_libgit2_opt_t_GIT_OPT_ENABLE_OFS_DELTA : git_libgit2_opt_t = 18 ; pub const git_libgit2_opt_t_GIT_OPT_ENABLE_FSYNC_GITDIR : git_libgit2_opt_t = 19 ; pub const git_libgit2_opt_t_GIT_OPT_GET_WINDOWS_SHAREMODE : git_libgit2_opt_t = 20 ; pub const git_libgit2_opt_t_GIT_OPT_SET_WINDOWS_SHAREMODE : git_libgit2_opt_t = 21 ; pub const git_libgit2_opt_t_GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION : git_libgit2_opt_t = 22 ; pub const git_libgit2_opt_t_GIT_OPT_SET_ALLOCATOR : git_libgit2_opt_t = 23 ; pub const git_libgit2_opt_t_GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY : git_libgit2_opt_t = 24 ; pub const git_libgit2_opt_t_GIT_OPT_GET_PACK_MAX_OBJECTS : git_libgit2_opt_t = 25 ; pub const git_libgit2_opt_t_GIT_OPT_SET_PACK_MAX_OBJECTS : git_libgit2_opt_t = 26 ; pub const git_libgit2_opt_t_GIT_OPT_DISABLE_PACK_KEEP_FILE_CHECKS : git_libgit2_opt_t = 27 ; pub const git_libgit2_opt_t_GIT_OPT_ENABLE_HTTP_EXPECT_CONTINUE : git_libgit2_opt_t = 28 ; pub const git_libgit2_opt_t_GIT_OPT_GET_MWINDOW_FILE_LIMIT : git_libgit2_opt_t = 29 ; pub const git_libgit2_opt_t_GIT_OPT_SET_MWINDOW_FILE_LIMIT : git_libgit2_opt_t = 30 ; pub const git_libgit2_opt_t_GIT_OPT_SET_ODB_PACKED_PRIORITY : git_libgit2_opt_t = 31 ; pub const git_libgit2_opt_t_GIT_OPT_SET_ODB_LOOSE_PRIORITY : git_libgit2_opt_t = 32 ; pub const git_libgit2_opt_t_GIT_OPT_GET_EXTENSIONS : git_libgit2_opt_t = 33 ; pub const git_libgit2_opt_t_GIT_OPT_SET_EXTENSIONS : git_libgit2_opt_t = 34 ; # [doc = " Global library options"] # [doc = ""] # [doc = " These are used to select which global option to set or get and are"] # [doc = " used in `git_libgit2_opts()`."] pub type git_libgit2_opt_t = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = " Set or query a library global option"] # [doc = ""] # [doc = " Available options:"] # [doc = ""] # [doc = "\t* opts(GIT_OPT_GET_MWINDOW_SIZE, size_t *):"] # [doc = ""] # [doc = "\t\t> Get the maximum mmap window size"] # [doc = ""] # [doc = "\t* opts(GIT_OPT_SET_MWINDOW_SIZE, size_t):"] # [doc = ""] # [doc = "\t\t> Set the maximum mmap window size"] # [doc = ""] # [doc = "\t* opts(GIT_OPT_GET_MWINDOW_MAPPED_LIMIT, size_t *):"] # [doc = ""] # [doc = "\t\t> Get the maximum memory that will be mapped in total by the library"] # [doc = ""] # [doc = "\t* opts(GIT_OPT_SET_MWINDOW_MAPPED_LIMIT, size_t):"] # [doc = ""] # [doc = "\t\t> Set the maximum amount of memory that can be mapped at any time"] # [doc = "\t\t> by the library"] # [doc = ""] # [doc = "\t* opts(GIT_OPT_GET_MWINDOW_FILE_LIMIT, size_t *):"] # [doc = ""] # [doc = "\t\t> Get the maximum number of files that will be mapped at any time by the"] # [doc = "\t\t> library"] # [doc = ""] # [doc = "\t* opts(GIT_OPT_SET_MWINDOW_FILE_LIMIT, size_t):"] # [doc = ""] # [doc = "\t\t> Set the maximum number of files that can be mapped at any time"] # [doc = "\t\t> by the library. The default (0) is unlimited."] # [doc = ""] # [doc = "\t* opts(GIT_OPT_GET_SEARCH_PATH, int level, git_buf *buf)"] # [doc = ""] # [doc = "\t\t> Get the search path for a given level of config data.  \"level\" must"] # [doc = "\t\t> be one of `GIT_CONFIG_LEVEL_SYSTEM`, `GIT_CONFIG_LEVEL_GLOBAL`,"] # [doc = "\t\t> `GIT_CONFIG_LEVEL_XDG`, or `GIT_CONFIG_LEVEL_PROGRAMDATA`."] # [doc = "\t\t> The search path is written to the `out` buffer."] # [doc = ""] # [doc = "\t* opts(GIT_OPT_SET_SEARCH_PATH, int level, const char *path)"] # [doc = ""] # [doc = "\t\t> Set the search path for a level of config data.  The search path"] # [doc = "\t\t> applied to shared attributes and ignore files, too."] # [doc = "\t\t>"] # [doc = "\t\t> - `path` lists directories delimited by GIT_PATH_LIST_SEPARATOR."] # [doc = "\t\t>   Pass NULL to reset to the default (generally based on environment"] # [doc = "\t\t>   variables).  Use magic path `$PATH` to include the old value"] # [doc = "\t\t>   of the path (if you want to prepend or append, for instance)."] # [doc = "\t\t>"] # [doc = "\t\t> - `level` must be `GIT_CONFIG_LEVEL_SYSTEM`,"] # [doc = "\t\t>   `GIT_CONFIG_LEVEL_GLOBAL`, `GIT_CONFIG_LEVEL_XDG`, or"] # [doc = "\t\t>   `GIT_CONFIG_LEVEL_PROGRAMDATA`."] # [doc = ""] # [doc = "\t* opts(GIT_OPT_SET_CACHE_OBJECT_LIMIT, git_object_t type, size_t size)"] # [doc = ""] # [doc = "\t\t> Set the maximum data size for the given type of object to be"] # [doc = "\t\t> considered eligible for caching in memory.  Setting to value to"] # [doc = "\t\t> zero means that that type of object will not be cached."] # [doc = "\t\t> Defaults to 0 for GIT_OBJECT_BLOB (i.e. won't cache blobs) and 4k"] # [doc = "\t\t> for GIT_OBJECT_COMMIT, GIT_OBJECT_TREE, and GIT_OBJECT_TAG."] # [doc = ""] # [doc = "\t* opts(GIT_OPT_SET_CACHE_MAX_SIZE, ssize_t max_storage_bytes)"] # [doc = ""] # [doc = "\t\t> Set the maximum total data size that will be cached in memory"] # [doc = "\t\t> across all repositories before libgit2 starts evicting objects"] # [doc = "\t\t> from the cache.  This is a soft limit, in that the library might"] # [doc = "\t\t> briefly exceed it, but will start aggressively evicting objects"] # [doc = "\t\t> from cache when that happens.  The default cache size is 256MB."] # [doc = ""] # [doc = "\t* opts(GIT_OPT_ENABLE_CACHING, int enabled)"] # [doc = ""] # [doc = "\t\t> Enable or disable caching completely."] # [doc = "\t\t>"] # [doc = "\t\t> Because caches are repository-specific, disabling the cache"] # [doc = "\t\t> cannot immediately clear all cached objects, but each cache will"] # [doc = "\t\t> be cleared on the next attempt to update anything in it."] # [doc = ""] # [doc = "\t* opts(GIT_OPT_GET_CACHED_MEMORY, ssize_t *current, ssize_t *allowed)"] # [doc = ""] # [doc = "\t\t> Get the current bytes in cache and the maximum that would be"] # [doc = "\t\t> allowed in the cache."] # [doc = ""] # [doc = "\t* opts(GIT_OPT_GET_TEMPLATE_PATH, git_buf *out)"] # [doc = ""] # [doc = "\t\t> Get the default template path."] # [doc = "\t\t> The path is written to the `out` buffer."] # [doc = ""] # [doc = "\t* opts(GIT_OPT_SET_TEMPLATE_PATH, const char *path)"] # [doc = ""] # [doc = "\t\t> Set the default template path."] # [doc = "\t\t>"] # [doc = "\t\t> - `path` directory of template."] # [doc = ""] # [doc = "\t* opts(GIT_OPT_SET_SSL_CERT_LOCATIONS, const char *file, const char *path)"] # [doc = ""] # [doc = "\t\t> Set the SSL certificate-authority locations."] # [doc = "\t\t>"] # [doc = "\t\t> - `file` is the location of a file containing several"] # [doc = "\t\t>   certificates concatenated together."] # [doc = "\t\t> - `path` is the location of a directory holding several"] # [doc = "\t\t>   certificates, one per file."] # [doc = "\t\t>"] # [doc = " \t\t> Either parameter may be `NULL`, but not both."] # [doc = ""] # [doc = "\t* opts(GIT_OPT_SET_USER_AGENT, const char *user_agent)"] # [doc = ""] # [doc = "\t\t> Set the value of the User-Agent header.  This value will be"] # [doc = "\t\t> appended to \"git/1.0\", for compatibility with other git clients."] # [doc = "\t\t>"] # [doc = "\t\t> - `user_agent` is the value that will be delivered as the"] # [doc = "\t\t>   User-Agent header on HTTP requests."] # [doc = ""] # [doc = "\t* opts(GIT_OPT_SET_WINDOWS_SHAREMODE, unsigned long value)"] # [doc = ""] # [doc = "\t\t> Set the share mode used when opening files on Windows."] # [doc = "\t\t> For more information, see the documentation for CreateFile."] # [doc = "\t\t> The default is: FILE_SHARE_READ | FILE_SHARE_WRITE.  This is"] # [doc = "\t\t> ignored and unused on non-Windows platforms."] # [doc = ""] # [doc = "\t* opts(GIT_OPT_GET_WINDOWS_SHAREMODE, unsigned long *value)"] # [doc = ""] # [doc = "\t\t> Get the share mode used when opening files on Windows."] # [doc = ""] # [doc = "\t* opts(GIT_OPT_ENABLE_STRICT_OBJECT_CREATION, int enabled)"] # [doc = ""] # [doc = "\t\t> Enable strict input validation when creating new objects"] # [doc = "\t\t> to ensure that all inputs to the new objects are valid.  For"] # [doc = "\t\t> example, when this is enabled, the parent(s) and tree inputs"] # [doc = "\t\t> will be validated when creating a new commit.  This defaults"] # [doc = "\t\t> to enabled."] # [doc = ""] # [doc = "\t* opts(GIT_OPT_ENABLE_STRICT_SYMBOLIC_REF_CREATION, int enabled)"] # [doc = ""] # [doc = "\t\t> Validate the target of a symbolic ref when creating it.  For"] # [doc = "\t\t> example, `foobar` is not a valid ref, therefore `foobar` is"] # [doc = "\t\t> not a valid target for a symbolic ref by default, whereas"] # [doc = "\t\t> `refs/heads/foobar` is.  Disabling this bypasses validation"] # [doc = "\t\t> so that an arbitrary strings such as `foobar` can be used"] # [doc = "\t\t> for a symbolic ref target.  This defaults to enabled."] # [doc = ""] # [doc = "\t* opts(GIT_OPT_SET_SSL_CIPHERS, const char *ciphers)"] # [doc = ""] # [doc = "\t\t> Set the SSL ciphers use for HTTPS connections."] # [doc = "\t\t>"] # [doc = "\t\t> - `ciphers` is the list of ciphers that are eanbled."] # [doc = ""] # [doc = "\t* opts(GIT_OPT_GET_USER_AGENT, git_buf *out)"] # [doc = ""] # [doc = "\t\t> Get the value of the User-Agent header."] # [doc = "\t\t> The User-Agent is written to the `out` buffer."] # [doc = ""] # [doc = "\t* opts(GIT_OPT_ENABLE_OFS_DELTA, int enabled)"] # [doc = ""] # [doc = "\t\t> Enable or disable the use of \"offset deltas\" when creating packfiles,"] # [doc = "\t\t> and the negotiation of them when talking to a remote server."] # [doc = "\t\t> Offset deltas store a delta base location as an offset into the"] # [doc = "\t\t> packfile from the current location, which provides a shorter encoding"] # [doc = "\t\t> and thus smaller resultant packfiles."] # [doc = "\t\t> Packfiles containing offset deltas can still be read."] # [doc = "\t\t> This defaults to enabled."] # [doc = ""] # [doc = "\t* opts(GIT_OPT_ENABLE_FSYNC_GITDIR, int enabled)"] # [doc = ""] # [doc = "\t\t> Enable synchronized writes of files in the gitdir using `fsync`"] # [doc = "\t\t> (or the platform equivalent) to ensure that new object data"] # [doc = "\t\t> is written to permanent storage, not simply cached.  This"] # [doc = "\t\t> defaults to disabled."] # [doc = ""] # [doc = "\t opts(GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION, int enabled)"] # [doc = ""] # [doc = "\t\t> Enable strict verification of object hashsums when reading"] # [doc = "\t\t> objects from disk. This may impact performance due to an"] # [doc = "\t\t> additional checksum calculation on each object. This defaults"] # [doc = "\t\t> to enabled."] # [doc = ""] # [doc = "\t opts(GIT_OPT_SET_ALLOCATOR, git_allocator *allocator)"] # [doc = ""] # [doc = "\t\t> Set the memory allocator to a different memory allocator. This"] # [doc = "\t\t> allocator will then be used to make all memory allocations for"] # [doc = "\t\t> libgit2 operations.  If the given `allocator` is NULL, then the"] # [doc = "\t\t> system default will be restored."] # [doc = ""] # [doc = "\t opts(GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY, int enabled)"] # [doc = ""] # [doc = "\t\t> Ensure that there are no unsaved changes in the index before"] # [doc = "\t\t> beginning any operation that reloads the index from disk (eg,"] # [doc = "\t\t> checkout).  If there are unsaved changes, the instruction will"] # [doc = "\t\t> fail.  (Using the FORCE flag to checkout will still overwrite"] # [doc = "\t\t> these changes.)"] # [doc = ""] # [doc = "\t opts(GIT_OPT_GET_PACK_MAX_OBJECTS, size_t *out)"] # [doc = ""] # [doc = "\t\t> Get the maximum number of objects libgit2 will allow in a pack"] # [doc = "\t\t> file when downloading a pack file from a remote. This can be"] # [doc = "\t\t> used to limit maximum memory usage when fetching from an untrusted"] # [doc = "\t\t> remote."] # [doc = ""] # [doc = "\t opts(GIT_OPT_SET_PACK_MAX_OBJECTS, size_t objects)"] # [doc = ""] # [doc = "\t\t> Set the maximum number of objects libgit2 will allow in a pack"] # [doc = "\t\t> file when downloading a pack file from a remote."] # [doc = ""] # [doc = "\t opts(GIT_OPT_DISABLE_PACK_KEEP_FILE_CHECKS, int enabled)"] # [doc = "\t\t> This will cause .keep file existence checks to be skipped when"] # [doc = "\t\t> accessing packfiles, which can help performance with remote filesystems."] # [doc = ""] # [doc = "\t opts(GIT_OPT_ENABLE_HTTP_EXPECT_CONTINUE, int enabled)"] # [doc = "\t\t> When connecting to a server using NTLM or Negotiate"] # [doc = "\t\t> authentication, use expect/continue when POSTing data."] # [doc = "\t\t> This option is not available on Windows."] # [doc = ""] # [doc = "   opts(GIT_OPT_SET_ODB_PACKED_PRIORITY, int priority)"] # [doc = "      > Override the default priority of the packed ODB backend which"] # [doc = "      > is added when default backends are assigned to a repository"] # [doc = ""] # [doc = "   opts(GIT_OPT_SET_ODB_LOOSE_PRIORITY, int priority)"] # [doc = "      > Override the default priority of the loose ODB backend which"] # [doc = "      > is added when default backends are assigned to a repository"] # [doc = ""] # [doc = "   opts(GIT_OPT_GET_EXTENSIONS, git_strarray *out)"] # [doc = "      > Returns the list of git extensions that are supported.  This"] # [doc = "      > is the list of built-in extensions supported by libgit2 and"] # [doc = "      > custom extensions that have been added with"] # [doc = "      > `GIT_OPT_SET_EXTENSIONS`.  Extensions that have been negated"] # [doc = "      > will not be returned.  The returned list should be released"] # [doc = "      > with `git_strarray_dispose`."] # [doc = ""] # [doc = "   opts(GIT_OPT_SET_EXTENSIONS, const char **extensions, size_t len)"] # [doc = "      > Set that the given git extensions are supported by the caller."] # [doc = "      > Extensions supported by libgit2 may be negated by prefixing"] # [doc = "      > them with a `!`.  For example: setting extensions to"] # [doc = "      > { \"!noop\", \"newext\" } indicates that the caller does not want"] # [doc = "      > to support repositories with the `noop` extension but does want"] # [doc = "      > to support repositories with the `newext` extension."] # [doc = ""] # [doc = " @param option Option key"] # [doc = " @param ... value to set the option"] # [doc = " @return 0 on success, <0 on failure"] pub fn git_libgit2_opts (option : :: std :: os :: raw :: c_int , ...) -> :: std :: os :: raw :: c_int ; } pub type git_off_t = i64 ; pub type git_time_t = i64 ; # [doc = " The maximum size of an object"] pub type git_object_size_t = u64 ; # [doc = " A data buffer for exporting data from libgit2"] # [doc = ""] # [doc = " Sometimes libgit2 wants to return an allocated data buffer to the"] # [doc = " caller and have the caller take responsibility for freeing that memory."] # [doc = " This can be awkward if the caller does not have easy access to the same"] # [doc = " allocation functions that libgit2 is using.  In those cases, libgit2"] # [doc = " will fill in a `git_buf` and the caller can use `git_buf_dispose()` to"] # [doc = " release it when they are done."] # [doc = ""] # [doc = " A `git_buf` may also be used for the caller to pass in a reference to"] # [doc = " a block of memory they hold.  In this case, libgit2 will not resize or"] # [doc = " free the memory, but will read from it as needed."] # [doc = ""] # [doc = " Some APIs may occasionally do something slightly unusual with a buffer,"] # [doc = " such as setting `ptr` to a value that was passed in by the user.  In"] # [doc = " those cases, the behavior will be clearly documented by the API."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_buf { # [doc = " The buffer contents."] # [doc = ""] # [doc = " `ptr` points to the start of the allocated memory.  If it is NULL,"] # [doc = " then the `git_buf` is considered empty and libgit2 will feel free"] # [doc = " to overwrite it with new data."] pub ptr : * mut :: std :: os :: raw :: c_char , # [doc = " `asize` holds the known total amount of allocated memory if the `ptr`"] # [doc = "  was allocated by libgit2.  It may be larger than `size`.  If `ptr`"] # [doc = "  was not allocated by libgit2 and should not be resized and/or freed,"] # [doc = "  then `asize` will be set to zero."] pub asize : size_t , # [doc = " `size` holds the size (in bytes) of the data that is actually used."] pub size : size_t , } # [test] fn bindgen_test_layout_git_buf () { assert_eq ! (:: std :: mem :: size_of :: < git_buf > () , 24usize , concat ! ("Size of: " , stringify ! (git_buf))) ; assert_eq ! (:: std :: mem :: align_of :: < git_buf > () , 8usize , concat ! ("Alignment of " , stringify ! (git_buf))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_buf > ())) . ptr as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_buf) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_buf > ())) . asize as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_buf) , "::" , stringify ! (asize))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_buf > ())) . size as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_buf) , "::" , stringify ! (size))) ; } extern "C" { # [doc = " Free the memory referred to by the git_buf."] # [doc = ""] # [doc = " Note that this does not free the `git_buf` itself, just the memory"] # [doc = " pointed to by `buffer->ptr`.  This will not free the memory if it looks"] # [doc = " like it was not allocated internally, but it will clear the buffer back"] # [doc = " to the empty state."] # [doc = ""] # [doc = " @param buffer The buffer to deallocate"] pub fn git_buf_dispose (buffer : * mut git_buf) ; } extern "C" { # [doc = " Resize the buffer allocation to make more space."] # [doc = ""] # [doc = " This will attempt to grow the buffer to accommodate the target size."] # [doc = ""] # [doc = " If the buffer refers to memory that was not allocated by libgit2 (i.e."] # [doc = " the `asize` field is zero), then `ptr` will be replaced with a newly"] # [doc = " allocated block of data.  Be careful so that memory allocated by the"] # [doc = " caller is not lost.  As a special variant, if you pass `target_size` as"] # [doc = " 0 and the memory is not allocated by libgit2, this will allocate a new"] # [doc = " buffer of size `size` and copy the external data into it."] # [doc = ""] # [doc = " Currently, this will never shrink a buffer, only expand it."] # [doc = ""] # [doc = " If the allocation fails, this will return an error and the buffer will be"] # [doc = " marked as invalid for future operations, invaliding the contents."] # [doc = ""] # [doc = " @param buffer The buffer to be resized; may or may not be allocated yet"] # [doc = " @param target_size The desired available size"] # [doc = " @return 0 on success, -1 on allocation failure"] pub fn git_buf_grow (buffer : * mut git_buf , target_size : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Set buffer to a copy of some raw data."] # [doc = ""] # [doc = " @param buffer The buffer to set"] # [doc = " @param data The data to copy into the buffer"] # [doc = " @param datalen The length of the data to copy into the buffer"] # [doc = " @return 0 on success, -1 on allocation failure"] pub fn git_buf_set (buffer : * mut git_buf , data : * const :: std :: os :: raw :: c_void , datalen : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Check quickly if buffer looks like it contains binary data"] # [doc = ""] # [doc = " @param buf Buffer to check"] # [doc = " @return 1 if buffer looks like non-text data"] pub fn git_buf_is_binary (buf : * const git_buf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Check quickly if buffer contains a NUL byte"] # [doc = ""] # [doc = " @param buf Buffer to check"] # [doc = " @return 1 if buffer contains a NUL byte"] pub fn git_buf_contains_nul (buf : * const git_buf) -> :: std :: os :: raw :: c_int ; } # [doc = " Unique identity of any object (commit, tree, blob, tag)."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_oid { # [doc = " raw binary formatted id"] pub id : [:: std :: os :: raw :: c_uchar ; 20usize] , } # [test] fn bindgen_test_layout_git_oid () { assert_eq ! (:: std :: mem :: size_of :: < git_oid > () , 20usize , concat ! ("Size of: " , stringify ! (git_oid))) ; assert_eq ! (:: std :: mem :: align_of :: < git_oid > () , 1usize , concat ! ("Alignment of " , stringify ! (git_oid))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_oid > ())) . id as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_oid) , "::" , stringify ! (id))) ; } extern "C" { # [doc = " Parse a hex formatted object id into a git_oid."] # [doc = ""] # [doc = " @param out oid structure the result is written into."] # [doc = " @param str input hex string; must be pointing at the start of"] # [doc = "\t\tthe hex sequence and have at least the number of bytes"] # [doc = "\t\tneeded for an oid encoded in hex (40 bytes)."] # [doc = " @return 0 or an error code"] pub fn git_oid_fromstr (out : * mut git_oid , str_ : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Parse a hex formatted null-terminated string into a git_oid."] # [doc = ""] # [doc = " @param out oid structure the result is written into."] # [doc = " @param str input hex string; must be null-terminated."] # [doc = " @return 0 or an error code"] pub fn git_oid_fromstrp (out : * mut git_oid , str_ : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Parse N characters of a hex formatted object id into a git_oid."] # [doc = ""] # [doc = " If N is odd, the last byte's high nibble will be read in and the"] # [doc = " low nibble set to zero."] # [doc = ""] # [doc = " @param out oid structure the result is written into."] # [doc = " @param str input hex string of at least size `length`"] # [doc = " @param length length of the input string"] # [doc = " @return 0 or an error code"] pub fn git_oid_fromstrn (out : * mut git_oid , str_ : * const :: std :: os :: raw :: c_char , length : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Copy an already raw oid into a git_oid structure."] # [doc = ""] # [doc = " @param out oid structure the result is written into."] # [doc = " @param raw the raw input bytes to be copied."] # [doc = " @return 0 on success or error code"] pub fn git_oid_fromraw (out : * mut git_oid , raw : * const :: std :: os :: raw :: c_uchar) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Format a git_oid into a hex string."] # [doc = ""] # [doc = " @param out output hex string; must be pointing at the start of"] # [doc = "\t\tthe hex sequence and have at least the number of bytes"] # [doc = "\t\tneeded for an oid encoded in hex (40 bytes). Only the"] # [doc = "\t\toid digits are written; a '\\\\0' terminator must be added"] # [doc = "\t\tby the caller if it is required."] # [doc = " @param id oid structure to format."] # [doc = " @return 0 on success or error code"] pub fn git_oid_fmt (out : * mut :: std :: os :: raw :: c_char , id : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Format a git_oid into a partial hex string."] # [doc = ""] # [doc = " @param out output hex string; you say how many bytes to write."] # [doc = "\t\tIf the number of bytes is > GIT_OID_HEXSZ, extra bytes"] # [doc = "\t\twill be zeroed; if not, a '\\0' terminator is NOT added."] # [doc = " @param n number of characters to write into out string"] # [doc = " @param id oid structure to format."] # [doc = " @return 0 on success or error code"] pub fn git_oid_nfmt (out : * mut :: std :: os :: raw :: c_char , n : size_t , id : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Format a git_oid into a loose-object path string."] # [doc = ""] # [doc = " The resulting string is \"aa/...\", where \"aa\" is the first two"] # [doc = " hex digits of the oid and \"...\" is the remaining 38 digits."] # [doc = ""] # [doc = " @param out output hex string; must be pointing at the start of"] # [doc = "\t\tthe hex sequence and have at least the number of bytes"] # [doc = "\t\tneeded for an oid encoded in hex (41 bytes). Only the"] # [doc = "\t\toid digits are written; a '\\\\0' terminator must be added"] # [doc = "\t\tby the caller if it is required."] # [doc = " @param id oid structure to format."] # [doc = " @return 0 on success, non-zero callback return value, or error code"] pub fn git_oid_pathfmt (out : * mut :: std :: os :: raw :: c_char , id : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Format a git_oid into a statically allocated c-string."] # [doc = ""] # [doc = " The c-string is owned by the library and should not be freed"] # [doc = " by the user. If libgit2 is built with thread support, the string"] # [doc = " will be stored in TLS (i.e. one buffer per thread) to allow for"] # [doc = " concurrent calls of the function."] # [doc = ""] # [doc = " @param oid The oid structure to format"] # [doc = " @return the c-string"] pub fn git_oid_tostr_s (oid : * const git_oid) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Format a git_oid into a buffer as a hex format c-string."] # [doc = ""] # [doc = " If the buffer is smaller than GIT_OID_HEXSZ+1, then the resulting"] # [doc = " oid c-string will be truncated to n-1 characters (but will still be"] # [doc = " NUL-byte terminated)."] # [doc = ""] # [doc = " If there are any input parameter errors (out == NULL, n == 0, oid =="] # [doc = " NULL), then a pointer to an empty string is returned, so that the"] # [doc = " return value can always be printed."] # [doc = ""] # [doc = " @param out the buffer into which the oid string is output."] # [doc = " @param n the size of the out buffer."] # [doc = " @param id the oid structure to format."] # [doc = " @return the out buffer pointer, assuming no input parameter"] # [doc = "\t\t\terrors, otherwise a pointer to an empty string."] pub fn git_oid_tostr (out : * mut :: std :: os :: raw :: c_char , n : size_t , id : * const git_oid) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Copy an oid from one structure to another."] # [doc = ""] # [doc = " @param out oid structure the result is written into."] # [doc = " @param src oid structure to copy from."] # [doc = " @return 0 on success or error code"] pub fn git_oid_cpy (out : * mut git_oid , src : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Compare two oid structures."] # [doc = ""] # [doc = " @param a first oid structure."] # [doc = " @param b second oid structure."] # [doc = " @return <0, 0, >0 if a < b, a == b, a > b."] pub fn git_oid_cmp (a : * const git_oid , b : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Compare two oid structures for equality"] # [doc = ""] # [doc = " @param a first oid structure."] # [doc = " @param b second oid structure."] # [doc = " @return true if equal, false otherwise"] pub fn git_oid_equal (a : * const git_oid , b : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Compare the first 'len' hexadecimal characters (packets of 4 bits)"] # [doc = " of two oid structures."] # [doc = ""] # [doc = " @param a first oid structure."] # [doc = " @param b second oid structure."] # [doc = " @param len the number of hex chars to compare"] # [doc = " @return 0 in case of a match"] pub fn git_oid_ncmp (a : * const git_oid , b : * const git_oid , len : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Check if an oid equals an hex formatted object id."] # [doc = ""] # [doc = " @param id oid structure."] # [doc = " @param str input hex string of an object id."] # [doc = " @return 0 in case of a match, -1 otherwise."] pub fn git_oid_streq (id : * const git_oid , str_ : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Compare an oid to an hex formatted object id."] # [doc = ""] # [doc = " @param id oid structure."] # [doc = " @param str input hex string of an object id."] # [doc = " @return -1 if str is not valid, <0 if id sorts before str,"] # [doc = "         0 if id matches str, >0 if id sorts after str."] pub fn git_oid_strcmp (id : * const git_oid , str_ : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Check is an oid is all zeros."] # [doc = ""] # [doc = " @return 1 if all zeros, 0 otherwise."] pub fn git_oid_is_zero (id : * const git_oid) -> :: std :: os :: raw :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_oid_shorten { _unused : [u8 ; 0] , } extern "C" { # [doc = " Create a new OID shortener."] # [doc = ""] # [doc = " The OID shortener is used to process a list of OIDs"] # [doc = " in text form and return the shortest length that would"] # [doc = " uniquely identify all of them."] # [doc = ""] # [doc = " E.g. look at the result of `git log --abbrev`."] # [doc = ""] # [doc = " @param min_length The minimal length for all identifiers,"] # [doc = "\t\twhich will be used even if shorter OIDs would still"] # [doc = "\t\tbe unique."] # [doc = "\t@return a `git_oid_shorten` instance, NULL if OOM"] pub fn git_oid_shorten_new (min_length : size_t) -> * mut git_oid_shorten ; } extern "C" { # [doc = " Add a new OID to set of shortened OIDs and calculate"] # [doc = " the minimal length to uniquely identify all the OIDs in"] # [doc = " the set."] # [doc = ""] # [doc = " The OID is expected to be a 40-char hexadecimal string."] # [doc = " The OID is owned by the user and will not be modified"] # [doc = " or freed."] # [doc = ""] # [doc = " For performance reasons, there is a hard-limit of how many"] # [doc = " OIDs can be added to a single set (around ~32000, assuming"] # [doc = " a mostly randomized distribution), which should be enough"] # [doc = " for any kind of program, and keeps the algorithm fast and"] # [doc = " memory-efficient."] # [doc = ""] # [doc = " Attempting to add more than those OIDs will result in a"] # [doc = " GIT_ERROR_INVALID error"] # [doc = ""] # [doc = " @param os a `git_oid_shorten` instance"] # [doc = " @param text_id an OID in text form"] # [doc = " @return the minimal length to uniquely identify all OIDs"] # [doc = "\t\tadded so far to the set; or an error code (<0) if an"] # [doc = "\t\terror occurs."] pub fn git_oid_shorten_add (os : * mut git_oid_shorten , text_id : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free an OID shortener instance"] # [doc = ""] # [doc = " @param os a `git_oid_shorten` instance"] pub fn git_oid_shorten_free (os : * mut git_oid_shorten) ; } # [doc = "< Object can be any of the following"] pub const git_object_t_GIT_OBJECT_ANY : git_object_t = - 2 ; # [doc = "< Object is invalid."] pub const git_object_t_GIT_OBJECT_INVALID : git_object_t = - 1 ; # [doc = "< A commit object."] pub const git_object_t_GIT_OBJECT_COMMIT : git_object_t = 1 ; # [doc = "< A tree (directory listing) object."] pub const git_object_t_GIT_OBJECT_TREE : git_object_t = 2 ; # [doc = "< A file revision object."] pub const git_object_t_GIT_OBJECT_BLOB : git_object_t = 3 ; # [doc = "< An annotated tag object."] pub const git_object_t_GIT_OBJECT_TAG : git_object_t = 4 ; # [doc = "< A delta, base is given by an offset."] pub const git_object_t_GIT_OBJECT_OFS_DELTA : git_object_t = 6 ; # [doc = "< A delta, base is given by object id."] pub const git_object_t_GIT_OBJECT_REF_DELTA : git_object_t = 7 ; # [doc = " Basic type (loose or packed) of any Git object."] pub type git_object_t = :: std :: os :: raw :: c_int ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_odb { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_odb_backend { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_odb_object { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_midx_writer { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_refdb { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_refdb_backend { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_commit_graph { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_commit_graph_writer { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_repository { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_worktree { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_object { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_revwalk { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_tag { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_blob { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_commit { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_tree_entry { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_tree { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_treebuilder { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_index { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_index_iterator { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_index_conflict_iterator { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_config { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_config_backend { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_reflog_entry { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_reflog { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_note { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_packbuilder { _unused : [u8 ; 0] , } # [doc = " Time in a signature"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_time { # [doc = "< time in seconds from epoch"] pub time : git_time_t , # [doc = "< timezone offset, in minutes"] pub offset : :: std :: os :: raw :: c_int , # [doc = "< indicator for questionable '-0000' offsets in signature"] pub sign : :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_git_time () { assert_eq ! (:: std :: mem :: size_of :: < git_time > () , 16usize , concat ! ("Size of: " , stringify ! (git_time))) ; assert_eq ! (:: std :: mem :: align_of :: < git_time > () , 8usize , concat ! ("Alignment of " , stringify ! (git_time))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_time > ())) . time as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_time) , "::" , stringify ! (time))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_time > ())) . offset as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_time) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_time > ())) . sign as * const _ as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (git_time) , "::" , stringify ! (sign))) ; } # [doc = " An action signature (e.g. for committers, taggers, etc)"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_signature { # [doc = "< full name of the author"] pub name : * mut :: std :: os :: raw :: c_char , # [doc = "< email of the author"] pub email : * mut :: std :: os :: raw :: c_char , # [doc = "< time when the action happened"] pub when : git_time , } # [test] fn bindgen_test_layout_git_signature () { assert_eq ! (:: std :: mem :: size_of :: < git_signature > () , 32usize , concat ! ("Size of: " , stringify ! (git_signature))) ; assert_eq ! (:: std :: mem :: align_of :: < git_signature > () , 8usize , concat ! ("Alignment of " , stringify ! (git_signature))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_signature > ())) . name as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_signature) , "::" , stringify ! (name))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_signature > ())) . email as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_signature) , "::" , stringify ! (email))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_signature > ())) . when as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_signature) , "::" , stringify ! (when))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_reference { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_reference_iterator { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_transaction { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_annotated_commit { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_status_list { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_rebase { _unused : [u8 ; 0] , } # [doc = "< Invalid reference"] pub const git_reference_t_GIT_REFERENCE_INVALID : git_reference_t = 0 ; # [doc = "< A reference that points at an object id"] pub const git_reference_t_GIT_REFERENCE_DIRECT : git_reference_t = 1 ; # [doc = "< A reference that points at another reference"] pub const git_reference_t_GIT_REFERENCE_SYMBOLIC : git_reference_t = 2 ; pub const git_reference_t_GIT_REFERENCE_ALL : git_reference_t = 3 ; # [doc = " Basic type of any Git reference."] pub type git_reference_t = :: std :: os :: raw :: c_uint ; pub const git_branch_t_GIT_BRANCH_LOCAL : git_branch_t = 1 ; pub const git_branch_t_GIT_BRANCH_REMOTE : git_branch_t = 2 ; pub const git_branch_t_GIT_BRANCH_ALL : git_branch_t = 3 ; # [doc = " Basic type of any Git branch."] pub type git_branch_t = :: std :: os :: raw :: c_uint ; pub const git_filemode_t_GIT_FILEMODE_UNREADABLE : git_filemode_t = 0 ; pub const git_filemode_t_GIT_FILEMODE_TREE : git_filemode_t = 16384 ; pub const git_filemode_t_GIT_FILEMODE_BLOB : git_filemode_t = 33188 ; pub const git_filemode_t_GIT_FILEMODE_BLOB_EXECUTABLE : git_filemode_t = 33261 ; pub const git_filemode_t_GIT_FILEMODE_LINK : git_filemode_t = 40960 ; pub const git_filemode_t_GIT_FILEMODE_COMMIT : git_filemode_t = 57344 ; # [doc = " Valid modes for index and tree entries."] pub type git_filemode_t = :: std :: os :: raw :: c_uint ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_refspec { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_remote { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_transport { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_push { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_submodule { _unused : [u8 ; 0] , } pub const git_submodule_update_t_GIT_SUBMODULE_UPDATE_CHECKOUT : git_submodule_update_t = 1 ; pub const git_submodule_update_t_GIT_SUBMODULE_UPDATE_REBASE : git_submodule_update_t = 2 ; pub const git_submodule_update_t_GIT_SUBMODULE_UPDATE_MERGE : git_submodule_update_t = 3 ; pub const git_submodule_update_t_GIT_SUBMODULE_UPDATE_NONE : git_submodule_update_t = 4 ; pub const git_submodule_update_t_GIT_SUBMODULE_UPDATE_DEFAULT : git_submodule_update_t = 0 ; # [doc = " Submodule update values"] # [doc = ""] # [doc = " These values represent settings for the `submodule.$name.update`"] # [doc = " configuration value which says how to handle `git submodule update` for"] # [doc = " this submodule.  The value is usually set in the \".gitmodules\" file and"] # [doc = " copied to \".git/config\" when the submodule is initialized."] # [doc = ""] # [doc = " You can override this setting on a per-submodule basis with"] # [doc = " `git_submodule_set_update()` and write the changed value to disk using"] # [doc = " `git_submodule_save()`.  If you have overwritten the value, you can"] # [doc = " revert it by passing `GIT_SUBMODULE_UPDATE_RESET` to the set function."] # [doc = ""] # [doc = " The values are:"] # [doc = ""] # [doc = " - GIT_SUBMODULE_UPDATE_CHECKOUT: the default; when a submodule is"] # [doc = "   updated, checkout the new detached HEAD to the submodule directory."] # [doc = " - GIT_SUBMODULE_UPDATE_REBASE: update by rebasing the current checked"] # [doc = "   out branch onto the commit from the superproject."] # [doc = " - GIT_SUBMODULE_UPDATE_MERGE: update by merging the commit in the"] # [doc = "   superproject into the current checkout out branch of the submodule."] # [doc = " - GIT_SUBMODULE_UPDATE_NONE: do not update this submodule even when"] # [doc = "   the commit in the superproject is updated."] # [doc = " - GIT_SUBMODULE_UPDATE_DEFAULT: not used except as static initializer"] # [doc = "   when we don't want any particular update rule to be specified."] pub type git_submodule_update_t = :: std :: os :: raw :: c_uint ; # [doc = "< use the submodule's configuration"] pub const git_submodule_ignore_t_GIT_SUBMODULE_IGNORE_UNSPECIFIED : git_submodule_ignore_t = - 1 ; # [doc = "< any change or untracked == dirty"] pub const git_submodule_ignore_t_GIT_SUBMODULE_IGNORE_NONE : git_submodule_ignore_t = 1 ; # [doc = "< dirty if tracked files change"] pub const git_submodule_ignore_t_GIT_SUBMODULE_IGNORE_UNTRACKED : git_submodule_ignore_t = 2 ; # [doc = "< only dirty if HEAD moved"] pub const git_submodule_ignore_t_GIT_SUBMODULE_IGNORE_DIRTY : git_submodule_ignore_t = 3 ; # [doc = "< never dirty"] pub const git_submodule_ignore_t_GIT_SUBMODULE_IGNORE_ALL : git_submodule_ignore_t = 4 ; # [doc = " Submodule ignore values"] # [doc = ""] # [doc = " These values represent settings for the `submodule.$name.ignore`"] # [doc = " configuration value which says how deeply to look at the working"] # [doc = " directory when getting submodule status."] # [doc = ""] # [doc = " You can override this value in memory on a per-submodule basis with"] # [doc = " `git_submodule_set_ignore()` and can write the changed value to disk"] # [doc = " with `git_submodule_save()`.  If you have overwritten the value, you"] # [doc = " can revert to the on disk value by using `GIT_SUBMODULE_IGNORE_RESET`."] # [doc = ""] # [doc = " The values are:"] # [doc = ""] # [doc = " - GIT_SUBMODULE_IGNORE_UNSPECIFIED: use the submodule's configuration"] # [doc = " - GIT_SUBMODULE_IGNORE_NONE: don't ignore any change - i.e. even an"] # [doc = "   untracked file, will mark the submodule as dirty.  Ignored files are"] # [doc = "   still ignored, of course."] # [doc = " - GIT_SUBMODULE_IGNORE_UNTRACKED: ignore untracked files; only changes"] # [doc = "   to tracked files, or the index or the HEAD commit will matter."] # [doc = " - GIT_SUBMODULE_IGNORE_DIRTY: ignore changes in the working directory,"] # [doc = "   only considering changes if the HEAD of submodule has moved from the"] # [doc = "   value in the superproject."] # [doc = " - GIT_SUBMODULE_IGNORE_ALL: never check if the submodule is dirty"] # [doc = " - GIT_SUBMODULE_IGNORE_DEFAULT: not used except as static initializer"] # [doc = "   when we don't want any particular ignore rule to be specified."] pub type git_submodule_ignore_t = :: std :: os :: raw :: c_int ; pub const git_submodule_recurse_t_GIT_SUBMODULE_RECURSE_NO : git_submodule_recurse_t = 0 ; pub const git_submodule_recurse_t_GIT_SUBMODULE_RECURSE_YES : git_submodule_recurse_t = 1 ; pub const git_submodule_recurse_t_GIT_SUBMODULE_RECURSE_ONDEMAND : git_submodule_recurse_t = 2 ; # [doc = " Options for submodule recurse."] # [doc = ""] # [doc = " Represent the value of `submodule.$name.fetchRecurseSubmodules`"] # [doc = ""] # [doc = " * GIT_SUBMODULE_RECURSE_NO    - do no recurse into submodules"] # [doc = " * GIT_SUBMODULE_RECURSE_YES   - recurse into submodules"] # [doc = " * GIT_SUBMODULE_RECURSE_ONDEMAND - recurse into submodules only when"] # [doc = "                                    commit not already in local clone"] pub type git_submodule_recurse_t = :: std :: os :: raw :: c_uint ; # [doc = " A type to write in a streaming fashion, for example, for filters."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_writestream { pub write : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut git_writestream , buffer : * const :: std :: os :: raw :: c_char , len : size_t) -> :: std :: os :: raw :: c_int > , pub close : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut git_writestream) -> :: std :: os :: raw :: c_int > , pub free : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut git_writestream) > , } # [test] fn bindgen_test_layout_git_writestream () { assert_eq ! (:: std :: mem :: size_of :: < git_writestream > () , 24usize , concat ! ("Size of: " , stringify ! (git_writestream))) ; assert_eq ! (:: std :: mem :: align_of :: < git_writestream > () , 8usize , concat ! ("Alignment of " , stringify ! (git_writestream))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_writestream > ())) . write as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_writestream) , "::" , stringify ! (write))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_writestream > ())) . close as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_writestream) , "::" , stringify ! (close))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_writestream > ())) . free as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_writestream) , "::" , stringify ! (free))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_mailmap { _unused : [u8 ; 0] , } extern "C" { # [doc = " Open a git repository."] # [doc = ""] # [doc = " The 'path' argument must point to either a git repository"] # [doc = " folder, or an existing work dir."] # [doc = ""] # [doc = " The method will automatically detect if 'path' is a normal"] # [doc = " or bare repository or fail is 'path' is neither."] # [doc = ""] # [doc = " @param out pointer to the repo which will be opened"] # [doc = " @param path the path to the repository"] # [doc = " @return 0 or an error code"] pub fn git_repository_open (out : * mut * mut git_repository , path : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Open working tree as a repository"] # [doc = ""] # [doc = " Open the working directory of the working tree as a normal"] # [doc = " repository that can then be worked on."] # [doc = ""] # [doc = " @param out Output pointer containing opened repository"] # [doc = " @param wt Working tree to open"] # [doc = " @return 0 or an error code"] pub fn git_repository_open_from_worktree (out : * mut * mut git_repository , wt : * mut git_worktree) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a \"fake\" repository to wrap an object database"] # [doc = ""] # [doc = " Create a repository object to wrap an object database to be used"] # [doc = " with the API when all you have is an object database. This doesn't"] # [doc = " have any paths associated with it, so use with care."] # [doc = ""] # [doc = " @param out pointer to the repo"] # [doc = " @param odb the object database to wrap"] # [doc = " @return 0 or an error code"] pub fn git_repository_wrap_odb (out : * mut * mut git_repository , odb : * mut git_odb) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Look for a git repository and copy its path in the given buffer."] # [doc = " The lookup start from base_path and walk across parent directories"] # [doc = " if nothing has been found. The lookup ends when the first repository"] # [doc = " is found, or when reaching a directory referenced in ceiling_dirs"] # [doc = " or when the filesystem changes (in case across_fs is true)."] # [doc = ""] # [doc = " The method will automatically detect if the repository is bare"] # [doc = " (if there is a repository)."] # [doc = ""] # [doc = " @param out A pointer to a user-allocated git_buf which will contain"] # [doc = " the found path."] # [doc = ""] # [doc = " @param start_path The base path where the lookup starts."] # [doc = ""] # [doc = " @param across_fs If true, then the lookup will not stop when a"] # [doc = " filesystem device change is detected while exploring parent directories."] # [doc = ""] # [doc = " @param ceiling_dirs A GIT_PATH_LIST_SEPARATOR separated list of"] # [doc = " absolute symbolic link free paths. The lookup will stop when any"] # [doc = " of this paths is reached. Note that the lookup always performs on"] # [doc = " start_path no matter start_path appears in ceiling_dirs ceiling_dirs"] # [doc = " might be NULL (which is equivalent to an empty string)"] # [doc = ""] # [doc = " @return 0 or an error code"] pub fn git_repository_discover (out : * mut git_buf , start_path : * const :: std :: os :: raw :: c_char , across_fs : :: std :: os :: raw :: c_int , ceiling_dirs : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } # [doc = " Only open the repository if it can be immediately found in the"] # [doc = " start_path. Do not walk up from the start_path looking at parent"] # [doc = " directories."] pub const git_repository_open_flag_t_GIT_REPOSITORY_OPEN_NO_SEARCH : git_repository_open_flag_t = 1 ; # [doc = " Unless this flag is set, open will not continue searching across"] # [doc = " filesystem boundaries (i.e. when `st_dev` changes from the `stat`"] # [doc = " system call).  For example, searching in a user's home directory at"] # [doc = " \"/home/user/source/\" will not return \"/.git/\" as the found repo if"] # [doc = " \"/\" is a different filesystem than \"/home\"."] pub const git_repository_open_flag_t_GIT_REPOSITORY_OPEN_CROSS_FS : git_repository_open_flag_t = 2 ; # [doc = " Open repository as a bare repo regardless of core.bare config, and"] # [doc = " defer loading config file for faster setup."] # [doc = " Unlike `git_repository_open_bare`, this can follow gitlinks."] pub const git_repository_open_flag_t_GIT_REPOSITORY_OPEN_BARE : git_repository_open_flag_t = 4 ; # [doc = " Do not check for a repository by appending /.git to the start_path;"] # [doc = " only open the repository if start_path itself points to the git"] # [doc = " directory."] pub const git_repository_open_flag_t_GIT_REPOSITORY_OPEN_NO_DOTGIT : git_repository_open_flag_t = 8 ; # [doc = " Find and open a git repository, respecting the environment variables"] # [doc = " used by the git command-line tools."] # [doc = " If set, `git_repository_open_ext` will ignore the other flags and"] # [doc = " the `ceiling_dirs` argument, and will allow a NULL `path` to use"] # [doc = " `GIT_DIR` or search from the current directory."] # [doc = " The search for a repository will respect $GIT_CEILING_DIRECTORIES and"] # [doc = " $GIT_DISCOVERY_ACROSS_FILESYSTEM.  The opened repository will"] # [doc = " respect $GIT_INDEX_FILE, $GIT_NAMESPACE, $GIT_OBJECT_DIRECTORY, and"] # [doc = " $GIT_ALTERNATE_OBJECT_DIRECTORIES."] # [doc = " In the future, this flag will also cause `git_repository_open_ext`"] # [doc = " to respect $GIT_WORK_TREE and $GIT_COMMON_DIR; currently,"] # [doc = " `git_repository_open_ext` with this flag will error out if either"] # [doc = " $GIT_WORK_TREE or $GIT_COMMON_DIR is set."] pub const git_repository_open_flag_t_GIT_REPOSITORY_OPEN_FROM_ENV : git_repository_open_flag_t = 16 ; # [doc = " Option flags for `git_repository_open_ext`."] pub type git_repository_open_flag_t = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = " Find and open a repository with extended controls."] # [doc = ""] # [doc = " @param out Pointer to the repo which will be opened.  This can"] # [doc = "        actually be NULL if you only want to use the error code to"] # [doc = "        see if a repo at this path could be opened."] # [doc = " @param path Path to open as git repository.  If the flags"] # [doc = "        permit \"searching\", then this can be a path to a subdirectory"] # [doc = "        inside the working directory of the repository. May be NULL if"] # [doc = "        flags is GIT_REPOSITORY_OPEN_FROM_ENV."] # [doc = " @param flags A combination of the GIT_REPOSITORY_OPEN flags above."] # [doc = " @param ceiling_dirs A GIT_PATH_LIST_SEPARATOR delimited list of path"] # [doc = "        prefixes at which the search for a containing repository should"] # [doc = "        terminate."] # [doc = " @return 0 on success, GIT_ENOTFOUND if no repository could be found,"] # [doc = "        or -1 if there was a repository but open failed for some reason"] # [doc = "        (such as repo corruption or system errors)."] pub fn git_repository_open_ext (out : * mut * mut git_repository , path : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_uint , ceiling_dirs : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Open a bare repository on the serverside."] # [doc = ""] # [doc = " This is a fast open for bare repositories that will come in handy"] # [doc = " if you're e.g. hosting git repositories and need to access them"] # [doc = " efficiently"] # [doc = ""] # [doc = " @param out Pointer to the repo which will be opened."] # [doc = " @param bare_path Direct path to the bare repository"] # [doc = " @return 0 on success, or an error code"] pub fn git_repository_open_bare (out : * mut * mut git_repository , bare_path : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free a previously allocated repository"] # [doc = ""] # [doc = " Note that after a repository is free'd, all the objects it has spawned"] # [doc = " will still exist until they are manually closed by the user"] # [doc = " with `git_object_free`, but accessing any of the attributes of"] # [doc = " an object without a backing repository will result in undefined"] # [doc = " behavior"] # [doc = ""] # [doc = " @param repo repository handle to close. If NULL nothing occurs."] pub fn git_repository_free (repo : * mut git_repository) ; } extern "C" { # [doc = " Creates a new Git repository in the given folder."] # [doc = ""] # [doc = " TODO:"] # [doc = "\t- Reinit the repository"] # [doc = ""] # [doc = " @param out pointer to the repo which will be created or reinitialized"] # [doc = " @param path the path to the repository"] # [doc = " @param is_bare if true, a Git repository without a working directory is"] # [doc = "\t\tcreated at the pointed path. If false, provided path will be"] # [doc = "\t\tconsidered as the working directory into which the .git directory"] # [doc = "\t\twill be created."] # [doc = ""] # [doc = " @return 0 or an error code"] pub fn git_repository_init (out : * mut * mut git_repository , path : * const :: std :: os :: raw :: c_char , is_bare : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } # [doc = " Create a bare repository with no working directory."] pub const git_repository_init_flag_t_GIT_REPOSITORY_INIT_BARE : git_repository_init_flag_t = 1 ; # [doc = " Return an GIT_EEXISTS error if the repo_path appears to already be"] # [doc = " an git repository."] pub const git_repository_init_flag_t_GIT_REPOSITORY_INIT_NO_REINIT : git_repository_init_flag_t = 2 ; # [doc = " Normally a \"/.git/\" will be appended to the repo path for"] # [doc = " non-bare repos (if it is not already there), but passing this flag"] # [doc = " prevents that behavior."] pub const git_repository_init_flag_t_GIT_REPOSITORY_INIT_NO_DOTGIT_DIR : git_repository_init_flag_t = 4 ; # [doc = " Make the repo_path (and workdir_path) as needed. Init is always willing"] # [doc = " to create the \".git\" directory even without this flag. This flag tells"] # [doc = " init to create the trailing component of the repo and workdir paths"] # [doc = " as needed."] pub const git_repository_init_flag_t_GIT_REPOSITORY_INIT_MKDIR : git_repository_init_flag_t = 8 ; # [doc = " Recursively make all components of the repo and workdir paths as"] # [doc = " necessary."] pub const git_repository_init_flag_t_GIT_REPOSITORY_INIT_MKPATH : git_repository_init_flag_t = 16 ; # [doc = " libgit2 normally uses internal templates to initialize a new repo."] # [doc = " This flags enables external templates, looking the \"template_path\" from"] # [doc = " the options if set, or the `init.templatedir` global config if not,"] # [doc = " or falling back on \"/usr/share/git-core/templates\" if it exists."] pub const git_repository_init_flag_t_GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE : git_repository_init_flag_t = 32 ; # [doc = " If an alternate workdir is specified, use relative paths for the gitdir"] # [doc = " and core.worktree."] pub const git_repository_init_flag_t_GIT_REPOSITORY_INIT_RELATIVE_GITLINK : git_repository_init_flag_t = 64 ; # [doc = " Option flags for `git_repository_init_ext`."] # [doc = ""] # [doc = " These flags configure extra behaviors to `git_repository_init_ext`."] # [doc = " In every case, the default behavior is the zero value (i.e. flag is"] # [doc = " not set). Just OR the flag values together for the `flags` parameter"] # [doc = " when initializing a new repo."] pub type git_repository_init_flag_t = :: std :: os :: raw :: c_uint ; # [doc = " Use permissions configured by umask - the default."] pub const git_repository_init_mode_t_GIT_REPOSITORY_INIT_SHARED_UMASK : git_repository_init_mode_t = 0 ; # [doc = " Use \"--shared=group\" behavior, chmod'ing the new repo to be group"] # [doc = " writable and \"g+sx\" for sticky group assignment."] pub const git_repository_init_mode_t_GIT_REPOSITORY_INIT_SHARED_GROUP : git_repository_init_mode_t = 1533 ; # [doc = " Use \"--shared=all\" behavior, adding world readability."] pub const git_repository_init_mode_t_GIT_REPOSITORY_INIT_SHARED_ALL : git_repository_init_mode_t = 1535 ; # [doc = " Mode options for `git_repository_init_ext`."] # [doc = ""] # [doc = " Set the mode field of the `git_repository_init_options` structure"] # [doc = " either to the custom mode that you would like, or to one of the"] # [doc = " defined modes."] pub type git_repository_init_mode_t = :: std :: os :: raw :: c_uint ; # [doc = " Extended options structure for `git_repository_init_ext`."] # [doc = ""] # [doc = " This contains extra options for `git_repository_init_ext` that enable"] # [doc = " additional initialization features."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_repository_init_options { pub version : :: std :: os :: raw :: c_uint , # [doc = " Combination of GIT_REPOSITORY_INIT flags above."] pub flags : u32 , # [doc = " Set to one of the standard GIT_REPOSITORY_INIT_SHARED_... constants"] # [doc = " above, or to a custom value that you would like."] pub mode : u32 , # [doc = " The path to the working dir or NULL for default (i.e. repo_path parent"] # [doc = " on non-bare repos). IF THIS IS RELATIVE PATH, IT WILL BE EVALUATED"] # [doc = " RELATIVE TO THE REPO_PATH. If this is not the \"natural\" working"] # [doc = " directory, a .git gitlink file will be created here linking to the"] # [doc = " repo_path."] pub workdir_path : * const :: std :: os :: raw :: c_char , # [doc = " If set, this will be used to initialize the \"description\" file in the"] # [doc = " repository, instead of using the template content."] pub description : * const :: std :: os :: raw :: c_char , # [doc = " When GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE is set, this contains"] # [doc = " the path to use for the template directory. If this is NULL, the config"] # [doc = " or default directory options will be used instead."] pub template_path : * const :: std :: os :: raw :: c_char , # [doc = " The name of the head to point HEAD at. If NULL, then this will be"] # [doc = " treated as \"master\" and the HEAD ref will be set to \"refs/heads/master\"."] # [doc = " If this begins with \"refs/\" it will be used verbatim;"] # [doc = " otherwise \"refs/heads/\" will be prefixed."] pub initial_head : * const :: std :: os :: raw :: c_char , # [doc = " If this is non-NULL, then after the rest of the repository"] # [doc = " initialization is completed, an \"origin\" remote will be added"] # [doc = " pointing to this URL."] pub origin_url : * const :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_git_repository_init_options () { assert_eq ! (:: std :: mem :: size_of :: < git_repository_init_options > () , 56usize , concat ! ("Size of: " , stringify ! (git_repository_init_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_repository_init_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_repository_init_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_repository_init_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_repository_init_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_repository_init_options > ())) . flags as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_repository_init_options) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_repository_init_options > ())) . mode as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_repository_init_options) , "::" , stringify ! (mode))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_repository_init_options > ())) . workdir_path as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_repository_init_options) , "::" , stringify ! (workdir_path))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_repository_init_options > ())) . description as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_repository_init_options) , "::" , stringify ! (description))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_repository_init_options > ())) . template_path as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (git_repository_init_options) , "::" , stringify ! (template_path))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_repository_init_options > ())) . initial_head as * const _ as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (git_repository_init_options) , "::" , stringify ! (initial_head))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_repository_init_options > ())) . origin_url as * const _ as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (git_repository_init_options) , "::" , stringify ! (origin_url))) ; } extern "C" { # [doc = " Initialize git_repository_init_options structure"] # [doc = ""] # [doc = " Initializes a `git_repository_init_options` with default values. Equivalent to"] # [doc = " creating an instance with `GIT_REPOSITORY_INIT_OPTIONS_INIT`."] # [doc = ""] # [doc = " @param opts The `git_repository_init_options` struct to initialize."] # [doc = " @param version The struct version; pass `GIT_REPOSITORY_INIT_OPTIONS_VERSION`."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_repository_init_options_init (opts : * mut git_repository_init_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a new Git repository in the given folder with extended controls."] # [doc = ""] # [doc = " This will initialize a new git repository (creating the repo_path"] # [doc = " if requested by flags) and working directory as needed.  It will"] # [doc = " auto-detect the case sensitivity of the file system and if the"] # [doc = " file system supports file mode bits correctly."] # [doc = ""] # [doc = " @param out Pointer to the repo which will be created or reinitialized."] # [doc = " @param repo_path The path to the repository."] # [doc = " @param opts Pointer to git_repository_init_options struct."] # [doc = " @return 0 or an error code on failure."] pub fn git_repository_init_ext (out : * mut * mut git_repository , repo_path : * const :: std :: os :: raw :: c_char , opts : * mut git_repository_init_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Retrieve and resolve the reference pointed at by HEAD."] # [doc = ""] # [doc = " The returned `git_reference` will be owned by caller and"] # [doc = " `git_reference_free()` must be called when done with it to release the"] # [doc = " allocated memory and prevent a leak."] # [doc = ""] # [doc = " @param out pointer to the reference which will be retrieved"] # [doc = " @param repo a repository object"] # [doc = ""] # [doc = " @return 0 on success, GIT_EUNBORNBRANCH when HEAD points to a non existing"] # [doc = " branch, GIT_ENOTFOUND when HEAD is missing; an error code otherwise"] pub fn git_repository_head (out : * mut * mut git_reference , repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Retrieve the referenced HEAD for the worktree"] # [doc = ""] # [doc = " @param out pointer to the reference which will be retrieved"] # [doc = " @param repo a repository object"] # [doc = " @param name name of the worktree to retrieve HEAD for"] # [doc = " @return 0 when successful, error-code otherwise"] pub fn git_repository_head_for_worktree (out : * mut * mut git_reference , repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Check if a repository's HEAD is detached"] # [doc = ""] # [doc = " A repository's HEAD is detached when it points directly to a commit"] # [doc = " instead of a branch."] # [doc = ""] # [doc = " @param repo Repo to test"] # [doc = " @return 1 if HEAD is detached, 0 if it's not; error code if there"] # [doc = " was an error."] pub fn git_repository_head_detached (repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Check if a worktree's HEAD is detached"] # [doc = ""] # [doc = " A worktree's HEAD is detached when it points directly to a"] # [doc = " commit instead of a branch."] # [doc = ""] # [doc = " @param repo a repository object"] # [doc = " @param name name of the worktree to retrieve HEAD for"] # [doc = " @return 1 if HEAD is detached, 0 if its not; error code if"] # [doc = "  there was an error"] pub fn git_repository_head_detached_for_worktree (repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Check if the current branch is unborn"] # [doc = ""] # [doc = " An unborn branch is one named from HEAD but which doesn't exist in"] # [doc = " the refs namespace, because it doesn't have any commit to point to."] # [doc = ""] # [doc = " @param repo Repo to test"] # [doc = " @return 1 if the current branch is unborn, 0 if it's not; error"] # [doc = " code if there was an error"] pub fn git_repository_head_unborn (repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Check if a repository is empty"] # [doc = ""] # [doc = " An empty repository has just been initialized and contains no references"] # [doc = " apart from HEAD, which must be pointing to the unborn master branch."] # [doc = ""] # [doc = " @param repo Repo to test"] # [doc = " @return 1 if the repository is empty, 0 if it isn't, error code"] # [doc = " if the repository is corrupted"] pub fn git_repository_is_empty (repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } pub const git_repository_item_t_GIT_REPOSITORY_ITEM_GITDIR : git_repository_item_t = 0 ; pub const git_repository_item_t_GIT_REPOSITORY_ITEM_WORKDIR : git_repository_item_t = 1 ; pub const git_repository_item_t_GIT_REPOSITORY_ITEM_COMMONDIR : git_repository_item_t = 2 ; pub const git_repository_item_t_GIT_REPOSITORY_ITEM_INDEX : git_repository_item_t = 3 ; pub const git_repository_item_t_GIT_REPOSITORY_ITEM_OBJECTS : git_repository_item_t = 4 ; pub const git_repository_item_t_GIT_REPOSITORY_ITEM_REFS : git_repository_item_t = 5 ; pub const git_repository_item_t_GIT_REPOSITORY_ITEM_PACKED_REFS : git_repository_item_t = 6 ; pub const git_repository_item_t_GIT_REPOSITORY_ITEM_REMOTES : git_repository_item_t = 7 ; pub const git_repository_item_t_GIT_REPOSITORY_ITEM_CONFIG : git_repository_item_t = 8 ; pub const git_repository_item_t_GIT_REPOSITORY_ITEM_INFO : git_repository_item_t = 9 ; pub const git_repository_item_t_GIT_REPOSITORY_ITEM_HOOKS : git_repository_item_t = 10 ; pub const git_repository_item_t_GIT_REPOSITORY_ITEM_LOGS : git_repository_item_t = 11 ; pub const git_repository_item_t_GIT_REPOSITORY_ITEM_MODULES : git_repository_item_t = 12 ; pub const git_repository_item_t_GIT_REPOSITORY_ITEM_WORKTREES : git_repository_item_t = 13 ; pub const git_repository_item_t_GIT_REPOSITORY_ITEM__LAST : git_repository_item_t = 14 ; # [doc = " List of items which belong to the git repository layout"] pub type git_repository_item_t = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = " Get the location of a specific repository file or directory"] # [doc = ""] # [doc = " This function will retrieve the path of a specific repository"] # [doc = " item. It will thereby honor things like the repository's"] # [doc = " common directory, gitdir, etc. In case a file path cannot"] # [doc = " exist for a given item (e.g. the working directory of a bare"] # [doc = " repository), GIT_ENOTFOUND is returned."] # [doc = ""] # [doc = " @param out Buffer to store the path at"] # [doc = " @param repo Repository to get path for"] # [doc = " @param item The repository item for which to retrieve the path"] # [doc = " @return 0, GIT_ENOTFOUND if the path cannot exist or an error code"] pub fn git_repository_item_path (out : * mut git_buf , repo : * const git_repository , item : git_repository_item_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the path of this repository"] # [doc = ""] # [doc = " This is the path of the `.git` folder for normal repositories,"] # [doc = " or of the repository itself for bare repositories."] # [doc = ""] # [doc = " @param repo A repository object"] # [doc = " @return the path to the repository"] pub fn git_repository_path (repo : * const git_repository) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Get the path of the working directory for this repository"] # [doc = ""] # [doc = " If the repository is bare, this function will always return"] # [doc = " NULL."] # [doc = ""] # [doc = " @param repo A repository object"] # [doc = " @return the path to the working dir, if it exists"] pub fn git_repository_workdir (repo : * const git_repository) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Get the path of the shared common directory for this repository."] # [doc = ""] # [doc = " If the repository is bare, it is the root directory for the repository."] # [doc = " If the repository is a worktree, it is the parent repo's gitdir."] # [doc = " Otherwise, it is the gitdir."] # [doc = ""] # [doc = " @param repo A repository object"] # [doc = " @return the path to the common dir"] pub fn git_repository_commondir (repo : * const git_repository) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Set the path to the working directory for this repository"] # [doc = ""] # [doc = " The working directory doesn't need to be the same one"] # [doc = " that contains the `.git` folder for this repository."] # [doc = ""] # [doc = " If this repository is bare, setting its working directory"] # [doc = " will turn it into a normal repository, capable of performing"] # [doc = " all the common workdir operations (checkout, status, index"] # [doc = " manipulation, etc)."] # [doc = ""] # [doc = " @param repo A repository object"] # [doc = " @param workdir The path to a working directory"] # [doc = " @param update_gitlink Create/update gitlink in workdir and set config"] # [doc = "        \"core.worktree\" (if workdir is not the parent of the .git directory)"] # [doc = " @return 0, or an error code"] pub fn git_repository_set_workdir (repo : * mut git_repository , workdir : * const :: std :: os :: raw :: c_char , update_gitlink : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Check if a repository is bare"] # [doc = ""] # [doc = " @param repo Repo to test"] # [doc = " @return 1 if the repository is bare, 0 otherwise."] pub fn git_repository_is_bare (repo : * const git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Check if a repository is a linked work tree"] # [doc = ""] # [doc = " @param repo Repo to test"] # [doc = " @return 1 if the repository is a linked work tree, 0 otherwise."] pub fn git_repository_is_worktree (repo : * const git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the configuration file for this repository."] # [doc = ""] # [doc = " If a configuration file has not been set, the default"] # [doc = " config set for the repository will be returned, including"] # [doc = " global and system configurations (if they are available)."] # [doc = ""] # [doc = " The configuration file must be freed once it's no longer"] # [doc = " being used by the user."] # [doc = ""] # [doc = " @param out Pointer to store the loaded configuration"] # [doc = " @param repo A repository object"] # [doc = " @return 0, or an error code"] pub fn git_repository_config (out : * mut * mut git_config , repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get a snapshot of the repository's configuration"] # [doc = ""] # [doc = " Convenience function to take a snapshot from the repository's"] # [doc = " configuration.  The contents of this snapshot will not change,"] # [doc = " even if the underlying config files are modified."] # [doc = ""] # [doc = " The configuration file must be freed once it's no longer"] # [doc = " being used by the user."] # [doc = ""] # [doc = " @param out Pointer to store the loaded configuration"] # [doc = " @param repo the repository"] # [doc = " @return 0, or an error code"] pub fn git_repository_config_snapshot (out : * mut * mut git_config , repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the Object Database for this repository."] # [doc = ""] # [doc = " If a custom ODB has not been set, the default"] # [doc = " database for the repository will be returned (the one"] # [doc = " located in `.git/objects`)."] # [doc = ""] # [doc = " The ODB must be freed once it's no longer being used by"] # [doc = " the user."] # [doc = ""] # [doc = " @param out Pointer to store the loaded ODB"] # [doc = " @param repo A repository object"] # [doc = " @return 0, or an error code"] pub fn git_repository_odb (out : * mut * mut git_odb , repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the Reference Database Backend for this repository."] # [doc = ""] # [doc = " If a custom refsdb has not been set, the default database for"] # [doc = " the repository will be returned (the one that manipulates loose"] # [doc = " and packed references in the `.git` directory)."] # [doc = ""] # [doc = " The refdb must be freed once it's no longer being used by"] # [doc = " the user."] # [doc = ""] # [doc = " @param out Pointer to store the loaded refdb"] # [doc = " @param repo A repository object"] # [doc = " @return 0, or an error code"] pub fn git_repository_refdb (out : * mut * mut git_refdb , repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the Index file for this repository."] # [doc = ""] # [doc = " If a custom index has not been set, the default"] # [doc = " index for the repository will be returned (the one"] # [doc = " located in `.git/index`)."] # [doc = ""] # [doc = " The index must be freed once it's no longer being used by"] # [doc = " the user."] # [doc = ""] # [doc = " @param out Pointer to store the loaded index"] # [doc = " @param repo A repository object"] # [doc = " @return 0, or an error code"] pub fn git_repository_index (out : * mut * mut git_index , repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Retrieve git's prepared message"] # [doc = ""] # [doc = " Operations such as git revert/cherry-pick/merge with the -n option"] # [doc = " stop just short of creating a commit with the changes and save"] # [doc = " their prepared message in .git/MERGE_MSG so the next git-commit"] # [doc = " execution can present it to the user for them to amend if they"] # [doc = " wish."] # [doc = ""] # [doc = " Use this function to get the contents of this file. Don't forget to"] # [doc = " remove the file after you create the commit."] # [doc = ""] # [doc = " @param out git_buf to write data into"] # [doc = " @param repo Repository to read prepared message from"] # [doc = " @return 0, GIT_ENOTFOUND if no message exists or an error code"] pub fn git_repository_message (out : * mut git_buf , repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Remove git's prepared message."] # [doc = ""] # [doc = " Remove the message that `git_repository_message` retrieves."] pub fn git_repository_message_remove (repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Remove all the metadata associated with an ongoing command like merge,"] # [doc = " revert, cherry-pick, etc.  For example: MERGE_HEAD, MERGE_MSG, etc."] # [doc = ""] # [doc = " @param repo A repository object"] # [doc = " @return 0 on success, or error"] pub fn git_repository_state_cleanup (repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } # [doc = " Callback used to iterate over each FETCH_HEAD entry"] # [doc = ""] # [doc = " @see git_repository_fetchhead_foreach"] # [doc = ""] # [doc = " @param ref_name The reference name"] # [doc = " @param remote_url The remote URL"] # [doc = " @param oid The reference target OID"] # [doc = " @param is_merge Was the reference the result of a merge"] # [doc = " @param payload Payload passed to git_repository_fetchhead_foreach"] # [doc = " @return non-zero to terminate the iteration"] pub type git_repository_fetchhead_foreach_cb = :: std :: option :: Option < unsafe extern "C" fn (ref_name : * const :: std :: os :: raw :: c_char , remote_url : * const :: std :: os :: raw :: c_char , oid : * const git_oid , is_merge : :: std :: os :: raw :: c_uint , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; extern "C" { # [doc = " Invoke 'callback' for each entry in the given FETCH_HEAD file."] # [doc = ""] # [doc = " Return a non-zero value from the callback to stop the loop."] # [doc = ""] # [doc = " @param repo A repository object"] # [doc = " @param callback Callback function"] # [doc = " @param payload Pointer to callback data (optional)"] # [doc = " @return 0 on success, non-zero callback return value, GIT_ENOTFOUND if"] # [doc = "         there is no FETCH_HEAD file, or other error code."] pub fn git_repository_fetchhead_foreach (repo : * mut git_repository , callback : git_repository_fetchhead_foreach_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } # [doc = " Callback used to iterate over each MERGE_HEAD entry"] # [doc = ""] # [doc = " @see git_repository_mergehead_foreach"] # [doc = ""] # [doc = " @param oid The merge OID"] # [doc = " @param payload Payload passed to git_repository_mergehead_foreach"] # [doc = " @return non-zero to terminate the iteration"] pub type git_repository_mergehead_foreach_cb = :: std :: option :: Option < unsafe extern "C" fn (oid : * const git_oid , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; extern "C" { # [doc = " If a merge is in progress, invoke 'callback' for each commit ID in the"] # [doc = " MERGE_HEAD file."] # [doc = ""] # [doc = " Return a non-zero value from the callback to stop the loop."] # [doc = ""] # [doc = " @param repo A repository object"] # [doc = " @param callback Callback function"] # [doc = " @param payload Pointer to callback data (optional)"] # [doc = " @return 0 on success, non-zero callback return value, GIT_ENOTFOUND if"] # [doc = "         there is no MERGE_HEAD file, or other error code."] pub fn git_repository_mergehead_foreach (repo : * mut git_repository , callback : git_repository_mergehead_foreach_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Calculate hash of file using repository filtering rules."] # [doc = ""] # [doc = " If you simply want to calculate the hash of a file on disk with no filters,"] # [doc = " you can just use the `git_odb_hashfile()` API.  However, if you want to"] # [doc = " hash a file in the repository and you want to apply filtering rules (e.g."] # [doc = " crlf filters) before generating the SHA, then use this function."] # [doc = ""] # [doc = " Note: if the repository has `core.safecrlf` set to fail and the"] # [doc = " filtering triggers that failure, then this function will return an"] # [doc = " error and not calculate the hash of the file."] # [doc = ""] # [doc = " @param out Output value of calculated SHA"] # [doc = " @param repo Repository pointer"] # [doc = " @param path Path to file on disk whose contents should be hashed.  This"] # [doc = "             may be an absolute path or a relative path, in which case it"] # [doc = "             will be treated as a path within the working directory."] # [doc = " @param type The object type to hash as (e.g. GIT_OBJECT_BLOB)"] # [doc = " @param as_path The path to use to look up filtering rules. If this is"] # [doc = "             an empty string then no filters will be applied when"] # [doc = "             calculating the hash. If this is `NULL` and the `path`"] # [doc = "             parameter is a file within the repository's working"] # [doc = "             directory, then the `path` will be used."] # [doc = " @return 0 on success, or an error code"] pub fn git_repository_hashfile (out : * mut git_oid , repo : * mut git_repository , path : * const :: std :: os :: raw :: c_char , type_ : git_object_t , as_path : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Make the repository HEAD point to the specified reference."] # [doc = ""] # [doc = " If the provided reference points to a Tree or a Blob, the HEAD is"] # [doc = " unaltered and -1 is returned."] # [doc = ""] # [doc = " If the provided reference points to a branch, the HEAD will point"] # [doc = " to that branch, staying attached, or become attached if it isn't yet."] # [doc = " If the branch doesn't exist yet, no error will be return. The HEAD"] # [doc = " will then be attached to an unborn branch."] # [doc = ""] # [doc = " Otherwise, the HEAD will be detached and will directly point to"] # [doc = " the Commit."] # [doc = ""] # [doc = " @param repo Repository pointer"] # [doc = " @param refname Canonical name of the reference the HEAD should point at"] # [doc = " @return 0 on success, or an error code"] pub fn git_repository_set_head (repo : * mut git_repository , refname : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Make the repository HEAD directly point to the Commit."] # [doc = ""] # [doc = " If the provided committish cannot be found in the repository, the HEAD"] # [doc = " is unaltered and GIT_ENOTFOUND is returned."] # [doc = ""] # [doc = " If the provided commitish cannot be peeled into a commit, the HEAD"] # [doc = " is unaltered and -1 is returned."] # [doc = ""] # [doc = " Otherwise, the HEAD will eventually be detached and will directly point to"] # [doc = " the peeled Commit."] # [doc = ""] # [doc = " @param repo Repository pointer"] # [doc = " @param commitish Object id of the Commit the HEAD should point to"] # [doc = " @return 0 on success, or an error code"] pub fn git_repository_set_head_detached (repo : * mut git_repository , commitish : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Make the repository HEAD directly point to the Commit."] # [doc = ""] # [doc = " This behaves like `git_repository_set_head_detached()` but takes an"] # [doc = " annotated commit, which lets you specify which extended sha syntax"] # [doc = " string was specified by a user, allowing for more exact reflog"] # [doc = " messages."] # [doc = ""] # [doc = " See the documentation for `git_repository_set_head_detached()`."] # [doc = ""] # [doc = " @see git_repository_set_head_detached"] pub fn git_repository_set_head_detached_from_annotated (repo : * mut git_repository , commitish : * const git_annotated_commit) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Detach the HEAD."] # [doc = ""] # [doc = " If the HEAD is already detached and points to a Commit, 0 is returned."] # [doc = ""] # [doc = " If the HEAD is already detached and points to a Tag, the HEAD is"] # [doc = " updated into making it point to the peeled Commit, and 0 is returned."] # [doc = ""] # [doc = " If the HEAD is already detached and points to a non commitish, the HEAD is"] # [doc = " unaltered, and -1 is returned."] # [doc = ""] # [doc = " Otherwise, the HEAD will be detached and point to the peeled Commit."] # [doc = ""] # [doc = " @param repo Repository pointer"] # [doc = " @return 0 on success, GIT_EUNBORNBRANCH when HEAD points to a non existing"] # [doc = " branch or an error code"] pub fn git_repository_detach_head (repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } pub const git_repository_state_t_GIT_REPOSITORY_STATE_NONE : git_repository_state_t = 0 ; pub const git_repository_state_t_GIT_REPOSITORY_STATE_MERGE : git_repository_state_t = 1 ; pub const git_repository_state_t_GIT_REPOSITORY_STATE_REVERT : git_repository_state_t = 2 ; pub const git_repository_state_t_GIT_REPOSITORY_STATE_REVERT_SEQUENCE : git_repository_state_t = 3 ; pub const git_repository_state_t_GIT_REPOSITORY_STATE_CHERRYPICK : git_repository_state_t = 4 ; pub const git_repository_state_t_GIT_REPOSITORY_STATE_CHERRYPICK_SEQUENCE : git_repository_state_t = 5 ; pub const git_repository_state_t_GIT_REPOSITORY_STATE_BISECT : git_repository_state_t = 6 ; pub const git_repository_state_t_GIT_REPOSITORY_STATE_REBASE : git_repository_state_t = 7 ; pub const git_repository_state_t_GIT_REPOSITORY_STATE_REBASE_INTERACTIVE : git_repository_state_t = 8 ; pub const git_repository_state_t_GIT_REPOSITORY_STATE_REBASE_MERGE : git_repository_state_t = 9 ; pub const git_repository_state_t_GIT_REPOSITORY_STATE_APPLY_MAILBOX : git_repository_state_t = 10 ; pub const git_repository_state_t_GIT_REPOSITORY_STATE_APPLY_MAILBOX_OR_REBASE : git_repository_state_t = 11 ; # [doc = " Repository state"] # [doc = ""] # [doc = " These values represent possible states for the repository to be in,"] # [doc = " based on the current operation which is ongoing."] pub type git_repository_state_t = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = " Determines the status of a git repository - ie, whether an operation"] # [doc = " (merge, cherry-pick, etc) is in progress."] # [doc = ""] # [doc = " @param repo Repository pointer"] # [doc = " @return The state of the repository"] pub fn git_repository_state (repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Sets the active namespace for this Git Repository"] # [doc = ""] # [doc = " This namespace affects all reference operations for the repo."] # [doc = " See `man gitnamespaces`"] # [doc = ""] # [doc = " @param repo The repo"] # [doc = " @param nmspace The namespace. This should not include the refs"] # [doc = "\tfolder, e.g. to namespace all references under `refs/namespaces/foo/`,"] # [doc = "\tuse `foo` as the namespace."] # [doc = "\t@return 0 on success, -1 on error"] pub fn git_repository_set_namespace (repo : * mut git_repository , nmspace : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the currently active namespace for this repository"] # [doc = ""] # [doc = " @param repo The repo"] # [doc = " @return the active namespace, or NULL if there isn't one"] pub fn git_repository_get_namespace (repo : * mut git_repository) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Determine if the repository was a shallow clone"] # [doc = ""] # [doc = " @param repo The repository"] # [doc = " @return 1 if shallow, zero if not"] pub fn git_repository_is_shallow (repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Retrieve the configured identity to use for reflogs"] # [doc = ""] # [doc = " The memory is owned by the repository and must not be freed by the"] # [doc = " user."] # [doc = ""] # [doc = " @param name where to store the pointer to the name"] # [doc = " @param email where to store the pointer to the email"] # [doc = " @param repo the repository"] pub fn git_repository_ident (name : * mut * const :: std :: os :: raw :: c_char , email : * mut * const :: std :: os :: raw :: c_char , repo : * const git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Set the identity to be used for writing reflogs"] # [doc = ""] # [doc = " If both are set, this name and email will be used to write to the"] # [doc = " reflog. Pass NULL to unset. When unset, the identity will be taken"] # [doc = " from the repository's configuration."] # [doc = ""] # [doc = " @param repo the repository to configure"] # [doc = " @param name the name to use for the reflog entries"] # [doc = " @param email the email to use for the reflog entries"] pub fn git_repository_set_ident (repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char , email : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Creates a `git_annotated_commit` from the given reference."] # [doc = " The resulting git_annotated_commit must be freed with"] # [doc = " `git_annotated_commit_free`."] # [doc = ""] # [doc = " @param out pointer to store the git_annotated_commit result in"] # [doc = " @param repo repository that contains the given reference"] # [doc = " @param ref reference to use to lookup the git_annotated_commit"] # [doc = " @return 0 on success or error code"] pub fn git_annotated_commit_from_ref (out : * mut * mut git_annotated_commit , repo : * mut git_repository , ref_ : * const git_reference) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Creates a `git_annotated_commit` from the given fetch head data."] # [doc = " The resulting git_annotated_commit must be freed with"] # [doc = " `git_annotated_commit_free`."] # [doc = ""] # [doc = " @param out pointer to store the git_annotated_commit result in"] # [doc = " @param repo repository that contains the given commit"] # [doc = " @param branch_name name of the (remote) branch"] # [doc = " @param remote_url url of the remote"] # [doc = " @param id the commit object id of the remote branch"] # [doc = " @return 0 on success or error code"] pub fn git_annotated_commit_from_fetchhead (out : * mut * mut git_annotated_commit , repo : * mut git_repository , branch_name : * const :: std :: os :: raw :: c_char , remote_url : * const :: std :: os :: raw :: c_char , id : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Creates a `git_annotated_commit` from the given commit id."] # [doc = " The resulting git_annotated_commit must be freed with"] # [doc = " `git_annotated_commit_free`."] # [doc = ""] # [doc = " An annotated commit contains information about how it was"] # [doc = " looked up, which may be useful for functions like merge or"] # [doc = " rebase to provide context to the operation.  For example,"] # [doc = " conflict files will include the name of the source or target"] # [doc = " branches being merged.  It is therefore preferable to use the"] # [doc = " most specific function (eg `git_annotated_commit_from_ref`)"] # [doc = " instead of this one when that data is known."] # [doc = ""] # [doc = " @param out pointer to store the git_annotated_commit result in"] # [doc = " @param repo repository that contains the given commit"] # [doc = " @param id the commit object id to lookup"] # [doc = " @return 0 on success or error code"] pub fn git_annotated_commit_lookup (out : * mut * mut git_annotated_commit , repo : * mut git_repository , id : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Creates a `git_annotated_commit` from a revision string."] # [doc = ""] # [doc = " See `man gitrevisions`, or"] # [doc = " http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for"] # [doc = " information on the syntax accepted."] # [doc = ""] # [doc = " @param out pointer to store the git_annotated_commit result in"] # [doc = " @param repo repository that contains the given commit"] # [doc = " @param revspec the extended sha syntax string to use to lookup the commit"] # [doc = " @return 0 on success or error code"] pub fn git_annotated_commit_from_revspec (out : * mut * mut git_annotated_commit , repo : * mut git_repository , revspec : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Gets the commit ID that the given `git_annotated_commit` refers to."] # [doc = ""] # [doc = " @param commit the given annotated commit"] # [doc = " @return commit id"] pub fn git_annotated_commit_id (commit : * const git_annotated_commit) -> * const git_oid ; } extern "C" { # [doc = " Get the refname that the given `git_annotated_commit` refers to."] # [doc = ""] # [doc = " @param commit the given annotated commit"] # [doc = " @return ref name."] pub fn git_annotated_commit_ref (commit : * const git_annotated_commit) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Frees a `git_annotated_commit`."] # [doc = ""] # [doc = " @param commit annotated commit to free"] pub fn git_annotated_commit_free (commit : * mut git_annotated_commit) ; } extern "C" { # [doc = " Lookup a reference to one of the objects in a repository."] # [doc = ""] # [doc = " The generated reference is owned by the repository and"] # [doc = " should be closed with the `git_object_free` method"] # [doc = " instead of free'd manually."] # [doc = ""] # [doc = " The 'type' parameter must match the type of the object"] # [doc = " in the odb; the method will fail otherwise."] # [doc = " The special value 'GIT_OBJECT_ANY' may be passed to let"] # [doc = " the method guess the object's type."] # [doc = ""] # [doc = " @param object pointer to the looked-up object"] # [doc = " @param repo the repository to look up the object"] # [doc = " @param id the unique identifier for the object"] # [doc = " @param type the type of the object"] # [doc = " @return 0 or an error code"] pub fn git_object_lookup (object : * mut * mut git_object , repo : * mut git_repository , id : * const git_oid , type_ : git_object_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Lookup a reference to one of the objects in a repository,"] # [doc = " given a prefix of its identifier (short id)."] # [doc = ""] # [doc = " The object obtained will be so that its identifier"] # [doc = " matches the first 'len' hexadecimal characters"] # [doc = " (packets of 4 bits) of the given 'id'."] # [doc = " 'len' must be at least GIT_OID_MINPREFIXLEN, and"] # [doc = " long enough to identify a unique object matching"] # [doc = " the prefix; otherwise the method will fail."] # [doc = ""] # [doc = " The generated reference is owned by the repository and"] # [doc = " should be closed with the `git_object_free` method"] # [doc = " instead of free'd manually."] # [doc = ""] # [doc = " The 'type' parameter must match the type of the object"] # [doc = " in the odb; the method will fail otherwise."] # [doc = " The special value 'GIT_OBJECT_ANY' may be passed to let"] # [doc = " the method guess the object's type."] # [doc = ""] # [doc = " @param object_out pointer where to store the looked-up object"] # [doc = " @param repo the repository to look up the object"] # [doc = " @param id a short identifier for the object"] # [doc = " @param len the length of the short identifier"] # [doc = " @param type the type of the object"] # [doc = " @return 0 or an error code"] pub fn git_object_lookup_prefix (object_out : * mut * mut git_object , repo : * mut git_repository , id : * const git_oid , len : size_t , type_ : git_object_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Lookup an object that represents a tree entry."] # [doc = ""] # [doc = " @param out buffer that receives a pointer to the object (which must be freed"] # [doc = "            by the caller)"] # [doc = " @param treeish root object that can be peeled to a tree"] # [doc = " @param path relative path from the root object to the desired object"] # [doc = " @param type type of object desired"] # [doc = " @return 0 on success, or an error code"] pub fn git_object_lookup_bypath (out : * mut * mut git_object , treeish : * const git_object , path : * const :: std :: os :: raw :: c_char , type_ : git_object_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the id (SHA1) of a repository object"] # [doc = ""] # [doc = " @param obj the repository object"] # [doc = " @return the SHA1 id"] pub fn git_object_id (obj : * const git_object) -> * const git_oid ; } extern "C" { # [doc = " Get a short abbreviated OID string for the object"] # [doc = ""] # [doc = " This starts at the \"core.abbrev\" length (default 7 characters) and"] # [doc = " iteratively extends to a longer string if that length is ambiguous."] # [doc = " The result will be unambiguous (at least until new objects are added to"] # [doc = " the repository)."] # [doc = ""] # [doc = " @param out Buffer to write string into"] # [doc = " @param obj The object to get an ID for"] # [doc = " @return 0 on success, <0 for error"] pub fn git_object_short_id (out : * mut git_buf , obj : * const git_object) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the object type of an object"] # [doc = ""] # [doc = " @param obj the repository object"] # [doc = " @return the object's type"] pub fn git_object_type (obj : * const git_object) -> git_object_t ; } extern "C" { # [doc = " Get the repository that owns this object"] # [doc = ""] # [doc = " Freeing or calling `git_repository_close` on the"] # [doc = " returned pointer will invalidate the actual object."] # [doc = ""] # [doc = " Any other operation may be run on the repository without"] # [doc = " affecting the object."] # [doc = ""] # [doc = " @param obj the object"] # [doc = " @return the repository who owns this object"] pub fn git_object_owner (obj : * const git_object) -> * mut git_repository ; } extern "C" { # [doc = " Close an open object"] # [doc = ""] # [doc = " This method instructs the library to close an existing"] # [doc = " object; note that git_objects are owned and cached by the repository"] # [doc = " so the object may or may not be freed after this library call,"] # [doc = " depending on how aggressive is the caching mechanism used"] # [doc = " by the repository."] # [doc = ""] # [doc = " IMPORTANT:"] # [doc = " It *is* necessary to call this method when you stop using"] # [doc = " an object. Failure to do so will cause a memory leak."] # [doc = ""] # [doc = " @param object the object to close"] pub fn git_object_free (object : * mut git_object) ; } extern "C" { # [doc = " Convert an object type to its string representation."] # [doc = ""] # [doc = " The result is a pointer to a string in static memory and"] # [doc = " should not be free()'ed."] # [doc = ""] # [doc = " @param type object type to convert."] # [doc = " @return the corresponding string representation."] pub fn git_object_type2string (type_ : git_object_t) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Convert a string object type representation to it's git_object_t."] # [doc = ""] # [doc = " @param str the string to convert."] # [doc = " @return the corresponding git_object_t."] pub fn git_object_string2type (str_ : * const :: std :: os :: raw :: c_char) -> git_object_t ; } extern "C" { # [doc = " Determine if the given git_object_t is a valid loose object type."] # [doc = ""] # [doc = " @param type object type to test."] # [doc = " @return true if the type represents a valid loose object type,"] # [doc = " false otherwise."] pub fn git_object_typeisloose (type_ : git_object_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Recursively peel an object until an object of the specified type is met."] # [doc = ""] # [doc = " If the query cannot be satisfied due to the object model,"] # [doc = " GIT_EINVALIDSPEC will be returned (e.g. trying to peel a blob to a"] # [doc = " tree)."] # [doc = ""] # [doc = " If you pass `GIT_OBJECT_ANY` as the target type, then the object will"] # [doc = " be peeled until the type changes. A tag will be peeled until the"] # [doc = " referenced object is no longer a tag, and a commit will be peeled"] # [doc = " to a tree. Any other object type will return GIT_EINVALIDSPEC."] # [doc = ""] # [doc = " If peeling a tag we discover an object which cannot be peeled to"] # [doc = " the target type due to the object model, GIT_EPEEL will be"] # [doc = " returned."] # [doc = ""] # [doc = " You must free the returned object."] # [doc = ""] # [doc = " @param peeled Pointer to the peeled git_object"] # [doc = " @param object The object to be processed"] # [doc = " @param target_type The type of the requested object (a GIT_OBJECT_ value)"] # [doc = " @return 0 on success, GIT_EINVALIDSPEC, GIT_EPEEL, or an error code"] pub fn git_object_peel (peeled : * mut * mut git_object , object : * const git_object , target_type : git_object_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create an in-memory copy of a Git object. The copy must be"] # [doc = " explicitly free'd or it will leak."] # [doc = ""] # [doc = " @param dest Pointer to store the copy of the object"] # [doc = " @param source Original object to copy"] pub fn git_object_dup (dest : * mut * mut git_object , source : * mut git_object) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Lookup a tree object from the repository."] # [doc = ""] # [doc = " @param out Pointer to the looked up tree"] # [doc = " @param repo The repo to use when locating the tree."] # [doc = " @param id Identity of the tree to locate."] # [doc = " @return 0 or an error code"] pub fn git_tree_lookup (out : * mut * mut git_tree , repo : * mut git_repository , id : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Lookup a tree object from the repository,"] # [doc = " given a prefix of its identifier (short id)."] # [doc = ""] # [doc = " @see git_object_lookup_prefix"] # [doc = ""] # [doc = " @param out pointer to the looked up tree"] # [doc = " @param repo the repo to use when locating the tree."] # [doc = " @param id identity of the tree to locate."] # [doc = " @param len the length of the short identifier"] # [doc = " @return 0 or an error code"] pub fn git_tree_lookup_prefix (out : * mut * mut git_tree , repo : * mut git_repository , id : * const git_oid , len : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Close an open tree"] # [doc = ""] # [doc = " You can no longer use the git_tree pointer after this call."] # [doc = ""] # [doc = " IMPORTANT: You MUST call this method when you stop using a tree to"] # [doc = " release memory. Failure to do so will cause a memory leak."] # [doc = ""] # [doc = " @param tree The tree to close"] pub fn git_tree_free (tree : * mut git_tree) ; } extern "C" { # [doc = " Get the id of a tree."] # [doc = ""] # [doc = " @param tree a previously loaded tree."] # [doc = " @return object identity for the tree."] pub fn git_tree_id (tree : * const git_tree) -> * const git_oid ; } extern "C" { # [doc = " Get the repository that contains the tree."] # [doc = ""] # [doc = " @param tree A previously loaded tree."] # [doc = " @return Repository that contains this tree."] pub fn git_tree_owner (tree : * const git_tree) -> * mut git_repository ; } extern "C" { # [doc = " Get the number of entries listed in a tree"] # [doc = ""] # [doc = " @param tree a previously loaded tree."] # [doc = " @return the number of entries in the tree"] pub fn git_tree_entrycount (tree : * const git_tree) -> size_t ; } extern "C" { # [doc = " Lookup a tree entry by its filename"] # [doc = ""] # [doc = " This returns a git_tree_entry that is owned by the git_tree.  You don't"] # [doc = " have to free it, but you must not use it after the git_tree is released."] # [doc = ""] # [doc = " @param tree a previously loaded tree."] # [doc = " @param filename the filename of the desired entry"] # [doc = " @return the tree entry; NULL if not found"] pub fn git_tree_entry_byname (tree : * const git_tree , filename : * const :: std :: os :: raw :: c_char) -> * const git_tree_entry ; } extern "C" { # [doc = " Lookup a tree entry by its position in the tree"] # [doc = ""] # [doc = " This returns a git_tree_entry that is owned by the git_tree.  You don't"] # [doc = " have to free it, but you must not use it after the git_tree is released."] # [doc = ""] # [doc = " @param tree a previously loaded tree."] # [doc = " @param idx the position in the entry list"] # [doc = " @return the tree entry; NULL if not found"] pub fn git_tree_entry_byindex (tree : * const git_tree , idx : size_t) -> * const git_tree_entry ; } extern "C" { # [doc = " Lookup a tree entry by SHA value."] # [doc = ""] # [doc = " This returns a git_tree_entry that is owned by the git_tree.  You don't"] # [doc = " have to free it, but you must not use it after the git_tree is released."] # [doc = ""] # [doc = " Warning: this must examine every entry in the tree, so it is not fast."] # [doc = ""] # [doc = " @param tree a previously loaded tree."] # [doc = " @param id the sha being looked for"] # [doc = " @return the tree entry; NULL if not found"] pub fn git_tree_entry_byid (tree : * const git_tree , id : * const git_oid) -> * const git_tree_entry ; } extern "C" { # [doc = " Retrieve a tree entry contained in a tree or in any of its subtrees,"] # [doc = " given its relative path."] # [doc = ""] # [doc = " Unlike the other lookup functions, the returned tree entry is owned by"] # [doc = " the user and must be freed explicitly with `git_tree_entry_free()`."] # [doc = ""] # [doc = " @param out Pointer where to store the tree entry"] # [doc = " @param root Previously loaded tree which is the root of the relative path"] # [doc = " @param path Path to the contained entry"] # [doc = " @return 0 on success; GIT_ENOTFOUND if the path does not exist"] pub fn git_tree_entry_bypath (out : * mut * mut git_tree_entry , root : * const git_tree , path : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Duplicate a tree entry"] # [doc = ""] # [doc = " Create a copy of a tree entry. The returned copy is owned by the user,"] # [doc = " and must be freed explicitly with `git_tree_entry_free()`."] # [doc = ""] # [doc = " @param dest pointer where to store the copy"] # [doc = " @param source tree entry to duplicate"] # [doc = " @return 0 or an error code"] pub fn git_tree_entry_dup (dest : * mut * mut git_tree_entry , source : * const git_tree_entry) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free a user-owned tree entry"] # [doc = ""] # [doc = " IMPORTANT: This function is only needed for tree entries owned by the"] # [doc = " user, such as the ones returned by `git_tree_entry_dup()` or"] # [doc = " `git_tree_entry_bypath()`."] # [doc = ""] # [doc = " @param entry The entry to free"] pub fn git_tree_entry_free (entry : * mut git_tree_entry) ; } extern "C" { # [doc = " Get the filename of a tree entry"] # [doc = ""] # [doc = " @param entry a tree entry"] # [doc = " @return the name of the file"] pub fn git_tree_entry_name (entry : * const git_tree_entry) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Get the id of the object pointed by the entry"] # [doc = ""] # [doc = " @param entry a tree entry"] # [doc = " @return the oid of the object"] pub fn git_tree_entry_id (entry : * const git_tree_entry) -> * const git_oid ; } extern "C" { # [doc = " Get the type of the object pointed by the entry"] # [doc = ""] # [doc = " @param entry a tree entry"] # [doc = " @return the type of the pointed object"] pub fn git_tree_entry_type (entry : * const git_tree_entry) -> git_object_t ; } extern "C" { # [doc = " Get the UNIX file attributes of a tree entry"] # [doc = ""] # [doc = " @param entry a tree entry"] # [doc = " @return filemode as an integer"] pub fn git_tree_entry_filemode (entry : * const git_tree_entry) -> git_filemode_t ; } extern "C" { # [doc = " Get the raw UNIX file attributes of a tree entry"] # [doc = ""] # [doc = " This function does not perform any normalization and is only useful"] # [doc = " if you need to be able to recreate the original tree object."] # [doc = ""] # [doc = " @param entry a tree entry"] # [doc = " @return filemode as an integer"] pub fn git_tree_entry_filemode_raw (entry : * const git_tree_entry) -> git_filemode_t ; } extern "C" { # [doc = " Compare two tree entries"] # [doc = ""] # [doc = " @param e1 first tree entry"] # [doc = " @param e2 second tree entry"] # [doc = " @return <0 if e1 is before e2, 0 if e1 == e2, >0 if e1 is after e2"] pub fn git_tree_entry_cmp (e1 : * const git_tree_entry , e2 : * const git_tree_entry) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Convert a tree entry to the git_object it points to."] # [doc = ""] # [doc = " You must call `git_object_free()` on the object when you are done with it."] # [doc = ""] # [doc = " @param object_out pointer to the converted object"] # [doc = " @param repo repository where to lookup the pointed object"] # [doc = " @param entry a tree entry"] # [doc = " @return 0 or an error code"] pub fn git_tree_entry_to_object (object_out : * mut * mut git_object , repo : * mut git_repository , entry : * const git_tree_entry) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a new tree builder."] # [doc = ""] # [doc = " The tree builder can be used to create or modify trees in memory and"] # [doc = " write them as tree objects to the database."] # [doc = ""] # [doc = " If the `source` parameter is not NULL, the tree builder will be"] # [doc = " initialized with the entries of the given tree."] # [doc = ""] # [doc = " If the `source` parameter is NULL, the tree builder will start with no"] # [doc = " entries and will have to be filled manually."] # [doc = ""] # [doc = " @param out Pointer where to store the tree builder"] # [doc = " @param repo Repository in which to store the object"] # [doc = " @param source Source tree to initialize the builder (optional)"] # [doc = " @return 0 on success; error code otherwise"] pub fn git_treebuilder_new (out : * mut * mut git_treebuilder , repo : * mut git_repository , source : * const git_tree) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Clear all the entires in the builder"] # [doc = ""] # [doc = " @param bld Builder to clear"] # [doc = " @return 0 on success; error code otherwise"] pub fn git_treebuilder_clear (bld : * mut git_treebuilder) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the number of entries listed in a treebuilder"] # [doc = ""] # [doc = " @param bld a previously loaded treebuilder."] # [doc = " @return the number of entries in the treebuilder"] pub fn git_treebuilder_entrycount (bld : * mut git_treebuilder) -> size_t ; } extern "C" { # [doc = " Free a tree builder"] # [doc = ""] # [doc = " This will clear all the entries and free to builder."] # [doc = " Failing to free the builder after you're done using it"] # [doc = " will result in a memory leak"] # [doc = ""] # [doc = " @param bld Builder to free"] pub fn git_treebuilder_free (bld : * mut git_treebuilder) ; } extern "C" { # [doc = " Get an entry from the builder from its filename"] # [doc = ""] # [doc = " The returned entry is owned by the builder and should"] # [doc = " not be freed manually."] # [doc = ""] # [doc = " @param bld Tree builder"] # [doc = " @param filename Name of the entry"] # [doc = " @return pointer to the entry; NULL if not found"] pub fn git_treebuilder_get (bld : * mut git_treebuilder , filename : * const :: std :: os :: raw :: c_char) -> * const git_tree_entry ; } extern "C" { # [doc = " Add or update an entry to the builder"] # [doc = ""] # [doc = " Insert a new entry for `filename` in the builder with the"] # [doc = " given attributes."] # [doc = ""] # [doc = " If an entry named `filename` already exists, its attributes"] # [doc = " will be updated with the given ones."] # [doc = ""] # [doc = " The optional pointer `out` can be used to retrieve a pointer to the"] # [doc = " newly created/updated entry.  Pass NULL if you do not need it. The"] # [doc = " pointer may not be valid past the next operation in this"] # [doc = " builder. Duplicate the entry if you want to keep it."] # [doc = ""] # [doc = " By default the entry that you are inserting will be checked for"] # [doc = " validity; that it exists in the object database and is of the"] # [doc = " correct type.  If you do not want this behavior, set the"] # [doc = " `GIT_OPT_ENABLE_STRICT_OBJECT_CREATION` library option to false."] # [doc = ""] # [doc = " @param out Pointer to store the entry (optional)"] # [doc = " @param bld Tree builder"] # [doc = " @param filename Filename of the entry"] # [doc = " @param id SHA1 oid of the entry"] # [doc = " @param filemode Folder attributes of the entry. This parameter must"] # [doc = "\t\t\tbe valued with one of the following entries: 0040000, 0100644,"] # [doc = "\t\t\t0100755, 0120000 or 0160000."] # [doc = " @return 0 or an error code"] pub fn git_treebuilder_insert (out : * mut * const git_tree_entry , bld : * mut git_treebuilder , filename : * const :: std :: os :: raw :: c_char , id : * const git_oid , filemode : git_filemode_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Remove an entry from the builder by its filename"] # [doc = ""] # [doc = " @param bld Tree builder"] # [doc = " @param filename Filename of the entry to remove"] # [doc = " @return 0 or an error code"] pub fn git_treebuilder_remove (bld : * mut git_treebuilder , filename : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } # [doc = " Callback for git_treebuilder_filter"] # [doc = ""] # [doc = " The return value is treated as a boolean, with zero indicating that the"] # [doc = " entry should be left alone and any non-zero value meaning that the"] # [doc = " entry should be removed from the treebuilder list (i.e. filtered out)."] pub type git_treebuilder_filter_cb = :: std :: option :: Option < unsafe extern "C" fn (entry : * const git_tree_entry , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; extern "C" { # [doc = " Selectively remove entries in the tree"] # [doc = ""] # [doc = " The `filter` callback will be called for each entry in the tree with a"] # [doc = " pointer to the entry and the provided `payload`; if the callback returns"] # [doc = " non-zero, the entry will be filtered (removed from the builder)."] # [doc = ""] # [doc = " @param bld Tree builder"] # [doc = " @param filter Callback to filter entries"] # [doc = " @param payload Extra data to pass to filter callback"] # [doc = " @return 0 on success, non-zero callback return value, or error code"] pub fn git_treebuilder_filter (bld : * mut git_treebuilder , filter : git_treebuilder_filter_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Write the contents of the tree builder as a tree object"] # [doc = ""] # [doc = " The tree builder will be written to the given `repo`, and its"] # [doc = " identifying SHA1 hash will be stored in the `id` pointer."] # [doc = ""] # [doc = " @param id Pointer to store the OID of the newly written tree"] # [doc = " @param bld Tree builder to write"] # [doc = " @return 0 or an error code"] pub fn git_treebuilder_write (id : * mut git_oid , bld : * mut git_treebuilder) -> :: std :: os :: raw :: c_int ; } # [doc = " Callback for the tree traversal method"] pub type git_treewalk_cb = :: std :: option :: Option < unsafe extern "C" fn (root : * const :: std :: os :: raw :: c_char , entry : * const git_tree_entry , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; pub const git_treewalk_mode_GIT_TREEWALK_PRE : git_treewalk_mode = 0 ; pub const git_treewalk_mode_GIT_TREEWALK_POST : git_treewalk_mode = 1 ; # [doc = " Tree traversal modes"] pub type git_treewalk_mode = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = " Traverse the entries in a tree and its subtrees in post or pre order."] # [doc = ""] # [doc = " The entries will be traversed in the specified order, children subtrees"] # [doc = " will be automatically loaded as required, and the `callback` will be"] # [doc = " called once per entry with the current (relative) root for the entry and"] # [doc = " the entry data itself."] # [doc = ""] # [doc = " If the callback returns a positive value, the passed entry will be"] # [doc = " skipped on the traversal (in pre mode). A negative value stops the walk."] # [doc = ""] # [doc = " @param tree The tree to walk"] # [doc = " @param mode Traversal mode (pre or post-order)"] # [doc = " @param callback Function to call on each tree entry"] # [doc = " @param payload Opaque pointer to be passed on each callback"] # [doc = " @return 0 or an error code"] pub fn git_tree_walk (tree : * const git_tree , mode : git_treewalk_mode , callback : git_treewalk_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create an in-memory copy of a tree. The copy must be explicitly"] # [doc = " free'd or it will leak."] # [doc = ""] # [doc = " @param out Pointer to store the copy of the tree"] # [doc = " @param source Original tree to copy"] pub fn git_tree_dup (out : * mut * mut git_tree , source : * mut git_tree) -> :: std :: os :: raw :: c_int ; } # [doc = " Update or insert an entry at the specified path"] pub const git_tree_update_t_GIT_TREE_UPDATE_UPSERT : git_tree_update_t = 0 ; # [doc = " Remove an entry from the specified path"] pub const git_tree_update_t_GIT_TREE_UPDATE_REMOVE : git_tree_update_t = 1 ; # [doc = " The kind of update to perform"] pub type git_tree_update_t = :: std :: os :: raw :: c_uint ; # [doc = " An action to perform during the update of a tree"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_tree_update { # [doc = " Update action. If it's an removal, only the path is looked at"] pub action : git_tree_update_t , # [doc = " The entry's id"] pub id : git_oid , # [doc = " The filemode/kind of object"] pub filemode : git_filemode_t , # [doc = " The full path from the root tree"] pub path : * const :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_git_tree_update () { assert_eq ! (:: std :: mem :: size_of :: < git_tree_update > () , 40usize , concat ! ("Size of: " , stringify ! (git_tree_update))) ; assert_eq ! (:: std :: mem :: align_of :: < git_tree_update > () , 8usize , concat ! ("Alignment of " , stringify ! (git_tree_update))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_tree_update > ())) . action as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_tree_update) , "::" , stringify ! (action))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_tree_update > ())) . id as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_tree_update) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_tree_update > ())) . filemode as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_tree_update) , "::" , stringify ! (filemode))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_tree_update > ())) . path as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (git_tree_update) , "::" , stringify ! (path))) ; } extern "C" { # [doc = " Create a tree based on another one with the specified modifications"] # [doc = ""] # [doc = " Given the `baseline` perform the changes described in the list of"] # [doc = " `updates` and create a new tree."] # [doc = ""] # [doc = " This function is optimized for common file/directory addition, removal and"] # [doc = " replacement in trees. It is much more efficient than reading the tree into a"] # [doc = " `git_index` and modifying that, but in exchange it is not as flexible."] # [doc = ""] # [doc = " Deleting and adding the same entry is undefined behaviour, changing"] # [doc = " a tree to a blob or viceversa is not supported."] # [doc = ""] # [doc = " @param out id of the new tree"] # [doc = " @param repo the repository in which to create the tree, must be the"] # [doc = " same as for `baseline`"] # [doc = " @param baseline the tree to base these changes on"] # [doc = " @param nupdates the number of elements in the update list"] # [doc = " @param updates the list of updates to perform"] # [doc = " @return 0 or an error code"] pub fn git_tree_create_updated (out : * mut git_oid , repo : * mut git_repository , baseline : * mut git_tree , nupdates : size_t , updates : * const git_tree_update) -> :: std :: os :: raw :: c_int ; } # [doc = " Array of strings"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_strarray { pub strings : * mut * mut :: std :: os :: raw :: c_char , pub count : size_t , } # [test] fn bindgen_test_layout_git_strarray () { assert_eq ! (:: std :: mem :: size_of :: < git_strarray > () , 16usize , concat ! ("Size of: " , stringify ! (git_strarray))) ; assert_eq ! (:: std :: mem :: align_of :: < git_strarray > () , 8usize , concat ! ("Alignment of " , stringify ! (git_strarray))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_strarray > ())) . strings as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_strarray) , "::" , stringify ! (strings))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_strarray > ())) . count as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_strarray) , "::" , stringify ! (count))) ; } extern "C" { # [doc = " Free the strings contained in a string array.  This method should"] # [doc = " be called on `git_strarray` objects that were provided by the"] # [doc = " library.  Not doing so, will result in a memory leak."] # [doc = ""] # [doc = " This does not free the `git_strarray` itself, since the library will"] # [doc = " never allocate that object directly itself."] # [doc = ""] # [doc = " @param array The git_strarray that contains strings to free"] pub fn git_strarray_dispose (array : * mut git_strarray) ; } extern "C" { # [doc = " Copy a string array object from source to target."] # [doc = ""] # [doc = " Note: target is overwritten and hence should be empty, otherwise its"] # [doc = " contents are leaked.  Call git_strarray_free() if necessary."] # [doc = ""] # [doc = " @param tgt target"] # [doc = " @param src source"] # [doc = " @return 0 on success, < 0 on allocation failure"] pub fn git_strarray_copy (tgt : * mut git_strarray , src : * const git_strarray) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Lookup a reference by name in a repository."] # [doc = ""] # [doc = " The returned reference must be freed by the user."] # [doc = ""] # [doc = " The name will be checked for validity."] # [doc = " See `git_reference_symbolic_create()` for rules about valid names."] # [doc = ""] # [doc = " @param out pointer to the looked-up reference"] # [doc = " @param repo the repository to look up the reference"] # [doc = " @param name the long name for the reference (e.g. HEAD, refs/heads/master, refs/tags/v0.1.0, ...)"] # [doc = " @return 0 on success, GIT_ENOTFOUND, GIT_EINVALIDSPEC or an error code."] pub fn git_reference_lookup (out : * mut * mut git_reference , repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Lookup a reference by name and resolve immediately to OID."] # [doc = ""] # [doc = " This function provides a quick way to resolve a reference name straight"] # [doc = " through to the object id that it refers to.  This avoids having to"] # [doc = " allocate or free any `git_reference` objects for simple situations."] # [doc = ""] # [doc = " The name will be checked for validity."] # [doc = " See `git_reference_symbolic_create()` for rules about valid names."] # [doc = ""] # [doc = " @param out Pointer to oid to be filled in"] # [doc = " @param repo The repository in which to look up the reference"] # [doc = " @param name The long name for the reference (e.g. HEAD, refs/heads/master, refs/tags/v0.1.0, ...)"] # [doc = " @return 0 on success, GIT_ENOTFOUND, GIT_EINVALIDSPEC or an error code."] pub fn git_reference_name_to_id (out : * mut git_oid , repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Lookup a reference by DWIMing its short name"] # [doc = ""] # [doc = " Apply the git precendence rules to the given shorthand to determine"] # [doc = " which reference the user is referring to."] # [doc = ""] # [doc = " @param out pointer in which to store the reference"] # [doc = " @param repo the repository in which to look"] # [doc = " @param shorthand the short name for the reference"] # [doc = " @return 0 or an error code"] pub fn git_reference_dwim (out : * mut * mut git_reference , repo : * mut git_repository , shorthand : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Conditionally create a new symbolic reference."] # [doc = ""] # [doc = " A symbolic reference is a reference name that refers to another"] # [doc = " reference name.  If the other name moves, the symbolic name will move,"] # [doc = " too.  As a simple example, the \"HEAD\" reference might refer to"] # [doc = " \"refs/heads/master\" while on the \"master\" branch of a repository."] # [doc = ""] # [doc = " The symbolic reference will be created in the repository and written to"] # [doc = " the disk.  The generated reference object must be freed by the user."] # [doc = ""] # [doc = " Valid reference names must follow one of two patterns:"] # [doc = ""] # [doc = " 1. Top-level names must contain only capital letters and underscores,"] # [doc = "    and must begin and end with a letter. (e.g. \"HEAD\", \"ORIG_HEAD\")."] # [doc = " 2. Names prefixed with \"refs/\" can be almost anything.  You must avoid"] # [doc = "    the characters '~', '^', ':', '\\\\', '?', '[', and '*', and the"] # [doc = "    sequences \"..\" and \"@{\" which have special meaning to revparse."] # [doc = ""] # [doc = " This function will return an error if a reference already exists with the"] # [doc = " given name unless `force` is true, in which case it will be overwritten."] # [doc = ""] # [doc = " The message for the reflog will be ignored if the reference does"] # [doc = " not belong in the standard set (HEAD, branches and remote-tracking"] # [doc = " branches) and it does not have a reflog."] # [doc = ""] # [doc = " It will return GIT_EMODIFIED if the reference's value at the time"] # [doc = " of updating does not match the one passed through `current_value`"] # [doc = " (i.e. if the ref has changed since the user read it)."] # [doc = ""] # [doc = " If `current_value` is all zeros, this function will return GIT_EMODIFIED"] # [doc = " if the ref already exists."] # [doc = ""] # [doc = " @param out Pointer to the newly created reference"] # [doc = " @param repo Repository where that reference will live"] # [doc = " @param name The name of the reference"] # [doc = " @param target The target of the reference"] # [doc = " @param force Overwrite existing references"] # [doc = " @param current_value The expected value of the reference when updating"] # [doc = " @param log_message The one line long message to be appended to the reflog"] # [doc = " @return 0 on success, GIT_EEXISTS, GIT_EINVALIDSPEC, GIT_EMODIFIED or an error code"] pub fn git_reference_symbolic_create_matching (out : * mut * mut git_reference , repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char , target : * const :: std :: os :: raw :: c_char , force : :: std :: os :: raw :: c_int , current_value : * const :: std :: os :: raw :: c_char , log_message : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a new symbolic reference."] # [doc = ""] # [doc = " A symbolic reference is a reference name that refers to another"] # [doc = " reference name.  If the other name moves, the symbolic name will move,"] # [doc = " too.  As a simple example, the \"HEAD\" reference might refer to"] # [doc = " \"refs/heads/master\" while on the \"master\" branch of a repository."] # [doc = ""] # [doc = " The symbolic reference will be created in the repository and written to"] # [doc = " the disk.  The generated reference object must be freed by the user."] # [doc = ""] # [doc = " Valid reference names must follow one of two patterns:"] # [doc = ""] # [doc = " 1. Top-level names must contain only capital letters and underscores,"] # [doc = "    and must begin and end with a letter. (e.g. \"HEAD\", \"ORIG_HEAD\")."] # [doc = " 2. Names prefixed with \"refs/\" can be almost anything.  You must avoid"] # [doc = "    the characters '~', '^', ':', '\\\\', '?', '[', and '*', and the"] # [doc = "    sequences \"..\" and \"@{\" which have special meaning to revparse."] # [doc = ""] # [doc = " This function will return an error if a reference already exists with the"] # [doc = " given name unless `force` is true, in which case it will be overwritten."] # [doc = ""] # [doc = " The message for the reflog will be ignored if the reference does"] # [doc = " not belong in the standard set (HEAD, branches and remote-tracking"] # [doc = " branches) and it does not have a reflog."] # [doc = ""] # [doc = " @param out Pointer to the newly created reference"] # [doc = " @param repo Repository where that reference will live"] # [doc = " @param name The name of the reference"] # [doc = " @param target The target of the reference"] # [doc = " @param force Overwrite existing references"] # [doc = " @param log_message The one line long message to be appended to the reflog"] # [doc = " @return 0 on success, GIT_EEXISTS, GIT_EINVALIDSPEC or an error code"] pub fn git_reference_symbolic_create (out : * mut * mut git_reference , repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char , target : * const :: std :: os :: raw :: c_char , force : :: std :: os :: raw :: c_int , log_message : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a new direct reference."] # [doc = ""] # [doc = " A direct reference (also called an object id reference) refers directly"] # [doc = " to a specific object id (a.k.a. OID or SHA) in the repository.  The id"] # [doc = " permanently refers to the object (although the reference itself can be"] # [doc = " moved).  For example, in libgit2 the direct ref \"refs/tags/v0.17.0\""] # [doc = " refers to OID 5b9fac39d8a76b9139667c26a63e6b3f204b3977."] # [doc = ""] # [doc = " The direct reference will be created in the repository and written to"] # [doc = " the disk.  The generated reference object must be freed by the user."] # [doc = ""] # [doc = " Valid reference names must follow one of two patterns:"] # [doc = ""] # [doc = " 1. Top-level names must contain only capital letters and underscores,"] # [doc = "    and must begin and end with a letter. (e.g. \"HEAD\", \"ORIG_HEAD\")."] # [doc = " 2. Names prefixed with \"refs/\" can be almost anything.  You must avoid"] # [doc = "    the characters '~', '^', ':', '\\\\', '?', '[', and '*', and the"] # [doc = "    sequences \"..\" and \"@{\" which have special meaning to revparse."] # [doc = ""] # [doc = " This function will return an error if a reference already exists with the"] # [doc = " given name unless `force` is true, in which case it will be overwritten."] # [doc = ""] # [doc = " The message for the reflog will be ignored if the reference does"] # [doc = " not belong in the standard set (HEAD, branches and remote-tracking"] # [doc = " branches) and it does not have a reflog."] # [doc = ""] # [doc = " @param out Pointer to the newly created reference"] # [doc = " @param repo Repository where that reference will live"] # [doc = " @param name The name of the reference"] # [doc = " @param id The object id pointed to by the reference."] # [doc = " @param force Overwrite existing references"] # [doc = " @param log_message The one line long message to be appended to the reflog"] # [doc = " @return 0 on success, GIT_EEXISTS, GIT_EINVALIDSPEC or an error code"] pub fn git_reference_create (out : * mut * mut git_reference , repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char , id : * const git_oid , force : :: std :: os :: raw :: c_int , log_message : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Conditionally create new direct reference"] # [doc = ""] # [doc = " A direct reference (also called an object id reference) refers directly"] # [doc = " to a specific object id (a.k.a. OID or SHA) in the repository.  The id"] # [doc = " permanently refers to the object (although the reference itself can be"] # [doc = " moved).  For example, in libgit2 the direct ref \"refs/tags/v0.17.0\""] # [doc = " refers to OID 5b9fac39d8a76b9139667c26a63e6b3f204b3977."] # [doc = ""] # [doc = " The direct reference will be created in the repository and written to"] # [doc = " the disk.  The generated reference object must be freed by the user."] # [doc = ""] # [doc = " Valid reference names must follow one of two patterns:"] # [doc = ""] # [doc = " 1. Top-level names must contain only capital letters and underscores,"] # [doc = "    and must begin and end with a letter. (e.g. \"HEAD\", \"ORIG_HEAD\")."] # [doc = " 2. Names prefixed with \"refs/\" can be almost anything.  You must avoid"] # [doc = "    the characters '~', '^', ':', '\\\\', '?', '[', and '*', and the"] # [doc = "    sequences \"..\" and \"@{\" which have special meaning to revparse."] # [doc = ""] # [doc = " This function will return an error if a reference already exists with the"] # [doc = " given name unless `force` is true, in which case it will be overwritten."] # [doc = ""] # [doc = " The message for the reflog will be ignored if the reference does"] # [doc = " not belong in the standard set (HEAD, branches and remote-tracking"] # [doc = " branches) and it does not have a reflog."] # [doc = ""] # [doc = " It will return GIT_EMODIFIED if the reference's value at the time"] # [doc = " of updating does not match the one passed through `current_id`"] # [doc = " (i.e. if the ref has changed since the user read it)."] # [doc = ""] # [doc = " @param out Pointer to the newly created reference"] # [doc = " @param repo Repository where that reference will live"] # [doc = " @param name The name of the reference"] # [doc = " @param id The object id pointed to by the reference."] # [doc = " @param force Overwrite existing references"] # [doc = " @param current_id The expected value of the reference at the time of update"] # [doc = " @param log_message The one line long message to be appended to the reflog"] # [doc = " @return 0 on success, GIT_EMODIFIED if the value of the reference"] # [doc = " has changed, GIT_EEXISTS, GIT_EINVALIDSPEC or an error code"] pub fn git_reference_create_matching (out : * mut * mut git_reference , repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char , id : * const git_oid , force : :: std :: os :: raw :: c_int , current_id : * const git_oid , log_message : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the OID pointed to by a direct reference."] # [doc = ""] # [doc = " Only available if the reference is direct (i.e. an object id reference,"] # [doc = " not a symbolic one)."] # [doc = ""] # [doc = " To find the OID of a symbolic ref, call `git_reference_resolve()` and"] # [doc = " then this function (or maybe use `git_reference_name_to_id()` to"] # [doc = " directly resolve a reference name all the way through to an OID)."] # [doc = ""] # [doc = " @param ref The reference"] # [doc = " @return a pointer to the oid if available, NULL otherwise"] pub fn git_reference_target (ref_ : * const git_reference) -> * const git_oid ; } extern "C" { # [doc = " Return the peeled OID target of this reference."] # [doc = ""] # [doc = " This peeled OID only applies to direct references that point to"] # [doc = " a hard Tag object: it is the result of peeling such Tag."] # [doc = ""] # [doc = " @param ref The reference"] # [doc = " @return a pointer to the oid if available, NULL otherwise"] pub fn git_reference_target_peel (ref_ : * const git_reference) -> * const git_oid ; } extern "C" { # [doc = " Get full name to the reference pointed to by a symbolic reference."] # [doc = ""] # [doc = " Only available if the reference is symbolic."] # [doc = ""] # [doc = " @param ref The reference"] # [doc = " @return a pointer to the name if available, NULL otherwise"] pub fn git_reference_symbolic_target (ref_ : * const git_reference) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Get the type of a reference."] # [doc = ""] # [doc = " Either direct (GIT_REFERENCE_DIRECT) or symbolic (GIT_REFERENCE_SYMBOLIC)"] # [doc = ""] # [doc = " @param ref The reference"] # [doc = " @return the type"] pub fn git_reference_type (ref_ : * const git_reference) -> git_reference_t ; } extern "C" { # [doc = " Get the full name of a reference."] # [doc = ""] # [doc = " See `git_reference_symbolic_create()` for rules about valid names."] # [doc = ""] # [doc = " @param ref The reference"] # [doc = " @return the full name for the ref"] pub fn git_reference_name (ref_ : * const git_reference) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Resolve a symbolic reference to a direct reference."] # [doc = ""] # [doc = " This method iteratively peels a symbolic reference until it resolves to"] # [doc = " a direct reference to an OID."] # [doc = ""] # [doc = " The peeled reference is returned in the `resolved_ref` argument, and"] # [doc = " must be freed manually once it's no longer needed."] # [doc = ""] # [doc = " If a direct reference is passed as an argument, a copy of that"] # [doc = " reference is returned. This copy must be manually freed too."] # [doc = ""] # [doc = " @param out Pointer to the peeled reference"] # [doc = " @param ref The reference"] # [doc = " @return 0 or an error code"] pub fn git_reference_resolve (out : * mut * mut git_reference , ref_ : * const git_reference) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the repository where a reference resides."] # [doc = ""] # [doc = " @param ref The reference"] # [doc = " @return a pointer to the repo"] pub fn git_reference_owner (ref_ : * const git_reference) -> * mut git_repository ; } extern "C" { # [doc = " Create a new reference with the same name as the given reference but a"] # [doc = " different symbolic target. The reference must be a symbolic reference,"] # [doc = " otherwise this will fail."] # [doc = ""] # [doc = " The new reference will be written to disk, overwriting the given reference."] # [doc = ""] # [doc = " The target name will be checked for validity."] # [doc = " See `git_reference_symbolic_create()` for rules about valid names."] # [doc = ""] # [doc = " The message for the reflog will be ignored if the reference does"] # [doc = " not belong in the standard set (HEAD, branches and remote-tracking"] # [doc = " branches) and it does not have a reflog."] # [doc = ""] # [doc = " @param out Pointer to the newly created reference"] # [doc = " @param ref The reference"] # [doc = " @param target The new target for the reference"] # [doc = " @param log_message The one line long message to be appended to the reflog"] # [doc = " @return 0 on success, GIT_EINVALIDSPEC or an error code"] pub fn git_reference_symbolic_set_target (out : * mut * mut git_reference , ref_ : * mut git_reference , target : * const :: std :: os :: raw :: c_char , log_message : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Conditionally create a new reference with the same name as the given reference but a"] # [doc = " different OID target. The reference must be a direct reference, otherwise"] # [doc = " this will fail."] # [doc = ""] # [doc = " The new reference will be written to disk, overwriting the given reference."] # [doc = ""] # [doc = " @param out Pointer to the newly created reference"] # [doc = " @param ref The reference"] # [doc = " @param id The new target OID for the reference"] # [doc = " @param log_message The one line long message to be appended to the reflog"] # [doc = " @return 0 on success, GIT_EMODIFIED if the value of the reference"] # [doc = " has changed since it was read, or an error code"] pub fn git_reference_set_target (out : * mut * mut git_reference , ref_ : * mut git_reference , id : * const git_oid , log_message : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Rename an existing reference."] # [doc = ""] # [doc = " This method works for both direct and symbolic references."] # [doc = ""] # [doc = " The new name will be checked for validity."] # [doc = " See `git_reference_symbolic_create()` for rules about valid names."] # [doc = ""] # [doc = " If the `force` flag is not enabled, and there's already"] # [doc = " a reference with the given name, the renaming will fail."] # [doc = ""] # [doc = " IMPORTANT:"] # [doc = " The user needs to write a proper reflog entry if the"] # [doc = " reflog is enabled for the repository. We only rename"] # [doc = " the reflog if it exists."] # [doc = ""] # [doc = " @param ref The reference to rename"] # [doc = " @param new_name The new name for the reference"] # [doc = " @param force Overwrite an existing reference"] # [doc = " @param log_message The one line long message to be appended to the reflog"] # [doc = " @return 0 on success, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code"] # [doc = ""] pub fn git_reference_rename (new_ref : * mut * mut git_reference , ref_ : * mut git_reference , new_name : * const :: std :: os :: raw :: c_char , force : :: std :: os :: raw :: c_int , log_message : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Delete an existing reference."] # [doc = ""] # [doc = " This method works for both direct and symbolic references.  The reference"] # [doc = " will be immediately removed on disk but the memory will not be freed."] # [doc = " Callers must call `git_reference_free`."] # [doc = ""] # [doc = " This function will return an error if the reference has changed"] # [doc = " from the time it was looked up."] # [doc = ""] # [doc = " @param ref The reference to remove"] # [doc = " @return 0, GIT_EMODIFIED or an error code"] pub fn git_reference_delete (ref_ : * mut git_reference) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Delete an existing reference by name"] # [doc = ""] # [doc = " This method removes the named reference from the repository without"] # [doc = " looking at its old value."] # [doc = ""] # [doc = " @param name The reference to remove"] # [doc = " @return 0 or an error code"] pub fn git_reference_remove (repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Fill a list with all the references that can be found in a repository."] # [doc = ""] # [doc = " The string array will be filled with the names of all references; these"] # [doc = " values are owned by the user and should be free'd manually when no"] # [doc = " longer needed, using `git_strarray_free()`."] # [doc = ""] # [doc = " @param array Pointer to a git_strarray structure where"] # [doc = "\t\tthe reference names will be stored"] # [doc = " @param repo Repository where to find the refs"] # [doc = " @return 0 or an error code"] pub fn git_reference_list (array : * mut git_strarray , repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } # [doc = " Callback used to iterate over references"] # [doc = ""] # [doc = " @see git_reference_foreach"] # [doc = ""] # [doc = " @param reference The reference object"] # [doc = " @param payload Payload passed to git_reference_foreach"] # [doc = " @return non-zero to terminate the iteration"] pub type git_reference_foreach_cb = :: std :: option :: Option < unsafe extern "C" fn (reference : * mut git_reference , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = " Callback used to iterate over reference names"] # [doc = ""] # [doc = " @see git_reference_foreach_name"] # [doc = ""] # [doc = " @param name The reference name"] # [doc = " @param payload Payload passed to git_reference_foreach_name"] # [doc = " @return non-zero to terminate the iteration"] pub type git_reference_foreach_name_cb = :: std :: option :: Option < unsafe extern "C" fn (name : * const :: std :: os :: raw :: c_char , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; extern "C" { # [doc = " Perform a callback on each reference in the repository."] # [doc = ""] # [doc = " The `callback` function will be called for each reference in the"] # [doc = " repository, receiving the reference object and the `payload` value"] # [doc = " passed to this method.  Returning a non-zero value from the callback"] # [doc = " will terminate the iteration."] # [doc = ""] # [doc = " Note that the callback function is responsible to call `git_reference_free`"] # [doc = " on each reference passed to it."] # [doc = ""] # [doc = " @param repo Repository where to find the refs"] # [doc = " @param callback Function which will be called for every listed ref"] # [doc = " @param payload Additional data to pass to the callback"] # [doc = " @return 0 on success, non-zero callback return value, or error code"] pub fn git_reference_foreach (repo : * mut git_repository , callback : git_reference_foreach_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Perform a callback on the fully-qualified name of each reference."] # [doc = ""] # [doc = " The `callback` function will be called for each reference in the"] # [doc = " repository, receiving the name of the reference and the `payload` value"] # [doc = " passed to this method.  Returning a non-zero value from the callback"] # [doc = " will terminate the iteration."] # [doc = ""] # [doc = " @param repo Repository where to find the refs"] # [doc = " @param callback Function which will be called for every listed ref name"] # [doc = " @param payload Additional data to pass to the callback"] # [doc = " @return 0 on success, non-zero callback return value, or error code"] pub fn git_reference_foreach_name (repo : * mut git_repository , callback : git_reference_foreach_name_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a copy of an existing reference."] # [doc = ""] # [doc = " Call `git_reference_free` to free the data."] # [doc = ""] # [doc = " @param dest pointer where to store the copy"] # [doc = " @param source object to copy"] # [doc = " @return 0 or an error code"] pub fn git_reference_dup (dest : * mut * mut git_reference , source : * mut git_reference) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free the given reference."] # [doc = ""] # [doc = " @param ref git_reference"] pub fn git_reference_free (ref_ : * mut git_reference) ; } extern "C" { # [doc = " Compare two references."] # [doc = ""] # [doc = " @param ref1 The first git_reference"] # [doc = " @param ref2 The second git_reference"] # [doc = " @return 0 if the same, else a stable but meaningless ordering."] pub fn git_reference_cmp (ref1 : * const git_reference , ref2 : * const git_reference) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create an iterator for the repo's references"] # [doc = ""] # [doc = " @param out pointer in which to store the iterator"] # [doc = " @param repo the repository"] # [doc = " @return 0 or an error code"] pub fn git_reference_iterator_new (out : * mut * mut git_reference_iterator , repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create an iterator for the repo's references that match the"] # [doc = " specified glob"] # [doc = ""] # [doc = " @param out pointer in which to store the iterator"] # [doc = " @param repo the repository"] # [doc = " @param glob the glob to match against the reference names"] # [doc = " @return 0 or an error code"] pub fn git_reference_iterator_glob_new (out : * mut * mut git_reference_iterator , repo : * mut git_repository , glob : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the next reference"] # [doc = ""] # [doc = " @param out pointer in which to store the reference"] # [doc = " @param iter the iterator"] # [doc = " @return 0, GIT_ITEROVER if there are no more; or an error code"] pub fn git_reference_next (out : * mut * mut git_reference , iter : * mut git_reference_iterator) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the next reference's name"] # [doc = ""] # [doc = " This function is provided for convenience in case only the names"] # [doc = " are interesting as it avoids the allocation of the `git_reference`"] # [doc = " object which `git_reference_next()` needs."] # [doc = ""] # [doc = " @param out pointer in which to store the string"] # [doc = " @param iter the iterator"] # [doc = " @return 0, GIT_ITEROVER if there are no more; or an error code"] pub fn git_reference_next_name (out : * mut * const :: std :: os :: raw :: c_char , iter : * mut git_reference_iterator) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free the iterator and its associated resources"] # [doc = ""] # [doc = " @param iter the iterator to free"] pub fn git_reference_iterator_free (iter : * mut git_reference_iterator) ; } extern "C" { # [doc = " Perform a callback on each reference in the repository whose name"] # [doc = " matches the given pattern."] # [doc = ""] # [doc = " This function acts like `git_reference_foreach()` with an additional"] # [doc = " pattern match being applied to the reference name before issuing the"] # [doc = " callback function.  See that function for more information."] # [doc = ""] # [doc = " The pattern is matched using fnmatch or \"glob\" style where a '*' matches"] # [doc = " any sequence of letters, a '?' matches any letter, and square brackets"] # [doc = " can be used to define character ranges (such as \"[0-9]\" for digits)."] # [doc = ""] # [doc = " @param repo Repository where to find the refs"] # [doc = " @param glob Pattern to match (fnmatch-style) against reference name."] # [doc = " @param callback Function which will be called for every listed ref"] # [doc = " @param payload Additional data to pass to the callback"] # [doc = " @return 0 on success, GIT_EUSER on non-zero callback, or error code"] pub fn git_reference_foreach_glob (repo : * mut git_repository , glob : * const :: std :: os :: raw :: c_char , callback : git_reference_foreach_name_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Check if a reflog exists for the specified reference."] # [doc = ""] # [doc = " @param repo the repository"] # [doc = " @param refname the reference's name"] # [doc = " @return 0 when no reflog can be found, 1 when it exists;"] # [doc = " otherwise an error code."] pub fn git_reference_has_log (repo : * mut git_repository , refname : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Ensure there is a reflog for a particular reference."] # [doc = ""] # [doc = " Make sure that successive updates to the reference will append to"] # [doc = " its log."] # [doc = ""] # [doc = " @param repo the repository"] # [doc = " @param refname the reference's name"] # [doc = " @return 0 or an error code."] pub fn git_reference_ensure_log (repo : * mut git_repository , refname : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Check if a reference is a local branch."] # [doc = ""] # [doc = " @param ref A git reference"] # [doc = ""] # [doc = " @return 1 when the reference lives in the refs/heads"] # [doc = " namespace; 0 otherwise."] pub fn git_reference_is_branch (ref_ : * const git_reference) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Check if a reference is a remote tracking branch"] # [doc = ""] # [doc = " @param ref A git reference"] # [doc = ""] # [doc = " @return 1 when the reference lives in the refs/remotes"] # [doc = " namespace; 0 otherwise."] pub fn git_reference_is_remote (ref_ : * const git_reference) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Check if a reference is a tag"] # [doc = ""] # [doc = " @param ref A git reference"] # [doc = ""] # [doc = " @return 1 when the reference lives in the refs/tags"] # [doc = " namespace; 0 otherwise."] pub fn git_reference_is_tag (ref_ : * const git_reference) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Check if a reference is a note"] # [doc = ""] # [doc = " @param ref A git reference"] # [doc = ""] # [doc = " @return 1 when the reference lives in the refs/notes"] # [doc = " namespace; 0 otherwise."] pub fn git_reference_is_note (ref_ : * const git_reference) -> :: std :: os :: raw :: c_int ; } # [doc = " No particular normalization."] pub const git_reference_format_t_GIT_REFERENCE_FORMAT_NORMAL : git_reference_format_t = 0 ; # [doc = " Control whether one-level refnames are accepted"] # [doc = " (i.e., refnames that do not contain multiple /-separated"] # [doc = " components). Those are expected to be written only using"] # [doc = " uppercase letters and underscore (FETCH_HEAD, ...)"] pub const git_reference_format_t_GIT_REFERENCE_FORMAT_ALLOW_ONELEVEL : git_reference_format_t = 1 ; `# [doc = " Interpret the provided name as a reference pattern for a"] # [doc = " refspec (as used with remote repositories). If this option"] # [doc = " is enabled, the name is allowed to contain a single * (<star>)"] # [doc = " in place of a one full pathname component"] # [doc = " (e.g., foo/<star>/bar but not foo/bar<star>)."]` pub const git_reference_format_t_GIT_REFERENCE_FORMAT_REFSPEC_PATTERN : git_reference_format_t = 2 ; # [doc = " Interpret the name as part of a refspec in shorthand form"] # [doc = " so the `ONELEVEL` naming rules aren't enforced and 'master'"] # [doc = " becomes a valid name."] pub const git_reference_format_t_GIT_REFERENCE_FORMAT_REFSPEC_SHORTHAND : git_reference_format_t = 4 ; # [doc = " Normalization options for reference lookup"] pub type git_reference_format_t = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = " Normalize reference name and check validity."] # [doc = ""] # [doc = " This will normalize the reference name by removing any leading slash"] # [doc = " '/' characters and collapsing runs of adjacent slashes between name"] # [doc = " components into a single slash."] # [doc = ""] # [doc = " Once normalized, if the reference name is valid, it will be returned in"] # [doc = " the user allocated buffer."] # [doc = ""] # [doc = " See `git_reference_symbolic_create()` for rules about valid names."] # [doc = ""] # [doc = " @param buffer_out User allocated buffer to store normalized name"] # [doc = " @param buffer_size Size of buffer_out"] # [doc = " @param name Reference name to be checked."] # [doc = " @param flags Flags to constrain name validation rules - see the"] # [doc = "              GIT_REFERENCE_FORMAT constants above."] # [doc = " @return 0 on success, GIT_EBUFS if buffer is too small, GIT_EINVALIDSPEC"] # [doc = " or an error code."] pub fn git_reference_normalize_name (buffer_out : * mut :: std :: os :: raw :: c_char , buffer_size : size_t , name : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Recursively peel reference until object of the specified type is found."] # [doc = ""] # [doc = " The retrieved `peeled` object is owned by the repository"] # [doc = " and should be closed with the `git_object_free` method."] # [doc = ""] # [doc = " If you pass `GIT_OBJECT_ANY` as the target type, then the object"] # [doc = " will be peeled until a non-tag object is met."] # [doc = ""] # [doc = " @param out Pointer to the peeled git_object"] # [doc = " @param ref The reference to be processed"] # [doc = " @param type The type of the requested object (GIT_OBJECT_COMMIT,"] # [doc = " GIT_OBJECT_TAG, GIT_OBJECT_TREE, GIT_OBJECT_BLOB or GIT_OBJECT_ANY)."] # [doc = " @return 0 on success, GIT_EAMBIGUOUS, GIT_ENOTFOUND or an error code"] pub fn git_reference_peel (out : * mut * mut git_object , ref_ : * const git_reference , type_ : git_object_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Ensure the reference name is well-formed."] # [doc = ""] # [doc = " Valid reference names must follow one of two patterns:"] # [doc = ""] # [doc = " 1. Top-level names must contain only capital letters and underscores,"] # [doc = "    and must begin and end with a letter. (e.g. \"HEAD\", \"ORIG_HEAD\")."] # [doc = " 2. Names prefixed with \"refs/\" can be almost anything.  You must avoid"] # [doc = "    the characters '~', '^', ':', '\\\\', '?', '[', and '*', and the"] # [doc = "    sequences \"..\" and \"@{\" which have special meaning to revparse."] # [doc = ""] # [doc = " @param valid output pointer to set with validity of given reference name"] # [doc = " @param refname name to be checked."] # [doc = " @return 0 on success or an error code"] pub fn git_reference_name_is_valid (valid : * mut :: std :: os :: raw :: c_int , refname : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the reference's short name"] # [doc = ""] # [doc = " This will transform the reference name into a name \"human-readable\""] # [doc = " version. If no shortname is appropriate, it will return the full"] # [doc = " name."] # [doc = ""] # [doc = " The memory is owned by the reference and must not be freed."] # [doc = ""] # [doc = " @param ref a reference"] # [doc = " @return the human-readable version of the name"] pub fn git_reference_shorthand (ref_ : * const git_reference) -> * const :: std :: os :: raw :: c_char ; } # [doc = " Normal diff, the default"] pub const git_diff_option_t_GIT_DIFF_NORMAL : git_diff_option_t = 0 ; # [doc = " Reverse the sides of the diff"] pub const git_diff_option_t_GIT_DIFF_REVERSE : git_diff_option_t = 1 ; # [doc = " Include ignored files in the diff"] pub const git_diff_option_t_GIT_DIFF_INCLUDE_IGNORED : git_diff_option_t = 2 ; # [doc = " Even with GIT_DIFF_INCLUDE_IGNORED, an entire ignored directory"] # [doc = "  will be marked with only a single entry in the diff; this flag"] # [doc = "  adds all files under the directory as IGNORED entries, too."] pub const git_diff_option_t_GIT_DIFF_RECURSE_IGNORED_DIRS : git_diff_option_t = 4 ; # [doc = " Include untracked files in the diff"] pub const git_diff_option_t_GIT_DIFF_INCLUDE_UNTRACKED : git_diff_option_t = 8 ; # [doc = " Even with GIT_DIFF_INCLUDE_UNTRACKED, an entire untracked"] # [doc = "  directory will be marked with only a single entry in the diff"] # [doc = "  (a la what core Git does in `git status`); this flag adds *all*"] # [doc = "  files under untracked directories as UNTRACKED entries, too."] pub const git_diff_option_t_GIT_DIFF_RECURSE_UNTRACKED_DIRS : git_diff_option_t = 16 ; # [doc = " Include unmodified files in the diff"] pub const git_diff_option_t_GIT_DIFF_INCLUDE_UNMODIFIED : git_diff_option_t = 32 ; # [doc = " Normally, a type change between files will be converted into a"] # [doc = "  DELETED record for the old and an ADDED record for the new; this"] # [doc = "  options enabled the generation of TYPECHANGE delta records."] pub const git_diff_option_t_GIT_DIFF_INCLUDE_TYPECHANGE : git_diff_option_t = 64 ; # [doc = " Even with GIT_DIFF_INCLUDE_TYPECHANGE, blob->tree changes still"] # [doc = "  generally show as a DELETED blob.  This flag tries to correctly"] # [doc = "  label blob->tree transitions as TYPECHANGE records with new_file's"] # [doc = "  mode set to tree.  Note: the tree SHA will not be available."] pub const git_diff_option_t_GIT_DIFF_INCLUDE_TYPECHANGE_TREES : git_diff_option_t = 128 ; # [doc = " Ignore file mode changes"] pub const git_diff_option_t_GIT_DIFF_IGNORE_FILEMODE : git_diff_option_t = 256 ; # [doc = " Treat all submodules as unmodified"] pub const git_diff_option_t_GIT_DIFF_IGNORE_SUBMODULES : git_diff_option_t = 512 ; # [doc = " Use case insensitive filename comparisons"] pub const git_diff_option_t_GIT_DIFF_IGNORE_CASE : git_diff_option_t = 1024 ; # [doc = " May be combined with `GIT_DIFF_IGNORE_CASE` to specify that a file"] # [doc = "  that has changed case will be returned as an add/delete pair."] pub const git_diff_option_t_GIT_DIFF_INCLUDE_CASECHANGE : git_diff_option_t = 2048 ; # [doc = " If the pathspec is set in the diff options, this flags indicates"] # [doc = "  that the paths will be treated as literal paths instead of"] # [doc = "  fnmatch patterns.  Each path in the list must either be a full"] # [doc = "  path to a file or a directory.  (A trailing slash indicates that"] # [doc = "  the path will _only_ match a directory).  If a directory is"] # [doc = "  specified, all children will be included."] pub const git_diff_option_t_GIT_DIFF_DISABLE_PATHSPEC_MATCH : git_diff_option_t = 4096 ; # [doc = " Disable updating of the `binary` flag in delta records.  This is"] # [doc = "  useful when iterating over a diff if you don't need hunk and data"] # [doc = "  callbacks and want to avoid having to load file completely."] pub const git_diff_option_t_GIT_DIFF_SKIP_BINARY_CHECK : git_diff_option_t = 8192 ; # [doc = " When diff finds an untracked directory, to match the behavior of"] # [doc = "  core Git, it scans the contents for IGNORED and UNTRACKED files."] # [doc = "  If *all* contents are IGNORED, then the directory is IGNORED; if"] # [doc = "  any contents are not IGNORED, then the directory is UNTRACKED."] # [doc = "  This is extra work that may not matter in many cases.  This flag"] # [doc = "  turns off that scan and immediately labels an untracked directory"] # [doc = "  as UNTRACKED (changing the behavior to not match core Git)."] pub const git_diff_option_t_GIT_DIFF_ENABLE_FAST_UNTRACKED_DIRS : git_diff_option_t = 16384 ; # [doc = " When diff finds a file in the working directory with stat"] # [doc = " information different from the index, but the OID ends up being the"] # [doc = " same, write the correct stat information into the index.  Note:"] # [doc = " without this flag, diff will always leave the index untouched."] pub const git_diff_option_t_GIT_DIFF_UPDATE_INDEX : git_diff_option_t = 32768 ; # [doc = " Include unreadable files in the diff"] pub const git_diff_option_t_GIT_DIFF_INCLUDE_UNREADABLE : git_diff_option_t = 65536 ; # [doc = " Include unreadable files in the diff"] pub const git_diff_option_t_GIT_DIFF_INCLUDE_UNREADABLE_AS_UNTRACKED : git_diff_option_t = 131072 ; # [doc = " Use a heuristic that takes indentation and whitespace into account"] # [doc = " which generally can produce better diffs when dealing with ambiguous"] # [doc = " diff hunks."] pub const git_diff_option_t_GIT_DIFF_INDENT_HEURISTIC : git_diff_option_t = 262144 ; # [doc = " Ignore blank lines"] pub const git_diff_option_t_GIT_DIFF_IGNORE_BLANK_LINES : git_diff_option_t = 524288 ; # [doc = " Treat all files as text, disabling binary attributes & detection"] pub const git_diff_option_t_GIT_DIFF_FORCE_TEXT : git_diff_option_t = 1048576 ; # [doc = " Treat all files as binary, disabling text diffs"] pub const git_diff_option_t_GIT_DIFF_FORCE_BINARY : git_diff_option_t = 2097152 ; # [doc = " Ignore all whitespace"] pub const git_diff_option_t_GIT_DIFF_IGNORE_WHITESPACE : git_diff_option_t = 4194304 ; # [doc = " Ignore changes in amount of whitespace"] pub const git_diff_option_t_GIT_DIFF_IGNORE_WHITESPACE_CHANGE : git_diff_option_t = 8388608 ; # [doc = " Ignore whitespace at end of line"] pub const git_diff_option_t_GIT_DIFF_IGNORE_WHITESPACE_EOL : git_diff_option_t = 16777216 ; # [doc = " When generating patch text, include the content of untracked"] # [doc = "  files.  This automatically turns on GIT_DIFF_INCLUDE_UNTRACKED but"] # [doc = "  it does not turn on GIT_DIFF_RECURSE_UNTRACKED_DIRS.  Add that"] # [doc = "  flag if you want the content of every single UNTRACKED file."] pub const git_diff_option_t_GIT_DIFF_SHOW_UNTRACKED_CONTENT : git_diff_option_t = 33554432 ; # [doc = " When generating output, include the names of unmodified files if"] # [doc = "  they are included in the git_diff.  Normally these are skipped in"] # [doc = "  the formats that list files (e.g. name-only, name-status, raw)."] # [doc = "  Even with this, these will not be included in patch format."] pub const git_diff_option_t_GIT_DIFF_SHOW_UNMODIFIED : git_diff_option_t = 67108864 ; # [doc = " Use the \"patience diff\" algorithm"] pub const git_diff_option_t_GIT_DIFF_PATIENCE : git_diff_option_t = 268435456 ; # [doc = " Take extra time to find minimal diff"] pub const git_diff_option_t_GIT_DIFF_MINIMAL : git_diff_option_t = 536870912 ; # [doc = " Include the necessary deflate / delta information so that `git-apply`"] # [doc = "  can apply given diff information to binary files."] pub const git_diff_option_t_GIT_DIFF_SHOW_BINARY : git_diff_option_t = 1073741824 ; # [doc = " Flags for diff options.  A combination of these flags can be passed"] # [doc = " in via the `flags` value in the `git_diff_options`."] pub type git_diff_option_t = :: std :: os :: raw :: c_uint ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_diff { _unused : [u8 ; 0] , } # [doc = "< file(s) treated as binary data"] pub const git_diff_flag_t_GIT_DIFF_FLAG_BINARY : git_diff_flag_t = 1 ; # [doc = "< file(s) treated as text data"] pub const git_diff_flag_t_GIT_DIFF_FLAG_NOT_BINARY : git_diff_flag_t = 2 ; # [doc = "< `id` value is known correct"] pub const git_diff_flag_t_GIT_DIFF_FLAG_VALID_ID : git_diff_flag_t = 4 ; # [doc = "< file exists at this side of the delta"] pub const git_diff_flag_t_GIT_DIFF_FLAG_EXISTS : git_diff_flag_t = 8 ; # [doc = " Flags for the delta object and the file objects on each side."] # [doc = ""] # [doc = " These flags are used for both the `flags` value of the `git_diff_delta`"] # [doc = " and the flags for the `git_diff_file` objects representing the old and"] # [doc = " new sides of the delta.  Values outside of this public range should be"] # [doc = " considered reserved for internal or future use."] pub type git_diff_flag_t = :: std :: os :: raw :: c_uint ; # [doc = "< no changes"] pub const git_delta_t_GIT_DELTA_UNMODIFIED : git_delta_t = 0 ; # [doc = "< entry does not exist in old version"] pub const git_delta_t_GIT_DELTA_ADDED : git_delta_t = 1 ; # [doc = "< entry does not exist in new version"] pub const git_delta_t_GIT_DELTA_DELETED : git_delta_t = 2 ; # [doc = "< entry content changed between old and new"] pub const git_delta_t_GIT_DELTA_MODIFIED : git_delta_t = 3 ; # [doc = "< entry was renamed between old and new"] pub const git_delta_t_GIT_DELTA_RENAMED : git_delta_t = 4 ; # [doc = "< entry was copied from another old entry"] pub const git_delta_t_GIT_DELTA_COPIED : git_delta_t = 5 ; # [doc = "< entry is ignored item in workdir"] pub const git_delta_t_GIT_DELTA_IGNORED : git_delta_t = 6 ; # [doc = "< entry is untracked item in workdir"] pub const git_delta_t_GIT_DELTA_UNTRACKED : git_delta_t = 7 ; # [doc = "< type of entry changed between old and new"] pub const git_delta_t_GIT_DELTA_TYPECHANGE : git_delta_t = 8 ; # [doc = "< entry is unreadable"] pub const git_delta_t_GIT_DELTA_UNREADABLE : git_delta_t = 9 ; # [doc = "< entry in the index is conflicted"] pub const git_delta_t_GIT_DELTA_CONFLICTED : git_delta_t = 10 ; # [doc = " What type of change is described by a git_diff_delta?"] # [doc = ""] # [doc = " `GIT_DELTA_RENAMED` and `GIT_DELTA_COPIED` will only show up if you run"] # [doc = " `git_diff_find_similar()` on the diff object."] # [doc = ""] # [doc = " `GIT_DELTA_TYPECHANGE` only shows up given `GIT_DIFF_INCLUDE_TYPECHANGE`"] # [doc = " in the option flags (otherwise type changes will be split into ADDED /"] # [doc = " DELETED pairs)."] pub type git_delta_t = :: std :: os :: raw :: c_uint ; # [doc = " Description of one side of a delta."] # [doc = ""] # [doc = " Although this is called a \"file\", it could represent a file, a symbolic"] # [doc = " link, a submodule commit id, or even a tree (although that only if you"] # [doc = " are tracking type changes or ignored/untracked directories)."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_diff_file { # [doc = " The `git_oid` of the item.  If the entry represents an"] # [doc = " absent side of a diff (e.g. the `old_file` of a `GIT_DELTA_ADDED` delta),"] # [doc = " then the oid will be zeroes."] pub id : git_oid , # [doc = " The NUL-terminated path to the entry relative to the working"] # [doc = " directory of the repository."] pub path : * const :: std :: os :: raw :: c_char , # [doc = " The size of the entry in bytes."] pub size : git_object_size_t , # [doc = " A combination of the `git_diff_flag_t` types"] pub flags : u32 , # [doc = " Roughly, the stat() `st_mode` value for the item.  This will"] # [doc = " be restricted to one of the `git_filemode_t` values."] pub mode : u16 , # [doc = " Represents the known length of the `id` field, when"] # [doc = " converted to a hex string.  It is generally `GIT_OID_HEXSZ`, unless this"] # [doc = " delta was created from reading a patch file, in which case it may be"] # [doc = " abbreviated to something reasonable, like 7 characters."] pub id_abbrev : u16 , } # [test] fn bindgen_test_layout_git_diff_file () { assert_eq ! (:: std :: mem :: size_of :: < git_diff_file > () , 48usize , concat ! ("Size of: " , stringify ! (git_diff_file))) ; assert_eq ! (:: std :: mem :: align_of :: < git_diff_file > () , 8usize , concat ! ("Alignment of " , stringify ! (git_diff_file))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_file > ())) . id as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_diff_file) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_file > ())) . path as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_diff_file) , "::" , stringify ! (path))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_file > ())) . size as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (git_diff_file) , "::" , stringify ! (size))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_file > ())) . flags as * const _ as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (git_diff_file) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_file > ())) . mode as * const _ as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (git_diff_file) , "::" , stringify ! (mode))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_file > ())) . id_abbrev as * const _ as usize } , 46usize , concat ! ("Offset of field: " , stringify ! (git_diff_file) , "::" , stringify ! (id_abbrev))) ; } # [doc = " Description of changes to one entry."] # [doc = ""] # [doc = " A `delta` is a file pair with an old and new revision.  The old version"] # [doc = " may be absent if the file was just created and the new version may be"] # [doc = " absent if the file was deleted.  A diff is mostly just a list of deltas."] # [doc = ""] # [doc = " When iterating over a diff, this will be passed to most callbacks and"] # [doc = " you can use the contents to understand exactly what has changed."] # [doc = ""] # [doc = " The `old_file` represents the \"from\" side of the diff and the `new_file`"] # [doc = " represents to \"to\" side of the diff.  What those means depend on the"] # [doc = " function that was used to generate the diff and will be documented below."] # [doc = " You can also use the `GIT_DIFF_REVERSE` flag to flip it around."] # [doc = ""] # [doc = " Although the two sides of the delta are named \"old_file\" and \"new_file\","] # [doc = " they actually may correspond to entries that represent a file, a symbolic"] # [doc = " link, a submodule commit id, or even a tree (if you are tracking type"] # [doc = " changes or ignored/untracked directories)."] # [doc = ""] # [doc = " Under some circumstances, in the name of efficiency, not all fields will"] # [doc = " be filled in, but we generally try to fill in as much as possible.  One"] # [doc = " example is that the \"flags\" field may not have either the `BINARY` or the"] # [doc = " `NOT_BINARY` flag set to avoid examining file contents if you do not pass"] # [doc = " in hunk and/or line callbacks to the diff foreach iteration function.  It"] # [doc = " will just use the git attributes for those files."] # [doc = ""] # [doc = " The similarity score is zero unless you call `git_diff_find_similar()`"] # [doc = " which does a similarity analysis of files in the diff.  Use that"] # [doc = " function to do rename and copy detection, and to split heavily modified"] # [doc = " files in add/delete pairs.  After that call, deltas with a status of"] # [doc = " GIT_DELTA_RENAMED or GIT_DELTA_COPIED will have a similarity score"] # [doc = " between 0 and 100 indicating how similar the old and new sides are."] # [doc = ""] # [doc = " If you ask `git_diff_find_similar` to find heavily modified files to"] # [doc = " break, but to not *actually* break the records, then GIT_DELTA_MODIFIED"] # [doc = " records may have a non-zero similarity score if the self-similarity is"] # [doc = " below the split threshold.  To display this value like core Git, invert"] # [doc = " the score (a la `printf(\"M%03d\", 100 - delta->similarity)`)."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_diff_delta { pub status : git_delta_t , # [doc = "< git_diff_flag_t values"] pub flags : u32 , # [doc = "< for RENAMED and COPIED, value 0-100"] pub similarity : u16 , # [doc = "< number of files in this delta"] pub nfiles : u16 , pub old_file : git_diff_file , pub new_file : git_diff_file , } # [test] fn bindgen_test_layout_git_diff_delta () { assert_eq ! (:: std :: mem :: size_of :: < git_diff_delta > () , 112usize , concat ! ("Size of: " , stringify ! (git_diff_delta))) ; assert_eq ! (:: std :: mem :: align_of :: < git_diff_delta > () , 8usize , concat ! ("Alignment of " , stringify ! (git_diff_delta))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_delta > ())) . status as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_diff_delta) , "::" , stringify ! (status))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_delta > ())) . flags as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_diff_delta) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_delta > ())) . similarity as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_diff_delta) , "::" , stringify ! (similarity))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_delta > ())) . nfiles as * const _ as usize } , 10usize , concat ! ("Offset of field: " , stringify ! (git_diff_delta) , "::" , stringify ! (nfiles))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_delta > ())) . old_file as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_diff_delta) , "::" , stringify ! (old_file))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_delta > ())) . new_file as * const _ as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (git_diff_delta) , "::" , stringify ! (new_file))) ; } # [doc = " Diff notification callback function."] # [doc = ""] # [doc = " The callback will be called for each file, just before the `git_diff_delta`"] # [doc = " gets inserted into the diff."] # [doc = ""] # [doc = " When the callback:"] # [doc = " - returns < 0, the diff process will be aborted."] # [doc = " - returns > 0, the delta will not be inserted into the diff, but the"] # [doc = "\t\tdiff process continues."] # [doc = " - returns 0, the delta is inserted into the diff, and the diff process"] # [doc = "\t\tcontinues."] pub type git_diff_notify_cb = :: std :: option :: Option < unsafe extern "C" fn (diff_so_far : * const git_diff , delta_to_add : * const git_diff_delta , matched_pathspec : * const :: std :: os :: raw :: c_char , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = " Diff progress callback."] # [doc = ""] # [doc = " Called before each file comparison."] # [doc = ""] # [doc = " @param diff_so_far The diff being generated."] # [doc = " @param old_path The path to the old file or NULL."] # [doc = " @param new_path The path to the new file or NULL."] # [doc = " @return Non-zero to abort the diff."] pub type git_diff_progress_cb = :: std :: option :: Option < unsafe extern "C" fn (diff_so_far : * const git_diff , old_path : * const :: std :: os :: raw :: c_char , new_path : * const :: std :: os :: raw :: c_char , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = " Structure describing options about how the diff should be executed."] # [doc = ""] # [doc = " Setting all values of the structure to zero will yield the default"] # [doc = " values.  Similarly, passing NULL for the options structure will"] # [doc = " give the defaults.  The default values are marked below."] # [doc = ""] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_diff_options { # [doc = "< version for the struct"] pub version : :: std :: os :: raw :: c_uint , # [doc = " A combination of `git_diff_option_t` values above."] # [doc = " Defaults to GIT_DIFF_NORMAL"] pub flags : u32 , # [doc = " Overrides the submodule ignore setting for all submodules in the diff."] pub ignore_submodules : git_submodule_ignore_t , # [doc = " An array of paths / fnmatch patterns to constrain diff."] # [doc = " All paths are included by default."] pub pathspec : git_strarray , # [doc = " An optional callback function, notifying the consumer of changes to"] # [doc = " the diff as new deltas are added."] pub notify_cb : git_diff_notify_cb , # [doc = " An optional callback function, notifying the consumer of which files"] # [doc = " are being examined as the diff is generated."] pub progress_cb : git_diff_progress_cb , # [doc = " The payload to pass to the callback functions."] pub payload : * mut :: std :: os :: raw :: c_void , # [doc = " The number of unchanged lines that define the boundary of a hunk"] # [doc = " (and to display before and after). Defaults to 3."] pub context_lines : u32 , # [doc = " The maximum number of unchanged lines between hunk boundaries before"] # [doc = " the hunks will be merged into one. Defaults to 0."] pub interhunk_lines : u32 , # [doc = " The abbreviation length to use when formatting object ids."] # [doc = " Defaults to the value of 'core.abbrev' from the config, or 7 if unset."] pub id_abbrev : u16 , # [doc = " A size (in bytes) above which a blob will be marked as binary"] # [doc = " automatically; pass a negative value to disable."] # [doc = " Defaults to 512MB."] pub max_size : git_off_t , # [doc = " The virtual \"directory\" prefix for old file names in hunk headers."] # [doc = " Default is \"a\"."] pub old_prefix : * const :: std :: os :: raw :: c_char , # [doc = " The virtual \"directory\" prefix for new file names in hunk headers."] # [doc = " Defaults to \"b\"."] pub new_prefix : * const :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_git_diff_options () { assert_eq ! (:: std :: mem :: size_of :: < git_diff_options > () , 96usize , concat ! ("Size of: " , stringify ! (git_diff_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_diff_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_diff_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_diff_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_options > ())) . flags as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_diff_options) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_options > ())) . ignore_submodules as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_diff_options) , "::" , stringify ! (ignore_submodules))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_options > ())) . pathspec as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_diff_options) , "::" , stringify ! (pathspec))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_options > ())) . notify_cb as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (git_diff_options) , "::" , stringify ! (notify_cb))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_options > ())) . progress_cb as * const _ as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (git_diff_options) , "::" , stringify ! (progress_cb))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_options > ())) . payload as * const _ as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (git_diff_options) , "::" , stringify ! (payload))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_options > ())) . context_lines as * const _ as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (git_diff_options) , "::" , stringify ! (context_lines))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_options > ())) . interhunk_lines as * const _ as usize } , 60usize , concat ! ("Offset of field: " , stringify ! (git_diff_options) , "::" , stringify ! (interhunk_lines))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_options > ())) . id_abbrev as * const _ as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (git_diff_options) , "::" , stringify ! (id_abbrev))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_options > ())) . max_size as * const _ as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (git_diff_options) , "::" , stringify ! (max_size))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_options > ())) . old_prefix as * const _ as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (git_diff_options) , "::" , stringify ! (old_prefix))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_options > ())) . new_prefix as * const _ as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (git_diff_options) , "::" , stringify ! (new_prefix))) ; } extern "C" { # [doc = " Initialize git_diff_options structure"] # [doc = ""] # [doc = " Initializes a `git_diff_options` with default values. Equivalent to creating"] # [doc = " an instance with GIT_DIFF_OPTIONS_INIT."] # [doc = ""] # [doc = " @param opts The `git_diff_options` struct to initialize."] # [doc = " @param version The struct version; pass `GIT_DIFF_OPTIONS_VERSION`."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_diff_options_init (opts : * mut git_diff_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } # [doc = " When iterating over a diff, callback that will be made per file."] # [doc = ""] # [doc = " @param delta A pointer to the delta data for the file"] # [doc = " @param progress Goes from 0 to 1 over the diff"] # [doc = " @param payload User-specified pointer from foreach function"] pub type git_diff_file_cb = :: std :: option :: Option < unsafe extern "C" fn (delta : * const git_diff_delta , progress : f32 , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = " There is no binary delta."] pub const git_diff_binary_t_GIT_DIFF_BINARY_NONE : git_diff_binary_t = 0 ; # [doc = " The binary data is the literal contents of the file."] pub const git_diff_binary_t_GIT_DIFF_BINARY_LITERAL : git_diff_binary_t = 1 ; # [doc = " The binary data is the delta from one side to the other."] pub const git_diff_binary_t_GIT_DIFF_BINARY_DELTA : git_diff_binary_t = 2 ; # [doc = " When producing a binary diff, the binary data returned will be"] # [doc = " either the deflated full (\"literal\") contents of the file, or"] # [doc = " the deflated binary delta between the two sides (whichever is"] # [doc = " smaller)."] pub type git_diff_binary_t = :: std :: os :: raw :: c_uint ; # [doc = " The contents of one of the files in a binary diff."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_diff_binary_file { # [doc = " The type of binary data for this file."] pub type_ : git_diff_binary_t , # [doc = " The binary data, deflated."] pub data : * const :: std :: os :: raw :: c_char , # [doc = " The length of the binary data."] pub datalen : size_t , # [doc = " The length of the binary data after inflation."] pub inflatedlen : size_t , } # [test] fn bindgen_test_layout_git_diff_binary_file () { assert_eq ! (:: std :: mem :: size_of :: < git_diff_binary_file > () , 32usize , concat ! ("Size of: " , stringify ! (git_diff_binary_file))) ; assert_eq ! (:: std :: mem :: align_of :: < git_diff_binary_file > () , 8usize , concat ! ("Alignment of " , stringify ! (git_diff_binary_file))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_binary_file > ())) . type_ as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_diff_binary_file) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_binary_file > ())) . data as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_diff_binary_file) , "::" , stringify ! (data))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_binary_file > ())) . datalen as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_diff_binary_file) , "::" , stringify ! (datalen))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_binary_file > ())) . inflatedlen as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_diff_binary_file) , "::" , stringify ! (inflatedlen))) ; } # [doc = " Structure describing the binary contents of a diff."] # [doc = ""] # [doc = " A `binary` file / delta is a file (or pair) for which no text diffs"] # [doc = " should be generated. A diff can contain delta entries that are"] # [doc = " binary, but no diff content will be output for those files. There is"] # [doc = " a base heuristic for binary detection and you can further tune the"] # [doc = " behavior with git attributes or diff flags and option settings."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_diff_binary { # [doc = " Whether there is data in this binary structure or not."] # [doc = ""] # [doc = " If this is `1`, then this was produced and included binary content."] # [doc = " If this is `0` then this was generated knowing only that a binary"] # [doc = " file changed but without providing the data, probably from a patch"] # [doc = " that said `Binary files a/file.txt and b/file.txt differ`."] pub contains_data : :: std :: os :: raw :: c_uint , # [doc = "< The contents of the old file."] pub old_file : git_diff_binary_file , # [doc = "< The contents of the new file."] pub new_file : git_diff_binary_file , } # [test] fn bindgen_test_layout_git_diff_binary () { assert_eq ! (:: std :: mem :: size_of :: < git_diff_binary > () , 72usize , concat ! ("Size of: " , stringify ! (git_diff_binary))) ; assert_eq ! (:: std :: mem :: align_of :: < git_diff_binary > () , 8usize , concat ! ("Alignment of " , stringify ! (git_diff_binary))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_binary > ())) . contains_data as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_diff_binary) , "::" , stringify ! (contains_data))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_binary > ())) . old_file as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_diff_binary) , "::" , stringify ! (old_file))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_binary > ())) . new_file as * const _ as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (git_diff_binary) , "::" , stringify ! (new_file))) ; } # [doc = " When iterating over a diff, callback that will be made for"] # [doc = " binary content within the diff."] pub type git_diff_binary_cb = :: std :: option :: Option < unsafe extern "C" fn (delta : * const git_diff_delta , binary : * const git_diff_binary , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = " Structure describing a hunk of a diff."] # [doc = ""] # [doc = " A `hunk` is a span of modified lines in a delta along with some stable"] # [doc = " surrounding context. You can configure the amount of context and other"] # [doc = " properties of how hunks are generated. Each hunk also comes with a"] # [doc = " header that described where it starts and ends in both the old and new"] # [doc = " versions in the delta."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_diff_hunk { # [doc = "< Starting line number in old_file"] pub old_start : :: std :: os :: raw :: c_int , # [doc = "< Number of lines in old_file"] pub old_lines : :: std :: os :: raw :: c_int , # [doc = "< Starting line number in new_file"] pub new_start : :: std :: os :: raw :: c_int , # [doc = "< Number of lines in new_file"] pub new_lines : :: std :: os :: raw :: c_int , # [doc = "< Number of bytes in header text"] pub header_len : size_t , # [doc = "< Header text, NUL-byte terminated"] pub header : [:: std :: os :: raw :: c_char ; 128usize] , } # [test] fn bindgen_test_layout_git_diff_hunk () { assert_eq ! (:: std :: mem :: size_of :: < git_diff_hunk > () , 152usize , concat ! ("Size of: " , stringify ! (git_diff_hunk))) ; assert_eq ! (:: std :: mem :: align_of :: < git_diff_hunk > () , 8usize , concat ! ("Alignment of " , stringify ! (git_diff_hunk))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_hunk > ())) . old_start as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_diff_hunk) , "::" , stringify ! (old_start))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_hunk > ())) . old_lines as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_diff_hunk) , "::" , stringify ! (old_lines))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_hunk > ())) . new_start as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_diff_hunk) , "::" , stringify ! (new_start))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_hunk > ())) . new_lines as * const _ as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (git_diff_hunk) , "::" , stringify ! (new_lines))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_hunk > ())) . header_len as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_diff_hunk) , "::" , stringify ! (header_len))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_hunk > ())) . header as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_diff_hunk) , "::" , stringify ! (header))) ; } # [doc = " When iterating over a diff, callback that will be made per hunk."] pub type git_diff_hunk_cb = :: std :: option :: Option < unsafe extern "C" fn (delta : * const git_diff_delta , hunk : * const git_diff_hunk , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; pub const git_diff_line_t_GIT_DIFF_LINE_CONTEXT : git_diff_line_t = 32 ; pub const git_diff_line_t_GIT_DIFF_LINE_ADDITION : git_diff_line_t = 43 ; pub const git_diff_line_t_GIT_DIFF_LINE_DELETION : git_diff_line_t = 45 ; # [doc = "< Both files have no LF at end"] pub const git_diff_line_t_GIT_DIFF_LINE_CONTEXT_EOFNL : git_diff_line_t = 61 ; # [doc = "< Old has no LF at end, new does"] pub const git_diff_line_t_GIT_DIFF_LINE_ADD_EOFNL : git_diff_line_t = 62 ; # [doc = "< Old has LF at end, new does not"] pub const git_diff_line_t_GIT_DIFF_LINE_DEL_EOFNL : git_diff_line_t = 60 ; pub const git_diff_line_t_GIT_DIFF_LINE_FILE_HDR : git_diff_line_t = 70 ; pub const git_diff_line_t_GIT_DIFF_LINE_HUNK_HDR : git_diff_line_t = 72 ; # [doc = "< For \"Binary files x and y differ\""] pub const git_diff_line_t_GIT_DIFF_LINE_BINARY : git_diff_line_t = 66 ; # [doc = " Line origin constants."] # [doc = ""] # [doc = " These values describe where a line came from and will be passed to"] # [doc = " the git_diff_line_cb when iterating over a diff.  There are some"] # [doc = " special origin constants at the end that are used for the text"] # [doc = " output callbacks to demarcate lines that are actually part of"] # [doc = " the file or hunk headers."] pub type git_diff_line_t = :: std :: os :: raw :: c_uint ; # [doc = " Structure describing a line (or data span) of a diff."] # [doc = ""] # [doc = " A `line` is a range of characters inside a hunk.  It could be a context"] # [doc = " line (i.e. in both old and new versions), an added line (i.e. only in"] # [doc = " the new version), or a removed line (i.e. only in the old version)."] # [doc = " Unfortunately, we don't know anything about the encoding of data in the"] # [doc = " file being diffed, so we cannot tell you much about the line content."] # [doc = " Line data will not be NUL-byte terminated, however, because it will be"] # [doc = " just a span of bytes inside the larger file."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_diff_line { # [doc = "< A git_diff_line_t value"] pub origin : :: std :: os :: raw :: c_char , # [doc = "< Line number in old file or -1 for added line"] pub old_lineno : :: std :: os :: raw :: c_int , # [doc = "< Line number in new file or -1 for deleted line"] pub new_lineno : :: std :: os :: raw :: c_int , # [doc = "< Number of newline characters in content"] pub num_lines : :: std :: os :: raw :: c_int , # [doc = "< Number of bytes of data"] pub content_len : size_t , # [doc = "< Offset in the original file to the content"] pub content_offset : git_off_t , # [doc = "< Pointer to diff text, not NUL-byte terminated"] pub content : * const :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_git_diff_line () { assert_eq ! (:: std :: mem :: size_of :: < git_diff_line > () , 40usize , concat ! ("Size of: " , stringify ! (git_diff_line))) ; assert_eq ! (:: std :: mem :: align_of :: < git_diff_line > () , 8usize , concat ! ("Alignment of " , stringify ! (git_diff_line))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_line > ())) . origin as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_diff_line) , "::" , stringify ! (origin))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_line > ())) . old_lineno as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_diff_line) , "::" , stringify ! (old_lineno))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_line > ())) . new_lineno as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_diff_line) , "::" , stringify ! (new_lineno))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_line > ())) . num_lines as * const _ as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (git_diff_line) , "::" , stringify ! (num_lines))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_line > ())) . content_len as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_diff_line) , "::" , stringify ! (content_len))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_line > ())) . content_offset as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_diff_line) , "::" , stringify ! (content_offset))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_line > ())) . content as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (git_diff_line) , "::" , stringify ! (content))) ; } # [doc = " When iterating over a diff, callback that will be made per text diff"] # [doc = " line. In this context, the provided range will be NULL."] # [doc = ""] # [doc = " When printing a diff, callback that will be made to output each line"] # [doc = " of text.  This uses some extra GIT_DIFF_LINE_... constants for output"] # [doc = " of lines of file and hunk headers."] pub type git_diff_line_cb = :: std :: option :: Option < unsafe extern "C" fn (delta : * const git_diff_delta , hunk : * const git_diff_hunk , line : * const git_diff_line , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = " Obey `diff.renames`. Overridden by any other GIT_DIFF_FIND_... flag."] pub const git_diff_find_t_GIT_DIFF_FIND_BY_CONFIG : git_diff_find_t = 0 ; # [doc = " Look for renames? (`--find-renames`)"] pub const git_diff_find_t_GIT_DIFF_FIND_RENAMES : git_diff_find_t = 1 ; # [doc = " Consider old side of MODIFIED for renames? (`--break-rewrites=N`)"] pub const git_diff_find_t_GIT_DIFF_FIND_RENAMES_FROM_REWRITES : git_diff_find_t = 2 ; # [doc = " Look for copies? (a la `--find-copies`)."] pub const git_diff_find_t_GIT_DIFF_FIND_COPIES : git_diff_find_t = 4 ; # [doc = " Consider UNMODIFIED as copy sources? (`--find-copies-harder`)."] # [doc = ""] # [doc = " For this to work correctly, use GIT_DIFF_INCLUDE_UNMODIFIED when"] # [doc = " the initial `git_diff` is being generated."] pub const git_diff_find_t_GIT_DIFF_FIND_COPIES_FROM_UNMODIFIED : git_diff_find_t = 8 ; # [doc = " Mark significant rewrites for split (`--break-rewrites=/M`)"] pub const git_diff_find_t_GIT_DIFF_FIND_REWRITES : git_diff_find_t = 16 ; # [doc = " Actually split large rewrites into delete/add pairs"] pub const git_diff_find_t_GIT_DIFF_BREAK_REWRITES : git_diff_find_t = 32 ; # [doc = " Mark rewrites for split and break into delete/add pairs"] pub const git_diff_find_t_GIT_DIFF_FIND_AND_BREAK_REWRITES : git_diff_find_t = 48 ; # [doc = " Find renames/copies for UNTRACKED items in working directory."] # [doc = ""] # [doc = " For this to work correctly, use GIT_DIFF_INCLUDE_UNTRACKED when the"] # [doc = " initial `git_diff` is being generated (and obviously the diff must"] # [doc = " be against the working directory for this to make sense)."] pub const git_diff_find_t_GIT_DIFF_FIND_FOR_UNTRACKED : git_diff_find_t = 64 ; # [doc = " Turn on all finding features."] pub const git_diff_find_t_GIT_DIFF_FIND_ALL : git_diff_find_t = 255 ; # [doc = " Measure similarity ignoring leading whitespace (default)"] pub const git_diff_find_t_GIT_DIFF_FIND_IGNORE_LEADING_WHITESPACE : git_diff_find_t = 0 ; # [doc = " Measure similarity ignoring all whitespace"] pub const git_diff_find_t_GIT_DIFF_FIND_IGNORE_WHITESPACE : git_diff_find_t = 4096 ; # [doc = " Measure similarity including all data"] pub const git_diff_find_t_GIT_DIFF_FIND_DONT_IGNORE_WHITESPACE : git_diff_find_t = 8192 ; # [doc = " Measure similarity only by comparing SHAs (fast and cheap)"] pub const git_diff_find_t_GIT_DIFF_FIND_EXACT_MATCH_ONLY : git_diff_find_t = 16384 ; # [doc = " Do not break rewrites unless they contribute to a rename."] # [doc = ""] # [doc = " Normally, GIT_DIFF_FIND_AND_BREAK_REWRITES will measure the self-"] # [doc = " similarity of modified files and split the ones that have changed a"] # [doc = " lot into a DELETE / ADD pair.  Then the sides of that pair will be"] # [doc = " considered candidates for rename and copy detection."] # [doc = ""] # [doc = " If you add this flag in and the split pair is *not* used for an"] # [doc = " actual rename or copy, then the modified record will be restored to"] # [doc = " a regular MODIFIED record instead of being split."] pub const git_diff_find_t_GIT_DIFF_BREAK_REWRITES_FOR_RENAMES_ONLY : git_diff_find_t = 32768 ; # [doc = " Remove any UNMODIFIED deltas after find_similar is done."] # [doc = ""] # [doc = " Using GIT_DIFF_FIND_COPIES_FROM_UNMODIFIED to emulate the"] # [doc = " --find-copies-harder behavior requires building a diff with the"] # [doc = " GIT_DIFF_INCLUDE_UNMODIFIED flag.  If you do not want UNMODIFIED"] # [doc = " records in the final result, pass this flag to have them removed."] pub const git_diff_find_t_GIT_DIFF_FIND_REMOVE_UNMODIFIED : git_diff_find_t = 65536 ; # [doc = " Flags to control the behavior of diff rename/copy detection."] pub type git_diff_find_t = :: std :: os :: raw :: c_uint ; # [doc = " Pluggable similarity metric"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_diff_similarity_metric { pub file_signature : :: std :: option :: Option < unsafe extern "C" fn (out : * mut * mut :: std :: os :: raw :: c_void , file : * const git_diff_file , fullpath : * const :: std :: os :: raw :: c_char , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , pub buffer_signature : :: std :: option :: Option < unsafe extern "C" fn (out : * mut * mut :: std :: os :: raw :: c_void , file : * const git_diff_file , buf : * const :: std :: os :: raw :: c_char , buflen : size_t , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , pub free_signature : :: std :: option :: Option < unsafe extern "C" fn (sig : * mut :: std :: os :: raw :: c_void , payload : * mut :: std :: os :: raw :: c_void) > , pub similarity : :: std :: option :: Option < unsafe extern "C" fn (score : * mut :: std :: os :: raw :: c_int , siga : * mut :: std :: os :: raw :: c_void , sigb : * mut :: std :: os :: raw :: c_void , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , pub payload : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_git_diff_similarity_metric () { assert_eq ! (:: std :: mem :: size_of :: < git_diff_similarity_metric > () , 40usize , concat ! ("Size of: " , stringify ! (git_diff_similarity_metric))) ; assert_eq ! (:: std :: mem :: align_of :: < git_diff_similarity_metric > () , 8usize , concat ! ("Alignment of " , stringify ! (git_diff_similarity_metric))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_similarity_metric > ())) . file_signature as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_diff_similarity_metric) , "::" , stringify ! (file_signature))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_similarity_metric > ())) . buffer_signature as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_diff_similarity_metric) , "::" , stringify ! (buffer_signature))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_similarity_metric > ())) . free_signature as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_diff_similarity_metric) , "::" , stringify ! (free_signature))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_similarity_metric > ())) . similarity as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_diff_similarity_metric) , "::" , stringify ! (similarity))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_similarity_metric > ())) . payload as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (git_diff_similarity_metric) , "::" , stringify ! (payload))) ; } # [doc = " Control behavior of rename and copy detection"] # [doc = ""] # [doc = " These options mostly mimic parameters that can be passed to git-diff."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_diff_find_options { pub version : :: std :: os :: raw :: c_uint , # [doc = " Combination of git_diff_find_t values (default GIT_DIFF_FIND_BY_CONFIG)."] # [doc = " NOTE: if you don't explicitly set this, `diff.renames` could be set"] # [doc = " to false, resulting in `git_diff_find_similar` doing nothing."] pub flags : u32 , # [doc = " Threshold above which similar files will be considered renames."] # [doc = " This is equivalent to the -M option. Defaults to 50."] pub rename_threshold : u16 , # [doc = " Threshold below which similar files will be eligible to be a rename source."] # [doc = " This is equivalent to the first part of the -B option. Defaults to 50."] pub rename_from_rewrite_threshold : u16 , # [doc = " Threshold above which similar files will be considered copies."] # [doc = " This is equivalent to the -C option. Defaults to 50."] pub copy_threshold : u16 , # [doc = " Treshold below which similar files will be split into a delete/add pair."] # [doc = " This is equivalent to the last part of the -B option. Defaults to 60."] pub break_rewrite_threshold : u16 , # [doc = " Maximum number of matches to consider for a particular file."] # [doc = ""] # [doc = " This is a little different from the `-l` option from Git because we"] # [doc = " will still process up to this many matches before abandoning the search."] # [doc = " Defaults to 200."] pub rename_limit : size_t , # [doc = " The `metric` option allows you to plug in a custom similarity metric."] # [doc = ""] # [doc = " Set it to NULL to use the default internal metric."] # [doc = ""] # [doc = " The default metric is based on sampling hashes of ranges of data in"] # [doc = " the file, which is a pretty good similarity approximation that should"] # [doc = " work fairly well for both text and binary data while still being"] # [doc = " pretty fast with a fixed memory overhead."] pub metric : * mut git_diff_similarity_metric , } # [test] fn bindgen_test_layout_git_diff_find_options () { assert_eq ! (:: std :: mem :: size_of :: < git_diff_find_options > () , 32usize , concat ! ("Size of: " , stringify ! (git_diff_find_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_diff_find_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_diff_find_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_find_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_diff_find_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_find_options > ())) . flags as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_diff_find_options) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_find_options > ())) . rename_threshold as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_diff_find_options) , "::" , stringify ! (rename_threshold))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_find_options > ())) . rename_from_rewrite_threshold as * const _ as usize } , 10usize , concat ! ("Offset of field: " , stringify ! (git_diff_find_options) , "::" , stringify ! (rename_from_rewrite_threshold))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_find_options > ())) . copy_threshold as * const _ as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (git_diff_find_options) , "::" , stringify ! (copy_threshold))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_find_options > ())) . break_rewrite_threshold as * const _ as usize } , 14usize , concat ! ("Offset of field: " , stringify ! (git_diff_find_options) , "::" , stringify ! (break_rewrite_threshold))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_find_options > ())) . rename_limit as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_diff_find_options) , "::" , stringify ! (rename_limit))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_find_options > ())) . metric as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_diff_find_options) , "::" , stringify ! (metric))) ; } extern "C" { # [doc = " Initialize git_diff_find_options structure"] # [doc = ""] # [doc = " Initializes a `git_diff_find_options` with default values. Equivalent to creating"] # [doc = " an instance with GIT_DIFF_FIND_OPTIONS_INIT."] # [doc = ""] # [doc = " @param opts The `git_diff_find_options` struct to initialize."] # [doc = " @param version The struct version; pass `GIT_DIFF_FIND_OPTIONS_VERSION`."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_diff_find_options_init (opts : * mut git_diff_find_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Deallocate a diff."] # [doc = ""] # [doc = " @param diff The previously created diff; cannot be used after free."] pub fn git_diff_free (diff : * mut git_diff) ; } extern "C" { # [doc = " Create a diff with the difference between two tree objects."] # [doc = ""] # [doc = " This is equivalent to `git diff <old-tree> <new-tree>`"] # [doc = ""] # [doc = " The first tree will be used for the \"old_file\" side of the delta and the"] # [doc = " second tree will be used for the \"new_file\" side of the delta.  You can"] # [doc = " pass NULL to indicate an empty tree, although it is an error to pass"] # [doc = " NULL for both the `old_tree` and `new_tree`."] # [doc = ""] # [doc = " @param diff Output pointer to a git_diff pointer to be allocated."] # [doc = " @param repo The repository containing the trees."] # [doc = " @param old_tree A git_tree object to diff from, or NULL for empty tree."] # [doc = " @param new_tree A git_tree object to diff to, or NULL for empty tree."] # [doc = " @param opts Structure with options to influence diff or NULL for defaults."] pub fn git_diff_tree_to_tree (diff : * mut * mut git_diff , repo : * mut git_repository , old_tree : * mut git_tree , new_tree : * mut git_tree , opts : * const git_diff_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a diff between a tree and repository index."] # [doc = ""] # [doc = " This is equivalent to `git diff --cached <treeish>` or if you pass"] # [doc = " the HEAD tree, then like `git diff --cached`."] # [doc = ""] # [doc = " The tree you pass will be used for the \"old_file\" side of the delta, and"] # [doc = " the index will be used for the \"new_file\" side of the delta."] # [doc = ""] # [doc = " If you pass NULL for the index, then the existing index of the `repo`"] # [doc = " will be used.  In this case, the index will be refreshed from disk"] # [doc = " (if it has changed) before the diff is generated."] # [doc = ""] # [doc = " @param diff Output pointer to a git_diff pointer to be allocated."] # [doc = " @param repo The repository containing the tree and index."] # [doc = " @param old_tree A git_tree object to diff from, or NULL for empty tree."] # [doc = " @param index The index to diff with; repo index used if NULL."] # [doc = " @param opts Structure with options to influence diff or NULL for defaults."] pub fn git_diff_tree_to_index (diff : * mut * mut git_diff , repo : * mut git_repository , old_tree : * mut git_tree , index : * mut git_index , opts : * const git_diff_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a diff between the repository index and the workdir directory."] # [doc = ""] # [doc = " This matches the `git diff` command.  See the note below on"] # [doc = " `git_diff_tree_to_workdir` for a discussion of the difference between"] # [doc = " `git diff` and `git diff HEAD` and how to emulate a `git diff <treeish>`"] # [doc = " using libgit2."] # [doc = ""] # [doc = " The index will be used for the \"old_file\" side of the delta, and the"] # [doc = " working directory will be used for the \"new_file\" side of the delta."] # [doc = ""] # [doc = " If you pass NULL for the index, then the existing index of the `repo`"] # [doc = " will be used.  In this case, the index will be refreshed from disk"] # [doc = " (if it has changed) before the diff is generated."] # [doc = ""] # [doc = " @param diff Output pointer to a git_diff pointer to be allocated."] # [doc = " @param repo The repository."] # [doc = " @param index The index to diff from; repo index used if NULL."] # [doc = " @param opts Structure with options to influence diff or NULL for defaults."] pub fn git_diff_index_to_workdir (diff : * mut * mut git_diff , repo : * mut git_repository , index : * mut git_index , opts : * const git_diff_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a diff between a tree and the working directory."] # [doc = ""] # [doc = " The tree you provide will be used for the \"old_file\" side of the delta,"] # [doc = " and the working directory will be used for the \"new_file\" side."] # [doc = ""] # [doc = " This is not the same as `git diff <treeish>` or `git diff-index"] # [doc = " <treeish>`.  Those commands use information from the index, whereas this"] # [doc = " function strictly returns the differences between the tree and the files"] # [doc = " in the working directory, regardless of the state of the index.  Use"] # [doc = " `git_diff_tree_to_workdir_with_index` to emulate those commands."] # [doc = ""] # [doc = " To see difference between this and `git_diff_tree_to_workdir_with_index`,"] # [doc = " consider the example of a staged file deletion where the file has then"] # [doc = " been put back into the working dir and further modified.  The"] # [doc = " tree-to-workdir diff for that file is 'modified', but `git diff` would"] # [doc = " show status 'deleted' since there is a staged delete."] # [doc = ""] # [doc = " @param diff A pointer to a git_diff pointer that will be allocated."] # [doc = " @param repo The repository containing the tree."] # [doc = " @param old_tree A git_tree object to diff from, or NULL for empty tree."] # [doc = " @param opts Structure with options to influence diff or NULL for defaults."] pub fn git_diff_tree_to_workdir (diff : * mut * mut git_diff , repo : * mut git_repository , old_tree : * mut git_tree , opts : * const git_diff_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a diff between a tree and the working directory using index data"] # [doc = " to account for staged deletes, tracked files, etc."] # [doc = ""] # [doc = " This emulates `git diff <tree>` by diffing the tree to the index and"] # [doc = " the index to the working directory and blending the results into a"] # [doc = " single diff that includes staged deleted, etc."] # [doc = ""] # [doc = " @param diff A pointer to a git_diff pointer that will be allocated."] # [doc = " @param repo The repository containing the tree."] # [doc = " @param old_tree A git_tree object to diff from, or NULL for empty tree."] # [doc = " @param opts Structure with options to influence diff or NULL for defaults."] pub fn git_diff_tree_to_workdir_with_index (diff : * mut * mut git_diff , repo : * mut git_repository , old_tree : * mut git_tree , opts : * const git_diff_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a diff with the difference between two index objects."] # [doc = ""] # [doc = " The first index will be used for the \"old_file\" side of the delta and the"] # [doc = " second index will be used for the \"new_file\" side of the delta."] # [doc = ""] # [doc = " @param diff Output pointer to a git_diff pointer to be allocated."] # [doc = " @param repo The repository containing the indexes."] # [doc = " @param old_index A git_index object to diff from."] # [doc = " @param new_index A git_index object to diff to."] # [doc = " @param opts Structure with options to influence diff or NULL for defaults."] pub fn git_diff_index_to_index (diff : * mut * mut git_diff , repo : * mut git_repository , old_index : * mut git_index , new_index : * mut git_index , opts : * const git_diff_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Merge one diff into another."] # [doc = ""] # [doc = " This merges items from the \"from\" list into the \"onto\" list.  The"] # [doc = " resulting diff will have all items that appear in either list."] # [doc = " If an item appears in both lists, then it will be \"merged\" to appear"] # [doc = " as if the old version was from the \"onto\" list and the new version"] # [doc = " is from the \"from\" list (with the exception that if the item has a"] # [doc = " pending DELETE in the middle, then it will show as deleted)."] # [doc = ""] # [doc = " @param onto Diff to merge into."] # [doc = " @param from Diff to merge."] pub fn git_diff_merge (onto : * mut git_diff , from : * const git_diff) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Transform a diff marking file renames, copies, etc."] # [doc = ""] # [doc = " This modifies a diff in place, replacing old entries that look"] # [doc = " like renames or copies with new entries reflecting those changes."] # [doc = " This also will, if requested, break modified files into add/remove"] # [doc = " pairs if the amount of change is above a threshold."] # [doc = ""] # [doc = " @param diff diff to run detection algorithms on"] # [doc = " @param options Control how detection should be run, NULL for defaults"] # [doc = " @return 0 on success, -1 on failure"] pub fn git_diff_find_similar (diff : * mut git_diff , options : * const git_diff_find_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Query how many diff records are there in a diff."] # [doc = ""] # [doc = " @param diff A git_diff generated by one of the above functions"] # [doc = " @return Count of number of deltas in the list"] pub fn git_diff_num_deltas (diff : * const git_diff) -> size_t ; } extern "C" { # [doc = " Query how many diff deltas are there in a diff filtered by type."] # [doc = ""] # [doc = " This works just like `git_diff_num_deltas()` with an extra parameter"] # [doc = " that is a `git_delta_t` and returns just the count of how many deltas"] # [doc = " match that particular type."] # [doc = ""] # [doc = " @param diff A git_diff generated by one of the above functions"] # [doc = " @param type A git_delta_t value to filter the count"] # [doc = " @return Count of number of deltas matching delta_t type"] pub fn git_diff_num_deltas_of_type (diff : * const git_diff , type_ : git_delta_t) -> size_t ; } extern "C" { # [doc = " Return the diff delta for an entry in the diff list."] # [doc = ""] # [doc = " The `git_diff_delta` pointer points to internal data and you do not"] # [doc = " have to release it when you are done with it.  It will go away when"] # [doc = " the * `git_diff` (or any associated `git_patch`) goes away."] # [doc = ""] # [doc = " Note that the flags on the delta related to whether it has binary"] # [doc = " content or not may not be set if there are no attributes set for the"] # [doc = " file and there has been no reason to load the file data at this point."] # [doc = " For now, if you need those flags to be up to date, your only option is"] # [doc = " to either use `git_diff_foreach` or create a `git_patch`."] # [doc = ""] # [doc = " @param diff Diff list object"] # [doc = " @param idx Index into diff list"] # [doc = " @return Pointer to git_diff_delta (or NULL if `idx` out of range)"] pub fn git_diff_get_delta (diff : * const git_diff , idx : size_t) -> * const git_diff_delta ; } extern "C" { # [doc = " Check if deltas are sorted case sensitively or insensitively."] # [doc = ""] # [doc = " @param diff diff to check"] # [doc = " @return 0 if case sensitive, 1 if case is ignored"] pub fn git_diff_is_sorted_icase (diff : * const git_diff) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Loop over all deltas in a diff issuing callbacks."] # [doc = ""] # [doc = " This will iterate through all of the files described in a diff.  You"] # [doc = " should provide a file callback to learn about each file."] # [doc = ""] # [doc = " The \"hunk\" and \"line\" callbacks are optional, and the text diff of the"] # [doc = " files will only be calculated if they are not NULL.  Of course, these"] # [doc = " callbacks will not be invoked for binary files on the diff or for"] # [doc = " files whose only changed is a file mode change."] # [doc = ""] # [doc = " Returning a non-zero value from any of the callbacks will terminate"] # [doc = " the iteration and return the value to the user."] # [doc = ""] # [doc = " @param diff A git_diff generated by one of the above functions."] # [doc = " @param file_cb Callback function to make per file in the diff."] # [doc = " @param binary_cb Optional callback to make for binary files."] # [doc = " @param hunk_cb Optional callback to make per hunk of text diff.  This"] # [doc = "                callback is called to describe a range of lines in the"] # [doc = "                diff.  It will not be issued for binary files."] # [doc = " @param line_cb Optional callback to make per line of diff text.  This"] # [doc = "                same callback will be made for context lines, added, and"] # [doc = "                removed lines, and even for a deleted trailing newline."] # [doc = " @param payload Reference pointer that will be passed to your callbacks."] # [doc = " @return 0 on success, non-zero callback return value, or error code"] pub fn git_diff_foreach (diff : * mut git_diff , file_cb : git_diff_file_cb , binary_cb : git_diff_binary_cb , hunk_cb : git_diff_hunk_cb , line_cb : git_diff_line_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Look up the single character abbreviation for a delta status code."] # [doc = ""] # [doc = " When you run `git diff --name-status` it uses single letter codes in"] # [doc = " the output such as 'A' for added, 'D' for deleted, 'M' for modified,"] # [doc = " etc.  This function converts a git_delta_t value into these letters for"] # [doc = " your own purposes.  GIT_DELTA_UNTRACKED will return a space (i.e. ' ')."] # [doc = ""] # [doc = " @param status The git_delta_t value to look up"] # [doc = " @return The single character label for that code"] pub fn git_diff_status_char (status : git_delta_t) -> :: std :: os :: raw :: c_char ; } # [doc = "< full git diff"] pub const git_diff_format_t_GIT_DIFF_FORMAT_PATCH : git_diff_format_t = 1 ; # [doc = "< just the file headers of patch"] pub const git_diff_format_t_GIT_DIFF_FORMAT_PATCH_HEADER : git_diff_format_t = 2 ; # [doc = "< like git diff --raw"] pub const git_diff_format_t_GIT_DIFF_FORMAT_RAW : git_diff_format_t = 3 ; # [doc = "< like git diff --name-only"] pub const git_diff_format_t_GIT_DIFF_FORMAT_NAME_ONLY : git_diff_format_t = 4 ; # [doc = "< like git diff --name-status"] pub const git_diff_format_t_GIT_DIFF_FORMAT_NAME_STATUS : git_diff_format_t = 5 ; # [doc = "< git diff as used by git patch-id"] pub const git_diff_format_t_GIT_DIFF_FORMAT_PATCH_ID : git_diff_format_t = 6 ; # [doc = " Possible output formats for diff data"] pub type git_diff_format_t = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = " Iterate over a diff generating formatted text output."] # [doc = ""] # [doc = " Returning a non-zero value from the callbacks will terminate the"] # [doc = " iteration and return the non-zero value to the caller."] # [doc = ""] # [doc = " @param diff A git_diff generated by one of the above functions."] # [doc = " @param format A git_diff_format_t value to pick the text format."] # [doc = " @param print_cb Callback to make per line of diff text."] # [doc = " @param payload Reference pointer that will be passed to your callback."] # [doc = " @return 0 on success, non-zero callback return value, or error code"] pub fn git_diff_print (diff : * mut git_diff , format : git_diff_format_t , print_cb : git_diff_line_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Produce the complete formatted text output from a diff into a"] # [doc = " buffer."] # [doc = ""] # [doc = " @param out A pointer to a user-allocated git_buf that will"] # [doc = "            contain the diff text"] # [doc = " @param diff A git_diff generated by one of the above functions."] # [doc = " @param format A git_diff_format_t value to pick the text format."] # [doc = " @return 0 on success or error code"] pub fn git_diff_to_buf (out : * mut git_buf , diff : * mut git_diff , format : git_diff_format_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Directly run a diff on two blobs."] # [doc = ""] # [doc = " Compared to a file, a blob lacks some contextual information. As such,"] # [doc = " the `git_diff_file` given to the callback will have some fake data; i.e."] # [doc = " `mode` will be 0 and `path` will be NULL."] # [doc = ""] # [doc = " NULL is allowed for either `old_blob` or `new_blob` and will be treated"] # [doc = " as an empty blob, with the `oid` set to NULL in the `git_diff_file` data."] # [doc = " Passing NULL for both blobs is a noop; no callbacks will be made at all."] # [doc = ""] # [doc = " We do run a binary content check on the blob content and if either blob"] # [doc = " looks like binary data, the `git_diff_delta` binary attribute will be set"] # [doc = " to 1 and no call to the hunk_cb nor line_cb will be made (unless you pass"] # [doc = " `GIT_DIFF_FORCE_TEXT` of course)."] # [doc = ""] # [doc = " @param old_blob Blob for old side of diff, or NULL for empty blob"] # [doc = " @param old_as_path Treat old blob as if it had this filename; can be NULL"] # [doc = " @param new_blob Blob for new side of diff, or NULL for empty blob"] # [doc = " @param new_as_path Treat new blob as if it had this filename; can be NULL"] # [doc = " @param options Options for diff, or NULL for default options"] # [doc = " @param file_cb Callback for \"file\"; made once if there is a diff; can be NULL"] # [doc = " @param binary_cb Callback for binary files; can be NULL"] # [doc = " @param hunk_cb Callback for each hunk in diff; can be NULL"] # [doc = " @param line_cb Callback for each line in diff; can be NULL"] # [doc = " @param payload Payload passed to each callback function"] # [doc = " @return 0 on success, non-zero callback return value, or error code"] pub fn git_diff_blobs (old_blob : * const git_blob , old_as_path : * const :: std :: os :: raw :: c_char , new_blob : * const git_blob , new_as_path : * const :: std :: os :: raw :: c_char , options : * const git_diff_options , file_cb : git_diff_file_cb , binary_cb : git_diff_binary_cb , hunk_cb : git_diff_hunk_cb , line_cb : git_diff_line_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Directly run a diff between a blob and a buffer."] # [doc = ""] # [doc = " As with `git_diff_blobs`, comparing a blob and buffer lacks some context,"] # [doc = " so the `git_diff_file` parameters to the callbacks will be faked a la the"] # [doc = " rules for `git_diff_blobs()`."] # [doc = ""] # [doc = " Passing NULL for `old_blob` will be treated as an empty blob (i.e. the"] # [doc = " `file_cb` will be invoked with GIT_DELTA_ADDED and the diff will be the"] # [doc = " entire content of the buffer added).  Passing NULL to the buffer will do"] # [doc = " the reverse, with GIT_DELTA_REMOVED and blob content removed."] # [doc = ""] # [doc = " @param old_blob Blob for old side of diff, or NULL for empty blob"] # [doc = " @param old_as_path Treat old blob as if it had this filename; can be NULL"] # [doc = " @param buffer Raw data for new side of diff, or NULL for empty"] # [doc = " @param buffer_len Length of raw data for new side of diff"] # [doc = " @param buffer_as_path Treat buffer as if it had this filename; can be NULL"] # [doc = " @param options Options for diff, or NULL for default options"] # [doc = " @param file_cb Callback for \"file\"; made once if there is a diff; can be NULL"] # [doc = " @param binary_cb Callback for binary files; can be NULL"] # [doc = " @param hunk_cb Callback for each hunk in diff; can be NULL"] # [doc = " @param line_cb Callback for each line in diff; can be NULL"] # [doc = " @param payload Payload passed to each callback function"] # [doc = " @return 0 on success, non-zero callback return value, or error code"] pub fn git_diff_blob_to_buffer (old_blob : * const git_blob , old_as_path : * const :: std :: os :: raw :: c_char , buffer : * const :: std :: os :: raw :: c_char , buffer_len : size_t , buffer_as_path : * const :: std :: os :: raw :: c_char , options : * const git_diff_options , file_cb : git_diff_file_cb , binary_cb : git_diff_binary_cb , hunk_cb : git_diff_hunk_cb , line_cb : git_diff_line_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Directly run a diff between two buffers."] # [doc = ""] # [doc = " Even more than with `git_diff_blobs`, comparing two buffer lacks"] # [doc = " context, so the `git_diff_file` parameters to the callbacks will be"] # [doc = " faked a la the rules for `git_diff_blobs()`."] # [doc = ""] # [doc = " @param old_buffer Raw data for old side of diff, or NULL for empty"] # [doc = " @param old_len Length of the raw data for old side of the diff"] # [doc = " @param old_as_path Treat old buffer as if it had this filename; can be NULL"] # [doc = " @param new_buffer Raw data for new side of diff, or NULL for empty"] # [doc = " @param new_len Length of raw data for new side of diff"] # [doc = " @param new_as_path Treat buffer as if it had this filename; can be NULL"] # [doc = " @param options Options for diff, or NULL for default options"] # [doc = " @param file_cb Callback for \"file\"; made once if there is a diff; can be NULL"] # [doc = " @param binary_cb Callback for binary files; can be NULL"] # [doc = " @param hunk_cb Callback for each hunk in diff; can be NULL"] # [doc = " @param line_cb Callback for each line in diff; can be NULL"] # [doc = " @param payload Payload passed to each callback function"] # [doc = " @return 0 on success, non-zero callback return value, or error code"] pub fn git_diff_buffers (old_buffer : * const :: std :: os :: raw :: c_void , old_len : size_t , old_as_path : * const :: std :: os :: raw :: c_char , new_buffer : * const :: std :: os :: raw :: c_void , new_len : size_t , new_as_path : * const :: std :: os :: raw :: c_char , options : * const git_diff_options , file_cb : git_diff_file_cb , binary_cb : git_diff_binary_cb , hunk_cb : git_diff_hunk_cb , line_cb : git_diff_line_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Read the contents of a git patch file into a `git_diff` object."] # [doc = ""] # [doc = " The diff object produced is similar to the one that would be"] # [doc = " produced if you actually produced it computationally by comparing"] # [doc = " two trees, however there may be subtle differences.  For example,"] # [doc = " a patch file likely contains abbreviated object IDs, so the"] # [doc = " object IDs in a `git_diff_delta` produced by this function will"] # [doc = " also be abbreviated."] # [doc = ""] # [doc = " This function will only read patch files created by a git"] # [doc = " implementation, it will not read unified diffs produced by"] # [doc = " the `diff` program, nor any other types of patch files."] # [doc = ""] # [doc = " @param out A pointer to a git_diff pointer that will be allocated."] # [doc = " @param content The contents of a patch file"] # [doc = " @param content_len The length of the patch file contents"] # [doc = " @return 0 or an error code"] pub fn git_diff_from_buffer (out : * mut * mut git_diff , content : * const :: std :: os :: raw :: c_char , content_len : size_t) -> :: std :: os :: raw :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_diff_stats { _unused : [u8 ; 0] , } # [doc = " No stats"] pub const git_diff_stats_format_t_GIT_DIFF_STATS_NONE : git_diff_stats_format_t = 0 ; # [doc = " Full statistics, equivalent of `--stat`"] pub const git_diff_stats_format_t_GIT_DIFF_STATS_FULL : git_diff_stats_format_t = 1 ; # [doc = " Short statistics, equivalent of `--shortstat`"] pub const git_diff_stats_format_t_GIT_DIFF_STATS_SHORT : git_diff_stats_format_t = 2 ; # [doc = " Number statistics, equivalent of `--numstat`"] pub const git_diff_stats_format_t_GIT_DIFF_STATS_NUMBER : git_diff_stats_format_t = 4 ; # [doc = " Extended header information such as creations, renames and mode changes, equivalent of `--summary`"] pub const git_diff_stats_format_t_GIT_DIFF_STATS_INCLUDE_SUMMARY : git_diff_stats_format_t = 8 ; # [doc = " Formatting options for diff stats"] pub type git_diff_stats_format_t = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = " Accumulate diff statistics for all patches."] # [doc = ""] # [doc = " @param out Structure containg the diff statistics."] # [doc = " @param diff A git_diff generated by one of the above functions."] # [doc = " @return 0 on success; non-zero on error"] pub fn git_diff_get_stats (out : * mut * mut git_diff_stats , diff : * mut git_diff) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the total number of files changed in a diff"] # [doc = ""] # [doc = " @param stats A `git_diff_stats` generated by one of the above functions."] # [doc = " @return total number of files changed in the diff"] pub fn git_diff_stats_files_changed (stats : * const git_diff_stats) -> size_t ; } extern "C" { # [doc = " Get the total number of insertions in a diff"] # [doc = ""] # [doc = " @param stats A `git_diff_stats` generated by one of the above functions."] # [doc = " @return total number of insertions in the diff"] pub fn git_diff_stats_insertions (stats : * const git_diff_stats) -> size_t ; } extern "C" { # [doc = " Get the total number of deletions in a diff"] # [doc = ""] # [doc = " @param stats A `git_diff_stats` generated by one of the above functions."] # [doc = " @return total number of deletions in the diff"] pub fn git_diff_stats_deletions (stats : * const git_diff_stats) -> size_t ; } extern "C" { # [doc = " Print diff statistics to a `git_buf`."] # [doc = ""] # [doc = " @param out buffer to store the formatted diff statistics in."] # [doc = " @param stats A `git_diff_stats` generated by one of the above functions."] # [doc = " @param format Formatting option."] # [doc = " @param width Target width for output (only affects GIT_DIFF_STATS_FULL)"] # [doc = " @return 0 on success; non-zero on error"] pub fn git_diff_stats_to_buf (out : * mut git_buf , stats : * const git_diff_stats , format : git_diff_stats_format_t , width : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Deallocate a `git_diff_stats`."] # [doc = ""] # [doc = " @param stats The previously created statistics object;"] # [doc = " cannot be used after free."] pub fn git_diff_stats_free (stats : * mut git_diff_stats) ; } # [doc = " Patch ID options structure"] # [doc = ""] # [doc = " Initialize with `GIT_PATCHID_OPTIONS_INIT`. Alternatively, you can"] # [doc = " use `git_diff_patchid_options_init`."] # [doc = ""] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_diff_patchid_options { pub version : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_git_diff_patchid_options () { assert_eq ! (:: std :: mem :: size_of :: < git_diff_patchid_options > () , 4usize , concat ! ("Size of: " , stringify ! (git_diff_patchid_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_diff_patchid_options > () , 4usize , concat ! ("Alignment of " , stringify ! (git_diff_patchid_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_patchid_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_diff_patchid_options) , "::" , stringify ! (version))) ; } extern "C" { # [doc = " Initialize git_diff_patchid_options structure"] # [doc = ""] # [doc = " Initializes a `git_diff_patchid_options` with default values. Equivalent to"] # [doc = " creating an instance with `GIT_DIFF_PATCHID_OPTIONS_INIT`."] # [doc = ""] # [doc = " @param opts The `git_diff_patchid_options` struct to initialize."] # [doc = " @param version The struct version; pass `GIT_DIFF_PATCHID_OPTIONS_VERSION`."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_diff_patchid_options_init (opts : * mut git_diff_patchid_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Calculate the patch ID for the given patch."] # [doc = ""] # [doc = " Calculate a stable patch ID for the given patch by summing the"] # [doc = " hash of the file diffs, ignoring whitespace and line numbers."] # [doc = " This can be used to derive whether two diffs are the same with"] # [doc = " a high probability."] # [doc = ""] # [doc = " Currently, this function only calculates stable patch IDs, as"] # [doc = " defined in git-patch-id(1), and should in fact generate the"] # [doc = " same IDs as the upstream git project does."] # [doc = ""] # [doc = " @param out Pointer where the calculated patch ID should be stored"] # [doc = " @param diff The diff to calculate the ID for"] # [doc = " @param opts Options for how to calculate the patch ID. This is"] # [doc = "  intended for future changes, as currently no options are"] # [doc = "  available."] # [doc = " @return 0 on success, an error code otherwise."] pub fn git_diff_patchid (out : * mut git_oid , diff : * mut git_diff , opts : * mut git_diff_patchid_options) -> :: std :: os :: raw :: c_int ; } # [doc = " When applying a patch, callback that will be made per delta (file)."] # [doc = ""] # [doc = " When the callback:"] # [doc = " - returns < 0, the apply process will be aborted."] # [doc = " - returns > 0, the delta will not be applied, but the apply process"] # [doc = "      continues"] # [doc = " - returns 0, the delta is applied, and the apply process continues."] # [doc = ""] # [doc = " @param delta The delta to be applied"] # [doc = " @param payload User-specified payload"] pub type git_apply_delta_cb = :: std :: option :: Option < unsafe extern "C" fn (delta : * const git_diff_delta , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = " When applying a patch, callback that will be made per hunk."] # [doc = ""] # [doc = " When the callback:"] # [doc = " - returns < 0, the apply process will be aborted."] # [doc = " - returns > 0, the hunk will not be applied, but the apply process"] # [doc = "      continues"] # [doc = " - returns 0, the hunk is applied, and the apply process continues."] # [doc = ""] # [doc = " @param hunk The hunk to be applied"] # [doc = " @param payload User-specified payload"] pub type git_apply_hunk_cb = :: std :: option :: Option < unsafe extern "C" fn (hunk : * const git_diff_hunk , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = " Don't actually make changes, just test that the patch applies."] # [doc = " This is the equivalent of `git apply --check`."] pub const git_apply_flags_t_GIT_APPLY_CHECK : git_apply_flags_t = 1 ; # [doc = " Flags controlling the behavior of git_apply"] pub type git_apply_flags_t = :: std :: os :: raw :: c_uint ; # [doc = " Apply options structure"] # [doc = ""] # [doc = " Initialize with `GIT_APPLY_OPTIONS_INIT`. Alternatively, you can"] # [doc = " use `git_apply_options_init`."] # [doc = ""] # [doc = " @see git_apply_to_tree, git_apply"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_apply_options { # [doc = "< The version"] pub version : :: std :: os :: raw :: c_uint , # [doc = " When applying a patch, callback that will be made per delta (file)."] pub delta_cb : git_apply_delta_cb , # [doc = " When applying a patch, callback that will be made per hunk."] pub hunk_cb : git_apply_hunk_cb , # [doc = " Payload passed to both delta_cb & hunk_cb."] pub payload : * mut :: std :: os :: raw :: c_void , # [doc = " Bitmask of git_apply_flags_t"] pub flags : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_git_apply_options () { assert_eq ! (:: std :: mem :: size_of :: < git_apply_options > () , 40usize , concat ! ("Size of: " , stringify ! (git_apply_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_apply_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_apply_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_apply_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_apply_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_apply_options > ())) . delta_cb as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_apply_options) , "::" , stringify ! (delta_cb))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_apply_options > ())) . hunk_cb as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_apply_options) , "::" , stringify ! (hunk_cb))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_apply_options > ())) . payload as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_apply_options) , "::" , stringify ! (payload))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_apply_options > ())) . flags as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (git_apply_options) , "::" , stringify ! (flags))) ; } extern "C" { pub fn git_apply_options_init (opts : * mut git_apply_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Apply a `git_diff` to a `git_tree`, and return the resulting image"] # [doc = " as an index."] # [doc = ""] # [doc = " @param out the postimage of the application"] # [doc = " @param repo the repository to apply"] # [doc = " @param preimage the tree to apply the diff to"] # [doc = " @param diff the diff to apply"] # [doc = " @param options the options for the apply (or null for defaults)"] # [doc = " @return 0 or an error code"] pub fn git_apply_to_tree (out : * mut * mut git_index , repo : * mut git_repository , preimage : * mut git_tree , diff : * mut git_diff , options : * const git_apply_options) -> :: std :: os :: raw :: c_int ; } # [doc = " Apply the patch to the workdir, leaving the index untouched."] # [doc = " This is the equivalent of `git apply` with no location argument."] pub const git_apply_location_t_GIT_APPLY_LOCATION_WORKDIR : git_apply_location_t = 0 ; # [doc = " Apply the patch to the index, leaving the working directory"] # [doc = " untouched.  This is the equivalent of `git apply --cached`."] pub const git_apply_location_t_GIT_APPLY_LOCATION_INDEX : git_apply_location_t = 1 ; # [doc = " Apply the patch to both the working directory and the index."] # [doc = " This is the equivalent of `git apply --index`."] pub const git_apply_location_t_GIT_APPLY_LOCATION_BOTH : git_apply_location_t = 2 ; # [doc = " Possible application locations for git_apply"] pub type git_apply_location_t = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = " Apply a `git_diff` to the given repository, making changes directly"] # [doc = " in the working directory, the index, or both."] # [doc = ""] # [doc = " @param repo the repository to apply to"] # [doc = " @param diff the diff to apply"] # [doc = " @param location the location to apply (workdir, index or both)"] # [doc = " @param options the options for the apply (or null for defaults)"] # [doc = " @return 0 or an error code"] pub fn git_apply (repo : * mut git_repository , diff : * mut git_diff , location : git_apply_location_t , options : * const git_apply_options) -> :: std :: os :: raw :: c_int ; } # [doc = "< The attribute has been left unspecified"] pub const git_attr_value_t_GIT_ATTR_VALUE_UNSPECIFIED : git_attr_value_t = 0 ; # [doc = "< The attribute has been set"] pub const git_attr_value_t_GIT_ATTR_VALUE_TRUE : git_attr_value_t = 1 ; # [doc = "< The attribute has been unset"] pub const git_attr_value_t_GIT_ATTR_VALUE_FALSE : git_attr_value_t = 2 ; # [doc = "< This attribute has a value"] pub const git_attr_value_t_GIT_ATTR_VALUE_STRING : git_attr_value_t = 3 ; # [doc = " Possible states for an attribute"] pub type git_attr_value_t = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = " Return the value type for a given attribute."] # [doc = ""] # [doc = " This can be either `TRUE`, `FALSE`, `UNSPECIFIED` (if the attribute"] # [doc = " was not set at all), or `VALUE`, if the attribute was set to an"] # [doc = " actual string."] # [doc = ""] # [doc = " If the attribute has a `VALUE` string, it can be accessed normally"] # [doc = " as a NULL-terminated C string."] # [doc = ""] # [doc = " @param attr The attribute"] # [doc = " @return the value type for the attribute"] pub fn git_attr_value (attr : * const :: std :: os :: raw :: c_char) -> git_attr_value_t ; } # [doc = " An options structure for querying attributes."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_attr_options { pub version : :: std :: os :: raw :: c_uint , # [doc = " A combination of GIT_ATTR_CHECK flags"] pub flags : :: std :: os :: raw :: c_uint , pub commit_id : * mut git_oid , # [doc = " The commit to load attributes from, when"] # [doc = " `GIT_ATTR_CHECK_INCLUDE_COMMIT` is specified."] pub attr_commit_id : git_oid , } # [test] fn bindgen_test_layout_git_attr_options () { assert_eq ! (:: std :: mem :: size_of :: < git_attr_options > () , 40usize , concat ! ("Size of: " , stringify ! (git_attr_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_attr_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_attr_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_attr_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_attr_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_attr_options > ())) . flags as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_attr_options) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_attr_options > ())) . commit_id as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_attr_options) , "::" , stringify ! (commit_id))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_attr_options > ())) . attr_commit_id as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_attr_options) , "::" , stringify ! (attr_commit_id))) ; } extern "C" { # [doc = " Look up the value of one git attribute for path."] # [doc = ""] # [doc = " @param value_out Output of the value of the attribute.  Use the GIT_ATTR_..."] # [doc = "             macros to test for TRUE, FALSE, UNSPECIFIED, etc. or just"] # [doc = "             use the string value for attributes set to a value.  You"] # [doc = "             should NOT modify or free this value."] # [doc = " @param repo The repository containing the path."] # [doc = " @param flags A combination of GIT_ATTR_CHECK... flags."] # [doc = " @param path The path to check for attributes.  Relative paths are"] # [doc = "             interpreted relative to the repo root.  The file does"] # [doc = "             not have to exist, but if it does not, then it will be"] # [doc = "             treated as a plain file (not a directory)."] # [doc = " @param name The name of the attribute to look up."] pub fn git_attr_get (value_out : * mut * const :: std :: os :: raw :: c_char , repo : * mut git_repository , flags : u32 , path : * const :: std :: os :: raw :: c_char , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Look up the value of one git attribute for path with extended options."] # [doc = ""] # [doc = " @param value_out Output of the value of the attribute.  Use the GIT_ATTR_..."] # [doc = "             macros to test for TRUE, FALSE, UNSPECIFIED, etc. or just"] # [doc = "             use the string value for attributes set to a value.  You"] # [doc = "             should NOT modify or free this value."] # [doc = " @param repo The repository containing the path."] # [doc = " @param opts The `git_attr_options` to use when querying these attributes."] # [doc = " @param path The path to check for attributes.  Relative paths are"] # [doc = "             interpreted relative to the repo root.  The file does"] # [doc = "             not have to exist, but if it does not, then it will be"] # [doc = "             treated as a plain file (not a directory)."] # [doc = " @param name The name of the attribute to look up."] pub fn git_attr_get_ext (value_out : * mut * const :: std :: os :: raw :: c_char , repo : * mut git_repository , opts : * mut git_attr_options , path : * const :: std :: os :: raw :: c_char , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Look up a list of git attributes for path."] # [doc = ""] # [doc = " Use this if you have a known list of attributes that you want to"] # [doc = " look up in a single call.  This is somewhat more efficient than"] # [doc = " calling `git_attr_get()` multiple times."] # [doc = ""] # [doc = " For example, you might write:"] # [doc = ""] # [doc = "     const char *attrs[] = { \"crlf\", \"diff\", \"foo\" };"] # [doc = "     const char **values[3];"] # [doc = "     git_attr_get_many(values, repo, 0, \"my/fun/file.c\", 3, attrs);"] # [doc = ""] # [doc = " Then you could loop through the 3 values to get the settings for"] # [doc = " the three attributes you asked about."] # [doc = ""] # [doc = " @param values_out An array of num_attr entries that will have string"] # [doc = "             pointers written into it for the values of the attributes."] # [doc = "             You should not modify or free the values that are written"] # [doc = "             into this array (although of course, you should free the"] # [doc = "             array itself if you allocated it)."] # [doc = " @param repo The repository containing the path."] # [doc = " @param flags A combination of GIT_ATTR_CHECK... flags."] # [doc = " @param path The path inside the repo to check attributes.  This"] # [doc = "             does not have to exist, but if it does not, then"] # [doc = "             it will be treated as a plain file (i.e. not a directory)."] # [doc = " @param num_attr The number of attributes being looked up"] # [doc = " @param names An array of num_attr strings containing attribute names."] pub fn git_attr_get_many (values_out : * mut * const :: std :: os :: raw :: c_char , repo : * mut git_repository , flags : u32 , path : * const :: std :: os :: raw :: c_char , num_attr : size_t , names : * mut * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Look up a list of git attributes for path with extended options."] # [doc = ""] # [doc = " @param values_out An array of num_attr entries that will have string"] # [doc = "             pointers written into it for the values of the attributes."] # [doc = "             You should not modify or free the values that are written"] # [doc = "             into this array (although of course, you should free the"] # [doc = "             array itself if you allocated it)."] # [doc = " @param repo The repository containing the path."] # [doc = " @param opts The `git_attr_options` to use when querying these attributes."] # [doc = " @param path The path inside the repo to check attributes.  This"] # [doc = "             does not have to exist, but if it does not, then"] # [doc = "             it will be treated as a plain file (i.e. not a directory)."] # [doc = " @param num_attr The number of attributes being looked up"] # [doc = " @param names An array of num_attr strings containing attribute names."] pub fn git_attr_get_many_ext (values_out : * mut * const :: std :: os :: raw :: c_char , repo : * mut git_repository , opts : * mut git_attr_options , path : * const :: std :: os :: raw :: c_char , num_attr : size_t , names : * mut * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } # [doc = " The callback used with git_attr_foreach."] # [doc = ""] # [doc = " This callback will be invoked only once per attribute name, even if there"] # [doc = " are multiple rules for a given file. The highest priority rule will be"] # [doc = " used."] # [doc = ""] # [doc = " @see git_attr_foreach."] # [doc = ""] # [doc = " @param name The attribute name."] # [doc = " @param value The attribute value. May be NULL if the attribute is explicitly"] # [doc = "              set to UNSPECIFIED using the '!' sign."] # [doc = " @param payload A user-specified pointer."] # [doc = " @return 0 to continue looping, non-zero to stop. This value will be returned"] # [doc = "         from git_attr_foreach."] pub type git_attr_foreach_cb = :: std :: option :: Option < unsafe extern "C" fn (name : * const :: std :: os :: raw :: c_char , value : * const :: std :: os :: raw :: c_char , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; extern "C" { # [doc = " Loop over all the git attributes for a path."] # [doc = ""] # [doc = " @param repo The repository containing the path."] # [doc = " @param flags A combination of GIT_ATTR_CHECK... flags."] # [doc = " @param path Path inside the repo to check attributes.  This does not have"] # [doc = "             to exist, but if it does not, then it will be treated as a"] # [doc = "             plain file (i.e. not a directory)."] # [doc = " @param callback Function to invoke on each attribute name and value."] # [doc = "                 See git_attr_foreach_cb."] # [doc = " @param payload Passed on as extra parameter to callback function."] # [doc = " @return 0 on success, non-zero callback return value, or error code"] pub fn git_attr_foreach (repo : * mut git_repository , flags : u32 , path : * const :: std :: os :: raw :: c_char , callback : git_attr_foreach_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Loop over all the git attributes for a path with extended options."] # [doc = ""] # [doc = " @param repo The repository containing the path."] # [doc = " @param opts The `git_attr_options` to use when querying these attributes."] # [doc = " @param path Path inside the repo to check attributes.  This does not have"] # [doc = "             to exist, but if it does not, then it will be treated as a"] # [doc = "             plain file (i.e. not a directory)."] # [doc = " @param callback Function to invoke on each attribute name and value."] # [doc = "                 See git_attr_foreach_cb."] # [doc = " @param payload Passed on as extra parameter to callback function."] # [doc = " @return 0 on success, non-zero callback return value, or error code"] pub fn git_attr_foreach_ext (repo : * mut git_repository , opts : * mut git_attr_options , path : * const :: std :: os :: raw :: c_char , callback : git_attr_foreach_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Flush the gitattributes cache."] # [doc = ""] # [doc = " Call this if you have reason to believe that the attributes files on"] # [doc = " disk no longer match the cached contents of memory.  This will cause"] # [doc = " the attributes files to be reloaded the next time that an attribute"] # [doc = " access function is called."] # [doc = ""] # [doc = " @param repo The repository containing the gitattributes cache"] # [doc = " @return 0 on success, or an error code"] pub fn git_attr_cache_flush (repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Add a macro definition."] # [doc = ""] # [doc = " Macros will automatically be loaded from the top level `.gitattributes`"] # [doc = " file of the repository (plus the build-in \"binary\" macro).  This"] # [doc = " function allows you to add others.  For example, to add the default"] # [doc = " macro, you would call:"] # [doc = ""] # [doc = "     git_attr_add_macro(repo, \"binary\", \"-diff -crlf\");"] pub fn git_attr_add_macro (repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char , values : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Lookup a blob object from a repository."] # [doc = ""] # [doc = " @param blob pointer to the looked up blob"] # [doc = " @param repo the repo to use when locating the blob."] # [doc = " @param id identity of the blob to locate."] # [doc = " @return 0 or an error code"] pub fn git_blob_lookup (blob : * mut * mut git_blob , repo : * mut git_repository , id : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Lookup a blob object from a repository,"] # [doc = " given a prefix of its identifier (short id)."] # [doc = ""] # [doc = " @see git_object_lookup_prefix"] # [doc = ""] # [doc = " @param blob pointer to the looked up blob"] # [doc = " @param repo the repo to use when locating the blob."] # [doc = " @param id identity of the blob to locate."] # [doc = " @param len the length of the short identifier"] # [doc = " @return 0 or an error code"] pub fn git_blob_lookup_prefix (blob : * mut * mut git_blob , repo : * mut git_repository , id : * const git_oid , len : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Close an open blob"] # [doc = ""] # [doc = " This is a wrapper around git_object_free()"] # [doc = ""] # [doc = " IMPORTANT:"] # [doc = " It *is* necessary to call this method when you stop"] # [doc = " using a blob. Failure to do so will cause a memory leak."] # [doc = ""] # [doc = " @param blob the blob to close"] pub fn git_blob_free (blob : * mut git_blob) ; } extern "C" { # [doc = " Get the id of a blob."] # [doc = ""] # [doc = " @param blob a previously loaded blob."] # [doc = " @return SHA1 hash for this blob."] pub fn git_blob_id (blob : * const git_blob) -> * const git_oid ; } extern "C" { # [doc = " Get the repository that contains the blob."] # [doc = ""] # [doc = " @param blob A previously loaded blob."] # [doc = " @return Repository that contains this blob."] pub fn git_blob_owner (blob : * const git_blob) -> * mut git_repository ; } extern "C" { # [doc = " Get a read-only buffer with the raw content of a blob."] # [doc = ""] # [doc = " A pointer to the raw content of a blob is returned;"] # [doc = " this pointer is owned internally by the object and shall"] # [doc = " not be free'd. The pointer may be invalidated at a later"] # [doc = " time."] # [doc = ""] # [doc = " @param blob pointer to the blob"] # [doc = " @return the pointer, or NULL on error"] pub fn git_blob_rawcontent (blob : * const git_blob) -> * const :: std :: os :: raw :: c_void ; } extern "C" { # [doc = " Get the size in bytes of the contents of a blob"] # [doc = ""] # [doc = " @param blob pointer to the blob"] # [doc = " @return size on bytes"] pub fn git_blob_rawsize (blob : * const git_blob) -> git_object_size_t ; } # [doc = " When set, filters will not be applied to binary files."] pub const git_blob_filter_flag_t_GIT_BLOB_FILTER_CHECK_FOR_BINARY : git_blob_filter_flag_t = 1 ; # [doc = " When set, filters will not load configuration from the"] # [doc = " system-wide `gitattributes` in `/etc` (or system equivalent)."] pub const git_blob_filter_flag_t_GIT_BLOB_FILTER_NO_SYSTEM_ATTRIBUTES : git_blob_filter_flag_t = 2 ; # [doc = " When set, filters will be loaded from a `.gitattributes` file"] # [doc = " in the HEAD commit."] pub const git_blob_filter_flag_t_GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD : git_blob_filter_flag_t = 4 ; # [doc = " When set, filters will be loaded from a `.gitattributes` file"] # [doc = " in the specified commit."] pub const git_blob_filter_flag_t_GIT_BLOB_FILTER_ATTRIBUTES_FROM_COMMIT : git_blob_filter_flag_t = 8 ; # [doc = " Flags to control the functionality of `git_blob_filter`."] pub type git_blob_filter_flag_t = :: std :: os :: raw :: c_uint ; # [doc = " The options used when applying filter options to a file."] # [doc = ""] # [doc = " Initialize with `GIT_BLOB_FILTER_OPTIONS_INIT`. Alternatively, you can"] # [doc = " use `git_blob_filter_options_init`."] # [doc = ""] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_blob_filter_options { pub version : :: std :: os :: raw :: c_int , # [doc = " Flags to control the filtering process, see `git_blob_filter_flag_t` above"] pub flags : u32 , pub commit_id : * mut git_oid , # [doc = " The commit to load attributes from, when"] # [doc = " `GIT_BLOB_FILTER_ATTRIBUTES_FROM_COMMIT` is specified."] pub attr_commit_id : git_oid , } # [test] fn bindgen_test_layout_git_blob_filter_options () { assert_eq ! (:: std :: mem :: size_of :: < git_blob_filter_options > () , 40usize , concat ! ("Size of: " , stringify ! (git_blob_filter_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_blob_filter_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_blob_filter_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_blob_filter_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_blob_filter_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_blob_filter_options > ())) . flags as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_blob_filter_options) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_blob_filter_options > ())) . commit_id as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_blob_filter_options) , "::" , stringify ! (commit_id))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_blob_filter_options > ())) . attr_commit_id as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_blob_filter_options) , "::" , stringify ! (attr_commit_id))) ; } extern "C" { # [doc = " Initialize git_blob_filter_options structure"] # [doc = ""] # [doc = " Initializes a `git_blob_filter_options` with default values. Equivalent"] # [doc = " to creating an instance with `GIT_BLOB_FILTER_OPTIONS_INIT`."] # [doc = ""] # [doc = " @param opts The `git_blob_filter_options` struct to initialize."] # [doc = " @param version The struct version; pass `GIT_BLOB_FILTER_OPTIONS_VERSION`."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_blob_filter_options_init (opts : * mut git_blob_filter_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get a buffer with the filtered content of a blob."] # [doc = ""] # [doc = " This applies filters as if the blob was being checked out to the"] # [doc = " working directory under the specified filename.  This may apply"] # [doc = " CRLF filtering or other types of changes depending on the file"] # [doc = " attributes set for the blob and the content detected in it."] # [doc = ""] # [doc = " The output is written into a `git_buf` which the caller must free"] # [doc = " when done (via `git_buf_dispose`)."] # [doc = ""] # [doc = " If no filters need to be applied, then the `out` buffer will just"] # [doc = " be populated with a pointer to the raw content of the blob.  In"] # [doc = " that case, be careful to *not* free the blob until done with the"] # [doc = " buffer or copy it into memory you own."] # [doc = ""] # [doc = " @param out The git_buf to be filled in"] # [doc = " @param blob Pointer to the blob"] # [doc = " @param as_path Path used for file attribute lookups, etc."] # [doc = " @param opts Options to use for filtering the blob"] # [doc = " @return 0 on success or an error code"] pub fn git_blob_filter (out : * mut git_buf , blob : * mut git_blob , as_path : * const :: std :: os :: raw :: c_char , opts : * mut git_blob_filter_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Read a file from the working folder of a repository"] # [doc = " and write it to the Object Database as a loose blob"] # [doc = ""] # [doc = " @param id return the id of the written blob"] # [doc = " @param repo repository where the blob will be written."] # [doc = "\tthis repository cannot be bare"] # [doc = " @param relative_path file from which the blob will be created,"] # [doc = "\trelative to the repository's working dir"] # [doc = " @return 0 or an error code"] pub fn git_blob_create_from_workdir (id : * mut git_oid , repo : * mut git_repository , relative_path : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Read a file from the filesystem and write its content"] # [doc = " to the Object Database as a loose blob"] # [doc = ""] # [doc = " @param id return the id of the written blob"] # [doc = " @param repo repository where the blob will be written."] # [doc = "\tthis repository can be bare or not"] # [doc = " @param path file from which the blob will be created"] # [doc = " @return 0 or an error code"] pub fn git_blob_create_from_disk (id : * mut git_oid , repo : * mut git_repository , path : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a stream to write a new blob into the object db"] # [doc = ""] # [doc = " This function may need to buffer the data on disk and will in"] # [doc = " general not be the right choice if you know the size of the data"] # [doc = " to write. If you have data in memory, use"] # [doc = " `git_blob_create_from_buffer()`. If you do not, but know the size of"] # [doc = " the contents (and don't want/need to perform filtering), use"] # [doc = " `git_odb_open_wstream()`."] # [doc = ""] # [doc = " Don't close this stream yourself but pass it to"] # [doc = " `git_blob_create_from_stream_commit()` to commit the write to the"] # [doc = " object db and get the object id."] # [doc = ""] # [doc = " If the `hintpath` parameter is filled, it will be used to determine"] # [doc = " what git filters should be applied to the object before it is written"] # [doc = " to the object database."] # [doc = ""] # [doc = " @param out the stream into which to write"] # [doc = " @param repo Repository where the blob will be written."] # [doc = "        This repository can be bare or not."] # [doc = " @param hintpath If not NULL, will be used to select data filters"] # [doc = "        to apply onto the content of the blob to be created."] # [doc = " @return 0 or error code"] pub fn git_blob_create_from_stream (out : * mut * mut git_writestream , repo : * mut git_repository , hintpath : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Close the stream and write the blob to the object db"] # [doc = ""] # [doc = " The stream will be closed and freed."] # [doc = ""] # [doc = " @param out the id of the new blob"] # [doc = " @param stream the stream to close"] # [doc = " @return 0 or an error code"] pub fn git_blob_create_from_stream_commit (out : * mut git_oid , stream : * mut git_writestream) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Write an in-memory buffer to the ODB as a blob"] # [doc = ""] # [doc = " @param id return the id of the written blob"] # [doc = " @param repo repository where the blob will be written"] # [doc = " @param buffer data to be written into the blob"] # [doc = " @param len length of the data"] # [doc = " @return 0 or an error code"] pub fn git_blob_create_from_buffer (id : * mut git_oid , repo : * mut git_repository , buffer : * const :: std :: os :: raw :: c_void , len : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Determine if the blob content is most certainly binary or not."] # [doc = ""] # [doc = " The heuristic used to guess if a file is binary is taken from core git:"] # [doc = " Searching for NUL bytes and looking for a reasonable ratio of printable"] # [doc = " to non-printable characters among the first 8000 bytes."] # [doc = ""] # [doc = " @param blob The blob which content should be analyzed"] # [doc = " @return 1 if the content of the blob is detected"] # [doc = " as binary; 0 otherwise."] pub fn git_blob_is_binary (blob : * const git_blob) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create an in-memory copy of a blob. The copy must be explicitly"] # [doc = " free'd or it will leak."] # [doc = ""] # [doc = " @param out Pointer to store the copy of the object"] # [doc = " @param source Original object to copy"] pub fn git_blob_dup (out : * mut * mut git_blob , source : * mut git_blob) -> :: std :: os :: raw :: c_int ; } # [doc = " Normal blame, the default"] pub const git_blame_flag_t_GIT_BLAME_NORMAL : git_blame_flag_t = 0 ; # [doc = " Track lines that have moved within a file (like `git blame -M`)."] # [doc = ""] # [doc = " This is not yet implemented and reserved for future use."] pub const git_blame_flag_t_GIT_BLAME_TRACK_COPIES_SAME_FILE : git_blame_flag_t = 1 ; # [doc = " Track lines that have moved across files in the same commit"] # [doc = " (like `git blame -C`)."] # [doc = ""] # [doc = " This is not yet implemented and reserved for future use."] pub const git_blame_flag_t_GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES : git_blame_flag_t = 2 ; # [doc = " Track lines that have been copied from another file that exists"] # [doc = " in the same commit (like `git blame -CC`).  Implies SAME_FILE."] # [doc = ""] # [doc = " This is not yet implemented and reserved for future use."] pub const git_blame_flag_t_GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES : git_blame_flag_t = 4 ; # [doc = " Track lines that have been copied from another file that exists in"] # [doc = " *any* commit (like `git blame -CCC`).  Implies SAME_COMMIT_COPIES."] # [doc = ""] # [doc = " This is not yet implemented and reserved for future use."] pub const git_blame_flag_t_GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES : git_blame_flag_t = 8 ; # [doc = " Restrict the search of commits to those reachable following only"] # [doc = " the first parents."] pub const git_blame_flag_t_GIT_BLAME_FIRST_PARENT : git_blame_flag_t = 16 ; # [doc = " Use mailmap file to map author and committer names and email"] # [doc = " addresses to canonical real names and email addresses. The"] # [doc = " mailmap will be read from the working directory, or HEAD in a"] # [doc = " bare repository."] pub const git_blame_flag_t_GIT_BLAME_USE_MAILMAP : git_blame_flag_t = 32 ; # [doc = " Ignore whitespace differences"] pub const git_blame_flag_t_GIT_BLAME_IGNORE_WHITESPACE : git_blame_flag_t = 64 ; # [doc = " Flags for indicating option behavior for git_blame APIs."] pub type git_blame_flag_t = :: std :: os :: raw :: c_uint ; # [doc = " Blame options structure"] # [doc = ""] # [doc = " Initialize with `GIT_BLAME_OPTIONS_INIT`. Alternatively, you can"] # [doc = " use `git_blame_options_init`."] # [doc = ""] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_blame_options { pub version : :: std :: os :: raw :: c_uint , # [doc = " A combination of `git_blame_flag_t`"] pub flags : u32 , # [doc = " The lower bound on the number of alphanumeric characters that"] # [doc = " must be detected as moving/copying within a file for it to"] # [doc = " associate those lines with the parent commit. The default value"] # [doc = " is 20."] # [doc = ""] # [doc = " This value only takes effect if any of the `GIT_BLAME_TRACK_COPIES_*`"] # [doc = " flags are specified."] pub min_match_characters : u16 , # [doc = " The id of the newest commit to consider. The default is HEAD."] pub newest_commit : git_oid , # [doc = " The id of the oldest commit to consider."] # [doc = " The default is the first commit encountered with a NULL parent."] pub oldest_commit : git_oid , # [doc = " The first line in the file to blame."] # [doc = " The default is 1 (line numbers start with 1)."] pub min_line : size_t , # [doc = " The last line in the file to blame."] # [doc = " The default is the last line of the file."] pub max_line : size_t , } # [test] fn bindgen_test_layout_git_blame_options () { assert_eq ! (:: std :: mem :: size_of :: < git_blame_options > () , 72usize , concat ! ("Size of: " , stringify ! (git_blame_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_blame_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_blame_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_blame_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_blame_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_blame_options > ())) . flags as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_blame_options) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_blame_options > ())) . min_match_characters as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_blame_options) , "::" , stringify ! (min_match_characters))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_blame_options > ())) . newest_commit as * const _ as usize } , 10usize , concat ! ("Offset of field: " , stringify ! (git_blame_options) , "::" , stringify ! (newest_commit))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_blame_options > ())) . oldest_commit as * const _ as usize } , 30usize , concat ! ("Offset of field: " , stringify ! (git_blame_options) , "::" , stringify ! (oldest_commit))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_blame_options > ())) . min_line as * const _ as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (git_blame_options) , "::" , stringify ! (min_line))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_blame_options > ())) . max_line as * const _ as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (git_blame_options) , "::" , stringify ! (max_line))) ; } extern "C" { # [doc = " Initialize git_blame_options structure"] # [doc = ""] # [doc = " Initializes a `git_blame_options` with default values. Equivalent to creating"] # [doc = " an instance with GIT_BLAME_OPTIONS_INIT."] # [doc = ""] # [doc = " @param opts The `git_blame_options` struct to initialize."] # [doc = " @param version The struct version; pass `GIT_BLAME_OPTIONS_VERSION`."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_blame_options_init (opts : * mut git_blame_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } # [doc = " Structure that represents a blame hunk."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_blame_hunk { # [doc = " The number of lines in this hunk."] pub lines_in_hunk : size_t , # [doc = " The OID of the commit where this line was last changed."] pub final_commit_id : git_oid , # [doc = " The 1-based line number where this hunk begins, in the final version"] # [doc = " of the file."] pub final_start_line_number : size_t , # [doc = " The author of `final_commit_id`. If `GIT_BLAME_USE_MAILMAP` has been"] # [doc = " specified, it will contain the canonical real name and email address."] pub final_signature : * mut git_signature , # [doc = " The OID of the commit where this hunk was found."] # [doc = " This will usually be the same as `final_commit_id`, except when"] # [doc = " `GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES` has been specified."] pub orig_commit_id : git_oid , # [doc = " The path to the file where this hunk originated, as of the commit"] # [doc = " specified by `orig_commit_id`."] pub orig_path : * const :: std :: os :: raw :: c_char , # [doc = " The 1-based line number where this hunk begins in the file named by"] # [doc = " `orig_path` in the commit specified by `orig_commit_id`."] pub orig_start_line_number : size_t , # [doc = " The author of `orig_commit_id`. If `GIT_BLAME_USE_MAILMAP` has been"] # [doc = " specified, it will contain the canonical real name and email address."] pub orig_signature : * mut git_signature , # [doc = " The 1 iff the hunk has been tracked to a boundary commit (the root,"] # [doc = " or the commit specified in git_blame_options.oldest_commit)"] pub boundary : :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_git_blame_hunk () { assert_eq ! (:: std :: mem :: size_of :: < git_blame_hunk > () , 104usize , concat ! ("Size of: " , stringify ! (git_blame_hunk))) ; assert_eq ! (:: std :: mem :: align_of :: < git_blame_hunk > () , 8usize , concat ! ("Alignment of " , stringify ! (git_blame_hunk))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_blame_hunk > ())) . lines_in_hunk as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_blame_hunk) , "::" , stringify ! (lines_in_hunk))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_blame_hunk > ())) . final_commit_id as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_blame_hunk) , "::" , stringify ! (final_commit_id))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_blame_hunk > ())) . final_start_line_number as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (git_blame_hunk) , "::" , stringify ! (final_start_line_number))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_blame_hunk > ())) . final_signature as * const _ as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (git_blame_hunk) , "::" , stringify ! (final_signature))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_blame_hunk > ())) . orig_commit_id as * const _ as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (git_blame_hunk) , "::" , stringify ! (orig_commit_id))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_blame_hunk > ())) . orig_path as * const _ as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (git_blame_hunk) , "::" , stringify ! (orig_path))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_blame_hunk > ())) . orig_start_line_number as * const _ as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (git_blame_hunk) , "::" , stringify ! (orig_start_line_number))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_blame_hunk > ())) . orig_signature as * const _ as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (git_blame_hunk) , "::" , stringify ! (orig_signature))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_blame_hunk > ())) . boundary as * const _ as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (git_blame_hunk) , "::" , stringify ! (boundary))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_blame { _unused : [u8 ; 0] , } extern "C" { # [doc = " Gets the number of hunks that exist in the blame structure."] pub fn git_blame_get_hunk_count (blame : * mut git_blame) -> u32 ; } extern "C" { # [doc = " Gets the blame hunk at the given index."] # [doc = ""] # [doc = " @param blame the blame structure to query"] # [doc = " @param index index of the hunk to retrieve"] # [doc = " @return the hunk at the given index, or NULL on error"] pub fn git_blame_get_hunk_byindex (blame : * mut git_blame , index : u32) -> * const git_blame_hunk ; } extern "C" { # [doc = " Gets the hunk that relates to the given line number in the newest commit."] # [doc = ""] # [doc = " @param blame the blame structure to query"] # [doc = " @param lineno the (1-based) line number to find a hunk for"] # [doc = " @return the hunk that contains the given line, or NULL on error"] pub fn git_blame_get_hunk_byline (blame : * mut git_blame , lineno : size_t) -> * const git_blame_hunk ; } extern "C" { # [doc = " Get the blame for a single file."] # [doc = ""] # [doc = " @param out pointer that will receive the blame object"] # [doc = " @param repo repository whose history is to be walked"] # [doc = " @param path path to file to consider"] # [doc = " @param options options for the blame operation.  If NULL, this is treated as"] # [doc = "                though GIT_BLAME_OPTIONS_INIT were passed."] # [doc = " @return 0 on success, or an error code. (use git_error_last for information"] # [doc = "         about the error.)"] pub fn git_blame_file (out : * mut * mut git_blame , repo : * mut git_repository , path : * const :: std :: os :: raw :: c_char , options : * mut git_blame_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get blame data for a file that has been modified in memory. The `reference`"] # [doc = " parameter is a pre-calculated blame for the in-odb history of the file. This"] # [doc = " means that once a file blame is completed (which can be expensive), updating"] # [doc = " the buffer blame is very fast."] # [doc = ""] # [doc = " Lines that differ between the buffer and the committed version are marked as"] # [doc = " having a zero OID for their final_commit_id."] # [doc = ""] # [doc = " @param out pointer that will receive the resulting blame data"] # [doc = " @param reference cached blame from the history of the file (usually the output"] # [doc = "                  from git_blame_file)"] # [doc = " @param buffer the (possibly) modified contents of the file"] # [doc = " @param buffer_len number of valid bytes in the buffer"] # [doc = " @return 0 on success, or an error code. (use git_error_last for information"] # [doc = "         about the error)"] pub fn git_blame_buffer (out : * mut * mut git_blame , reference : * mut git_blame , buffer : * const :: std :: os :: raw :: c_char , buffer_len : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free memory allocated by git_blame_file or git_blame_buffer."] # [doc = ""] # [doc = " @param blame the blame structure to free"] pub fn git_blame_free (blame : * mut git_blame) ; } extern "C" { # [doc = " Create a new branch pointing at a target commit"] # [doc = ""] # [doc = " A new direct reference will be created pointing to"] # [doc = " this target commit. If `force` is true and a reference"] # [doc = " already exists with the given name, it'll be replaced."] # [doc = ""] # [doc = " The returned reference must be freed by the user."] # [doc = ""] # [doc = " The branch name will be checked for validity."] # [doc = " See `git_tag_create()` for rules about valid names."] # [doc = ""] # [doc = " @param out Pointer where to store the underlying reference."] # [doc = ""] # [doc = " @param branch_name Name for the branch; this name is"] # [doc = " validated for consistency. It should also not conflict with"] # [doc = " an already existing branch name."] # [doc = ""] # [doc = " @param target Commit to which this branch should point. This object"] # [doc = " must belong to the given `repo`."] # [doc = ""] # [doc = " @param force Overwrite existing branch."] # [doc = ""] # [doc = " @return 0, GIT_EINVALIDSPEC or an error code."] # [doc = " A proper reference is written in the refs/heads namespace"] # [doc = " pointing to the provided target commit."] pub fn git_branch_create (out : * mut * mut git_reference , repo : * mut git_repository , branch_name : * const :: std :: os :: raw :: c_char , target : * const git_commit , force : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a new branch pointing at a target commit"] # [doc = ""] # [doc = " This behaves like `git_branch_create()` but takes an annotated"] # [doc = " commit, which lets you specify which extended sha syntax string was"] # [doc = " specified by a user, allowing for more exact reflog messages."] # [doc = ""] # [doc = " See the documentation for `git_branch_create()`."] # [doc = ""] # [doc = " @see git_branch_create"] pub fn git_branch_create_from_annotated (ref_out : * mut * mut git_reference , repository : * mut git_repository , branch_name : * const :: std :: os :: raw :: c_char , commit : * const git_annotated_commit , force : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Delete an existing branch reference."] # [doc = ""] # [doc = " Note that if the deletion succeeds, the reference object will not"] # [doc = " be valid anymore, and should be freed immediately by the user using"] # [doc = " `git_reference_free()`."] # [doc = ""] # [doc = " @param branch A valid reference representing a branch"] # [doc = " @return 0 on success, or an error code."] pub fn git_branch_delete (branch : * mut git_reference) -> :: std :: os :: raw :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_branch_iterator { _unused : [u8 ; 0] , } extern "C" { # [doc = " Create an iterator which loops over the requested branches."] # [doc = ""] # [doc = " @param out the iterator"] # [doc = " @param repo Repository where to find the branches."] # [doc = " @param list_flags Filtering flags for the branch"] # [doc = " listing. Valid values are GIT_BRANCH_LOCAL, GIT_BRANCH_REMOTE"] # [doc = " or GIT_BRANCH_ALL."] # [doc = ""] # [doc = " @return 0 on success  or an error code"] pub fn git_branch_iterator_new (out : * mut * mut git_branch_iterator , repo : * mut git_repository , list_flags : git_branch_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Retrieve the next branch from the iterator"] # [doc = ""] # [doc = " @param out the reference"] # [doc = " @param out_type the type of branch (local or remote-tracking)"] # [doc = " @param iter the branch iterator"] # [doc = " @return 0 on success, GIT_ITEROVER if there are no more branches or an error code."] pub fn git_branch_next (out : * mut * mut git_reference , out_type : * mut git_branch_t , iter : * mut git_branch_iterator) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free a branch iterator"] # [doc = ""] # [doc = " @param iter the iterator to free"] pub fn git_branch_iterator_free (iter : * mut git_branch_iterator) ; } extern "C" { # [doc = " Move/rename an existing local branch reference."] # [doc = ""] # [doc = " The new branch name will be checked for validity."] # [doc = " See `git_tag_create()` for rules about valid names."] # [doc = ""] # [doc = " Note that if the move succeeds, the old reference object will not"] # [doc = "+ be valid anymore, and should be freed immediately by the user using"] # [doc = "+ `git_reference_free()`."] # [doc = ""] # [doc = " @param out New reference object for the updated name."] # [doc = ""] # [doc = " @param branch Current underlying reference of the branch."] # [doc = ""] # [doc = " @param new_branch_name Target name of the branch once the move"] # [doc = " is performed; this name is validated for consistency."] # [doc = ""] # [doc = " @param force Overwrite existing branch."] # [doc = ""] # [doc = " @return 0 on success, GIT_EINVALIDSPEC or an error code."] pub fn git_branch_move (out : * mut * mut git_reference , branch : * mut git_reference , new_branch_name : * const :: std :: os :: raw :: c_char , force : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Lookup a branch by its name in a repository."] # [doc = ""] # [doc = " The generated reference must be freed by the user."] # [doc = " The branch name will be checked for validity."] # [doc = ""] # [doc = " @see git_tag_create for rules about valid names."] # [doc = ""] # [doc = " @param out pointer to the looked-up branch reference"] # [doc = " @param repo the repository to look up the branch"] # [doc = " @param branch_name Name of the branch to be looked-up;"] # [doc = " this name is validated for consistency."] # [doc = " @param branch_type Type of the considered branch. This should"] # [doc = " be valued with either GIT_BRANCH_LOCAL or GIT_BRANCH_REMOTE."] # [doc = ""] # [doc = " @return 0 on success; GIT_ENOTFOUND when no matching branch"] # [doc = " exists, GIT_EINVALIDSPEC, otherwise an error code."] pub fn git_branch_lookup (out : * mut * mut git_reference , repo : * mut git_repository , branch_name : * const :: std :: os :: raw :: c_char , branch_type : git_branch_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the branch name"] # [doc = ""] # [doc = " Given a reference object, this will check that it really is a branch (ie."] # [doc = " it lives under \"refs/heads/\" or \"refs/remotes/\"), and return the branch part"] # [doc = " of it."] # [doc = ""] # [doc = " @param out Pointer to the abbreviated reference name."] # [doc = "        Owned by ref, do not free."] # [doc = ""] # [doc = " @param ref A reference object, ideally pointing to a branch"] # [doc = ""] # [doc = " @return 0 on success; GIT_EINVALID if the reference isn't either a local or"] # [doc = "         remote branch, otherwise an error code."] pub fn git_branch_name (out : * mut * const :: std :: os :: raw :: c_char , ref_ : * const git_reference) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the upstream of a branch"] # [doc = ""] # [doc = " Given a reference, this will return a new reference object corresponding"] # [doc = " to its remote tracking branch. The reference must be a local branch."] # [doc = ""] # [doc = " @see git_branch_upstream_name for details on the resolution."] # [doc = ""] # [doc = " @param out Pointer where to store the retrieved reference."] # [doc = " @param branch Current underlying reference of the branch."] # [doc = ""] # [doc = " @return 0 on success; GIT_ENOTFOUND when no remote tracking"] # [doc = "         reference exists, otherwise an error code."] pub fn git_branch_upstream (out : * mut * mut git_reference , branch : * const git_reference) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Set a branch's upstream branch"] # [doc = ""] # [doc = " This will update the configuration to set the branch named `branch_name` as the upstream of `branch`."] # [doc = " Pass a NULL name to unset the upstream information."] # [doc = ""] # [doc = " @note the actual tracking reference must have been already created for the"] # [doc = " operation to succeed."] # [doc = ""] # [doc = " @param branch the branch to configure"] # [doc = " @param branch_name remote-tracking or local branch to set as upstream."] # [doc = ""] # [doc = " @return 0 on success; GIT_ENOTFOUND if there's no branch named `branch_name`"] # [doc = "         or an error code"] pub fn git_branch_set_upstream (branch : * mut git_reference , branch_name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the upstream name of a branch"] # [doc = ""] # [doc = " Given a local branch, this will return its remote-tracking branch information,"] # [doc = " as a full reference name, ie. \"feature/nice\" would become"] # [doc = " \"refs/remote/origin/feature/nice\", depending on that branch's configuration."] # [doc = ""] # [doc = " @param out the buffer into which the name will be written."] # [doc = " @param repo the repository where the branches live."] # [doc = " @param refname reference name of the local branch."] # [doc = ""] # [doc = " @return 0 on success, GIT_ENOTFOUND when no remote tracking reference exists,"] # [doc = "         or an error code."] pub fn git_branch_upstream_name (out : * mut git_buf , repo : * mut git_repository , refname : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Determine if HEAD points to the given branch"] # [doc = ""] # [doc = " @param branch A reference to a local branch."] # [doc = ""] # [doc = " @return 1 if HEAD points at the branch, 0 if it isn't, or a negative value"] # [doc = " \t\t   as an error code."] pub fn git_branch_is_head (branch : * const git_reference) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Determine if any HEAD points to the current branch"] # [doc = ""] # [doc = " This will iterate over all known linked repositories (usually in the form of"] # [doc = " worktrees) and report whether any HEAD is pointing at the current branch."] # [doc = ""] # [doc = " @param branch A reference to a local branch."] # [doc = ""] # [doc = " @return 1 if branch is checked out, 0 if it isn't, an error code otherwise."] pub fn git_branch_is_checked_out (branch : * const git_reference) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Find the remote name of a remote-tracking branch"] # [doc = ""] # [doc = " This will return the name of the remote whose fetch refspec is matching"] # [doc = " the given branch. E.g. given a branch \"refs/remotes/test/master\", it will"] # [doc = " extract the \"test\" part. If refspecs from multiple remotes match,"] # [doc = " the function will return GIT_EAMBIGUOUS."] # [doc = ""] # [doc = " @param out The buffer into which the name will be written."] # [doc = " @param repo The repository where the branch lives."] # [doc = " @param refname complete name of the remote tracking branch."] # [doc = ""] # [doc = " @return 0 on success, GIT_ENOTFOUND when no matching remote was found,"] # [doc = "         GIT_EAMBIGUOUS when the branch maps to several remotes,"] # [doc = "         otherwise an error code."] pub fn git_branch_remote_name (out : * mut git_buf , repo : * mut git_repository , refname : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Retrieve the upstream remote of a local branch"] # [doc = ""] # [doc = " This will return the currently configured \"branch.*.remote\" for a given"] # [doc = " branch. This branch must be local."] # [doc = ""] # [doc = " @param buf the buffer into which to write the name"] # [doc = " @param repo the repository in which to look"] # [doc = " @param refname the full name of the branch"] # [doc = " @return 0 or an error code"] pub fn git_branch_upstream_remote (buf : * mut git_buf , repo : * mut git_repository , refname : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Retrieve the upstream merge of a local branch"] # [doc = ""] # [doc = " This will return the currently configured \"branch.*.merge\" for a given"] # [doc = " branch. This branch must be local."] # [doc = ""] # [doc = " @param buf the buffer into which to write the name"] # [doc = " @param repo the repository in which to look"] # [doc = " @param refname the full name of the branch"] # [doc = " @return 0 or an error code"] pub fn git_branch_upstream_merge (buf : * mut git_buf , repo : * mut git_repository , refname : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Determine whether a branch name is valid, meaning that (when prefixed"] # [doc = " with `refs/heads/`) that it is a valid reference name, and that any"] # [doc = " additional branch name restrictions are imposed (eg, it cannot start"] # [doc = " with a `-`)."] # [doc = ""] # [doc = " @param valid output pointer to set with validity of given branch name"] # [doc = " @param name a branch name to test"] # [doc = " @return 0 on success or an error code"] pub fn git_branch_name_is_valid (valid : * mut :: std :: os :: raw :: c_int , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } # [doc = " No information about the certificate is available. This may"] # [doc = " happen when using curl."] pub const git_cert_t_GIT_CERT_NONE : git_cert_t = 0 ; # [doc = " The `data` argument to the callback will be a pointer to"] # [doc = " the DER-encoded data."] pub const git_cert_t_GIT_CERT_X509 : git_cert_t = 1 ; # [doc = " The `data` argument to the callback will be a pointer to a"] # [doc = " `git_cert_hostkey` structure."] pub const git_cert_t_GIT_CERT_HOSTKEY_LIBSSH2 : git_cert_t = 2 ; # [doc = " The `data` argument to the callback will be a pointer to a"] # [doc = " `git_strarray` with `name:content` strings containing"] # [doc = " information about the certificate. This is used when using"] # [doc = " curl."] pub const git_cert_t_GIT_CERT_STRARRAY : git_cert_t = 3 ; # [doc = " Type of host certificate structure that is passed to the check callback"] pub type git_cert_t = :: std :: os :: raw :: c_uint ; # [doc = " Parent type for `git_cert_hostkey` and `git_cert_x509`."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_cert { # [doc = " Type of certificate. A `GIT_CERT_` value."] pub cert_type : git_cert_t , } # [test] fn bindgen_test_layout_git_cert () { assert_eq ! (:: std :: mem :: size_of :: < git_cert > () , 4usize , concat ! ("Size of: " , stringify ! (git_cert))) ; assert_eq ! (:: std :: mem :: align_of :: < git_cert > () , 4usize , concat ! ("Alignment of " , stringify ! (git_cert))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_cert > ())) . cert_type as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_cert) , "::" , stringify ! (cert_type))) ; } # [doc = " Callback for the user's custom certificate checks."] # [doc = ""] # [doc = " @param cert The host certificate"] # [doc = " @param valid Whether the libgit2 checks (OpenSSL or WinHTTP) think"] # [doc = " this certificate is valid"] # [doc = " @param host Hostname of the host libgit2 connected to"] # [doc = " @param payload Payload provided by the caller"] # [doc = " @return 0 to proceed with the connection, < 0 to fail the connection"] # [doc = "         or > 0 to indicate that the callback refused to act and that"] # [doc = "         the existing validity determination should be honored"] pub type git_transport_certificate_check_cb = :: std :: option :: Option < unsafe extern "C" fn (cert : * mut git_cert , valid : :: std :: os :: raw :: c_int , host : * const :: std :: os :: raw :: c_char , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = " MD5 is available"] pub const git_cert_ssh_t_GIT_CERT_SSH_MD5 : git_cert_ssh_t = 1 ; # [doc = " SHA-1 is available"] pub const git_cert_ssh_t_GIT_CERT_SSH_SHA1 : git_cert_ssh_t = 2 ; # [doc = " SHA-256 is available"] pub const git_cert_ssh_t_GIT_CERT_SSH_SHA256 : git_cert_ssh_t = 4 ; # [doc = " Raw hostkey is available"] pub const git_cert_ssh_t_GIT_CERT_SSH_RAW : git_cert_ssh_t = 8 ; # [doc = " Type of SSH host fingerprint"] pub type git_cert_ssh_t = :: std :: os :: raw :: c_uint ; # [doc = " The raw key is of an unknown type."] pub const git_cert_ssh_raw_type_t_GIT_CERT_SSH_RAW_TYPE_UNKNOWN : git_cert_ssh_raw_type_t = 0 ; # [doc = " The raw key is an RSA key."] pub const git_cert_ssh_raw_type_t_GIT_CERT_SSH_RAW_TYPE_RSA : git_cert_ssh_raw_type_t = 1 ; # [doc = " The raw key is a DSS key."] pub const git_cert_ssh_raw_type_t_GIT_CERT_SSH_RAW_TYPE_DSS : git_cert_ssh_raw_type_t = 2 ; # [doc = " The raw key is a ECDSA 256 key."] pub const git_cert_ssh_raw_type_t_GIT_CERT_SSH_RAW_TYPE_KEY_ECDSA_256 : git_cert_ssh_raw_type_t = 3 ; # [doc = " The raw key is a ECDSA 384 key."] pub const git_cert_ssh_raw_type_t_GIT_CERT_SSH_RAW_TYPE_KEY_ECDSA_384 : git_cert_ssh_raw_type_t = 4 ; # [doc = " The raw key is a ECDSA 521 key."] pub const git_cert_ssh_raw_type_t_GIT_CERT_SSH_RAW_TYPE_KEY_ECDSA_521 : git_cert_ssh_raw_type_t = 5 ; # [doc = " The raw key is a ED25519 key."] pub const git_cert_ssh_raw_type_t_GIT_CERT_SSH_RAW_TYPE_KEY_ED25519 : git_cert_ssh_raw_type_t = 6 ; pub type git_cert_ssh_raw_type_t = :: std :: os :: raw :: c_uint ; # [doc = " Hostkey information taken from libssh2"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_cert_hostkey { # [doc = "< The parent cert"] pub parent : git_cert , # [doc = " A bitmask containing the available fields."] pub type_ : git_cert_ssh_t , # [doc = " Hostkey hash. If `type` has `GIT_CERT_SSH_MD5` set, this will"] # [doc = " have the MD5 hash of the hostkey."] pub hash_md5 : [:: std :: os :: raw :: c_uchar ; 16usize] , # [doc = " Hostkey hash. If `type` has `GIT_CERT_SSH_SHA1` set, this will"] # [doc = " have the SHA-1 hash of the hostkey."] pub hash_sha1 : [:: std :: os :: raw :: c_uchar ; 20usize] , # [doc = " Hostkey hash. If `type` has `GIT_CERT_SSH_SHA256` set, this will"] # [doc = " have the SHA-256 hash of the hostkey."] pub hash_sha256 : [:: std :: os :: raw :: c_uchar ; 32usize] , # [doc = " Raw hostkey type. If `type` has `GIT_CERT_SSH_RAW` set, this will"] # [doc = " have the type of the raw hostkey."] pub raw_type : git_cert_ssh_raw_type_t , # [doc = " Pointer to the raw hostkey. If `type` has `GIT_CERT_SSH_RAW` set,"] # [doc = " this will have the raw contents of the hostkey."] pub hostkey : * const :: std :: os :: raw :: c_char , # [doc = " Raw hostkey length. If `type` has `GIT_CERT_SSH_RAW` set, this will"] # [doc = " have the length of the raw contents of the hostkey."] pub hostkey_len : size_t , } # [test] fn bindgen_test_layout_git_cert_hostkey () { assert_eq ! (:: std :: mem :: size_of :: < git_cert_hostkey > () , 96usize , concat ! ("Size of: " , stringify ! (git_cert_hostkey))) ; assert_eq ! (:: std :: mem :: align_of :: < git_cert_hostkey > () , 8usize , concat ! ("Alignment of " , stringify ! (git_cert_hostkey))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_cert_hostkey > ())) . parent as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_cert_hostkey) , "::" , stringify ! (parent))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_cert_hostkey > ())) . type_ as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_cert_hostkey) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_cert_hostkey > ())) . hash_md5 as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_cert_hostkey) , "::" , stringify ! (hash_md5))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_cert_hostkey > ())) . hash_sha1 as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_cert_hostkey) , "::" , stringify ! (hash_sha1))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_cert_hostkey > ())) . hash_sha256 as * const _ as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (git_cert_hostkey) , "::" , stringify ! (hash_sha256))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_cert_hostkey > ())) . raw_type as * const _ as usize } , 76usize , concat ! ("Offset of field: " , stringify ! (git_cert_hostkey) , "::" , stringify ! (raw_type))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_cert_hostkey > ())) . hostkey as * const _ as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (git_cert_hostkey) , "::" , stringify ! (hostkey))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_cert_hostkey > ())) . hostkey_len as * const _ as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (git_cert_hostkey) , "::" , stringify ! (hostkey_len))) ; } # [doc = " X.509 certificate information"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_cert_x509 { # [doc = "< The parent cert"] pub parent : git_cert , # [doc = " Pointer to the X.509 certificate data"] pub data : * mut :: std :: os :: raw :: c_void , # [doc = " Length of the memory block pointed to by `data`."] pub len : size_t , } # [test] fn bindgen_test_layout_git_cert_x509 () { assert_eq ! (:: std :: mem :: size_of :: < git_cert_x509 > () , 24usize , concat ! ("Size of: " , stringify ! (git_cert_x509))) ; assert_eq ! (:: std :: mem :: align_of :: < git_cert_x509 > () , 8usize , concat ! ("Alignment of " , stringify ! (git_cert_x509))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_cert_x509 > ())) . parent as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_cert_x509) , "::" , stringify ! (parent))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_cert_x509 > ())) . data as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_cert_x509) , "::" , stringify ! (data))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_cert_x509 > ())) . len as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_cert_x509) , "::" , stringify ! (len))) ; } # [doc = "< default is a dry run, no actual updates"] pub const git_checkout_strategy_t_GIT_CHECKOUT_NONE : git_checkout_strategy_t = 0 ; # [doc = " Allow safe updates that cannot overwrite uncommitted data."] # [doc = " If the uncommitted changes don't conflict with the checked out files,"] # [doc = " the checkout will still proceed, leaving the changes intact."] # [doc = ""] # [doc = " Mutually exclusive with GIT_CHECKOUT_FORCE."] # [doc = " GIT_CHECKOUT_FORCE takes precedence over GIT_CHECKOUT_SAFE."] pub const git_checkout_strategy_t_GIT_CHECKOUT_SAFE : git_checkout_strategy_t = 1 ; # [doc = " Allow all updates to force working directory to look like index."] # [doc = ""] # [doc = " Mutually exclusive with GIT_CHECKOUT_SAFE."] # [doc = " GIT_CHECKOUT_FORCE takes precedence over GIT_CHECKOUT_SAFE."] pub const git_checkout_strategy_t_GIT_CHECKOUT_FORCE : git_checkout_strategy_t = 2 ; # [doc = " Allow checkout to recreate missing files"] pub const git_checkout_strategy_t_GIT_CHECKOUT_RECREATE_MISSING : git_checkout_strategy_t = 4 ; # [doc = " Allow checkout to make safe updates even if conflicts are found"] pub const git_checkout_strategy_t_GIT_CHECKOUT_ALLOW_CONFLICTS : git_checkout_strategy_t = 16 ; # [doc = " Remove untracked files not in index (that are not ignored)"] pub const git_checkout_strategy_t_GIT_CHECKOUT_REMOVE_UNTRACKED : git_checkout_strategy_t = 32 ; # [doc = " Remove ignored files not in index"] pub const git_checkout_strategy_t_GIT_CHECKOUT_REMOVE_IGNORED : git_checkout_strategy_t = 64 ; # [doc = " Only update existing files, don't create new ones"] pub const git_checkout_strategy_t_GIT_CHECKOUT_UPDATE_ONLY : git_checkout_strategy_t = 128 ; # [doc = " Normally checkout updates index entries as it goes; this stops that."] # [doc = " Implies `GIT_CHECKOUT_DONT_WRITE_INDEX`."] pub const git_checkout_strategy_t_GIT_CHECKOUT_DONT_UPDATE_INDEX : git_checkout_strategy_t = 256 ; # [doc = " Don't refresh index/config/etc before doing checkout"] pub const git_checkout_strategy_t_GIT_CHECKOUT_NO_REFRESH : git_checkout_strategy_t = 512 ; # [doc = " Allow checkout to skip unmerged files"] pub const git_checkout_strategy_t_GIT_CHECKOUT_SKIP_UNMERGED : git_checkout_strategy_t = 1024 ; # [doc = " For unmerged files, checkout stage 2 from index"] pub const git_checkout_strategy_t_GIT_CHECKOUT_USE_OURS : git_checkout_strategy_t = 2048 ; # [doc = " For unmerged files, checkout stage 3 from index"] pub const git_checkout_strategy_t_GIT_CHECKOUT_USE_THEIRS : git_checkout_strategy_t = 4096 ; # [doc = " Treat pathspec as simple list of exact match file paths"] pub const git_checkout_strategy_t_GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH : git_checkout_strategy_t = 8192 ; # [doc = " Ignore directories in use, they will be left empty"] pub const git_checkout_strategy_t_GIT_CHECKOUT_SKIP_LOCKED_DIRECTORIES : git_checkout_strategy_t = 262144 ; # [doc = " Don't overwrite ignored files that exist in the checkout target"] pub const git_checkout_strategy_t_GIT_CHECKOUT_DONT_OVERWRITE_IGNORED : git_checkout_strategy_t = 524288 ; # [doc = " Write normal merge files for conflicts"] pub const git_checkout_strategy_t_GIT_CHECKOUT_CONFLICT_STYLE_MERGE : git_checkout_strategy_t = 1048576 ; # [doc = " Include common ancestor data in diff3 format files for conflicts"] pub const git_checkout_strategy_t_GIT_CHECKOUT_CONFLICT_STYLE_DIFF3 : git_checkout_strategy_t = 2097152 ; # [doc = " Don't overwrite existing files or folders"] pub const git_checkout_strategy_t_GIT_CHECKOUT_DONT_REMOVE_EXISTING : git_checkout_strategy_t = 4194304 ; # [doc = " Normally checkout writes the index upon completion; this prevents that."] pub const git_checkout_strategy_t_GIT_CHECKOUT_DONT_WRITE_INDEX : git_checkout_strategy_t = 8388608 ; # [doc = " Show what would be done by a checkout.  Stop after sending"] # [doc = " notifications; don't update the working directory or index."] pub const git_checkout_strategy_t_GIT_CHECKOUT_DRY_RUN : git_checkout_strategy_t = 16777216 ; # [doc = " Recursively checkout submodules with same options (NOT IMPLEMENTED)"] pub const git_checkout_strategy_t_GIT_CHECKOUT_UPDATE_SUBMODULES : git_checkout_strategy_t = 65536 ; # [doc = " Recursively checkout submodules if HEAD moved in super repo (NOT IMPLEMENTED)"] pub const git_checkout_strategy_t_GIT_CHECKOUT_UPDATE_SUBMODULES_IF_CHANGED : git_checkout_strategy_t = 131072 ; # [doc = " Checkout behavior flags"] # [doc = ""] # [doc = " In libgit2, checkout is used to update the working directory and index"] # [doc = " to match a target tree.  Unlike git checkout, it does not move the HEAD"] # [doc = " commit for you - use `git_repository_set_head` or the like to do that."] # [doc = ""] # [doc = " Checkout looks at (up to) four things: the \"target\" tree you want to"] # [doc = " check out, the \"baseline\" tree of what was checked out previously, the"] # [doc = " working directory for actual files, and the index for staged changes."] # [doc = ""] # [doc = " You give checkout one of three strategies for update:"] # [doc = ""] # [doc = " - `GIT_CHECKOUT_NONE` is a dry-run strategy that checks for conflicts,"] # [doc = "   etc., but doesn't make any actual changes."] # [doc = ""] # [doc = " - `GIT_CHECKOUT_FORCE` is at the opposite extreme, taking any action to"] # [doc = "   make the working directory match the target (including potentially"] # [doc = "   discarding modified files)."] # [doc = ""] # [doc = " - `GIT_CHECKOUT_SAFE` is between these two options, it will only make"] # [doc = "   modifications that will not lose changes."] # [doc = ""] # [doc = "                         |  target == baseline   |  target != baseline  |"] # [doc = "    ---------------------|-----------------------|----------------------|"] # [doc = "     workdir == baseline |       no action       |  create, update, or  |"] # [doc = "                         |                       |     delete file      |"] # [doc = "    ---------------------|-----------------------|----------------------|"] # [doc = "     workdir exists and  |       no action       |   conflict (notify   |"] # [doc = "       is != baseline    | notify dirty MODIFIED | and cancel checkout) |"] # [doc = "    ---------------------|-----------------------|----------------------|"] # [doc = "      workdir missing,   | notify dirty DELETED  |     create file      |"] # [doc = "      baseline present   |                       |                      |"] # [doc = "    ---------------------|-----------------------|----------------------|"] # [doc = ""] # [doc = " To emulate `git checkout`, use `GIT_CHECKOUT_SAFE` with a checkout"] # [doc = " notification callback (see below) that displays information about dirty"] # [doc = " files.  The default behavior will cancel checkout on conflicts."] # [doc = ""] # [doc = " To emulate `git checkout-index`, use `GIT_CHECKOUT_SAFE` with a"] # [doc = " notification callback that cancels the operation if a dirty-but-existing"] # [doc = " file is found in the working directory.  This core git command isn't"] # [doc = " quite \"force\" but is sensitive about some types of changes."] # [doc = ""] # [doc = " To emulate `git checkout -f`, use `GIT_CHECKOUT_FORCE`."] # [doc = ""] # [doc = ""] # [doc = " There are some additional flags to modify the behavior of checkout:"] # [doc = ""] # [doc = " - GIT_CHECKOUT_ALLOW_CONFLICTS makes SAFE mode apply safe file updates"] # [doc = "   even if there are conflicts (instead of cancelling the checkout)."] # [doc = ""] # [doc = " - GIT_CHECKOUT_REMOVE_UNTRACKED means remove untracked files (i.e. not"] # [doc = "   in target, baseline, or index, and not ignored) from the working dir."] # [doc = ""] # [doc = " - GIT_CHECKOUT_REMOVE_IGNORED means remove ignored files (that are also"] # [doc = "   untracked) from the working directory as well."] # [doc = ""] # [doc = " - GIT_CHECKOUT_UPDATE_ONLY means to only update the content of files that"] # [doc = "   already exist.  Files will not be created nor deleted.  This just skips"] # [doc = "   applying adds, deletes, and typechanges."] # [doc = ""] # [doc = " - GIT_CHECKOUT_DONT_UPDATE_INDEX prevents checkout from writing the"] # [doc = "   updated files' information to the index."] # [doc = ""] # [doc = " - Normally, checkout will reload the index and git attributes from disk"] # [doc = "   before any operations.  GIT_CHECKOUT_NO_REFRESH prevents this reload."] # [doc = ""] # [doc = " - Unmerged index entries are conflicts.  GIT_CHECKOUT_SKIP_UNMERGED skips"] # [doc = "   files with unmerged index entries instead.  GIT_CHECKOUT_USE_OURS and"] # [doc = "   GIT_CHECKOUT_USE_THEIRS to proceed with the checkout using either the"] # [doc = "   stage 2 (\"ours\") or stage 3 (\"theirs\") version of files in the index."] # [doc = ""] # [doc = " - GIT_CHECKOUT_DONT_OVERWRITE_IGNORED prevents ignored files from being"] # [doc = "   overwritten.  Normally, files that are ignored in the working directory"] # [doc = "   are not considered \"precious\" and may be overwritten if the checkout"] # [doc = "   target contains that file."] # [doc = ""] # [doc = " - GIT_CHECKOUT_DONT_REMOVE_EXISTING prevents checkout from removing"] # [doc = "   files or folders that fold to the same name on case insensitive"] # [doc = "   filesystems.  This can cause files to retain their existing names"] # [doc = "   and write through existing symbolic links."] pub type git_checkout_strategy_t = :: std :: os :: raw :: c_uint ; pub const git_checkout_notify_t_GIT_CHECKOUT_NOTIFY_NONE : git_checkout_notify_t = 0 ; # [doc = " Invokes checkout on conflicting paths."] pub const git_checkout_notify_t_GIT_CHECKOUT_NOTIFY_CONFLICT : git_checkout_notify_t = 1 ; # [doc = " Notifies about \"dirty\" files, i.e. those that do not need an update"] # [doc = " but no longer match the baseline.  Core git displays these files when"] # [doc = " checkout runs, but won't stop the checkout."] pub const git_checkout_notify_t_GIT_CHECKOUT_NOTIFY_DIRTY : git_checkout_notify_t = 2 ; # [doc = " Sends notification for any file changed."] pub const git_checkout_notify_t_GIT_CHECKOUT_NOTIFY_UPDATED : git_checkout_notify_t = 4 ; # [doc = " Notifies about untracked files."] pub const git_checkout_notify_t_GIT_CHECKOUT_NOTIFY_UNTRACKED : git_checkout_notify_t = 8 ; # [doc = " Notifies about ignored files."] pub const git_checkout_notify_t_GIT_CHECKOUT_NOTIFY_IGNORED : git_checkout_notify_t = 16 ; # [doc = " Notifies about ignored files."] pub const git_checkout_notify_t_GIT_CHECKOUT_NOTIFY_ALL : git_checkout_notify_t = 65535 ; # [doc = " Checkout notification flags"] # [doc = ""] # [doc = " Checkout will invoke an options notification callback (`notify_cb`) for"] # [doc = " certain cases - you pick which ones via `notify_flags`:"] # [doc = ""] # [doc = " Returning a non-zero value from this callback will cancel the checkout."] # [doc = " The non-zero return value will be propagated back and returned by the"] # [doc = " git_checkout_... call."] # [doc = ""] # [doc = " Notification callbacks are made prior to modifying any files on disk,"] # [doc = " so canceling on any notification will still happen prior to any files"] # [doc = " being modified."] pub type git_checkout_notify_t = :: std :: os :: raw :: c_uint ; # [doc = " Checkout performance-reporting structure"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_checkout_perfdata { pub mkdir_calls : size_t , pub stat_calls : size_t , pub chmod_calls : size_t , } # [test] fn bindgen_test_layout_git_checkout_perfdata () { assert_eq ! (:: std :: mem :: size_of :: < git_checkout_perfdata > () , 24usize , concat ! ("Size of: " , stringify ! (git_checkout_perfdata))) ; assert_eq ! (:: std :: mem :: align_of :: < git_checkout_perfdata > () , 8usize , concat ! ("Alignment of " , stringify ! (git_checkout_perfdata))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_checkout_perfdata > ())) . mkdir_calls as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_checkout_perfdata) , "::" , stringify ! (mkdir_calls))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_checkout_perfdata > ())) . stat_calls as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_checkout_perfdata) , "::" , stringify ! (stat_calls))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_checkout_perfdata > ())) . chmod_calls as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_checkout_perfdata) , "::" , stringify ! (chmod_calls))) ; } # [doc = " Checkout notification callback function"] pub type git_checkout_notify_cb = :: std :: option :: Option < unsafe extern "C" fn (why : git_checkout_notify_t , path : * const :: std :: os :: raw :: c_char , baseline : * const git_diff_file , target : * const git_diff_file , workdir : * const git_diff_file , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = " Checkout progress notification function"] pub type git_checkout_progress_cb = :: std :: option :: Option < unsafe extern "C" fn (path : * const :: std :: os :: raw :: c_char , completed_steps : size_t , total_steps : size_t , payload : * mut :: std :: os :: raw :: c_void) > ; # [doc = " Checkout perfdata notification function"] pub type git_checkout_perfdata_cb = :: std :: option :: Option < unsafe extern "C" fn (perfdata : * const git_checkout_perfdata , payload : * mut :: std :: os :: raw :: c_void) > ; # [doc = " Checkout options structure"] # [doc = ""] # [doc = " Initialize with `GIT_CHECKOUT_OPTIONS_INIT`. Alternatively, you can"] # [doc = " use `git_checkout_options_init`."] # [doc = ""] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_checkout_options { # [doc = "< The version"] pub version : :: std :: os :: raw :: c_uint , # [doc = "< default will be a safe checkout"] pub checkout_strategy : :: std :: os :: raw :: c_uint , # [doc = "< don't apply filters like CRLF conversion"] pub disable_filters : :: std :: os :: raw :: c_int , # [doc = "< default is 0755"] pub dir_mode : :: std :: os :: raw :: c_uint , # [doc = "< default is 0644 or 0755 as dictated by blob"] pub file_mode : :: std :: os :: raw :: c_uint , # [doc = "< default is O_CREAT | O_TRUNC | O_WRONLY"] pub file_open_flags : :: std :: os :: raw :: c_int , # [doc = "< see `git_checkout_notify_t` above"] pub notify_flags : :: std :: os :: raw :: c_uint , # [doc = " Optional callback to get notifications on specific file states."] # [doc = " @see git_checkout_notify_t"] pub notify_cb : git_checkout_notify_cb , # [doc = " Payload passed to notify_cb"] pub notify_payload : * mut :: std :: os :: raw :: c_void , # [doc = " Optional callback to notify the consumer of checkout progress."] pub progress_cb : git_checkout_progress_cb , # [doc = " Payload passed to progress_cb"] pub progress_payload : * mut :: std :: os :: raw :: c_void , # [doc = " A list of wildmatch patterns or paths."] # [doc = ""] # [doc = " By default, all paths are processed. If you pass an array of wildmatch"] # [doc = " patterns, those will be used to filter which paths should be taken into"] # [doc = " account."] # [doc = ""] # [doc = " Use GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH to treat as a simple list."] pub paths : git_strarray , # [doc = " The expected content of the working directory; defaults to HEAD."] # [doc = ""] # [doc = " If the working directory does not match this baseline information,"] # [doc = " that will produce a checkout conflict."] pub baseline : * mut git_tree , # [doc = " Like `baseline` above, though expressed as an index.  This"] # [doc = " option overrides `baseline`."] pub baseline_index : * mut git_index , # [doc = "< alternative checkout path to workdir"] pub target_directory : * const :: std :: os :: raw :: c_char , # [doc = "< the name of the common ancestor side of conflicts"] pub ancestor_label : * const :: std :: os :: raw :: c_char , # [doc = "< the name of the \"our\" side of conflicts"] pub our_label : * const :: std :: os :: raw :: c_char , # [doc = "< the name of the \"their\" side of conflicts"] pub their_label : * const :: std :: os :: raw :: c_char , # [doc = " Optional callback to notify the consumer of performance data."] pub perfdata_cb : git_checkout_perfdata_cb , # [doc = " Payload passed to perfdata_cb"] pub perfdata_payload : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_git_checkout_options () { assert_eq ! (:: std :: mem :: size_of :: < git_checkout_options > () , 144usize , concat ! ("Size of: " , stringify ! (git_checkout_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_checkout_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_checkout_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_checkout_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_checkout_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_checkout_options > ())) . checkout_strategy as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_checkout_options) , "::" , stringify ! (checkout_strategy))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_checkout_options > ())) . disable_filters as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_checkout_options) , "::" , stringify ! (disable_filters))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_checkout_options > ())) . dir_mode as * const _ as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (git_checkout_options) , "::" , stringify ! (dir_mode))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_checkout_options > ())) . file_mode as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_checkout_options) , "::" , stringify ! (file_mode))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_checkout_options > ())) . file_open_flags as * const _ as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (git_checkout_options) , "::" , stringify ! (file_open_flags))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_checkout_options > ())) . notify_flags as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_checkout_options) , "::" , stringify ! (notify_flags))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_checkout_options > ())) . notify_cb as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (git_checkout_options) , "::" , stringify ! (notify_cb))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_checkout_options > ())) . notify_payload as * const _ as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (git_checkout_options) , "::" , stringify ! (notify_payload))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_checkout_options > ())) . progress_cb as * const _ as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (git_checkout_options) , "::" , stringify ! (progress_cb))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_checkout_options > ())) . progress_payload as * const _ as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (git_checkout_options) , "::" , stringify ! (progress_payload))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_checkout_options > ())) . paths as * const _ as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (git_checkout_options) , "::" , stringify ! (paths))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_checkout_options > ())) . baseline as * const _ as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (git_checkout_options) , "::" , stringify ! (baseline))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_checkout_options > ())) . baseline_index as * const _ as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (git_checkout_options) , "::" , stringify ! (baseline_index))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_checkout_options > ())) . target_directory as * const _ as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (git_checkout_options) , "::" , stringify ! (target_directory))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_checkout_options > ())) . ancestor_label as * const _ as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (git_checkout_options) , "::" , stringify ! (ancestor_label))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_checkout_options > ())) . our_label as * const _ as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (git_checkout_options) , "::" , stringify ! (our_label))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_checkout_options > ())) . their_label as * const _ as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (git_checkout_options) , "::" , stringify ! (their_label))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_checkout_options > ())) . perfdata_cb as * const _ as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (git_checkout_options) , "::" , stringify ! (perfdata_cb))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_checkout_options > ())) . perfdata_payload as * const _ as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (git_checkout_options) , "::" , stringify ! (perfdata_payload))) ; } extern "C" { # [doc = " Initialize git_checkout_options structure"] # [doc = ""] # [doc = " Initializes a `git_checkout_options` with default values. Equivalent to creating"] # [doc = " an instance with GIT_CHECKOUT_OPTIONS_INIT."] # [doc = ""] # [doc = " @param opts The `git_checkout_options` struct to initialize."] # [doc = " @param version The struct version; pass `GIT_CHECKOUT_OPTIONS_VERSION`."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_checkout_options_init (opts : * mut git_checkout_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Updates files in the index and the working tree to match the content of"] # [doc = " the commit pointed at by HEAD."] # [doc = ""] # [doc = " Note that this is _not_ the correct mechanism used to switch branches;"] # [doc = " do not change your `HEAD` and then call this method, that would leave"] # [doc = " you with checkout conflicts since your working directory would then"] # [doc = " appear to be dirty.  Instead, checkout the target of the branch and"] # [doc = " then update `HEAD` using `git_repository_set_head` to point to the"] # [doc = " branch you checked out."] # [doc = ""] # [doc = " @param repo repository to check out (must be non-bare)"] # [doc = " @param opts specifies checkout options (may be NULL)"] # [doc = " @return 0 on success, GIT_EUNBORNBRANCH if HEAD points to a non"] # [doc = "         existing branch, non-zero value returned by `notify_cb`, or"] # [doc = "         other error code < 0 (use git_error_last for error details)"] pub fn git_checkout_head (repo : * mut git_repository , opts : * const git_checkout_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Updates files in the working tree to match the content of the index."] # [doc = ""] # [doc = " @param repo repository into which to check out (must be non-bare)"] # [doc = " @param index index to be checked out (or NULL to use repository index)"] # [doc = " @param opts specifies checkout options (may be NULL)"] # [doc = " @return 0 on success, non-zero return value from `notify_cb`, or error"] # [doc = "         code < 0 (use git_error_last for error details)"] pub fn git_checkout_index (repo : * mut git_repository , index : * mut git_index , opts : * const git_checkout_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Updates files in the index and working tree to match the content of the"] # [doc = " tree pointed at by the treeish."] # [doc = ""] # [doc = " @param repo repository to check out (must be non-bare)"] # [doc = " @param treeish a commit, tag or tree which content will be used to update"] # [doc = " the working directory (or NULL to use HEAD)"] # [doc = " @param opts specifies checkout options (may be NULL)"] # [doc = " @return 0 on success, non-zero return value from `notify_cb`, or error"] # [doc = "         code < 0 (use git_error_last for error details)"] pub fn git_checkout_tree (repo : * mut git_repository , treeish : * const git_object , opts : * const git_checkout_options) -> :: std :: os :: raw :: c_int ; } # [doc = " Array of object ids"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_oidarray { pub ids : * mut git_oid , pub count : size_t , } # [test] fn bindgen_test_layout_git_oidarray () { assert_eq ! (:: std :: mem :: size_of :: < git_oidarray > () , 16usize , concat ! ("Size of: " , stringify ! (git_oidarray))) ; assert_eq ! (:: std :: mem :: align_of :: < git_oidarray > () , 8usize , concat ! ("Alignment of " , stringify ! (git_oidarray))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_oidarray > ())) . ids as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_oidarray) , "::" , stringify ! (ids))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_oidarray > ())) . count as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_oidarray) , "::" , stringify ! (count))) ; } extern "C" { # [doc = " Free the object IDs contained in an oid_array.  This method should"] # [doc = " be called on `git_oidarray` objects that were provided by the"] # [doc = " library.  Not doing so will result in a memory leak."] # [doc = ""] # [doc = " This does not free the `git_oidarray` itself, since the library will"] # [doc = " never allocate that object directly itself."] # [doc = ""] # [doc = " @param array git_oidarray from which to free oid data"] pub fn git_oidarray_dispose (array : * mut git_oidarray) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_indexer { _unused : [u8 ; 0] , } # [doc = " This structure is used to provide callers information about the"] # [doc = " progress of indexing a packfile, either directly or part of a"] # [doc = " fetch or clone that downloads a packfile."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_indexer_progress { # [doc = " number of objects in the packfile being indexed"] pub total_objects : :: std :: os :: raw :: c_uint , # [doc = " received objects that have been hashed"] pub indexed_objects : :: std :: os :: raw :: c_uint , # [doc = " received_objects: objects which have been downloaded"] pub received_objects : :: std :: os :: raw :: c_uint , # [doc = " locally-available objects that have been injected in order"] # [doc = " to fix a thin pack"] pub local_objects : :: std :: os :: raw :: c_uint , # [doc = " number of deltas in the packfile being indexed"] pub total_deltas : :: std :: os :: raw :: c_uint , # [doc = " received deltas that have been indexed"] pub indexed_deltas : :: std :: os :: raw :: c_uint , # [doc = " size of the packfile received up to now"] pub received_bytes : size_t , } # [test] fn bindgen_test_layout_git_indexer_progress () { assert_eq ! (:: std :: mem :: size_of :: < git_indexer_progress > () , 32usize , concat ! ("Size of: " , stringify ! (git_indexer_progress))) ; assert_eq ! (:: std :: mem :: align_of :: < git_indexer_progress > () , 8usize , concat ! ("Alignment of " , stringify ! (git_indexer_progress))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_indexer_progress > ())) . total_objects as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_indexer_progress) , "::" , stringify ! (total_objects))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_indexer_progress > ())) . indexed_objects as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_indexer_progress) , "::" , stringify ! (indexed_objects))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_indexer_progress > ())) . received_objects as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_indexer_progress) , "::" , stringify ! (received_objects))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_indexer_progress > ())) . local_objects as * const _ as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (git_indexer_progress) , "::" , stringify ! (local_objects))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_indexer_progress > ())) . total_deltas as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_indexer_progress) , "::" , stringify ! (total_deltas))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_indexer_progress > ())) . indexed_deltas as * const _ as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (git_indexer_progress) , "::" , stringify ! (indexed_deltas))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_indexer_progress > ())) . received_bytes as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_indexer_progress) , "::" , stringify ! (received_bytes))) ; } # [doc = " Type for progress callbacks during indexing.  Return a value less"] # [doc = " than zero to cancel the indexing or download."] # [doc = ""] # [doc = " @param stats Structure containing information about the state of the transfer"] # [doc = " @param payload Payload provided by caller"] pub type git_indexer_progress_cb = :: std :: option :: Option < unsafe extern "C" fn (stats : * const git_indexer_progress , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = " Options for indexer configuration"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_indexer_options { pub version : :: std :: os :: raw :: c_uint , # [doc = " progress_cb function to call with progress information"] pub progress_cb : git_indexer_progress_cb , # [doc = " progress_cb_payload payload for the progress callback"] pub progress_cb_payload : * mut :: std :: os :: raw :: c_void , # [doc = " Do connectivity checks for the received pack"] pub verify : :: std :: os :: raw :: c_uchar , } # [test] fn bindgen_test_layout_git_indexer_options () { assert_eq ! (:: std :: mem :: size_of :: < git_indexer_options > () , 32usize , concat ! ("Size of: " , stringify ! (git_indexer_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_indexer_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_indexer_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_indexer_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_indexer_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_indexer_options > ())) . progress_cb as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_indexer_options) , "::" , stringify ! (progress_cb))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_indexer_options > ())) . progress_cb_payload as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_indexer_options) , "::" , stringify ! (progress_cb_payload))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_indexer_options > ())) . verify as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_indexer_options) , "::" , stringify ! (verify))) ; } extern "C" { # [doc = " Initializes a `git_indexer_options` with default values. Equivalent to"] # [doc = " creating an instance with GIT_INDEXER_OPTIONS_INIT."] # [doc = ""] # [doc = " @param opts the `git_indexer_options` struct to initialize."] # [doc = " @param version Version of struct; pass `GIT_INDEXER_OPTIONS_VERSION`"] # [doc = " @return Zero on success; -1 on failure."] pub fn git_indexer_options_init (opts : * mut git_indexer_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a new indexer instance"] # [doc = ""] # [doc = " @param out where to store the indexer instance"] # [doc = " @param path to the directory where the packfile should be stored"] # [doc = " @param mode permissions to use creating packfile or 0 for defaults"] # [doc = " @param odb object database from which to read base objects when"] # [doc = " fixing thin packs. Pass NULL if no thin pack is expected (an error"] # [doc = " will be returned if there are bases missing)"] # [doc = " @param opts Optional structure containing additional options. See"] # [doc = " `git_indexer_options` above."] pub fn git_indexer_new (out : * mut * mut git_indexer , path : * const :: std :: os :: raw :: c_char , mode : :: std :: os :: raw :: c_uint , odb : * mut git_odb , opts : * mut git_indexer_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Add data to the indexer"] # [doc = ""] # [doc = " @param idx the indexer"] # [doc = " @param data the data to add"] # [doc = " @param size the size of the data in bytes"] # [doc = " @param stats stat storage"] pub fn git_indexer_append (idx : * mut git_indexer , data : * const :: std :: os :: raw :: c_void , size : size_t , stats : * mut git_indexer_progress) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Finalize the pack and index"] # [doc = ""] # [doc = " Resolve any pending deltas and write out the index file"] # [doc = ""] # [doc = " @param idx the indexer"] pub fn git_indexer_commit (idx : * mut git_indexer , stats : * mut git_indexer_progress) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the packfile's hash"] # [doc = ""] # [doc = " A packfile's name is derived from the sorted hashing of all object"] # [doc = " names. This is only correct after the index has been finalized."] # [doc = ""] # [doc = " @param idx the indexer instance"] pub fn git_indexer_hash (idx : * const git_indexer) -> * const git_oid ; } extern "C" { # [doc = " Free the indexer and its resources"] # [doc = ""] # [doc = " @param idx the indexer to free"] pub fn git_indexer_free (idx : * mut git_indexer) ; } # [doc = " Time structure used in a git index entry"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_index_time { pub seconds : i32 , pub nanoseconds : u32 , } # [test] fn bindgen_test_layout_git_index_time () { assert_eq ! (:: std :: mem :: size_of :: < git_index_time > () , 8usize , concat ! ("Size of: " , stringify ! (git_index_time))) ; assert_eq ! (:: std :: mem :: align_of :: < git_index_time > () , 4usize , concat ! ("Alignment of " , stringify ! (git_index_time))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_index_time > ())) . seconds as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_index_time) , "::" , stringify ! (seconds))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_index_time > ())) . nanoseconds as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_index_time) , "::" , stringify ! (nanoseconds))) ; } # [doc = " In-memory representation of a file entry in the index."] # [doc = ""] # [doc = " This is a public structure that represents a file entry in the index."] # [doc = " The meaning of the fields corresponds to core Git's documentation (in"] # [doc = " \"Documentation/technical/index-format.txt\")."] # [doc = ""] # [doc = " The `flags` field consists of a number of bit fields which can be"] # [doc = " accessed via the first set of `GIT_INDEX_ENTRY_...` bitmasks below."] # [doc = " These flags are all read from and persisted to disk."] # [doc = ""] # [doc = " The `flags_extended` field also has a number of bit fields which can be"] # [doc = " accessed via the later `GIT_INDEX_ENTRY_...` bitmasks below.  Some of"] # [doc = " these flags are read from and written to disk, but some are set aside"] # [doc = " for in-memory only reference."] # [doc = ""] # [doc = " Note that the time and size fields are truncated to 32 bits. This"] # [doc = " is enough to detect changes, which is enough for the index to"] # [doc = " function as a cache, but it should not be taken as an authoritative"] # [doc = " source for that data."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_index_entry { pub ctime : git_index_time , pub mtime : git_index_time , pub dev : u32 , pub ino : u32 , pub mode : u32 , pub uid : u32 , pub gid : u32 , pub file_size : u32 , pub id : git_oid , pub flags : u16 , pub flags_extended : u16 , pub path : * const :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_git_index_entry () { assert_eq ! (:: std :: mem :: size_of :: < git_index_entry > () , 72usize , concat ! ("Size of: " , stringify ! (git_index_entry))) ; assert_eq ! (:: std :: mem :: align_of :: < git_index_entry > () , 8usize , concat ! ("Alignment of " , stringify ! (git_index_entry))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_index_entry > ())) . ctime as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_index_entry) , "::" , stringify ! (ctime))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_index_entry > ())) . mtime as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_index_entry) , "::" , stringify ! (mtime))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_index_entry > ())) . dev as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_index_entry) , "::" , stringify ! (dev))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_index_entry > ())) . ino as * const _ as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (git_index_entry) , "::" , stringify ! (ino))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_index_entry > ())) . mode as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_index_entry) , "::" , stringify ! (mode))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_index_entry > ())) . uid as * const _ as usize } , 28usize , concat ! ("Offset of field: " , stringify ! (git_index_entry) , "::" , stringify ! (uid))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_index_entry > ())) . gid as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (git_index_entry) , "::" , stringify ! (gid))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_index_entry > ())) . file_size as * const _ as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (git_index_entry) , "::" , stringify ! (file_size))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_index_entry > ())) . id as * const _ as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (git_index_entry) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_index_entry > ())) . flags as * const _ as usize } , 60usize , concat ! ("Offset of field: " , stringify ! (git_index_entry) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_index_entry > ())) . flags_extended as * const _ as usize } , 62usize , concat ! ("Offset of field: " , stringify ! (git_index_entry) , "::" , stringify ! (flags_extended))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_index_entry > ())) . path as * const _ as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (git_index_entry) , "::" , stringify ! (path))) ; } pub const git_index_entry_flag_t_GIT_INDEX_ENTRY_EXTENDED : git_index_entry_flag_t = 16384 ; pub const git_index_entry_flag_t_GIT_INDEX_ENTRY_VALID : git_index_entry_flag_t = 32768 ; # [doc = " Flags for index entries"] pub type git_index_entry_flag_t = :: std :: os :: raw :: c_uint ; pub const git_index_entry_extended_flag_t_GIT_INDEX_ENTRY_INTENT_TO_ADD : git_index_entry_extended_flag_t = 8192 ; pub const git_index_entry_extended_flag_t_GIT_INDEX_ENTRY_SKIP_WORKTREE : git_index_entry_extended_flag_t = 16384 ; pub const git_index_entry_extended_flag_t_GIT_INDEX_ENTRY_EXTENDED_FLAGS : git_index_entry_extended_flag_t = 24576 ; pub const git_index_entry_extended_flag_t_GIT_INDEX_ENTRY_UPTODATE : git_index_entry_extended_flag_t = 4 ; # [doc = " Bitmasks for on-disk fields of `git_index_entry`'s `flags_extended`"] # [doc = ""] # [doc = " In memory, the `flags_extended` fields are divided into two parts: the"] # [doc = " fields that are read from and written to disk, and other fields that"] # [doc = " in-memory only and used by libgit2.  Only the flags in"] # [doc = " `GIT_INDEX_ENTRY_EXTENDED_FLAGS` will get saved on-disk."] # [doc = ""] # [doc = " Thee first three bitmasks match the three fields in the"] # [doc = " `git_index_entry` `flags_extended` value that belong on disk.  You"] # [doc = " can use them to interpret the data in the `flags_extended`."] # [doc = ""] # [doc = " The rest of the bitmasks match the other fields in the `git_index_entry`"] # [doc = " `flags_extended` value that are only used in-memory by libgit2."] # [doc = " You can use them to interpret the data in the `flags_extended`."] # [doc = ""] pub type git_index_entry_extended_flag_t = :: std :: os :: raw :: c_uint ; pub const git_index_capability_t_GIT_INDEX_CAPABILITY_IGNORE_CASE : git_index_capability_t = 1 ; pub const git_index_capability_t_GIT_INDEX_CAPABILITY_NO_FILEMODE : git_index_capability_t = 2 ; pub const git_index_capability_t_GIT_INDEX_CAPABILITY_NO_SYMLINKS : git_index_capability_t = 4 ; pub const git_index_capability_t_GIT_INDEX_CAPABILITY_FROM_OWNER : git_index_capability_t = - 1 ; # [doc = " Capabilities of system that affect index actions."] pub type git_index_capability_t = :: std :: os :: raw :: c_int ; # [doc = " Callback for APIs that add/remove/update files matching pathspec"] pub type git_index_matched_path_cb = :: std :: option :: Option < unsafe extern "C" fn (path : * const :: std :: os :: raw :: c_char , matched_pathspec : * const :: std :: os :: raw :: c_char , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; pub const git_index_add_option_t_GIT_INDEX_ADD_DEFAULT : git_index_add_option_t = 0 ; pub const git_index_add_option_t_GIT_INDEX_ADD_FORCE : git_index_add_option_t = 1 ; pub const git_index_add_option_t_GIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH : git_index_add_option_t = 2 ; pub const git_index_add_option_t_GIT_INDEX_ADD_CHECK_PATHSPEC : git_index_add_option_t = 4 ; # [doc = " Flags for APIs that add files matching pathspec"] pub type git_index_add_option_t = :: std :: os :: raw :: c_uint ; # [doc = " Match any index stage."] # [doc = ""] # [doc = " Some index APIs take a stage to match; pass this value to match"] # [doc = " any entry matching the path regardless of stage."] pub const git_index_stage_t_GIT_INDEX_STAGE_ANY : git_index_stage_t = - 1 ; # [doc = " A normal staged file in the index."] pub const git_index_stage_t_GIT_INDEX_STAGE_NORMAL : git_index_stage_t = 0 ; # [doc = " The ancestor side of a conflict."] pub const git_index_stage_t_GIT_INDEX_STAGE_ANCESTOR : git_index_stage_t = 1 ; # [doc = " The \"ours\" side of a conflict."] pub const git_index_stage_t_GIT_INDEX_STAGE_OURS : git_index_stage_t = 2 ; # [doc = " The \"theirs\" side of a conflict."] pub const git_index_stage_t_GIT_INDEX_STAGE_THEIRS : git_index_stage_t = 3 ; # [doc = " Git index stage states"] pub type git_index_stage_t = :: std :: os :: raw :: c_int ; extern "C" { # [doc = " Create a new bare Git index object as a memory representation"] # [doc = " of the Git index file in 'index_path', without a repository"] # [doc = " to back it."] # [doc = ""] # [doc = " Since there is no ODB or working directory behind this index,"] # [doc = " any Index methods which rely on these (e.g. index_add_bypath)"] # [doc = " will fail with the GIT_ERROR error code."] # [doc = ""] # [doc = " If you need to access the index of an actual repository,"] # [doc = " use the `git_repository_index` wrapper."] # [doc = ""] # [doc = " The index must be freed once it's no longer in use."] # [doc = ""] # [doc = " @param out the pointer for the new index"] # [doc = " @param index_path the path to the index file in disk"] # [doc = " @return 0 or an error code"] pub fn git_index_open (out : * mut * mut git_index , index_path : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create an in-memory index object."] # [doc = ""] # [doc = " This index object cannot be read/written to the filesystem,"] # [doc = " but may be used to perform in-memory index operations."] # [doc = ""] # [doc = " The index must be freed once it's no longer in use."] # [doc = ""] # [doc = " @param out the pointer for the new index"] # [doc = " @return 0 or an error code"] pub fn git_index_new (out : * mut * mut git_index) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free an existing index object."] # [doc = ""] # [doc = " @param index an existing index object"] pub fn git_index_free (index : * mut git_index) ; } extern "C" { # [doc = " Get the repository this index relates to"] # [doc = ""] # [doc = " @param index The index"] # [doc = " @return A pointer to the repository"] pub fn git_index_owner (index : * const git_index) -> * mut git_repository ; } extern "C" { # [doc = " Read index capabilities flags."] # [doc = ""] # [doc = " @param index An existing index object"] # [doc = " @return A combination of GIT_INDEX_CAPABILITY values"] pub fn git_index_caps (index : * const git_index) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Set index capabilities flags."] # [doc = ""] # [doc = " If you pass `GIT_INDEX_CAPABILITY_FROM_OWNER` for the caps, then"] # [doc = " capabilities will be read from the config of the owner object,"] # [doc = " looking at `core.ignorecase`, `core.filemode`, `core.symlinks`."] # [doc = ""] # [doc = " @param index An existing index object"] # [doc = " @param caps A combination of GIT_INDEX_CAPABILITY values"] # [doc = " @return 0 on success, -1 on failure"] pub fn git_index_set_caps (index : * mut git_index , caps : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get index on-disk version."] # [doc = ""] # [doc = " Valid return values are 2, 3, or 4.  If 3 is returned, an index"] # [doc = " with version 2 may be written instead, if the extension data in"] # [doc = " version 3 is not necessary."] # [doc = ""] # [doc = " @param index An existing index object"] # [doc = " @return the index version"] pub fn git_index_version (index : * mut git_index) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = " Set index on-disk version."] # [doc = ""] # [doc = " Valid values are 2, 3, or 4.  If 2 is given, git_index_write may"] # [doc = " write an index with version 3 instead, if necessary to accurately"] # [doc = " represent the index."] # [doc = ""] # [doc = " @param index An existing index object"] # [doc = " @param version The new version number"] # [doc = " @return 0 on success, -1 on failure"] pub fn git_index_set_version (index : * mut git_index , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Update the contents of an existing index object in memory by reading"] # [doc = " from the hard disk."] # [doc = ""] # [doc = " If `force` is true, this performs a \"hard\" read that discards in-memory"] # [doc = " changes and always reloads the on-disk index data.  If there is no"] # [doc = " on-disk version, the index will be cleared."] # [doc = ""] # [doc = " If `force` is false, this does a \"soft\" read that reloads the index"] # [doc = " data from disk only if it has changed since the last time it was"] # [doc = " loaded.  Purely in-memory index data will be untouched.  Be aware: if"] # [doc = " there are changes on disk, unwritten in-memory changes are discarded."] # [doc = ""] # [doc = " @param index an existing index object"] # [doc = " @param force if true, always reload, vs. only read if file has changed"] # [doc = " @return 0 or an error code"] pub fn git_index_read (index : * mut git_index , force : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Write an existing index object from memory back to disk"] # [doc = " using an atomic file lock."] # [doc = ""] # [doc = " @param index an existing index object"] # [doc = " @return 0 or an error code"] pub fn git_index_write (index : * mut git_index) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the full path to the index file on disk."] # [doc = ""] # [doc = " @param index an existing index object"] # [doc = " @return path to index file or NULL for in-memory index"] pub fn git_index_path (index : * const git_index) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Get the checksum of the index"] # [doc = ""] # [doc = " This checksum is the SHA-1 hash over the index file (except the"] # [doc = " last 20 bytes which are the checksum itself). In cases where the"] # [doc = " index does not exist on-disk, it will be zeroed out."] # [doc = ""] # [doc = " @param index an existing index object"] # [doc = " @return a pointer to the checksum of the index"] pub fn git_index_checksum (index : * mut git_index) -> * const git_oid ; } extern "C" { # [doc = " Read a tree into the index file with stats"] # [doc = ""] # [doc = " The current index contents will be replaced by the specified tree."] # [doc = ""] # [doc = " @param index an existing index object"] # [doc = " @param tree tree to read"] # [doc = " @return 0 or an error code"] pub fn git_index_read_tree (index : * mut git_index , tree : * const git_tree) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Write the index as a tree"] # [doc = ""] # [doc = " This method will scan the index and write a representation"] # [doc = " of its current state back to disk; it recursively creates"] # [doc = " tree objects for each of the subtrees stored in the index,"] # [doc = " but only returns the OID of the root tree. This is the OID"] # [doc = " that can be used e.g. to create a commit."] # [doc = ""] # [doc = " The index instance cannot be bare, and needs to be associated"] # [doc = " to an existing repository."] # [doc = ""] # [doc = " The index must not contain any file in conflict."] # [doc = ""] # [doc = " @param out Pointer where to store the OID of the written tree"] # [doc = " @param index Index to write"] # [doc = " @return 0 on success, GIT_EUNMERGED when the index is not clean"] # [doc = " or an error code"] pub fn git_index_write_tree (out : * mut git_oid , index : * mut git_index) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Write the index as a tree to the given repository"] # [doc = ""] # [doc = " This method will do the same as `git_index_write_tree`, but"] # [doc = " letting the user choose the repository where the tree will"] # [doc = " be written."] # [doc = ""] # [doc = " The index must not contain any file in conflict."] # [doc = ""] # [doc = " @param out Pointer where to store OID of the written tree"] # [doc = " @param index Index to write"] # [doc = " @param repo Repository where to write the tree"] # [doc = " @return 0 on success, GIT_EUNMERGED when the index is not clean"] # [doc = " or an error code"] pub fn git_index_write_tree_to (out : * mut git_oid , index : * mut git_index , repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the count of entries currently in the index"] # [doc = ""] # [doc = " @param index an existing index object"] # [doc = " @return integer of count of current entries"] pub fn git_index_entrycount (index : * const git_index) -> size_t ; } extern "C" { # [doc = " Clear the contents (all the entries) of an index object."] # [doc = ""] # [doc = " This clears the index object in memory; changes must be explicitly"] # [doc = " written to disk for them to take effect persistently."] # [doc = ""] # [doc = " @param index an existing index object"] # [doc = " @return 0 on success, error code < 0 on failure"] pub fn git_index_clear (index : * mut git_index) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get a pointer to one of the entries in the index"] # [doc = ""] # [doc = " The entry is not modifiable and should not be freed.  Because the"] # [doc = " `git_index_entry` struct is a publicly defined struct, you should"] # [doc = " be able to make your own permanent copy of the data if necessary."] # [doc = ""] # [doc = " @param index an existing index object"] # [doc = " @param n the position of the entry"] # [doc = " @return a pointer to the entry; NULL if out of bounds"] pub fn git_index_get_byindex (index : * mut git_index , n : size_t) -> * const git_index_entry ; } extern "C" { # [doc = " Get a pointer to one of the entries in the index"] # [doc = ""] # [doc = " The entry is not modifiable and should not be freed.  Because the"] # [doc = " `git_index_entry` struct is a publicly defined struct, you should"] # [doc = " be able to make your own permanent copy of the data if necessary."] # [doc = ""] # [doc = " @param index an existing index object"] # [doc = " @param path path to search"] # [doc = " @param stage stage to search"] # [doc = " @return a pointer to the entry; NULL if it was not found"] pub fn git_index_get_bypath (index : * mut git_index , path : * const :: std :: os :: raw :: c_char , stage : :: std :: os :: raw :: c_int) -> * const git_index_entry ; } extern "C" { # [doc = " Remove an entry from the index"] # [doc = ""] # [doc = " @param index an existing index object"] # [doc = " @param path path to search"] # [doc = " @param stage stage to search"] # [doc = " @return 0 or an error code"] pub fn git_index_remove (index : * mut git_index , path : * const :: std :: os :: raw :: c_char , stage : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Remove all entries from the index under a given directory"] # [doc = ""] # [doc = " @param index an existing index object"] # [doc = " @param dir container directory path"] # [doc = " @param stage stage to search"] # [doc = " @return 0 or an error code"] pub fn git_index_remove_directory (index : * mut git_index , dir : * const :: std :: os :: raw :: c_char , stage : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Add or update an index entry from an in-memory struct"] # [doc = ""] # [doc = " If a previous index entry exists that has the same path and stage"] # [doc = " as the given 'source_entry', it will be replaced.  Otherwise, the"] # [doc = " 'source_entry' will be added."] # [doc = ""] # [doc = " A full copy (including the 'path' string) of the given"] # [doc = " 'source_entry' will be inserted on the index."] # [doc = ""] # [doc = " @param index an existing index object"] # [doc = " @param source_entry new entry object"] # [doc = " @return 0 or an error code"] pub fn git_index_add (index : * mut git_index , source_entry : * const git_index_entry) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Return the stage number from a git index entry"] # [doc = ""] # [doc = " This entry is calculated from the entry's flag attribute like this:"] # [doc = ""] # [doc = "    (entry->flags & GIT_INDEX_ENTRY_STAGEMASK) >> GIT_INDEX_ENTRY_STAGESHIFT"] # [doc = ""] # [doc = " @param entry The entry"] # [doc = " @return the stage number"] pub fn git_index_entry_stage (entry : * const git_index_entry) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Return whether the given index entry is a conflict (has a high stage"] # [doc = " entry).  This is simply shorthand for `git_index_entry_stage > 0`."] # [doc = ""] # [doc = " @param entry The entry"] # [doc = " @return 1 if the entry is a conflict entry, 0 otherwise"] pub fn git_index_entry_is_conflict (entry : * const git_index_entry) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create an iterator that will return every entry contained in the"] # [doc = " index at the time of creation.  Entries are returned in order,"] # [doc = " sorted by path.  This iterator is backed by a snapshot that allows"] # [doc = " callers to modify the index while iterating without affecting the"] # [doc = " iterator."] # [doc = ""] # [doc = " @param iterator_out The newly created iterator"] # [doc = " @param index The index to iterate"] pub fn git_index_iterator_new (iterator_out : * mut * mut git_index_iterator , index : * mut git_index) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Return the next index entry in-order from the iterator."] # [doc = ""] # [doc = " @param out Pointer to store the index entry in"] # [doc = " @param iterator The iterator"] # [doc = " @return 0, GIT_ITEROVER on iteration completion or an error code"] pub fn git_index_iterator_next (out : * mut * const git_index_entry , iterator : * mut git_index_iterator) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free the index iterator"] # [doc = ""] # [doc = " @param iterator The iterator to free"] pub fn git_index_iterator_free (iterator : * mut git_index_iterator) ; } extern "C" { # [doc = " Add or update an index entry from a file on disk"] # [doc = ""] # [doc = " The file `path` must be relative to the repository's"] # [doc = " working folder and must be readable."] # [doc = ""] # [doc = " This method will fail in bare index instances."] # [doc = ""] # [doc = " This forces the file to be added to the index, not looking"] # [doc = " at gitignore rules.  Those rules can be evaluated through"] # [doc = " the git_status APIs (in status.h) before calling this."] # [doc = ""] # [doc = " If this file currently is the result of a merge conflict, this"] # [doc = " file will no longer be marked as conflicting.  The data about"] # [doc = " the conflict will be moved to the \"resolve undo\" (REUC) section."] # [doc = ""] # [doc = " @param index an existing index object"] # [doc = " @param path filename to add"] # [doc = " @return 0 or an error code"] pub fn git_index_add_bypath (index : * mut git_index , path : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Add or update an index entry from a buffer in memory"] # [doc = ""] # [doc = " This method will create a blob in the repository that owns the"] # [doc = " index and then add the index entry to the index.  The `path` of the"] # [doc = " entry represents the position of the blob relative to the"] # [doc = " repository's root folder."] # [doc = ""] # [doc = " If a previous index entry exists that has the same path as the"] # [doc = " given 'entry', it will be replaced.  Otherwise, the 'entry' will be"] # [doc = " added."] # [doc = ""] # [doc = " This forces the file to be added to the index, not looking"] # [doc = " at gitignore rules.  Those rules can be evaluated through"] # [doc = " the git_status APIs (in status.h) before calling this."] # [doc = ""] # [doc = " If this file currently is the result of a merge conflict, this"] # [doc = " file will no longer be marked as conflicting.  The data about"] # [doc = " the conflict will be moved to the \"resolve undo\" (REUC) section."] # [doc = ""] # [doc = " @param index an existing index object"] # [doc = " @param entry filename to add"] # [doc = " @param buffer data to be written into the blob"] # [doc = " @param len length of the data"] # [doc = " @return 0 or an error code"] pub fn git_index_add_from_buffer (index : * mut git_index , entry : * const git_index_entry , buffer : * const :: std :: os :: raw :: c_void , len : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Remove an index entry corresponding to a file on disk"] # [doc = ""] # [doc = " The file `path` must be relative to the repository's"] # [doc = " working folder.  It may exist."] # [doc = ""] # [doc = " If this file currently is the result of a merge conflict, this"] # [doc = " file will no longer be marked as conflicting.  The data about"] # [doc = " the conflict will be moved to the \"resolve undo\" (REUC) section."] # [doc = ""] # [doc = " @param index an existing index object"] # [doc = " @param path filename to remove"] # [doc = " @return 0 or an error code"] pub fn git_index_remove_bypath (index : * mut git_index , path : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Add or update index entries matching files in the working directory."] # [doc = ""] # [doc = " This method will fail in bare index instances."] # [doc = ""] # [doc = " The `pathspec` is a list of file names or shell glob patterns that will"] # [doc = " be matched against files in the repository's working directory.  Each"] # [doc = " file that matches will be added to the index (either updating an"] # [doc = " existing entry or adding a new entry).  You can disable glob expansion"] # [doc = " and force exact matching with the `GIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH`"] # [doc = " flag."] # [doc = ""] # [doc = " Files that are ignored will be skipped (unlike `git_index_add_bypath`)."] # [doc = " If a file is already tracked in the index, then it *will* be updated"] # [doc = " even if it is ignored.  Pass the `GIT_INDEX_ADD_FORCE` flag to skip"] # [doc = " the checking of ignore rules."] # [doc = ""] # [doc = " To emulate `git add -A` and generate an error if the pathspec contains"] # [doc = " the exact path of an ignored file (when not using FORCE), add the"] # [doc = " `GIT_INDEX_ADD_CHECK_PATHSPEC` flag.  This checks that each entry"] # [doc = " in the `pathspec` that is an exact match to a filename on disk is"] # [doc = " either not ignored or already in the index.  If this check fails, the"] # [doc = " function will return GIT_EINVALIDSPEC."] # [doc = ""] # [doc = " To emulate `git add -A` with the \"dry-run\" option, just use a callback"] # [doc = " function that always returns a positive value.  See below for details."] # [doc = ""] # [doc = " If any files are currently the result of a merge conflict, those files"] # [doc = " will no longer be marked as conflicting.  The data about the conflicts"] # [doc = " will be moved to the \"resolve undo\" (REUC) section."] # [doc = ""] # [doc = " If you provide a callback function, it will be invoked on each matching"] # [doc = " item in the working directory immediately *before* it is added to /"] # [doc = " updated in the index.  Returning zero will add the item to the index,"] # [doc = " greater than zero will skip the item, and less than zero will abort the"] # [doc = " scan and return that value to the caller."] # [doc = ""] # [doc = " @param index an existing index object"] # [doc = " @param pathspec array of path patterns"] # [doc = " @param flags combination of git_index_add_option_t flags"] # [doc = " @param callback notification callback for each added/updated path (also"] # [doc = "                 gets index of matching pathspec entry); can be NULL;"] # [doc = "                 return 0 to add, >0 to skip, <0 to abort scan."] # [doc = " @param payload payload passed through to callback function"] # [doc = " @return 0 on success, negative callback return value, or error code"] pub fn git_index_add_all (index : * mut git_index , pathspec : * const git_strarray , flags : :: std :: os :: raw :: c_uint , callback : git_index_matched_path_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Remove all matching index entries."] # [doc = ""] # [doc = " If you provide a callback function, it will be invoked on each matching"] # [doc = " item in the index immediately *before* it is removed.  Return 0 to"] # [doc = " remove the item, > 0 to skip the item, and < 0 to abort the scan."] # [doc = ""] # [doc = " @param index An existing index object"] # [doc = " @param pathspec array of path patterns"] # [doc = " @param callback notification callback for each removed path (also"] # [doc = "                 gets index of matching pathspec entry); can be NULL;"] # [doc = "                 return 0 to add, >0 to skip, <0 to abort scan."] # [doc = " @param payload payload passed through to callback function"] # [doc = " @return 0 on success, negative callback return value, or error code"] pub fn git_index_remove_all (index : * mut git_index , pathspec : * const git_strarray , callback : git_index_matched_path_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Update all index entries to match the working directory"] # [doc = ""] # [doc = " This method will fail in bare index instances."] # [doc = ""] # [doc = " This scans the existing index entries and synchronizes them with the"] # [doc = " working directory, deleting them if the corresponding working directory"] # [doc = " file no longer exists otherwise updating the information (including"] # [doc = " adding the latest version of file to the ODB if needed)."] # [doc = ""] # [doc = " If you provide a callback function, it will be invoked on each matching"] # [doc = " item in the index immediately *before* it is updated (either refreshed"] # [doc = " or removed depending on working directory state).  Return 0 to proceed"] # [doc = " with updating the item, > 0 to skip the item, and < 0 to abort the scan."] # [doc = ""] # [doc = " @param index An existing index object"] # [doc = " @param pathspec array of path patterns"] # [doc = " @param callback notification callback for each updated path (also"] # [doc = "                 gets index of matching pathspec entry); can be NULL;"] # [doc = "                 return 0 to add, >0 to skip, <0 to abort scan."] # [doc = " @param payload payload passed through to callback function"] # [doc = " @return 0 on success, negative callback return value, or error code"] pub fn git_index_update_all (index : * mut git_index , pathspec : * const git_strarray , callback : git_index_matched_path_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Find the first position of any entries which point to given"] # [doc = " path in the Git index."] # [doc = ""] # [doc = " @param at_pos the address to which the position of the index entry is written (optional)"] # [doc = " @param index an existing index object"] # [doc = " @param path path to search"] # [doc = " @return 0 or an error code"] pub fn git_index_find (at_pos : * mut size_t , index : * mut git_index , path : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Find the first position of any entries matching a prefix. To find the first position"] # [doc = " of a path inside a given folder, suffix the prefix with a '/'."] # [doc = ""] # [doc = " @param at_pos the address to which the position of the index entry is written (optional)"] # [doc = " @param index an existing index object"] # [doc = " @param prefix the prefix to search for"] # [doc = " @return 0 or an error code"] pub fn git_index_find_prefix (at_pos : * mut size_t , index : * mut git_index , prefix : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Add or update index entries to represent a conflict.  Any staged"] # [doc = " entries that exist at the given paths will be removed."] # [doc = ""] # [doc = " The entries are the entries from the tree included in the merge.  Any"] # [doc = " entry may be null to indicate that that file was not present in the"] # [doc = " trees during the merge.  For example, ancestor_entry may be NULL to"] # [doc = " indicate that a file was added in both branches and must be resolved."] # [doc = ""] # [doc = " @param index an existing index object"] # [doc = " @param ancestor_entry the entry data for the ancestor of the conflict"] # [doc = " @param our_entry the entry data for our side of the merge conflict"] # [doc = " @param their_entry the entry data for their side of the merge conflict"] # [doc = " @return 0 or an error code"] pub fn git_index_conflict_add (index : * mut git_index , ancestor_entry : * const git_index_entry , our_entry : * const git_index_entry , their_entry : * const git_index_entry) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the index entries that represent a conflict of a single file."] # [doc = ""] # [doc = " The entries are not modifiable and should not be freed.  Because the"] # [doc = " `git_index_entry` struct is a publicly defined struct, you should"] # [doc = " be able to make your own permanent copy of the data if necessary."] # [doc = ""] # [doc = " @param ancestor_out Pointer to store the ancestor entry"] # [doc = " @param our_out Pointer to store the our entry"] # [doc = " @param their_out Pointer to store the their entry"] # [doc = " @param index an existing index object"] # [doc = " @param path path to search"] # [doc = " @return 0 or an error code"] pub fn git_index_conflict_get (ancestor_out : * mut * const git_index_entry , our_out : * mut * const git_index_entry , their_out : * mut * const git_index_entry , index : * mut git_index , path : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Removes the index entries that represent a conflict of a single file."] # [doc = ""] # [doc = " @param index an existing index object"] # [doc = " @param path path to remove conflicts for"] # [doc = " @return 0 or an error code"] pub fn git_index_conflict_remove (index : * mut git_index , path : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Remove all conflicts in the index (entries with a stage greater than 0)."] # [doc = ""] # [doc = " @param index an existing index object"] # [doc = " @return 0 or an error code"] pub fn git_index_conflict_cleanup (index : * mut git_index) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Determine if the index contains entries representing file conflicts."] # [doc = ""] # [doc = " @return 1 if at least one conflict is found, 0 otherwise."] pub fn git_index_has_conflicts (index : * const git_index) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create an iterator for the conflicts in the index."] # [doc = ""] # [doc = " The index must not be modified while iterating; the results are undefined."] # [doc = ""] # [doc = " @param iterator_out The newly created conflict iterator"] # [doc = " @param index The index to scan"] # [doc = " @return 0 or an error code"] pub fn git_index_conflict_iterator_new (iterator_out : * mut * mut git_index_conflict_iterator , index : * mut git_index) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Returns the current conflict (ancestor, ours and theirs entry) and"] # [doc = " advance the iterator internally to the next value."] # [doc = ""] # [doc = " @param ancestor_out Pointer to store the ancestor side of the conflict"] # [doc = " @param our_out Pointer to store our side of the conflict"] # [doc = " @param their_out Pointer to store their side of the conflict"] # [doc = " @return 0 (no error), GIT_ITEROVER (iteration is done) or an error code"] # [doc = "         (negative value)"] pub fn git_index_conflict_next (ancestor_out : * mut * const git_index_entry , our_out : * mut * const git_index_entry , their_out : * mut * const git_index_entry , iterator : * mut git_index_conflict_iterator) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Frees a `git_index_conflict_iterator`."] # [doc = ""] # [doc = " @param iterator pointer to the iterator"] pub fn git_index_conflict_iterator_free (iterator : * mut git_index_conflict_iterator) ; } # [doc = " The file inputs to `git_merge_file`.  Callers should populate the"] # [doc = " `git_merge_file_input` structure with descriptions of the files in"] # [doc = " each side of the conflict for use in producing the merge file."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_merge_file_input { pub version : :: std :: os :: raw :: c_uint , # [doc = " Pointer to the contents of the file."] pub ptr : * const :: std :: os :: raw :: c_char , # [doc = " Size of the contents pointed to in `ptr`."] pub size : size_t , # [doc = " File name of the conflicted file, or `NULL` to not merge the path."] pub path : * const :: std :: os :: raw :: c_char , # [doc = " File mode of the conflicted file, or `0` to not merge the mode."] pub mode : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_git_merge_file_input () { assert_eq ! (:: std :: mem :: size_of :: < git_merge_file_input > () , 40usize , concat ! ("Size of: " , stringify ! (git_merge_file_input))) ; assert_eq ! (:: std :: mem :: align_of :: < git_merge_file_input > () , 8usize , concat ! ("Alignment of " , stringify ! (git_merge_file_input))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_file_input > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_merge_file_input) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_file_input > ())) . ptr as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_merge_file_input) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_file_input > ())) . size as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_merge_file_input) , "::" , stringify ! (size))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_file_input > ())) . path as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_merge_file_input) , "::" , stringify ! (path))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_file_input > ())) . mode as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (git_merge_file_input) , "::" , stringify ! (mode))) ; } extern "C" { # [doc = " Initializes a `git_merge_file_input` with default values. Equivalent to"] # [doc = " creating an instance with GIT_MERGE_FILE_INPUT_INIT."] # [doc = ""] # [doc = " @param opts the `git_merge_file_input` instance to initialize."] # [doc = " @param version the version of the struct; you should pass"] # [doc = "        `GIT_MERGE_FILE_INPUT_VERSION` here."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_merge_file_input_init (opts : * mut git_merge_file_input , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } # [doc = " Detect renames that occur between the common ancestor and the \"ours\""] # [doc = " side or the common ancestor and the \"theirs\" side.  This will enable"] # [doc = " the ability to merge between a modified and renamed file."] pub const git_merge_flag_t_GIT_MERGE_FIND_RENAMES : git_merge_flag_t = 1 ; # [doc = " If a conflict occurs, exit immediately instead of attempting to"] # [doc = " continue resolving conflicts.  The merge operation will fail with"] # [doc = " GIT_EMERGECONFLICT and no index will be returned."] pub const git_merge_flag_t_GIT_MERGE_FAIL_ON_CONFLICT : git_merge_flag_t = 2 ; # [doc = " Do not write the REUC extension on the generated index"] pub const git_merge_flag_t_GIT_MERGE_SKIP_REUC : git_merge_flag_t = 4 ; # [doc = " If the commits being merged have multiple merge bases, do not build"] # [doc = " a recursive merge base (by merging the multiple merge bases),"] # [doc = " instead simply use the first base.  This flag provides a similar"] # [doc = " merge base to `git-merge-resolve`."] pub const git_merge_flag_t_GIT_MERGE_NO_RECURSIVE : git_merge_flag_t = 8 ; # [doc = " Flags for `git_merge` options.  A combination of these flags can be"] # [doc = " passed in via the `flags` value in the `git_merge_options`."] pub type git_merge_flag_t = :: std :: os :: raw :: c_uint ; # [doc = " When a region of a file is changed in both branches, a conflict"] # [doc = " will be recorded in the index so that `git_checkout` can produce"] # [doc = " a merge file with conflict markers in the working directory."] # [doc = " This is the default."] pub const git_merge_file_favor_t_GIT_MERGE_FILE_FAVOR_NORMAL : git_merge_file_favor_t = 0 ; # [doc = " When a region of a file is changed in both branches, the file"] # [doc = " created in the index will contain the \"ours\" side of any conflicting"] # [doc = " region.  The index will not record a conflict."] pub const git_merge_file_favor_t_GIT_MERGE_FILE_FAVOR_OURS : git_merge_file_favor_t = 1 ; # [doc = " When a region of a file is changed in both branches, the file"] # [doc = " created in the index will contain the \"theirs\" side of any conflicting"] # [doc = " region.  The index will not record a conflict."] pub const git_merge_file_favor_t_GIT_MERGE_FILE_FAVOR_THEIRS : git_merge_file_favor_t = 2 ; # [doc = " When a region of a file is changed in both branches, the file"] # [doc = " created in the index will contain each unique line from each side,"] # [doc = " which has the result of combining both files.  The index will not"] # [doc = " record a conflict."] pub const git_merge_file_favor_t_GIT_MERGE_FILE_FAVOR_UNION : git_merge_file_favor_t = 3 ; # [doc = " Merge file favor options for `git_merge_options` instruct the file-level"] # [doc = " merging functionality how to deal with conflicting regions of the files."] pub type git_merge_file_favor_t = :: std :: os :: raw :: c_uint ; # [doc = " Defaults"] pub const git_merge_file_flag_t_GIT_MERGE_FILE_DEFAULT : git_merge_file_flag_t = 0 ; # [doc = " Create standard conflicted merge files"] pub const git_merge_file_flag_t_GIT_MERGE_FILE_STYLE_MERGE : git_merge_file_flag_t = 1 ; # [doc = " Create diff3-style files"] pub const git_merge_file_flag_t_GIT_MERGE_FILE_STYLE_DIFF3 : git_merge_file_flag_t = 2 ; # [doc = " Condense non-alphanumeric regions for simplified diff file"] pub const git_merge_file_flag_t_GIT_MERGE_FILE_SIMPLIFY_ALNUM : git_merge_file_flag_t = 4 ; # [doc = " Ignore all whitespace"] pub const git_merge_file_flag_t_GIT_MERGE_FILE_IGNORE_WHITESPACE : git_merge_file_flag_t = 8 ; # [doc = " Ignore changes in amount of whitespace"] pub const git_merge_file_flag_t_GIT_MERGE_FILE_IGNORE_WHITESPACE_CHANGE : git_merge_file_flag_t = 16 ; # [doc = " Ignore whitespace at end of line"] pub const git_merge_file_flag_t_GIT_MERGE_FILE_IGNORE_WHITESPACE_EOL : git_merge_file_flag_t = 32 ; # [doc = " Use the \"patience diff\" algorithm"] pub const git_merge_file_flag_t_GIT_MERGE_FILE_DIFF_PATIENCE : git_merge_file_flag_t = 64 ; # [doc = " Take extra time to find minimal diff"] pub const git_merge_file_flag_t_GIT_MERGE_FILE_DIFF_MINIMAL : git_merge_file_flag_t = 128 ; # [doc = " File merging flags"] pub type git_merge_file_flag_t = :: std :: os :: raw :: c_uint ; # [doc = " Options for merging a file"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_merge_file_options { pub version : :: std :: os :: raw :: c_uint , # [doc = " Label for the ancestor file side of the conflict which will be prepended"] # [doc = " to labels in diff3-format merge files."] pub ancestor_label : * const :: std :: os :: raw :: c_char , # [doc = " Label for our file side of the conflict which will be prepended"] # [doc = " to labels in merge files."] pub our_label : * const :: std :: os :: raw :: c_char , # [doc = " Label for their file side of the conflict which will be prepended"] # [doc = " to labels in merge files."] pub their_label : * const :: std :: os :: raw :: c_char , # [doc = " The file to favor in region conflicts."] pub favor : git_merge_file_favor_t , # [doc = " see `git_merge_file_flag_t` above"] pub flags : u32 , # [doc = " The size of conflict markers (eg, \"<<<<<<<\").  Default is"] # [doc = " GIT_MERGE_CONFLICT_MARKER_SIZE."] pub marker_size : :: std :: os :: raw :: c_ushort , } # [test] fn bindgen_test_layout_git_merge_file_options () { assert_eq ! (:: std :: mem :: size_of :: < git_merge_file_options > () , 48usize , concat ! ("Size of: " , stringify ! (git_merge_file_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_merge_file_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_merge_file_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_file_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_merge_file_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_file_options > ())) . ancestor_label as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_merge_file_options) , "::" , stringify ! (ancestor_label))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_file_options > ())) . our_label as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_merge_file_options) , "::" , stringify ! (our_label))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_file_options > ())) . their_label as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_merge_file_options) , "::" , stringify ! (their_label))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_file_options > ())) . favor as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (git_merge_file_options) , "::" , stringify ! (favor))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_file_options > ())) . flags as * const _ as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (git_merge_file_options) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_file_options > ())) . marker_size as * const _ as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (git_merge_file_options) , "::" , stringify ! (marker_size))) ; } extern "C" { # [doc = " Initialize git_merge_file_options structure"] # [doc = ""] # [doc = " Initializes a `git_merge_file_options` with default values. Equivalent to"] # [doc = " creating an instance with `GIT_MERGE_FILE_OPTIONS_INIT`."] # [doc = ""] # [doc = " @param opts The `git_merge_file_options` struct to initialize."] # [doc = " @param version The struct version; pass `GIT_MERGE_FILE_OPTIONS_VERSION`."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_merge_file_options_init (opts : * mut git_merge_file_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } # [doc = " Information about file-level merging"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_merge_file_result { # [doc = " True if the output was automerged, false if the output contains"] # [doc = " conflict markers."] pub automergeable : :: std :: os :: raw :: c_uint , # [doc = " The path that the resultant merge file should use, or NULL if a"] # [doc = " filename conflict would occur."] pub path : * const :: std :: os :: raw :: c_char , # [doc = " The mode that the resultant merge file should use."] pub mode : :: std :: os :: raw :: c_uint , # [doc = " The contents of the merge."] pub ptr : * const :: std :: os :: raw :: c_char , # [doc = " The length of the merge contents."] pub len : size_t , } # [test] fn bindgen_test_layout_git_merge_file_result () { assert_eq ! (:: std :: mem :: size_of :: < git_merge_file_result > () , 40usize , concat ! ("Size of: " , stringify ! (git_merge_file_result))) ; assert_eq ! (:: std :: mem :: align_of :: < git_merge_file_result > () , 8usize , concat ! ("Alignment of " , stringify ! (git_merge_file_result))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_file_result > ())) . automergeable as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_merge_file_result) , "::" , stringify ! (automergeable))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_file_result > ())) . path as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_merge_file_result) , "::" , stringify ! (path))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_file_result > ())) . mode as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_merge_file_result) , "::" , stringify ! (mode))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_file_result > ())) . ptr as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_merge_file_result) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_file_result > ())) . len as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (git_merge_file_result) , "::" , stringify ! (len))) ; } # [doc = " Merging options"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_merge_options { pub version : :: std :: os :: raw :: c_uint , # [doc = " See `git_merge_flag_t` above"] pub flags : u32 , # [doc = " Similarity to consider a file renamed (default 50).  If"] # [doc = " `GIT_MERGE_FIND_RENAMES` is enabled, added files will be compared"] # [doc = " with deleted files to determine their similarity.  Files that are"] # [doc = " more similar than the rename threshold (percentage-wise) will be"] # [doc = " treated as a rename."] pub rename_threshold : :: std :: os :: raw :: c_uint , # [doc = " Maximum similarity sources to examine for renames (default 200)."] # [doc = " If the number of rename candidates (add / delete pairs) is greater"] # [doc = " than this value, inexact rename detection is aborted."] # [doc = ""] # [doc = " This setting overrides the `merge.renameLimit` configuration value."] pub target_limit : :: std :: os :: raw :: c_uint , # [doc = " Pluggable similarity metric; pass NULL to use internal metric"] pub metric : * mut git_diff_similarity_metric , # [doc = " Maximum number of times to merge common ancestors to build a"] # [doc = " virtual merge base when faced with criss-cross merges.  When this"] # [doc = " limit is reached, the next ancestor will simply be used instead of"] # [doc = " attempting to merge it.  The default is unlimited."] pub recursion_limit : :: std :: os :: raw :: c_uint , # [doc = " Default merge driver to be used when both sides of a merge have"] # [doc = " changed.  The default is the `text` driver."] pub default_driver : * const :: std :: os :: raw :: c_char , # [doc = " Flags for handling conflicting content, to be used with the standard"] # [doc = " (`text`) merge driver."] pub file_favor : git_merge_file_favor_t , # [doc = " see `git_merge_file_flag_t` above"] pub file_flags : u32 , } # [test] fn bindgen_test_layout_git_merge_options () { assert_eq ! (:: std :: mem :: size_of :: < git_merge_options > () , 48usize , concat ! ("Size of: " , stringify ! (git_merge_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_merge_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_merge_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_merge_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_options > ())) . flags as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_merge_options) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_options > ())) . rename_threshold as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_merge_options) , "::" , stringify ! (rename_threshold))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_options > ())) . target_limit as * const _ as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (git_merge_options) , "::" , stringify ! (target_limit))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_options > ())) . metric as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_merge_options) , "::" , stringify ! (metric))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_options > ())) . recursion_limit as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_merge_options) , "::" , stringify ! (recursion_limit))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_options > ())) . default_driver as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (git_merge_options) , "::" , stringify ! (default_driver))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_options > ())) . file_favor as * const _ as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (git_merge_options) , "::" , stringify ! (file_favor))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_merge_options > ())) . file_flags as * const _ as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (git_merge_options) , "::" , stringify ! (file_flags))) ; } extern "C" { # [doc = " Initialize git_merge_options structure"] # [doc = ""] # [doc = " Initializes a `git_merge_options` with default values. Equivalent to"] # [doc = " creating an instance with `GIT_MERGE_OPTIONS_INIT`."] # [doc = ""] # [doc = " @param opts The `git_merge_options` struct to initialize."] # [doc = " @param version The struct version; pass `GIT_MERGE_OPTIONS_VERSION`."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_merge_options_init (opts : * mut git_merge_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } # [doc = " No merge is possible.  (Unused.)"] pub const git_merge_analysis_t_GIT_MERGE_ANALYSIS_NONE : git_merge_analysis_t = 0 ; # [doc = " A \"normal\" merge; both HEAD and the given merge input have diverged"] # [doc = " from their common ancestor.  The divergent commits must be merged."] pub const git_merge_analysis_t_GIT_MERGE_ANALYSIS_NORMAL : git_merge_analysis_t = 1 ; # [doc = " All given merge inputs are reachable from HEAD, meaning the"] # [doc = " repository is up-to-date and no merge needs to be performed."] pub const git_merge_analysis_t_GIT_MERGE_ANALYSIS_UP_TO_DATE : git_merge_analysis_t = 2 ; # [doc = " The given merge input is a fast-forward from HEAD and no merge"] # [doc = " needs to be performed.  Instead, the client can check out the"] # [doc = " given merge input."] pub const git_merge_analysis_t_GIT_MERGE_ANALYSIS_FASTFORWARD : git_merge_analysis_t = 4 ; # [doc = " The HEAD of the current repository is \"unborn\" and does not point to"] # [doc = " a valid commit.  No merge can be performed, but the caller may wish"] # [doc = " to simply set HEAD to the target commit(s)."] pub const git_merge_analysis_t_GIT_MERGE_ANALYSIS_UNBORN : git_merge_analysis_t = 8 ; # [doc = " The results of `git_merge_analysis` indicate the merge opportunities."] pub type git_merge_analysis_t = :: std :: os :: raw :: c_uint ; # [doc = " No configuration was found that suggests a preferred behavior for"] # [doc = " merge."] pub const git_merge_preference_t_GIT_MERGE_PREFERENCE_NONE : git_merge_preference_t = 0 ; # [doc = " There is a `merge.ff=false` configuration setting, suggesting that"] # [doc = " the user does not want to allow a fast-forward merge."] pub const git_merge_preference_t_GIT_MERGE_PREFERENCE_NO_FASTFORWARD : git_merge_preference_t = 1 ; # [doc = " There is a `merge.ff=only` configuration setting, suggesting that"] # [doc = " the user only wants fast-forward merges."] pub const git_merge_preference_t_GIT_MERGE_PREFERENCE_FASTFORWARD_ONLY : git_merge_preference_t = 2 ; # [doc = " The user's stated preference for merges."] pub type git_merge_preference_t = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = " Analyzes the given branch(es) and determines the opportunities for"] # [doc = " merging them into the HEAD of the repository."] # [doc = ""] # [doc = " @param analysis_out analysis enumeration that the result is written into"] # [doc = " @param repo the repository to merge"] # [doc = " @param their_heads the heads to merge into"] # [doc = " @param their_heads_len the number of heads to merge"] # [doc = " @return 0 on success or error code"] pub fn git_merge_analysis (analysis_out : * mut git_merge_analysis_t , preference_out : * mut git_merge_preference_t , repo : * mut git_repository , their_heads : * mut * const git_annotated_commit , their_heads_len : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Analyzes the given branch(es) and determines the opportunities for"] # [doc = " merging them into a reference."] # [doc = ""] # [doc = " @param analysis_out analysis enumeration that the result is written into"] # [doc = " @param repo the repository to merge"] # [doc = " @param our_ref the reference to perform the analysis from"] # [doc = " @param their_heads the heads to merge into"] # [doc = " @param their_heads_len the number of heads to merge"] # [doc = " @return 0 on success or error code"] pub fn git_merge_analysis_for_ref (analysis_out : * mut git_merge_analysis_t , preference_out : * mut git_merge_preference_t , repo : * mut git_repository , our_ref : * mut git_reference , their_heads : * mut * const git_annotated_commit , their_heads_len : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Find a merge base between two commits"] # [doc = ""] # [doc = " @param out the OID of a merge base between 'one' and 'two'"] # [doc = " @param repo the repository where the commits exist"] # [doc = " @param one one of the commits"] # [doc = " @param two the other commit"] # [doc = " @return 0 on success, GIT_ENOTFOUND if not found or error code"] pub fn git_merge_base (out : * mut git_oid , repo : * mut git_repository , one : * const git_oid , two : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Find merge bases between two commits"] # [doc = ""] # [doc = " @param out array in which to store the resulting ids"] # [doc = " @param repo the repository where the commits exist"] # [doc = " @param one one of the commits"] # [doc = " @param two the other commit"] # [doc = " @return 0 on success, GIT_ENOTFOUND if not found or error code"] pub fn git_merge_bases (out : * mut git_oidarray , repo : * mut git_repository , one : * const git_oid , two : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Find a merge base given a list of commits"] # [doc = ""] # [doc = " @param out the OID of a merge base considering all the commits"] # [doc = " @param repo the repository where the commits exist"] # [doc = " @param length The number of commits in the provided `input_array`"] # [doc = " @param input_array oids of the commits"] # [doc = " @return Zero on success; GIT_ENOTFOUND or -1 on failure."] pub fn git_merge_base_many (out : * mut git_oid , repo : * mut git_repository , length : size_t , input_array : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Find all merge bases given a list of commits"] # [doc = ""] # [doc = " @param out array in which to store the resulting ids"] # [doc = " @param repo the repository where the commits exist"] # [doc = " @param length The number of commits in the provided `input_array`"] # [doc = " @param input_array oids of the commits"] # [doc = " @return Zero on success; GIT_ENOTFOUND or -1 on failure."] pub fn git_merge_bases_many (out : * mut git_oidarray , repo : * mut git_repository , length : size_t , input_array : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Find a merge base in preparation for an octopus merge"] # [doc = ""] # [doc = " @param out the OID of a merge base considering all the commits"] # [doc = " @param repo the repository where the commits exist"] # [doc = " @param length The number of commits in the provided `input_array`"] # [doc = " @param input_array oids of the commits"] # [doc = " @return Zero on success; GIT_ENOTFOUND or -1 on failure."] pub fn git_merge_base_octopus (out : * mut git_oid , repo : * mut git_repository , length : size_t , input_array : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Merge two files as they exist in the in-memory data structures, using"] # [doc = " the given common ancestor as the baseline, producing a"] # [doc = " `git_merge_file_result` that reflects the merge result.  The"] # [doc = " `git_merge_file_result` must be freed with `git_merge_file_result_free`."] # [doc = ""] # [doc = " Note that this function does not reference a repository and any"] # [doc = " configuration must be passed as `git_merge_file_options`."] # [doc = ""] # [doc = " @param out The git_merge_file_result to be filled in"] # [doc = " @param ancestor The contents of the ancestor file"] # [doc = " @param ours The contents of the file in \"our\" side"] # [doc = " @param theirs The contents of the file in \"their\" side"] # [doc = " @param opts The merge file options or `NULL` for defaults"] # [doc = " @return 0 on success or error code"] pub fn git_merge_file (out : * mut git_merge_file_result , ancestor : * const git_merge_file_input , ours : * const git_merge_file_input , theirs : * const git_merge_file_input , opts : * const git_merge_file_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Merge two files as they exist in the index, using the given common"] # [doc = " ancestor as the baseline, producing a `git_merge_file_result` that"] # [doc = " reflects the merge result.  The `git_merge_file_result` must be freed with"] # [doc = " `git_merge_file_result_free`."] # [doc = ""] # [doc = " @param out The git_merge_file_result to be filled in"] # [doc = " @param repo The repository"] # [doc = " @param ancestor The index entry for the ancestor file (stage level 1)"] # [doc = " @param ours The index entry for our file (stage level 2)"] # [doc = " @param theirs The index entry for their file (stage level 3)"] # [doc = " @param opts The merge file options or NULL"] # [doc = " @return 0 on success or error code"] pub fn git_merge_file_from_index (out : * mut git_merge_file_result , repo : * mut git_repository , ancestor : * const git_index_entry , ours : * const git_index_entry , theirs : * const git_index_entry , opts : * const git_merge_file_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Frees a `git_merge_file_result`."] # [doc = ""] # [doc = " @param result The result to free or `NULL`"] pub fn git_merge_file_result_free (result : * mut git_merge_file_result) ; } extern "C" { # [doc = " Merge two trees, producing a `git_index` that reflects the result of"] # [doc = " the merge.  The index may be written as-is to the working directory"] # [doc = " or checked out.  If the index is to be converted to a tree, the caller"] # [doc = " should resolve any conflicts that arose as part of the merge."] # [doc = ""] # [doc = " The returned index must be freed explicitly with `git_index_free`."] # [doc = ""] # [doc = " @param out pointer to store the index result in"] # [doc = " @param repo repository that contains the given trees"] # [doc = " @param ancestor_tree the common ancestor between the trees (or null if none)"] # [doc = " @param our_tree the tree that reflects the destination tree"] # [doc = " @param their_tree the tree to merge in to `our_tree`"] # [doc = " @param opts the merge tree options (or null for defaults)"] # [doc = " @return 0 on success or error code"] pub fn git_merge_trees (out : * mut * mut git_index , repo : * mut git_repository , ancestor_tree : * const git_tree , our_tree : * const git_tree , their_tree : * const git_tree , opts : * const git_merge_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Merge two commits, producing a `git_index` that reflects the result of"] # [doc = " the merge.  The index may be written as-is to the working directory"] # [doc = " or checked out.  If the index is to be converted to a tree, the caller"] # [doc = " should resolve any conflicts that arose as part of the merge."] # [doc = ""] # [doc = " The returned index must be freed explicitly with `git_index_free`."] # [doc = ""] # [doc = " @param out pointer to store the index result in"] # [doc = " @param repo repository that contains the given trees"] # [doc = " @param our_commit the commit that reflects the destination tree"] # [doc = " @param their_commit the commit to merge in to `our_commit`"] # [doc = " @param opts the merge tree options (or null for defaults)"] # [doc = " @return 0 on success or error code"] pub fn git_merge_commits (out : * mut * mut git_index , repo : * mut git_repository , our_commit : * const git_commit , their_commit : * const git_commit , opts : * const git_merge_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Merges the given commit(s) into HEAD, writing the results into the working"] # [doc = " directory.  Any changes are staged for commit and any conflicts are written"] # [doc = " to the index.  Callers should inspect the repository's index after this"] # [doc = " completes, resolve any conflicts and prepare a commit."] # [doc = ""] # [doc = " For compatibility with git, the repository is put into a merging"] # [doc = " state. Once the commit is done (or if the uses wishes to abort),"] # [doc = " you should clear this state by calling"] # [doc = " `git_repository_state_cleanup()`."] # [doc = ""] # [doc = " @param repo the repository to merge"] # [doc = " @param their_heads the heads to merge into"] # [doc = " @param their_heads_len the number of heads to merge"] # [doc = " @param merge_opts merge options"] # [doc = " @param checkout_opts checkout options"] # [doc = " @return 0 on success or error code"] pub fn git_merge (repo : * mut git_repository , their_heads : * mut * const git_annotated_commit , their_heads_len : size_t , merge_opts : * const git_merge_options , checkout_opts : * const git_checkout_options) -> :: std :: os :: raw :: c_int ; } # [doc = " Cherry-pick options"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_cherrypick_options { pub version : :: std :: os :: raw :: c_uint , # [doc = " For merge commits, the \"mainline\" is treated as the parent."] pub mainline : :: std :: os :: raw :: c_uint , # [doc = "< Options for the merging"] pub merge_opts : git_merge_options , # [doc = "< Options for the checkout"] pub checkout_opts : git_checkout_options , } # [test] fn bindgen_test_layout_git_cherrypick_options () { assert_eq ! (:: std :: mem :: size_of :: < git_cherrypick_options > () , 200usize , concat ! ("Size of: " , stringify ! (git_cherrypick_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_cherrypick_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_cherrypick_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_cherrypick_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_cherrypick_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_cherrypick_options > ())) . mainline as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_cherrypick_options) , "::" , stringify ! (mainline))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_cherrypick_options > ())) . merge_opts as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_cherrypick_options) , "::" , stringify ! (merge_opts))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_cherrypick_options > ())) . checkout_opts as * const _ as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (git_cherrypick_options) , "::" , stringify ! (checkout_opts))) ; } extern "C" { # [doc = " Initialize git_cherrypick_options structure"] # [doc = ""] # [doc = " Initializes a `git_cherrypick_options` with default values. Equivalent to creating"] # [doc = " an instance with GIT_CHERRYPICK_OPTIONS_INIT."] # [doc = ""] # [doc = " @param opts The `git_cherrypick_options` struct to initialize."] # [doc = " @param version The struct version; pass `GIT_CHERRYPICK_OPTIONS_VERSION`."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_cherrypick_options_init (opts : * mut git_cherrypick_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Cherry-picks the given commit against the given \"our\" commit, producing an"] # [doc = " index that reflects the result of the cherry-pick."] # [doc = ""] # [doc = " The returned index must be freed explicitly with `git_index_free`."] # [doc = ""] # [doc = " @param out pointer to store the index result in"] # [doc = " @param repo the repository that contains the given commits"] # [doc = " @param cherrypick_commit the commit to cherry-pick"] # [doc = " @param our_commit the commit to cherry-pick against (eg, HEAD)"] # [doc = " @param mainline the parent of the `cherrypick_commit`, if it is a merge"] # [doc = " @param merge_options the merge options (or null for defaults)"] # [doc = " @return zero on success, -1 on failure."] pub fn git_cherrypick_commit (out : * mut * mut git_index , repo : * mut git_repository , cherrypick_commit : * mut git_commit , our_commit : * mut git_commit , mainline : :: std :: os :: raw :: c_uint , merge_options : * const git_merge_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Cherry-pick the given commit, producing changes in the index and working directory."] # [doc = ""] # [doc = " @param repo the repository to cherry-pick"] # [doc = " @param commit the commit to cherry-pick"] # [doc = " @param cherrypick_options the cherry-pick options (or null for defaults)"] # [doc = " @return zero on success, -1 on failure."] pub fn git_cherrypick (repo : * mut git_repository , commit : * mut git_commit , cherrypick_options : * const git_cherrypick_options) -> :: std :: os :: raw :: c_int ; } pub const git_direction_GIT_DIRECTION_FETCH : git_direction = 0 ; pub const git_direction_GIT_DIRECTION_PUSH : git_direction = 1 ; # [doc = " Direction of the connection."] # [doc = ""] # [doc = " We need this because we need to know whether we should call"] # [doc = " git-upload-pack or git-receive-pack on the remote end when get_refs"] # [doc = " gets called."] pub type git_direction = :: std :: os :: raw :: c_uint ; # [doc = " Description of a reference advertised by a remote server, given out"] # [doc = " on `ls` calls."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_remote_head { pub local : :: std :: os :: raw :: c_int , pub oid : git_oid , pub loid : git_oid , pub name : * mut :: std :: os :: raw :: c_char , # [doc = " If the server send a symref mapping for this ref, this will"] # [doc = " point to the target."] pub symref_target : * mut :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_git_remote_head () { assert_eq ! (:: std :: mem :: size_of :: < git_remote_head > () , 64usize , concat ! ("Size of: " , stringify ! (git_remote_head))) ; assert_eq ! (:: std :: mem :: align_of :: < git_remote_head > () , 8usize , concat ! ("Alignment of " , stringify ! (git_remote_head))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_remote_head > ())) . local as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_remote_head) , "::" , stringify ! (local))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_remote_head > ())) . oid as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_remote_head) , "::" , stringify ! (oid))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_remote_head > ())) . loid as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_remote_head) , "::" , stringify ! (loid))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_remote_head > ())) . name as * const _ as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (git_remote_head) , "::" , stringify ! (name))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_remote_head > ())) . symref_target as * const _ as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (git_remote_head) , "::" , stringify ! (symref_target))) ; } extern "C" { # [doc = " Parse a given refspec string"] # [doc = ""] # [doc = " @param refspec a pointer to hold the refspec handle"] # [doc = " @param input the refspec string"] # [doc = " @param is_fetch is this a refspec for a fetch"] # [doc = " @return 0 if the refspec string could be parsed, -1 otherwise"] pub fn git_refspec_parse (refspec : * mut * mut git_refspec , input : * const :: std :: os :: raw :: c_char , is_fetch : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free a refspec object which has been created by git_refspec_parse"] # [doc = ""] # [doc = " @param refspec the refspec object"] pub fn git_refspec_free (refspec : * mut git_refspec) ; } extern "C" { # [doc = " Get the source specifier"] # [doc = ""] # [doc = " @param refspec the refspec"] # [doc = " @return the refspec's source specifier"] pub fn git_refspec_src (refspec : * const git_refspec) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Get the destination specifier"] # [doc = ""] # [doc = " @param refspec the refspec"] # [doc = " @return the refspec's destination specifier"] pub fn git_refspec_dst (refspec : * const git_refspec) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Get the refspec's string"] # [doc = ""] # [doc = " @param refspec the refspec"] # [doc = " @returns the refspec's original string"] pub fn git_refspec_string (refspec : * const git_refspec) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Get the force update setting"] # [doc = ""] # [doc = " @param refspec the refspec"] # [doc = " @return 1 if force update has been set, 0 otherwise"] pub fn git_refspec_force (refspec : * const git_refspec) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the refspec's direction."] # [doc = ""] # [doc = " @param spec refspec"] # [doc = " @return GIT_DIRECTION_FETCH or GIT_DIRECTION_PUSH"] pub fn git_refspec_direction (spec : * const git_refspec) -> git_direction ; } extern "C" { # [doc = " Check if a refspec's source descriptor matches a reference"] # [doc = ""] # [doc = " @param refspec the refspec"] # [doc = " @param refname the name of the reference to check"] # [doc = " @return 1 if the refspec matches, 0 otherwise"] pub fn git_refspec_src_matches (refspec : * const git_refspec , refname : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Check if a refspec's destination descriptor matches a reference"] # [doc = ""] # [doc = " @param refspec the refspec"] # [doc = " @param refname the name of the reference to check"] # [doc = " @return 1 if the refspec matches, 0 otherwise"] pub fn git_refspec_dst_matches (refspec : * const git_refspec , refname : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Transform a reference to its target following the refspec's rules"] # [doc = ""] # [doc = " @param out where to store the target name"] # [doc = " @param spec the refspec"] # [doc = " @param name the name of the reference to transform"] # [doc = " @return 0, GIT_EBUFS or another error"] pub fn git_refspec_transform (out : * mut git_buf , spec : * const git_refspec , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Transform a target reference to its source reference following the refspec's rules"] # [doc = ""] # [doc = " @param out where to store the source reference name"] # [doc = " @param spec the refspec"] # [doc = " @param name the name of the reference to transform"] # [doc = " @return 0, GIT_EBUFS or another error"] pub fn git_refspec_rtransform (out : * mut git_buf , spec : * const git_refspec , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } # [doc = " A vanilla user/password request"] # [doc = " @see git_credential_userpass_plaintext_new"] pub const git_credential_t_GIT_CREDENTIAL_USERPASS_PLAINTEXT : git_credential_t = 1 ; # [doc = " An SSH key-based authentication request"] # [doc = " @see git_credential_ssh_key_new"] pub const git_credential_t_GIT_CREDENTIAL_SSH_KEY : git_credential_t = 2 ; # [doc = " An SSH key-based authentication request, with a custom signature"] # [doc = " @see git_credential_ssh_custom_new"] pub const git_credential_t_GIT_CREDENTIAL_SSH_CUSTOM : git_credential_t = 4 ; # [doc = " An NTLM/Negotiate-based authentication request."] # [doc = " @see git_credential_default"] pub const git_credential_t_GIT_CREDENTIAL_DEFAULT : git_credential_t = 8 ; # [doc = " An SSH interactive authentication request"] # [doc = " @see git_credential_ssh_interactive_new"] pub const git_credential_t_GIT_CREDENTIAL_SSH_INTERACTIVE : git_credential_t = 16 ; # [doc = " Username-only authentication request"] # [doc = ""] # [doc = " Used as a pre-authentication step if the underlying transport"] # [doc = " (eg. SSH, with no username in its URL) does not know which username"] # [doc = " to use."] # [doc = ""] # [doc = " @see git_credential_username_new"] pub const git_credential_t_GIT_CREDENTIAL_USERNAME : git_credential_t = 32 ; # [doc = " An SSH key-based authentication request"] # [doc = ""] # [doc = " Allows credentials to be read from memory instead of files."] # [doc = " Note that because of differences in crypto backend support, it might"] # [doc = " not be functional."] # [doc = ""] # [doc = " @see git_credential_ssh_key_memory_new"] pub const git_credential_t_GIT_CREDENTIAL_SSH_MEMORY : git_credential_t = 64 ; # [doc = " Supported credential types"] # [doc = ""] # [doc = " This represents the various types of authentication methods supported by"] # [doc = " the library."] pub type git_credential_t = :: std :: os :: raw :: c_uint ; # [doc = " The base structure for all credential types"] pub type git_credential_default = git_credential ; # [doc = " Credential acquisition callback."] # [doc = ""] # [doc = " This callback is usually involved any time another system might need"] # [doc = " authentication. As such, you are expected to provide a valid"] # [doc = " git_credential object back, depending on allowed_types (a"] # [doc = " git_credential_t bitmask)."] # [doc = ""] # [doc = " Note that most authentication details are your responsibility - this"] # [doc = " callback will be called until the authentication succeeds, or you report"] # [doc = " an error. As such, it's easy to get in a loop if you fail to stop providing"] # [doc = " the same incorrect credentials."] # [doc = ""] # [doc = " @param out The newly created credential object."] # [doc = " @param url The resource for which we are demanding a credential."] # [doc = " @param username_from_url The username that was embedded in a \"user\\@host\""] # [doc = "                          remote url, or NULL if not included."] # [doc = " @param allowed_types A bitmask stating which credential types are OK to return."] # [doc = " @param payload The payload provided when specifying this callback."] # [doc = " @return 0 for success, < 0 to indicate an error, > 0 to indicate"] # [doc = "       no credential was acquired"] pub type git_credential_acquire_cb = :: std :: option :: Option < unsafe extern "C" fn (out : * mut * mut git_credential , url : * const :: std :: os :: raw :: c_char , username_from_url : * const :: std :: os :: raw :: c_char , allowed_types : :: std :: os :: raw :: c_uint , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; extern "C" { # [doc = " Free a credential."] # [doc = ""] # [doc = " This is only necessary if you own the object; that is, if you are a"] # [doc = " transport."] # [doc = ""] # [doc = " @param cred the object to free"] pub fn git_credential_free (cred : * mut git_credential) ; } extern "C" { # [doc = " Check whether a credential object contains username information."] # [doc = ""] # [doc = " @param cred object to check"] # [doc = " @return 1 if the credential object has non-NULL username, 0 otherwise"] pub fn git_credential_has_username (cred : * mut git_credential) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Return the username associated with a credential object."] # [doc = ""] # [doc = " @param cred object to check"] # [doc = " @return the credential username, or NULL if not applicable"] pub fn git_credential_get_username (cred : * mut git_credential) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Create a new plain-text username and password credential object."] # [doc = " The supplied credential parameter will be internally duplicated."] # [doc = ""] # [doc = " @param out The newly created credential object."] # [doc = " @param username The username of the credential."] # [doc = " @param password The password of the credential."] # [doc = " @return 0 for success or an error code for failure"] pub fn git_credential_userpass_plaintext_new (out : * mut * mut git_credential , username : * const :: std :: os :: raw :: c_char , password : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a \"default\" credential usable for Negotiate mechanisms like NTLM"] # [doc = " or Kerberos authentication."] # [doc = ""] # [doc = " @param out The newly created credential object."] # [doc = " @return 0 for success or an error code for failure"] pub fn git_credential_default_new (out : * mut * mut git_credential) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a credential to specify a username."] # [doc = ""] # [doc = " This is used with ssh authentication to query for the username if"] # [doc = " none is specified in the url."] # [doc = ""] # [doc = " @param out The newly created credential object."] # [doc = " @param username The username to authenticate with"] # [doc = " @return 0 for success or an error code for failure"] pub fn git_credential_username_new (out : * mut * mut git_credential , username : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a new passphrase-protected ssh key credential object."] # [doc = " The supplied credential parameter will be internally duplicated."] # [doc = ""] # [doc = " @param out The newly created credential object."] # [doc = " @param username username to use to authenticate"] # [doc = " @param publickey The path to the public key of the credential."] # [doc = " @param privatekey The path to the private key of the credential."] # [doc = " @param passphrase The passphrase of the credential."] # [doc = " @return 0 for success or an error code for failure"] pub fn git_credential_ssh_key_new (out : * mut * mut git_credential , username : * const :: std :: os :: raw :: c_char , publickey : * const :: std :: os :: raw :: c_char , privatekey : * const :: std :: os :: raw :: c_char , passphrase : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a new ssh key credential object reading the keys from memory."] # [doc = ""] # [doc = " @param out The newly created credential object."] # [doc = " @param username username to use to authenticate."] # [doc = " @param publickey The public key of the credential."] # [doc = " @param privatekey The private key of the credential."] # [doc = " @param passphrase The passphrase of the credential."] # [doc = " @return 0 for success or an error code for failure"] pub fn git_credential_ssh_key_memory_new (out : * mut * mut git_credential , username : * const :: std :: os :: raw :: c_char , publickey : * const :: std :: os :: raw :: c_char , privatekey : * const :: std :: os :: raw :: c_char , passphrase : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _LIBSSH2_SESSION { _unused : [u8 ; 0] , } pub type LIBSSH2_SESSION = _LIBSSH2_SESSION ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _LIBSSH2_USERAUTH_KBDINT_PROMPT { _unused : [u8 ; 0] , } pub type LIBSSH2_USERAUTH_KBDINT_PROMPT = _LIBSSH2_USERAUTH_KBDINT_PROMPT ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _LIBSSH2_USERAUTH_KBDINT_RESPONSE { _unused : [u8 ; 0] , } pub type LIBSSH2_USERAUTH_KBDINT_RESPONSE = _LIBSSH2_USERAUTH_KBDINT_RESPONSE ; pub type git_credential_ssh_interactive_cb = :: std :: option :: Option < unsafe extern "C" fn (name : * const :: std :: os :: raw :: c_char , name_len : :: std :: os :: raw :: c_int , instruction : * const :: std :: os :: raw :: c_char , instruction_len : :: std :: os :: raw :: c_int , num_prompts : :: std :: os :: raw :: c_int , prompts : * const LIBSSH2_USERAUTH_KBDINT_PROMPT , responses : * mut LIBSSH2_USERAUTH_KBDINT_RESPONSE , abstract_ : * mut * mut :: std :: os :: raw :: c_void) > ; extern "C" { # [doc = " Create a new ssh keyboard-interactive based credential object."] # [doc = " The supplied credential parameter will be internally duplicated."] # [doc = ""] # [doc = " @param username Username to use to authenticate."] # [doc = " @param prompt_callback The callback method used for prompts."] # [doc = " @param payload Additional data to pass to the callback."] # [doc = " @return 0 for success or an error code for failure."] pub fn git_credential_ssh_interactive_new (out : * mut * mut git_credential , username : * const :: std :: os :: raw :: c_char , prompt_callback : git_credential_ssh_interactive_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a new ssh key credential object used for querying an ssh-agent."] # [doc = " The supplied credential parameter will be internally duplicated."] # [doc = ""] # [doc = " @param out The newly created credential object."] # [doc = " @param username username to use to authenticate"] # [doc = " @return 0 for success or an error code for failure"] pub fn git_credential_ssh_key_from_agent (out : * mut * mut git_credential , username : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } pub type git_credential_sign_cb = :: std :: option :: Option < unsafe extern "C" fn (session : * mut LIBSSH2_SESSION , sig : * mut * mut :: std :: os :: raw :: c_uchar , sig_len : * mut size_t , data : * const :: std :: os :: raw :: c_uchar , data_len : size_t , abstract_ : * mut * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; extern "C" { # [doc = " Create an ssh key credential with a custom signing function."] # [doc = ""] # [doc = " This lets you use your own function to sign the challenge."] # [doc = ""] # [doc = " This function and its credential type is provided for completeness"] # [doc = " and wraps `libssh2_userauth_publickey()`, which is undocumented."] # [doc = ""] # [doc = " The supplied credential parameter will be internally duplicated."] # [doc = ""] # [doc = " @param out The newly created credential object."] # [doc = " @param username username to use to authenticate"] # [doc = " @param publickey The bytes of the public key."] # [doc = " @param publickey_len The length of the public key in bytes."] # [doc = " @param sign_callback The callback method to sign the data during the challenge."] # [doc = " @param payload Additional data to pass to the callback."] # [doc = " @return 0 for success or an error code for failure"] pub fn git_credential_ssh_custom_new (out : * mut * mut git_credential , username : * const :: std :: os :: raw :: c_char , publickey : * const :: std :: os :: raw :: c_char , publickey_len : size_t , sign_callback : git_credential_sign_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } # [doc = " Callback for messages received by the transport."] # [doc = ""] # [doc = " Return a negative value to cancel the network operation."] # [doc = ""] # [doc = " @param str The message from the transport"] # [doc = " @param len The length of the message"] # [doc = " @param payload Payload provided by the caller"] pub type git_transport_message_cb = :: std :: option :: Option < unsafe extern "C" fn (str_ : * const :: std :: os :: raw :: c_char , len : :: std :: os :: raw :: c_int , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = " Signature of a function which creates a transport"] pub type git_transport_cb = :: std :: option :: Option < unsafe extern "C" fn (out : * mut * mut git_transport , owner : * mut git_remote , param : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; pub const git_packbuilder_stage_t_GIT_PACKBUILDER_ADDING_OBJECTS : git_packbuilder_stage_t = 0 ; pub const git_packbuilder_stage_t_GIT_PACKBUILDER_DELTAFICATION : git_packbuilder_stage_t = 1 ; # [doc = " Stages that are reported by the packbuilder progress callback."] pub type git_packbuilder_stage_t = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = " Initialize a new packbuilder"] # [doc = ""] # [doc = " @param out The new packbuilder object"] # [doc = " @param repo The repository"] # [doc = ""] # [doc = " @return 0 or an error code"] pub fn git_packbuilder_new (out : * mut * mut git_packbuilder , repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Set number of threads to spawn"] # [doc = ""] # [doc = " By default, libgit2 won't spawn any threads at all;"] # [doc = " when set to 0, libgit2 will autodetect the number of"] # [doc = " CPUs."] # [doc = ""] # [doc = " @param pb The packbuilder"] # [doc = " @param n Number of threads to spawn"] # [doc = " @return number of actual threads to be used"] pub fn git_packbuilder_set_threads (pb : * mut git_packbuilder , n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = " Insert a single object"] # [doc = ""] # [doc = " For an optimal pack it's mandatory to insert objects in recency order,"] # [doc = " commits followed by trees and blobs."] # [doc = ""] # [doc = " @param pb The packbuilder"] # [doc = " @param id The oid of the commit"] # [doc = " @param name The name; might be NULL"] # [doc = ""] # [doc = " @return 0 or an error code"] pub fn git_packbuilder_insert (pb : * mut git_packbuilder , id : * const git_oid , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Insert a root tree object"] # [doc = ""] # [doc = " This will add the tree as well as all referenced trees and blobs."] # [doc = ""] # [doc = " @param pb The packbuilder"] # [doc = " @param id The oid of the root tree"] # [doc = ""] # [doc = " @return 0 or an error code"] pub fn git_packbuilder_insert_tree (pb : * mut git_packbuilder , id : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Insert a commit object"] # [doc = ""] # [doc = " This will add a commit as well as the completed referenced tree."] # [doc = ""] # [doc = " @param pb The packbuilder"] # [doc = " @param id The oid of the commit"] # [doc = ""] # [doc = " @return 0 or an error code"] pub fn git_packbuilder_insert_commit (pb : * mut git_packbuilder , id : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Insert objects as given by the walk"] # [doc = ""] # [doc = " Those commits and all objects they reference will be inserted into"] # [doc = " the packbuilder."] # [doc = ""] # [doc = " @param pb the packbuilder"] # [doc = " @param walk the revwalk to use to fill the packbuilder"] # [doc = ""] # [doc = " @return 0 or an error code"] pub fn git_packbuilder_insert_walk (pb : * mut git_packbuilder , walk : * mut git_revwalk) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Recursively insert an object and its referenced objects"] # [doc = ""] # [doc = " Insert the object as well as any object it references."] # [doc = ""] # [doc = " @param pb the packbuilder"] # [doc = " @param id the id of the root object to insert"] # [doc = " @param name optional name for the object"] # [doc = " @return 0 or an error code"] pub fn git_packbuilder_insert_recur (pb : * mut git_packbuilder , id : * const git_oid , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Write the contents of the packfile to an in-memory buffer"] # [doc = ""] # [doc = " The contents of the buffer will become a valid packfile, even though there"] # [doc = " will be no attached index"] # [doc = ""] # [doc = " @param buf Buffer where to write the packfile"] # [doc = " @param pb The packbuilder"] pub fn git_packbuilder_write_buf (buf : * mut git_buf , pb : * mut git_packbuilder) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Write the new pack and corresponding index file to path."] # [doc = ""] # [doc = " @param pb The packbuilder"] # [doc = " @param path Path to the directory where the packfile and index should be stored, or NULL for default location"] # [doc = " @param mode permissions to use creating a packfile or 0 for defaults"] # [doc = " @param progress_cb function to call with progress information from the indexer (optional)"] # [doc = " @param progress_cb_payload payload for the progress callback (optional)"] # [doc = ""] # [doc = " @return 0 or an error code"] pub fn git_packbuilder_write (pb : * mut git_packbuilder , path : * const :: std :: os :: raw :: c_char , mode : :: std :: os :: raw :: c_uint , progress_cb : git_indexer_progress_cb , progress_cb_payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the packfile's hash"] # [doc = ""] # [doc = " A packfile's name is derived from the sorted hashing of all object"] # [doc = " names. This is only correct after the packfile has been written."] # [doc = ""] # [doc = " @param pb The packbuilder object"] pub fn git_packbuilder_hash (pb : * mut git_packbuilder) -> * const git_oid ; } # [doc = " Callback used to iterate over packed objects"] # [doc = ""] # [doc = " @see git_packbuilder_foreach"] # [doc = ""] # [doc = " @param buf A pointer to the object's data"] # [doc = " @param size The size of the underlying object"] # [doc = " @param payload Payload passed to git_packbuilder_foreach"] # [doc = " @return non-zero to terminate the iteration"] pub type git_packbuilder_foreach_cb = :: std :: option :: Option < unsafe extern "C" fn (buf : * mut :: std :: os :: raw :: c_void , size : size_t , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; extern "C" { # [doc = " Create the new pack and pass each object to the callback"] # [doc = ""] # [doc = " @param pb the packbuilder"] # [doc = " @param cb the callback to call with each packed object's buffer"] # [doc = " @param payload the callback's data"] # [doc = " @return 0 or an error code"] pub fn git_packbuilder_foreach (pb : * mut git_packbuilder , cb : git_packbuilder_foreach_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the total number of objects the packbuilder will write out"] # [doc = ""] # [doc = " @param pb the packbuilder"] # [doc = " @return the number of objects in the packfile"] pub fn git_packbuilder_object_count (pb : * mut git_packbuilder) -> size_t ; } extern "C" { # [doc = " Get the number of objects the packbuilder has already written out"] # [doc = ""] # [doc = " @param pb the packbuilder"] # [doc = " @return the number of objects which have already been written"] pub fn git_packbuilder_written (pb : * mut git_packbuilder) -> size_t ; } # [doc = " Packbuilder progress notification function"] pub type git_packbuilder_progress = :: std :: option :: Option < unsafe extern "C" fn (stage : :: std :: os :: raw :: c_int , current : u32 , total : u32 , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; extern "C" { # [doc = " Set the callbacks for a packbuilder"] # [doc = ""] # [doc = " @param pb The packbuilder object"] # [doc = " @param progress_cb Function to call with progress information during"] # [doc = " pack building. Be aware that this is called inline with pack building"] # [doc = " operations, so performance may be affected."] # [doc = " @param progress_cb_payload Payload for progress callback."] # [doc = " @return 0 or an error code"] pub fn git_packbuilder_set_callbacks (pb : * mut git_packbuilder , progress_cb : git_packbuilder_progress , progress_cb_payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free the packbuilder and all associated data"] # [doc = ""] # [doc = " @param pb The packbuilder"] pub fn git_packbuilder_free (pb : * mut git_packbuilder) ; } # [doc = " Do not attempt to connect through a proxy"] # [doc = ""] # [doc = " If built against libcurl, it itself may attempt to connect"] # [doc = " to a proxy if the environment variables specify it."] pub const git_proxy_t_GIT_PROXY_NONE : git_proxy_t = 0 ; # [doc = " Try to auto-detect the proxy from the git configuration."] pub const git_proxy_t_GIT_PROXY_AUTO : git_proxy_t = 1 ; # [doc = " Connect via the URL given in the options"] pub const git_proxy_t_GIT_PROXY_SPECIFIED : git_proxy_t = 2 ; # [doc = " The type of proxy to use."] pub type git_proxy_t = :: std :: os :: raw :: c_uint ; # [doc = " Options for connecting through a proxy"] # [doc = ""] # [doc = " Note that not all types may be supported, depending on the platform"] # [doc = " and compilation options."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_proxy_options { pub version : :: std :: os :: raw :: c_uint , # [doc = " The type of proxy to use, by URL, auto-detect."] pub type_ : git_proxy_t , # [doc = " The URL of the proxy."] pub url : * const :: std :: os :: raw :: c_char , # [doc = " This will be called if the remote host requires"] # [doc = " authentication in order to connect to it."] # [doc = ""] # [doc = " Returning GIT_PASSTHROUGH will make libgit2 behave as"] # [doc = " though this field isn't set."] pub credentials : git_credential_acquire_cb , # [doc = " If cert verification fails, this will be called to let the"] # [doc = " user make the final decision of whether to allow the"] # [doc = " connection to proceed. Returns 0 to allow the connection"] # [doc = " or a negative value to indicate an error."] pub certificate_check : git_transport_certificate_check_cb , # [doc = " Payload to be provided to the credentials and certificate"] # [doc = " check callbacks."] pub payload : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_git_proxy_options () { assert_eq ! (:: std :: mem :: size_of :: < git_proxy_options > () , 40usize , concat ! ("Size of: " , stringify ! (git_proxy_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_proxy_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_proxy_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_proxy_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_proxy_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_proxy_options > ())) . type_ as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_proxy_options) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_proxy_options > ())) . url as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_proxy_options) , "::" , stringify ! (url))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_proxy_options > ())) . credentials as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_proxy_options) , "::" , stringify ! (credentials))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_proxy_options > ())) . certificate_check as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_proxy_options) , "::" , stringify ! (certificate_check))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_proxy_options > ())) . payload as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (git_proxy_options) , "::" , stringify ! (payload))) ; } extern "C" { # [doc = " Initialize git_proxy_options structure"] # [doc = ""] # [doc = " Initializes a `git_proxy_options` with default values. Equivalent to"] # [doc = " creating an instance with `GIT_PROXY_OPTIONS_INIT`."] # [doc = ""] # [doc = " @param opts The `git_proxy_options` struct to initialize."] # [doc = " @param version The struct version; pass `GIT_PROXY_OPTIONS_VERSION`."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_proxy_options_init (opts : * mut git_proxy_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Add a remote with the default fetch refspec to the repository's configuration."] # [doc = ""] # [doc = " @param out the resulting remote"] # [doc = " @param repo the repository in which to create the remote"] # [doc = " @param name the remote's name"] # [doc = " @param url the remote's url"] # [doc = " @return 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code"] pub fn git_remote_create (out : * mut * mut git_remote , repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char , url : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } # [doc = " Ignore the repository apply.insteadOf configuration"] pub const git_remote_create_flags_GIT_REMOTE_CREATE_SKIP_INSTEADOF : git_remote_create_flags = 1 ; # [doc = " Don't build a fetchspec from the name if none is set"] pub const git_remote_create_flags_GIT_REMOTE_CREATE_SKIP_DEFAULT_FETCHSPEC : git_remote_create_flags = 2 ; # [doc = " Remote creation options flags"] pub type git_remote_create_flags = :: std :: os :: raw :: c_uint ; # [doc = " Remote creation options structure"] # [doc = ""] # [doc = " Initialize with `GIT_REMOTE_CREATE_OPTIONS_INIT`. Alternatively, you can"] # [doc = " use `git_remote_create_options_init`."] # [doc = ""] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_remote_create_options { pub version : :: std :: os :: raw :: c_uint , # [doc = " The repository that should own the remote."] # [doc = " Setting this to NULL results in a detached remote."] pub repository : * mut git_repository , # [doc = " The remote's name."] # [doc = " Setting this to NULL results in an in-memory/anonymous remote."] pub name : * const :: std :: os :: raw :: c_char , # [doc = " The fetchspec the remote should use."] pub fetchspec : * const :: std :: os :: raw :: c_char , # [doc = " Additional flags for the remote. See git_remote_create_flags."] pub flags : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_git_remote_create_options () { assert_eq ! (:: std :: mem :: size_of :: < git_remote_create_options > () , 40usize , concat ! ("Size of: " , stringify ! (git_remote_create_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_remote_create_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_remote_create_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_remote_create_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_remote_create_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_remote_create_options > ())) . repository as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_remote_create_options) , "::" , stringify ! (repository))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_remote_create_options > ())) . name as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_remote_create_options) , "::" , stringify ! (name))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_remote_create_options > ())) . fetchspec as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_remote_create_options) , "::" , stringify ! (fetchspec))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_remote_create_options > ())) . flags as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (git_remote_create_options) , "::" , stringify ! (flags))) ; } extern "C" { # [doc = " Initialize git_remote_create_options structure"] # [doc = ""] # [doc = " Initializes a `git_remote_create_options` with default values. Equivalent to"] # [doc = " creating an instance with `GIT_REMOTE_CREATE_OPTIONS_INIT`."] # [doc = ""] # [doc = " @param opts The `git_remote_create_options` struct to initialize."] # [doc = " @param version The struct version; pass `GIT_REMOTE_CREATE_OPTIONS_VERSION`."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_remote_create_options_init (opts : * mut git_remote_create_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a remote, with options."] # [doc = ""] # [doc = " This function allows more fine-grained control over the remote creation."] # [doc = ""] # [doc = " Passing NULL as the opts argument will result in a detached remote."] # [doc = ""] # [doc = " @param out the resulting remote"] # [doc = " @param url the remote's url"] # [doc = " @param opts the remote creation options"] # [doc = " @return 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code"] pub fn git_remote_create_with_opts (out : * mut * mut git_remote , url : * const :: std :: os :: raw :: c_char , opts : * const git_remote_create_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Add a remote with the provided fetch refspec (or default if NULL) to the repository's"] # [doc = " configuration."] # [doc = ""] # [doc = " @param out the resulting remote"] # [doc = " @param repo the repository in which to create the remote"] # [doc = " @param name the remote's name"] # [doc = " @param url the remote's url"] # [doc = " @param fetch the remote fetch value"] # [doc = " @return 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code"] pub fn git_remote_create_with_fetchspec (out : * mut * mut git_remote , repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char , url : * const :: std :: os :: raw :: c_char , fetch : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create an anonymous remote"] # [doc = ""] # [doc = " Create a remote with the given url in-memory. You can use this when"] # [doc = " you have a URL instead of a remote's name."] # [doc = ""] # [doc = " @param out pointer to the new remote objects"] # [doc = " @param repo the associated repository"] # [doc = " @param url the remote repository's URL"] # [doc = " @return 0 or an error code"] pub fn git_remote_create_anonymous (out : * mut * mut git_remote , repo : * mut git_repository , url : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a remote without a connected local repo"] # [doc = ""] # [doc = " Create a remote with the given url in-memory. You can use this when"] # [doc = " you have a URL instead of a remote's name."] # [doc = ""] # [doc = " Contrasted with git_remote_create_anonymous, a detached remote"] # [doc = " will not consider any repo configuration values (such as insteadof url"] # [doc = " substitutions)."] # [doc = ""] # [doc = " @param out pointer to the new remote objects"] # [doc = " @param url the remote repository's URL"] # [doc = " @return 0 or an error code"] pub fn git_remote_create_detached (out : * mut * mut git_remote , url : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the information for a particular remote"] # [doc = ""] # [doc = " The name will be checked for validity."] # [doc = " See `git_tag_create()` for rules about valid names."] # [doc = ""] # [doc = " @param out pointer to the new remote object"] # [doc = " @param repo the associated repository"] # [doc = " @param name the remote's name"] # [doc = " @return 0, GIT_ENOTFOUND, GIT_EINVALIDSPEC or an error code"] pub fn git_remote_lookup (out : * mut * mut git_remote , repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a copy of an existing remote.  All internal strings are also"] # [doc = " duplicated. Callbacks are not duplicated."] # [doc = ""] # [doc = " Call `git_remote_free` to free the data."] # [doc = ""] # [doc = " @param dest pointer where to store the copy"] # [doc = " @param source object to copy"] # [doc = " @return 0 or an error code"] pub fn git_remote_dup (dest : * mut * mut git_remote , source : * mut git_remote) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the remote's repository"] # [doc = ""] # [doc = " @param remote the remote"] # [doc = " @return a pointer to the repository"] pub fn git_remote_owner (remote : * const git_remote) -> * mut git_repository ; } extern "C" { # [doc = " Get the remote's name"] # [doc = ""] # [doc = " @param remote the remote"] # [doc = " @return a pointer to the name or NULL for in-memory remotes"] pub fn git_remote_name (remote : * const git_remote) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Get the remote's url"] # [doc = ""] # [doc = " If url.*.insteadOf has been configured for this URL, it will"] # [doc = " return the modified URL.  If `git_remote_set_instance_pushurl`"] # [doc = " has been called for this remote, then that URL will be returned."] # [doc = ""] # [doc = " @param remote the remote"] # [doc = " @return a pointer to the url"] pub fn git_remote_url (remote : * const git_remote) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Get the remote's url for pushing."] # [doc = ""] # [doc = " If url.*.pushInsteadOf has been configured for this URL, it"] # [doc = " will return the modified URL.  If `git_remote_set_instance_pushurl`"] # [doc = " has been called for this remote, then that URL will be returned."] # [doc = ""] # [doc = " @param remote the remote"] # [doc = " @return a pointer to the url or NULL if no special url for pushing is set"] pub fn git_remote_pushurl (remote : * const git_remote) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Set the remote's url in the configuration"] # [doc = ""] # [doc = " Remote objects already in memory will not be affected. This assumes"] # [doc = " the common case of a single-url remote and will otherwise return an error."] # [doc = ""] # [doc = " @param repo the repository in which to perform the change"] # [doc = " @param remote the remote's name"] # [doc = " @param url the url to set"] # [doc = " @return 0 or an error value"] pub fn git_remote_set_url (repo : * mut git_repository , remote : * const :: std :: os :: raw :: c_char , url : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Set the remote's url for pushing in the configuration."] # [doc = ""] # [doc = " Remote objects already in memory will not be affected. This assumes"] # [doc = " the common case of a single-url remote and will otherwise return an error."] # [doc = ""] # [doc = ""] # [doc = " @param repo the repository in which to perform the change"] # [doc = " @param remote the remote's name"] # [doc = " @param url the url to set"] # [doc = " @return 0, or an error code"] pub fn git_remote_set_pushurl (repo : * mut git_repository , remote : * const :: std :: os :: raw :: c_char , url : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Set the url for this particular url instance.  The URL in the"] # [doc = " configuration will be ignored, and will not be changed."] # [doc = ""] # [doc = " @param remote the remote's name"] # [doc = " @param url the url to set"] # [doc = " @return 0 or an error value"] pub fn git_remote_set_instance_url (remote : * mut git_remote , url : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Set the push url for this particular url instance.  The URL in the"] # [doc = " configuration will be ignored, and will not be changed."] # [doc = ""] # [doc = " @param remote the remote's name"] # [doc = " @param url the url to set"] # [doc = " @return 0 or an error value"] pub fn git_remote_set_instance_pushurl (remote : * mut git_remote , url : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Add a fetch refspec to the remote's configuration"] # [doc = ""] # [doc = " Add the given refspec to the fetch list in the configuration. No"] # [doc = " loaded remote instances will be affected."] # [doc = ""] # [doc = " @param repo the repository in which to change the configuration"] # [doc = " @param remote the name of the remote to change"] # [doc = " @param refspec the new fetch refspec"] # [doc = " @return 0, GIT_EINVALIDSPEC if refspec is invalid or an error value"] pub fn git_remote_add_fetch (repo : * mut git_repository , remote : * const :: std :: os :: raw :: c_char , refspec : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the remote's list of fetch refspecs"] # [doc = ""] # [doc = " The memory is owned by the user and should be freed with"] # [doc = " `git_strarray_free`."] # [doc = ""] # [doc = " @param array pointer to the array in which to store the strings"] # [doc = " @param remote the remote to query"] pub fn git_remote_get_fetch_refspecs (array : * mut git_strarray , remote : * const git_remote) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Add a push refspec to the remote's configuration"] # [doc = ""] # [doc = " Add the given refspec to the push list in the configuration. No"] # [doc = " loaded remote instances will be affected."] # [doc = ""] # [doc = " @param repo the repository in which to change the configuration"] # [doc = " @param remote the name of the remote to change"] # [doc = " @param refspec the new push refspec"] # [doc = " @return 0, GIT_EINVALIDSPEC if refspec is invalid or an error value"] pub fn git_remote_add_push (repo : * mut git_repository , remote : * const :: std :: os :: raw :: c_char , refspec : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the remote's list of push refspecs"] # [doc = ""] # [doc = " The memory is owned by the user and should be freed with"] # [doc = " `git_strarray_free`."] # [doc = ""] # [doc = " @param array pointer to the array in which to store the strings"] # [doc = " @param remote the remote to query"] pub fn git_remote_get_push_refspecs (array : * mut git_strarray , remote : * const git_remote) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the number of refspecs for a remote"] # [doc = ""] # [doc = " @param remote the remote"] # [doc = " @return the amount of refspecs configured in this remote"] pub fn git_remote_refspec_count (remote : * const git_remote) -> size_t ; } extern "C" { # [doc = " Get a refspec from the remote"] # [doc = ""] # [doc = " @param remote the remote to query"] # [doc = " @param n the refspec to get"] # [doc = " @return the nth refspec"] pub fn git_remote_get_refspec (remote : * const git_remote , n : size_t) -> * const git_refspec ; } extern "C" { # [doc = " Open a connection to a remote"] # [doc = ""] # [doc = " The transport is selected based on the URL. The direction argument"] # [doc = " is due to a limitation of the git protocol (over TCP or SSH) which"] # [doc = " starts up a specific binary which can only do the one or the other."] # [doc = ""] # [doc = " @param remote the remote to connect to"] # [doc = " @param direction GIT_DIRECTION_FETCH if you want to fetch or"] # [doc = " GIT_DIRECTION_PUSH if you want to push"] # [doc = " @param callbacks the callbacks to use for this connection"] # [doc = " @param proxy_opts proxy settings"] # [doc = " @param custom_headers extra HTTP headers to use in this connection"] # [doc = " @return 0 or an error code"] pub fn git_remote_connect (remote : * mut git_remote , direction : git_direction , callbacks : * const git_remote_callbacks , proxy_opts : * const git_proxy_options , custom_headers : * const git_strarray) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the remote repository's reference advertisement list"] # [doc = ""] # [doc = " Get the list of references with which the server responds to a new"] # [doc = " connection."] # [doc = ""] # [doc = " The remote (or more exactly its transport) must have connected to"] # [doc = " the remote repository. This list is available as soon as the"] # [doc = " connection to the remote is initiated and it remains available"] # [doc = " after disconnecting."] # [doc = ""] # [doc = " The memory belongs to the remote. The pointer will be valid as long"] # [doc = " as a new connection is not initiated, but it is recommended that"] # [doc = " you make a copy in order to make use of the data."] # [doc = ""] # [doc = " @param out pointer to the array"] # [doc = " @param size the number of remote heads"] # [doc = " @param remote the remote"] # [doc = " @return 0 on success, or an error code"] pub fn git_remote_ls (out : * mut * mut * const git_remote_head , size : * mut size_t , remote : * mut git_remote) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Check whether the remote is connected"] # [doc = ""] # [doc = " Check whether the remote's underlying transport is connected to the"] # [doc = " remote host."] # [doc = ""] # [doc = " @param remote the remote"] # [doc = " @return 1 if it's connected, 0 otherwise."] pub fn git_remote_connected (remote : * const git_remote) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Cancel the operation"] # [doc = ""] # [doc = " At certain points in its operation, the network code checks whether"] # [doc = " the operation has been cancelled and if so stops the operation."] # [doc = ""] # [doc = " @param remote the remote"] # [doc = " @return 0 on success, or an error code"] pub fn git_remote_stop (remote : * mut git_remote) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Disconnect from the remote"] # [doc = ""] # [doc = " Close the connection to the remote."] # [doc = ""] # [doc = " @param remote the remote to disconnect from"] # [doc = " @return 0 on success, or an error code"] pub fn git_remote_disconnect (remote : * mut git_remote) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free the memory associated with a remote"] # [doc = ""] # [doc = " This also disconnects from the remote, if the connection"] # [doc = " has not been closed yet (using git_remote_disconnect)."] # [doc = ""] # [doc = " @param remote the remote to free"] pub fn git_remote_free (remote : * mut git_remote) ; } extern "C" { # [doc = " Get a list of the configured remotes for a repo"] # [doc = ""] # [doc = " The string array must be freed by the user."] # [doc = ""] # [doc = " @param out a string array which receives the names of the remotes"] # [doc = " @param repo the repository to query"] # [doc = " @return 0 or an error code"] pub fn git_remote_list (out : * mut git_strarray , repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } pub const git_remote_completion_t_GIT_REMOTE_COMPLETION_DOWNLOAD : git_remote_completion_t = 0 ; pub const git_remote_completion_t_GIT_REMOTE_COMPLETION_INDEXING : git_remote_completion_t = 1 ; pub const git_remote_completion_t_GIT_REMOTE_COMPLETION_ERROR : git_remote_completion_t = 2 ; # [doc = " Argument to the completion callback which tells it which operation"] # [doc = " finished."] pub type git_remote_completion_t = :: std :: os :: raw :: c_uint ; # [doc = " Push network progress notification function"] pub type git_push_transfer_progress_cb = :: std :: option :: Option < unsafe extern "C" fn (current : :: std :: os :: raw :: c_uint , total : :: std :: os :: raw :: c_uint , bytes : size_t , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = " Represents an update which will be performed on the remote during push"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_push_update { # [doc = " The source name of the reference"] pub src_refname : * mut :: std :: os :: raw :: c_char , # [doc = " The name of the reference to update on the server"] pub dst_refname : * mut :: std :: os :: raw :: c_char , # [doc = " The current target of the reference"] pub src : git_oid , # [doc = " The new target for the reference"] pub dst : git_oid , } # [test] fn bindgen_test_layout_git_push_update () { assert_eq ! (:: std :: mem :: size_of :: < git_push_update > () , 56usize , concat ! ("Size of: " , stringify ! (git_push_update))) ; assert_eq ! (:: std :: mem :: align_of :: < git_push_update > () , 8usize , concat ! ("Alignment of " , stringify ! (git_push_update))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_push_update > ())) . src_refname as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_push_update) , "::" , stringify ! (src_refname))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_push_update > ())) . dst_refname as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_push_update) , "::" , stringify ! (dst_refname))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_push_update > ())) . src as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_push_update) , "::" , stringify ! (src))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_push_update > ())) . dst as * const _ as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (git_push_update) , "::" , stringify ! (dst))) ; } # [doc = " Callback used to inform of upcoming updates."] # [doc = ""] # [doc = " @param updates an array containing the updates which will be sent"] # [doc = " as commands to the destination."] # [doc = " @param len number of elements in `updates`"] # [doc = " @param payload Payload provided by the caller"] pub type git_push_negotiation = :: std :: option :: Option < unsafe extern "C" fn (updates : * mut * const git_push_update , len : size_t , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = " Callback used to inform of the update status from the remote."] # [doc = ""] # [doc = " Called for each updated reference on push. If `status` is"] # [doc = " not `NULL`, the update was rejected by the remote server"] # [doc = " and `status` contains the reason given."] # [doc = ""] # [doc = " @param refname refname specifying to the remote ref"] # [doc = " @param status status message sent from the remote"] # [doc = " @param data data provided by the caller"] # [doc = " @return 0 on success, otherwise an error"] pub type git_push_update_reference_cb = :: std :: option :: Option < unsafe extern "C" fn (refname : * const :: std :: os :: raw :: c_char , status : * const :: std :: os :: raw :: c_char , data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = " Callback to resolve URLs before connecting to remote"] # [doc = ""] # [doc = " If you return GIT_PASSTHROUGH, you don't need to write anything to"] # [doc = " url_resolved."] # [doc = ""] # [doc = " @param url_resolved The buffer to write the resolved URL to"] # [doc = " @param url The URL to resolve"] # [doc = " @param direction GIT_DIRECTION_FETCH or GIT_DIRECTION_PUSH"] # [doc = " @param payload Payload provided by the caller"] # [doc = " @return 0 on success, GIT_PASSTHROUGH or an error"] # [doc = " @deprecated Use `git_remote_set_instance_url`"] pub type git_url_resolve_cb = :: std :: option :: Option < unsafe extern "C" fn (url_resolved : * mut git_buf , url : * const :: std :: os :: raw :: c_char , direction : :: std :: os :: raw :: c_int , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = " Callback invoked immediately before we attempt to connect to the"] # [doc = " given url.  Callers may change the URL before the connection by"] # [doc = " calling `git_remote_set_instance_url` in the callback."] # [doc = ""] # [doc = " @param remote The remote to be connected"] # [doc = " @param direction GIT_DIRECTION_FETCH or GIT_DIRECTION_PUSH"] # [doc = " @param payload Payload provided by the caller"] # [doc = " @return 0 on success, or an error"] pub type git_remote_ready_cb = :: std :: option :: Option < unsafe extern "C" fn (remote : * mut git_remote , direction : :: std :: os :: raw :: c_int , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = " The callback settings structure"] # [doc = ""] # [doc = " Set the callbacks to be called by the remote when informing the user"] # [doc = " about the progress of the network operations."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_remote_callbacks { # [doc = "< The version"] pub version : :: std :: os :: raw :: c_uint , # [doc = " Textual progress from the remote. Text send over the"] # [doc = " progress side-band will be passed to this function (this is"] # [doc = " the 'counting objects' output)."] pub sideband_progress : git_transport_message_cb , pub completion : :: std :: option :: Option < unsafe extern "C" fn (type_ : git_remote_completion_t , data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = " This will be called if the remote host requires"] # [doc = " authentication in order to connect to it."] # [doc = ""] # [doc = " Returning GIT_PASSTHROUGH will make libgit2 behave as"] # [doc = " though this field isn't set."] pub credentials : git_credential_acquire_cb , # [doc = " If cert verification fails, this will be called to let the"] # [doc = " user make the final decision of whether to allow the"] # [doc = " connection to proceed. Returns 0 to allow the connection"] # [doc = " or a negative value to indicate an error."] pub certificate_check : git_transport_certificate_check_cb , # [doc = " During the download of new data, this will be regularly"] # [doc = " called with the current count of progress done by the"] # [doc = " indexer."] pub transfer_progress : git_indexer_progress_cb , pub update_tips : :: std :: option :: Option < unsafe extern "C" fn (refname : * const :: std :: os :: raw :: c_char , a : * const git_oid , b : * const git_oid , data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = " Function to call with progress information during pack"] # [doc = " building. Be aware that this is called inline with pack"] # [doc = " building operations, so performance may be affected."] pub pack_progress : git_packbuilder_progress , # [doc = " Function to call with progress information during the"] # [doc = " upload portion of a push. Be aware that this is called"] # [doc = " inline with pack building operations, so performance may be"] # [doc = " affected."] pub push_transfer_progress : git_push_transfer_progress_cb , # [doc = " See documentation of git_push_update_reference_cb"] pub push_update_reference : git_push_update_reference_cb , # [doc = " Called once between the negotiation step and the upload. It"] # [doc = " provides information about what updates will be performed."] pub push_negotiation : git_push_negotiation , # [doc = " Create the transport to use for this operation. Leave NULL"] # [doc = " to auto-detect."] pub transport : git_transport_cb , # [doc = " Callback when the remote is ready to connect."] pub remote_ready : git_remote_ready_cb , # [doc = " This will be passed to each of the callbacks in this struct"] # [doc = " as the last parameter."] pub payload : * mut :: std :: os :: raw :: c_void , # [doc = " Resolve URL before connecting to remote."] # [doc = " The returned URL will be used to connect to the remote instead."] # [doc = ""] # [doc = " This callback is deprecated; users should use"] # [doc = " git_remote_ready_cb and configure the instance URL instead."] pub resolve_url : git_url_resolve_cb , } # [test] fn bindgen_test_layout_git_remote_callbacks () { assert_eq ! (:: std :: mem :: size_of :: < git_remote_callbacks > () , 120usize , concat ! ("Size of: " , stringify ! (git_remote_callbacks))) ; assert_eq ! (:: std :: mem :: align_of :: < git_remote_callbacks > () , 8usize , concat ! ("Alignment of " , stringify ! (git_remote_callbacks))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_remote_callbacks > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_remote_callbacks) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_remote_callbacks > ())) . sideband_progress as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_remote_callbacks) , "::" , stringify ! (sideband_progress))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_remote_callbacks > ())) . completion as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_remote_callbacks) , "::" , stringify ! (completion))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_remote_callbacks > ())) . credentials as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_remote_callbacks) , "::" , stringify ! (credentials))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_remote_callbacks > ())) . certificate_check as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (git_remote_callbacks) , "::" , stringify ! (certificate_check))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_remote_callbacks > ())) . transfer_progress as * const _ as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (git_remote_callbacks) , "::" , stringify ! (transfer_progress))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_remote_callbacks > ())) . update_tips as * const _ as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (git_remote_callbacks) , "::" , stringify ! (update_tips))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_remote_callbacks > ())) . pack_progress as * const _ as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (git_remote_callbacks) , "::" , stringify ! (pack_progress))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_remote_callbacks > ())) . push_transfer_progress as * const _ as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (git_remote_callbacks) , "::" , stringify ! (push_transfer_progress))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_remote_callbacks > ())) . push_update_reference as * const _ as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (git_remote_callbacks) , "::" , stringify ! (push_update_reference))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_remote_callbacks > ())) . push_negotiation as * const _ as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (git_remote_callbacks) , "::" , stringify ! (push_negotiation))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_remote_callbacks > ())) . transport as * const _ as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (git_remote_callbacks) , "::" , stringify ! (transport))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_remote_callbacks > ())) . remote_ready as * const _ as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (git_remote_callbacks) , "::" , stringify ! (remote_ready))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_remote_callbacks > ())) . payload as * const _ as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (git_remote_callbacks) , "::" , stringify ! (payload))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_remote_callbacks > ())) . resolve_url as * const _ as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (git_remote_callbacks) , "::" , stringify ! (resolve_url))) ; } extern "C" { # [doc = " Initializes a `git_remote_callbacks` with default values. Equivalent to"] # [doc = " creating an instance with GIT_REMOTE_CALLBACKS_INIT."] # [doc = ""] # [doc = " @param opts the `git_remote_callbacks` struct to initialize"] # [doc = " @param version Version of struct; pass `GIT_REMOTE_CALLBACKS_VERSION`"] # [doc = " @return Zero on success; -1 on failure."] pub fn git_remote_init_callbacks (opts : * mut git_remote_callbacks , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } # [doc = " Use the setting from the configuration"] pub const git_fetch_prune_t_GIT_FETCH_PRUNE_UNSPECIFIED : git_fetch_prune_t = 0 ; # [doc = " Force pruning on"] pub const git_fetch_prune_t_GIT_FETCH_PRUNE : git_fetch_prune_t = 1 ; # [doc = " Force pruning off"] pub const git_fetch_prune_t_GIT_FETCH_NO_PRUNE : git_fetch_prune_t = 2 ; # [doc = " Acceptable prune settings when fetching"] pub type git_fetch_prune_t = :: std :: os :: raw :: c_uint ; # [doc = " Use the setting from the configuration."] pub const git_remote_autotag_option_t_GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED : git_remote_autotag_option_t = 0 ; # [doc = " Ask the server for tags pointing to objects we're already"] # [doc = " downloading."] pub const git_remote_autotag_option_t_GIT_REMOTE_DOWNLOAD_TAGS_AUTO : git_remote_autotag_option_t = 1 ; # [doc = " Don't ask for any tags beyond the refspecs."] pub const git_remote_autotag_option_t_GIT_REMOTE_DOWNLOAD_TAGS_NONE : git_remote_autotag_option_t = 2 ; # [doc = " Ask for the all the tags."] pub const git_remote_autotag_option_t_GIT_REMOTE_DOWNLOAD_TAGS_ALL : git_remote_autotag_option_t = 3 ; # [doc = " Automatic tag following option"] # [doc = ""] # [doc = " Lets us select the --tags option to use."] pub type git_remote_autotag_option_t = :: std :: os :: raw :: c_uint ; # [doc = " Fetch options structure."] # [doc = ""] # [doc = " Zero out for defaults.  Initialize with `GIT_FETCH_OPTIONS_INIT` macro to"] # [doc = " correctly set the `version` field.  E.g."] # [doc = ""] # [doc = "\t\tgit_fetch_options opts = GIT_FETCH_OPTIONS_INIT;"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_fetch_options { pub version : :: std :: os :: raw :: c_int , # [doc = " Callbacks to use for this fetch operation"] pub callbacks : git_remote_callbacks , # [doc = " Whether to perform a prune after the fetch"] pub prune : git_fetch_prune_t , # [doc = " Whether to write the results to FETCH_HEAD. Defaults to"] # [doc = " on. Leave this default in order to behave like git."] pub update_fetchhead : :: std :: os :: raw :: c_int , # [doc = " Determines how to behave regarding tags on the remote, such"] # [doc = " as auto-downloading tags for objects we're downloading or"] # [doc = " downloading all of them."] # [doc = ""] # [doc = " The default is to auto-follow tags."] pub download_tags : git_remote_autotag_option_t , # [doc = " Proxy options to use, by default no proxy is used."] pub proxy_opts : git_proxy_options , # [doc = " Extra headers for this fetch operation"] pub custom_headers : git_strarray , } # [test] fn bindgen_test_layout_git_fetch_options () { assert_eq ! (:: std :: mem :: size_of :: < git_fetch_options > () , 200usize , concat ! ("Size of: " , stringify ! (git_fetch_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_fetch_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_fetch_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_fetch_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_fetch_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_fetch_options > ())) . callbacks as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_fetch_options) , "::" , stringify ! (callbacks))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_fetch_options > ())) . prune as * const _ as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (git_fetch_options) , "::" , stringify ! (prune))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_fetch_options > ())) . update_fetchhead as * const _ as usize } , 132usize , concat ! ("Offset of field: " , stringify ! (git_fetch_options) , "::" , stringify ! (update_fetchhead))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_fetch_options > ())) . download_tags as * const _ as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (git_fetch_options) , "::" , stringify ! (download_tags))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_fetch_options > ())) . proxy_opts as * const _ as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (git_fetch_options) , "::" , stringify ! (proxy_opts))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_fetch_options > ())) . custom_headers as * const _ as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (git_fetch_options) , "::" , stringify ! (custom_headers))) ; } extern "C" { # [doc = " Initialize git_fetch_options structure"] # [doc = ""] # [doc = " Initializes a `git_fetch_options` with default values. Equivalent to"] # [doc = " creating an instance with `GIT_FETCH_OPTIONS_INIT`."] # [doc = ""] # [doc = " @param opts The `git_fetch_options` struct to initialize."] # [doc = " @param version The struct version; pass `GIT_FETCH_OPTIONS_VERSION`."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_fetch_options_init (opts : * mut git_fetch_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } # [doc = " Controls the behavior of a git_push object."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_push_options { pub version : :: std :: os :: raw :: c_uint , # [doc = " If the transport being used to push to the remote requires the creation"] # [doc = " of a pack file, this controls the number of worker threads used by"] # [doc = " the packbuilder when creating that pack file to be sent to the remote."] # [doc = ""] # [doc = " If set to 0, the packbuilder will auto-detect the number of threads"] # [doc = " to create. The default value is 1."] pub pb_parallelism : :: std :: os :: raw :: c_uint , # [doc = " Callbacks to use for this push operation"] pub callbacks : git_remote_callbacks , # [doc = " Proxy options to use, by default no proxy is used."] pub proxy_opts : git_proxy_options , # [doc = " Extra headers for this push operation"] pub custom_headers : git_strarray , } # [test] fn bindgen_test_layout_git_push_options () { assert_eq ! (:: std :: mem :: size_of :: < git_push_options > () , 184usize , concat ! ("Size of: " , stringify ! (git_push_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_push_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_push_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_push_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_push_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_push_options > ())) . pb_parallelism as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_push_options) , "::" , stringify ! (pb_parallelism))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_push_options > ())) . callbacks as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_push_options) , "::" , stringify ! (callbacks))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_push_options > ())) . proxy_opts as * const _ as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (git_push_options) , "::" , stringify ! (proxy_opts))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_push_options > ())) . custom_headers as * const _ as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (git_push_options) , "::" , stringify ! (custom_headers))) ; } extern "C" { # [doc = " Initialize git_push_options structure"] # [doc = ""] # [doc = " Initializes a `git_push_options` with default values. Equivalent to"] # [doc = " creating an instance with `GIT_PUSH_OPTIONS_INIT`."] # [doc = ""] # [doc = " @param opts The `git_push_options` struct to initialize."] # [doc = " @param version The struct version; pass `GIT_PUSH_OPTIONS_VERSION`."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_push_options_init (opts : * mut git_push_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Download and index the packfile"] # [doc = ""] # [doc = " Connect to the remote if it hasn't been done yet, negotiate with"] # [doc = " the remote git which objects are missing, download and index the"] # [doc = " packfile."] # [doc = ""] # [doc = " The .idx file will be created and both it and the packfile with be"] # [doc = " renamed to their final name."] # [doc = ""] # [doc = " @param remote the remote"] # [doc = " @param refspecs the refspecs to use for this negotiation and"] # [doc = " download. Use NULL or an empty array to use the base refspecs"] # [doc = " @param opts the options to use for this fetch"] # [doc = " @return 0 or an error code"] pub fn git_remote_download (remote : * mut git_remote , refspecs : * const git_strarray , opts : * const git_fetch_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a packfile and send it to the server"] # [doc = ""] # [doc = " Connect to the remote if it hasn't been done yet, negotiate with"] # [doc = " the remote git which objects are missing, create a packfile with the missing objects and send it."] # [doc = ""] # [doc = " @param remote the remote"] # [doc = " @param refspecs the refspecs to use for this negotiation and"] # [doc = " upload. Use NULL or an empty array to use the base refspecs"] # [doc = " @param opts the options to use for this push"] # [doc = " @return 0 or an error code"] pub fn git_remote_upload (remote : * mut git_remote , refspecs : * const git_strarray , opts : * const git_push_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Update the tips to the new state"] # [doc = ""] # [doc = " @param remote the remote to update"] # [doc = " @param reflog_message The message to insert into the reflogs. If"] # [doc = " NULL and fetching, the default is \"fetch <name>\", where <name> is"] # [doc = " the name of the remote (or its url, for in-memory remotes). This"] # [doc = " parameter is ignored when pushing."] # [doc = " @param callbacks  pointer to the callback structure to use"] # [doc = " @param update_fetchhead whether to write to FETCH_HEAD. Pass 1 to behave like git."] # [doc = " @param download_tags what the behaviour for downloading tags is for this fetch. This is"] # [doc = " ignored for push. This must be the same value passed to `git_remote_download()`."] # [doc = " @return 0 or an error code"] pub fn git_remote_update_tips (remote : * mut git_remote , callbacks : * const git_remote_callbacks , update_fetchhead : :: std :: os :: raw :: c_int , download_tags : git_remote_autotag_option_t , reflog_message : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Download new data and update tips"] # [doc = ""] # [doc = " Convenience function to connect to a remote, download the data,"] # [doc = " disconnect and update the remote-tracking branches."] # [doc = ""] # [doc = " @param remote the remote to fetch from"] # [doc = " @param refspecs the refspecs to use for this fetch. Pass NULL or an"] # [doc = "                 empty array to use the base refspecs."] # [doc = " @param opts options to use for this fetch"] # [doc = " @param reflog_message The message to insert into the reflogs. If NULL, the"] # [doc = "\t\t\t\t\t\t\t\t default is \"fetch\""] # [doc = " @return 0 or an error code"] pub fn git_remote_fetch (remote : * mut git_remote , refspecs : * const git_strarray , opts : * const git_fetch_options , reflog_message : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Prune tracking refs that are no longer present on remote"] # [doc = ""] # [doc = " @param remote the remote to prune"] # [doc = " @param callbacks callbacks to use for this prune"] # [doc = " @return 0 or an error code"] pub fn git_remote_prune (remote : * mut git_remote , callbacks : * const git_remote_callbacks) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Perform a push"] # [doc = ""] # [doc = " Peform all the steps from a push."] # [doc = ""] # [doc = " @param remote the remote to push to"] # [doc = " @param refspecs the refspecs to use for pushing. If NULL or an empty"] # [doc = "                 array, the configured refspecs will be used"] # [doc = " @param opts options to use for this push"] pub fn git_remote_push (remote : * mut git_remote , refspecs : * const git_strarray , opts : * const git_push_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the statistics structure that is filled in by the fetch operation."] pub fn git_remote_stats (remote : * mut git_remote) -> * const git_indexer_progress ; } extern "C" { # [doc = " Retrieve the tag auto-follow setting"] # [doc = ""] # [doc = " @param remote the remote to query"] # [doc = " @return the auto-follow setting"] pub fn git_remote_autotag (remote : * const git_remote) -> git_remote_autotag_option_t ; } extern "C" { # [doc = " Set the remote's tag following setting."] # [doc = ""] # [doc = " The change will be made in the configuration. No loaded remotes"] # [doc = " will be affected."] # [doc = ""] # [doc = " @param repo the repository in which to make the change"] # [doc = " @param remote the name of the remote"] # [doc = " @param value the new value to take."] # [doc = " @return 0, or an error code."] pub fn git_remote_set_autotag (repo : * mut git_repository , remote : * const :: std :: os :: raw :: c_char , value : git_remote_autotag_option_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Retrieve the ref-prune setting"] # [doc = ""] # [doc = " @param remote the remote to query"] # [doc = " @return the ref-prune setting"] pub fn git_remote_prune_refs (remote : * const git_remote) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Give the remote a new name"] # [doc = ""] # [doc = " All remote-tracking branches and configuration settings"] # [doc = " for the remote are updated."] # [doc = ""] # [doc = " The new name will be checked for validity."] # [doc = " See `git_tag_create()` for rules about valid names."] # [doc = ""] # [doc = " No loaded instances of a the remote with the old name will change"] # [doc = " their name or their list of refspecs."] # [doc = ""] # [doc = " @param problems non-default refspecs cannot be renamed and will be"] # [doc = " stored here for further processing by the caller. Always free this"] # [doc = " strarray on successful return."] # [doc = " @param repo the repository in which to rename"] # [doc = " @param name the current name of the remote"] # [doc = " @param new_name the new name the remote should bear"] # [doc = " @return 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code"] pub fn git_remote_rename (problems : * mut git_strarray , repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char , new_name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Ensure the remote name is well-formed."] # [doc = ""] # [doc = " @param valid output pointer to set with validity of given remote name"] # [doc = " @param remote_name name to be checked."] # [doc = " @return 0 on success or an error code"] pub fn git_remote_name_is_valid (valid : * mut :: std :: os :: raw :: c_int , remote_name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Delete an existing persisted remote."] # [doc = ""] # [doc = " All remote-tracking branches and configuration settings"] # [doc = " for the remote will be removed."] # [doc = ""] # [doc = " @param repo the repository in which to act"] # [doc = " @param name the name of the remote to delete"] # [doc = " @return 0 on success, or an error code."] pub fn git_remote_delete (repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Retrieve the name of the remote's default branch"] # [doc = ""] # [doc = " The default branch of a repository is the branch which HEAD points"] # [doc = " to. If the remote does not support reporting this information"] # [doc = " directly, it performs the guess as git does; that is, if there are"] # [doc = " multiple branches which point to the same commit, the first one is"] # [doc = " chosen. If the master branch is a candidate, it wins."] # [doc = ""] # [doc = " This function must only be called after connecting."] # [doc = ""] # [doc = " @param out the buffer in which to store the reference name"] # [doc = " @param remote the remote"] # [doc = " @return 0, GIT_ENOTFOUND if the remote does not have any references"] # [doc = " or none of them point to HEAD's commit, or an error message."] pub fn git_remote_default_branch (out : * mut git_buf , remote : * mut git_remote) -> :: std :: os :: raw :: c_int ; } # [doc = " Auto-detect (default), libgit2 will bypass the git-aware"] # [doc = " transport for local paths, but use a normal fetch for"] # [doc = " `file://` urls."] pub const git_clone_local_t_GIT_CLONE_LOCAL_AUTO : git_clone_local_t = 0 ; # [doc = " Bypass the git-aware transport even for a `file://` url."] pub const git_clone_local_t_GIT_CLONE_LOCAL : git_clone_local_t = 1 ; # [doc = " Do no bypass the git-aware transport"] pub const git_clone_local_t_GIT_CLONE_NO_LOCAL : git_clone_local_t = 2 ; # [doc = " Bypass the git-aware transport, but do not try to use"] # [doc = " hardlinks."] pub const git_clone_local_t_GIT_CLONE_LOCAL_NO_LINKS : git_clone_local_t = 3 ; # [doc = " Options for bypassing the git-aware transport on clone. Bypassing"] # [doc = " it means that instead of a fetch, libgit2 will copy the object"] # [doc = " database directory instead of figuring out what it needs, which is"] # [doc = " faster. If possible, it will hardlink the files to save space."] pub type git_clone_local_t = :: std :: os :: raw :: c_uint ; # [doc = " The signature of a function matching git_remote_create, with an additional"] # [doc = " void* as a callback payload."] # [doc = ""] # [doc = " Callers of git_clone may provide a function matching this signature to override"] # [doc = " the remote creation and customization process during a clone operation."] # [doc = ""] # [doc = " @param out the resulting remote"] # [doc = " @param repo the repository in which to create the remote"] # [doc = " @param name the remote's name"] # [doc = " @param url the remote's url"] # [doc = " @param payload an opaque payload"] # [doc = " @return 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code"] pub type git_remote_create_cb = :: std :: option :: Option < unsafe extern "C" fn (out : * mut * mut git_remote , repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char , url : * const :: std :: os :: raw :: c_char , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = " The signature of a function matchin git_repository_init, with an"] # [doc = " aditional void * as callback payload."] # [doc = ""] # [doc = " Callers of git_clone my provide a function matching this signature"] # [doc = " to override the repository creation and customization process"] # [doc = " during a clone operation."] # [doc = ""] # [doc = " @param out the resulting repository"] # [doc = " @param path path in which to create the repository"] # [doc = " @param bare whether the repository is bare. This is the value from the clone options"] # [doc = " @param payload payload specified by the options"] # [doc = " @return 0, or a negative value to indicate error"] pub type git_repository_create_cb = :: std :: option :: Option < unsafe extern "C" fn (out : * mut * mut git_repository , path : * const :: std :: os :: raw :: c_char , bare : :: std :: os :: raw :: c_int , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = " Clone options structure"] # [doc = ""] # [doc = " Initialize with `GIT_CLONE_OPTIONS_INIT`. Alternatively, you can"] # [doc = " use `git_clone_options_init`."] # [doc = ""] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_clone_options { pub version : :: std :: os :: raw :: c_uint , # [doc = " These options are passed to the checkout step. To disable"] # [doc = " checkout, set the `checkout_strategy` to"] # [doc = " `GIT_CHECKOUT_NONE`."] pub checkout_opts : git_checkout_options , # [doc = " Options which control the fetch, including callbacks."] # [doc = ""] # [doc = " The callbacks are used for reporting fetch progress, and for acquiring"] # [doc = " credentials in the event they are needed."] pub fetch_opts : git_fetch_options , # [doc = " Set to zero (false) to create a standard repo, or non-zero"] # [doc = " for a bare repo"] pub bare : :: std :: os :: raw :: c_int , # [doc = " Whether to use a fetch or copy the object database."] pub local : git_clone_local_t , # [doc = " The name of the branch to checkout. NULL means use the"] # [doc = " remote's default branch."] pub checkout_branch : * const :: std :: os :: raw :: c_char , # [doc = " A callback used to create the new repository into which to"] # [doc = " clone. If NULL, the 'bare' field will be used to determine"] # [doc = " whether to create a bare repository."] pub repository_cb : git_repository_create_cb , # [doc = " An opaque payload to pass to the git_repository creation callback."] # [doc = " This parameter is ignored unless repository_cb is non-NULL."] pub repository_cb_payload : * mut :: std :: os :: raw :: c_void , # [doc = " A callback used to create the git_remote, prior to its being"] # [doc = " used to perform the clone operation. See the documentation for"] # [doc = " git_remote_create_cb for details. This parameter may be NULL,"] # [doc = " indicating that git_clone should provide default behavior."] pub remote_cb : git_remote_create_cb , # [doc = " An opaque payload to pass to the git_remote creation callback."] # [doc = " This parameter is ignored unless remote_cb is non-NULL."] pub remote_cb_payload : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_git_clone_options () { assert_eq ! (:: std :: mem :: size_of :: < git_clone_options > () , 400usize , concat ! ("Size of: " , stringify ! (git_clone_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_clone_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_clone_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_clone_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_clone_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_clone_options > ())) . checkout_opts as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_clone_options) , "::" , stringify ! (checkout_opts))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_clone_options > ())) . fetch_opts as * const _ as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (git_clone_options) , "::" , stringify ! (fetch_opts))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_clone_options > ())) . bare as * const _ as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (git_clone_options) , "::" , stringify ! (bare))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_clone_options > ())) . local as * const _ as usize } , 356usize , concat ! ("Offset of field: " , stringify ! (git_clone_options) , "::" , stringify ! (local))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_clone_options > ())) . checkout_branch as * const _ as usize } , 360usize , concat ! ("Offset of field: " , stringify ! (git_clone_options) , "::" , stringify ! (checkout_branch))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_clone_options > ())) . repository_cb as * const _ as usize } , 368usize , concat ! ("Offset of field: " , stringify ! (git_clone_options) , "::" , stringify ! (repository_cb))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_clone_options > ())) . repository_cb_payload as * const _ as usize } , 376usize , concat ! ("Offset of field: " , stringify ! (git_clone_options) , "::" , stringify ! (repository_cb_payload))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_clone_options > ())) . remote_cb as * const _ as usize } , 384usize , concat ! ("Offset of field: " , stringify ! (git_clone_options) , "::" , stringify ! (remote_cb))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_clone_options > ())) . remote_cb_payload as * const _ as usize } , 392usize , concat ! ("Offset of field: " , stringify ! (git_clone_options) , "::" , stringify ! (remote_cb_payload))) ; } extern "C" { # [doc = " Initialize git_clone_options structure"] # [doc = ""] # [doc = " Initializes a `git_clone_options` with default values. Equivalent to creating"] # [doc = " an instance with GIT_CLONE_OPTIONS_INIT."] # [doc = ""] # [doc = " @param opts The `git_clone_options` struct to initialize."] # [doc = " @param version The struct version; pass `GIT_CLONE_OPTIONS_VERSION`."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_clone_options_init (opts : * mut git_clone_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Clone a remote repository."] # [doc = ""] # [doc = " By default this creates its repository and initial remote to match"] # [doc = " git's defaults. You can use the options in the callback to"] # [doc = " customize how these are created."] # [doc = ""] # [doc = " @param out pointer that will receive the resulting repository object"] # [doc = " @param url the remote repository to clone"] # [doc = " @param local_path local directory to clone to"] # [doc = " @param options configuration options for the clone.  If NULL, the"] # [doc = "        function works as though GIT_OPTIONS_INIT were passed."] # [doc = " @return 0 on success, any non-zero return value from a callback"] # [doc = "         function, or a negative value to indicate an error (use"] # [doc = "         `git_error_last` for a detailed error message)"] pub fn git_clone (out : * mut * mut git_repository , url : * const :: std :: os :: raw :: c_char , local_path : * const :: std :: os :: raw :: c_char , options : * const git_clone_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Lookup a commit object from a repository."] # [doc = ""] # [doc = " The returned object should be released with `git_commit_free` when no"] # [doc = " longer needed."] # [doc = ""] # [doc = " @param commit pointer to the looked up commit"] # [doc = " @param repo the repo to use when locating the commit."] # [doc = " @param id identity of the commit to locate. If the object is"] # [doc = "\t\tan annotated tag it will be peeled back to the commit."] # [doc = " @return 0 or an error code"] pub fn git_commit_lookup (commit : * mut * mut git_commit , repo : * mut git_repository , id : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Lookup a commit object from a repository, given a prefix of its"] # [doc = " identifier (short id)."] # [doc = ""] # [doc = " The returned object should be released with `git_commit_free` when no"] # [doc = " longer needed."] # [doc = ""] # [doc = " @see git_object_lookup_prefix"] # [doc = ""] # [doc = " @param commit pointer to the looked up commit"] # [doc = " @param repo the repo to use when locating the commit."] # [doc = " @param id identity of the commit to locate. If the object is"] # [doc = "\t\tan annotated tag it will be peeled back to the commit."] # [doc = " @param len the length of the short identifier"] # [doc = " @return 0 or an error code"] pub fn git_commit_lookup_prefix (commit : * mut * mut git_commit , repo : * mut git_repository , id : * const git_oid , len : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Close an open commit"] # [doc = ""] # [doc = " This is a wrapper around git_object_free()"] # [doc = ""] # [doc = " IMPORTANT:"] # [doc = " It *is* necessary to call this method when you stop"] # [doc = " using a commit. Failure to do so will cause a memory leak."] # [doc = ""] # [doc = " @param commit the commit to close"] pub fn git_commit_free (commit : * mut git_commit) ; } extern "C" { # [doc = " Get the id of a commit."] # [doc = ""] # [doc = " @param commit a previously loaded commit."] # [doc = " @return object identity for the commit."] pub fn git_commit_id (commit : * const git_commit) -> * const git_oid ; } extern "C" { # [doc = " Get the repository that contains the commit."] # [doc = ""] # [doc = " @param commit A previously loaded commit."] # [doc = " @return Repository that contains this commit."] pub fn git_commit_owner (commit : * const git_commit) -> * mut git_repository ; } extern "C" { # [doc = " Get the encoding for the message of a commit,"] # [doc = " as a string representing a standard encoding name."] # [doc = ""] # [doc = " The encoding may be NULL if the `encoding` header"] # [doc = " in the commit is missing; in that case UTF-8 is assumed."] # [doc = ""] # [doc = " @param commit a previously loaded commit."] # [doc = " @return NULL, or the encoding"] pub fn git_commit_message_encoding (commit : * const git_commit) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Get the full message of a commit."] # [doc = ""] # [doc = " The returned message will be slightly prettified by removing any"] # [doc = " potential leading newlines."] # [doc = ""] # [doc = " @param commit a previously loaded commit."] # [doc = " @return the message of a commit"] pub fn git_commit_message (commit : * const git_commit) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Get the full raw message of a commit."] # [doc = ""] # [doc = " @param commit a previously loaded commit."] # [doc = " @return the raw message of a commit"] pub fn git_commit_message_raw (commit : * const git_commit) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Get the short \"summary\" of the git commit message."] # [doc = ""] # [doc = " The returned message is the summary of the commit, comprising the"] # [doc = " first paragraph of the message with whitespace trimmed and squashed."] # [doc = ""] # [doc = " @param commit a previously loaded commit."] # [doc = " @return the summary of a commit or NULL on error"] pub fn git_commit_summary (commit : * mut git_commit) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Get the long \"body\" of the git commit message."] # [doc = ""] # [doc = " The returned message is the body of the commit, comprising"] # [doc = " everything but the first paragraph of the message. Leading and"] # [doc = " trailing whitespaces are trimmed."] # [doc = ""] # [doc = " @param commit a previously loaded commit."] # [doc = " @return the body of a commit or NULL when no the message only"] # [doc = "   consists of a summary"] pub fn git_commit_body (commit : * mut git_commit) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Get the commit time (i.e. committer time) of a commit."] # [doc = ""] # [doc = " @param commit a previously loaded commit."] # [doc = " @return the time of a commit"] pub fn git_commit_time (commit : * const git_commit) -> git_time_t ; } extern "C" { # [doc = " Get the commit timezone offset (i.e. committer's preferred timezone) of a commit."] # [doc = ""] # [doc = " @param commit a previously loaded commit."] # [doc = " @return positive or negative timezone offset, in minutes from UTC"] pub fn git_commit_time_offset (commit : * const git_commit) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the committer of a commit."] # [doc = ""] # [doc = " @param commit a previously loaded commit."] # [doc = " @return the committer of a commit"] pub fn git_commit_committer (commit : * const git_commit) -> * const git_signature ; } extern "C" { # [doc = " Get the author of a commit."] # [doc = ""] # [doc = " @param commit a previously loaded commit."] # [doc = " @return the author of a commit"] pub fn git_commit_author (commit : * const git_commit) -> * const git_signature ; } extern "C" { # [doc = " Get the committer of a commit, using the mailmap to map names and email"] # [doc = " addresses to canonical real names and email addresses."] # [doc = ""] # [doc = " Call `git_signature_free` to free the signature."] # [doc = ""] # [doc = " @param out a pointer to store the resolved signature."] # [doc = " @param commit a previously loaded commit."] # [doc = " @param mailmap the mailmap to resolve with. (may be NULL)"] # [doc = " @return 0 or an error code"] pub fn git_commit_committer_with_mailmap (out : * mut * mut git_signature , commit : * const git_commit , mailmap : * const git_mailmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the author of a commit, using the mailmap to map names and email"] # [doc = " addresses to canonical real names and email addresses."] # [doc = ""] # [doc = " Call `git_signature_free` to free the signature."] # [doc = ""] # [doc = " @param out a pointer to store the resolved signature."] # [doc = " @param commit a previously loaded commit."] # [doc = " @param mailmap the mailmap to resolve with. (may be NULL)"] # [doc = " @return 0 or an error code"] pub fn git_commit_author_with_mailmap (out : * mut * mut git_signature , commit : * const git_commit , mailmap : * const git_mailmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the full raw text of the commit header."] # [doc = ""] # [doc = " @param commit a previously loaded commit"] # [doc = " @return the header text of the commit"] pub fn git_commit_raw_header (commit : * const git_commit) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Get the tree pointed to by a commit."] # [doc = ""] # [doc = " @param tree_out pointer where to store the tree object"] # [doc = " @param commit a previously loaded commit."] # [doc = " @return 0 or an error code"] pub fn git_commit_tree (tree_out : * mut * mut git_tree , commit : * const git_commit) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the id of the tree pointed to by a commit. This differs from"] # [doc = " `git_commit_tree` in that no attempts are made to fetch an object"] # [doc = " from the ODB."] # [doc = ""] # [doc = " @param commit a previously loaded commit."] # [doc = " @return the id of tree pointed to by commit."] pub fn git_commit_tree_id (commit : * const git_commit) -> * const git_oid ; } extern "C" { # [doc = " Get the number of parents of this commit"] # [doc = ""] # [doc = " @param commit a previously loaded commit."] # [doc = " @return integer of count of parents"] pub fn git_commit_parentcount (commit : * const git_commit) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = " Get the specified parent of the commit."] # [doc = ""] # [doc = " @param out Pointer where to store the parent commit"] # [doc = " @param commit a previously loaded commit."] # [doc = " @param n the position of the parent (from 0 to `parentcount`)"] # [doc = " @return 0 or an error code"] pub fn git_commit_parent (out : * mut * mut git_commit , commit : * const git_commit , n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the oid of a specified parent for a commit. This is different from"] # [doc = " `git_commit_parent`, which will attempt to load the parent commit from"] # [doc = " the ODB."] # [doc = ""] # [doc = " @param commit a previously loaded commit."] # [doc = " @param n the position of the parent (from 0 to `parentcount`)"] # [doc = " @return the id of the parent, NULL on error."] pub fn git_commit_parent_id (commit : * const git_commit , n : :: std :: os :: raw :: c_uint) -> * const git_oid ; } extern "C" { # [doc = " Get the commit object that is the <n>th generation ancestor"] # [doc = " of the named commit object, following only the first parents."] # [doc = " The returned commit has to be freed by the caller."] # [doc = ""] # [doc = " Passing `0` as the generation number returns another instance of the"] # [doc = " base commit itself."] # [doc = ""] # [doc = " @param ancestor Pointer where to store the ancestor commit"] # [doc = " @param commit a previously loaded commit."] # [doc = " @param n the requested generation"] # [doc = " @return 0 on success; GIT_ENOTFOUND if no matching ancestor exists"] # [doc = " or an error code"] pub fn git_commit_nth_gen_ancestor (ancestor : * mut * mut git_commit , commit : * const git_commit , n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get an arbitrary header field"] # [doc = ""] # [doc = " @param out the buffer to fill; existing content will be"] # [doc = " overwritten"] # [doc = " @param commit the commit to look in"] # [doc = " @param field the header field to return"] # [doc = " @return 0 on succeess, GIT_ENOTFOUND if the field does not exist,"] # [doc = " or an error code"] pub fn git_commit_header_field (out : * mut git_buf , commit : * const git_commit , field : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Extract the signature from a commit"] # [doc = ""] # [doc = " If the id is not for a commit, the error class will be"] # [doc = " `GIT_ERROR_INVALID`. If the commit does not have a signature, the"] # [doc = " error class will be `GIT_ERROR_OBJECT`."] # [doc = ""] # [doc = " @param signature the signature block; existing content will be"] # [doc = " overwritten"] # [doc = " @param signed_data signed data; this is the commit contents minus the signature block;"] # [doc = " existing content will be overwritten"] # [doc = " @param repo the repository in which the commit exists"] # [doc = " @param commit_id the commit from which to extract the data"] # [doc = " @param field the name of the header field containing the signature"] # [doc = " block; pass `NULL` to extract the default 'gpgsig'"] # [doc = " @return 0 on success, GIT_ENOTFOUND if the id is not for a commit"] # [doc = " or the commit does not have a signature."] pub fn git_commit_extract_signature (signature : * mut git_buf , signed_data : * mut git_buf , repo : * mut git_repository , commit_id : * mut git_oid , field : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create new commit in the repository from a list of `git_object` pointers"] # [doc = ""] # [doc = " The message will **not** be cleaned up automatically. You can do that"] # [doc = " with the `git_message_prettify()` function."] # [doc = ""] # [doc = " @param id Pointer in which to store the OID of the newly created commit"] # [doc = ""] # [doc = " @param repo Repository where to store the commit"] # [doc = ""] # [doc = " @param update_ref If not NULL, name of the reference that"] # [doc = "\twill be updated to point to this commit. If the reference"] # [doc = "\tis not direct, it will be resolved to a direct reference."] # [doc = "\tUse \"HEAD\" to update the HEAD of the current branch and"] # [doc = "\tmake it point to this commit. If the reference doesn't"] # [doc = "\texist yet, it will be created. If it does exist, the first"] # [doc = "\tparent must be the tip of this branch."] # [doc = ""] # [doc = " @param author Signature with author and author time of commit"] # [doc = ""] # [doc = " @param committer Signature with committer and * commit time of commit"] # [doc = ""] # [doc = " @param message_encoding The encoding for the message in the"] # [doc = "  commit, represented with a standard encoding name."] # [doc = "  E.g. \"UTF-8\". If NULL, no encoding header is written and"] # [doc = "  UTF-8 is assumed."] # [doc = ""] # [doc = " @param message Full message for this commit"] # [doc = ""] # [doc = " @param tree An instance of a `git_tree` object that will"] # [doc = "  be used as the tree for the commit. This tree object must"] # [doc = "  also be owned by the given `repo`."] # [doc = ""] # [doc = " @param parent_count Number of parents for this commit"] # [doc = ""] # [doc = " @param parents Array of `parent_count` pointers to `git_commit`"] # [doc = "  objects that will be used as the parents for this commit. This"] # [doc = "  array may be NULL if `parent_count` is 0 (root commit). All the"] # [doc = "  given commits must be owned by the `repo`."] # [doc = ""] # [doc = " @return 0 or an error code"] # [doc = "\tThe created commit will be written to the Object Database and"] # [doc = "\tthe given reference will be updated to point to it"] pub fn git_commit_create (id : * mut git_oid , repo : * mut git_repository , update_ref : * const :: std :: os :: raw :: c_char , author : * const git_signature , committer : * const git_signature , message_encoding : * const :: std :: os :: raw :: c_char , message : * const :: std :: os :: raw :: c_char , tree : * const git_tree , parent_count : size_t , parents : * mut * const git_commit) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create new commit in the repository using a variable argument list."] # [doc = ""] # [doc = " The message will **not** be cleaned up automatically. You can do that"] # [doc = " with the `git_message_prettify()` function."] # [doc = ""] # [doc = " The parents for the commit are specified as a variable list of pointers"] # [doc = " to `const git_commit *`. Note that this is a convenience method which may"] # [doc = " not be safe to export for certain languages or compilers"] # [doc = ""] # [doc = " All other parameters remain the same as `git_commit_create()`."] # [doc = ""] # [doc = " @see git_commit_create"] pub fn git_commit_create_v (id : * mut git_oid , repo : * mut git_repository , update_ref : * const :: std :: os :: raw :: c_char , author : * const git_signature , committer : * const git_signature , message_encoding : * const :: std :: os :: raw :: c_char , message : * const :: std :: os :: raw :: c_char , tree : * const git_tree , parent_count : size_t , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Amend an existing commit by replacing only non-NULL values."] # [doc = ""] # [doc = " This creates a new commit that is exactly the same as the old commit,"] # [doc = " except that any non-NULL values will be updated.  The new commit has"] # [doc = " the same parents as the old commit."] # [doc = ""] # [doc = " The `update_ref` value works as in the regular `git_commit_create()`,"] # [doc = " updating the ref to point to the newly rewritten commit.  If you want"] # [doc = " to amend a commit that is not currently the tip of the branch and then"] # [doc = " rewrite the following commits to reach a ref, pass this as NULL and"] # [doc = " update the rest of the commit chain and ref separately."] # [doc = ""] # [doc = " Unlike `git_commit_create()`, the `author`, `committer`, `message`,"] # [doc = " `message_encoding`, and `tree` parameters can be NULL in which case this"] # [doc = " will use the values from the original `commit_to_amend`."] # [doc = ""] # [doc = " All parameters have the same meanings as in `git_commit_create()`."] # [doc = ""] # [doc = " @see git_commit_create"] pub fn git_commit_amend (id : * mut git_oid , commit_to_amend : * const git_commit , update_ref : * const :: std :: os :: raw :: c_char , author : * const git_signature , committer : * const git_signature , message_encoding : * const :: std :: os :: raw :: c_char , message : * const :: std :: os :: raw :: c_char , tree : * const git_tree) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a commit and write it into a buffer"] # [doc = ""] # [doc = " Create a commit as with `git_commit_create()` but instead of"] # [doc = " writing it to the objectdb, write the contents of the object into a"] # [doc = " buffer."] # [doc = ""] # [doc = " @param out the buffer into which to write the commit object content"] # [doc = ""] # [doc = " @param repo Repository where the referenced tree and parents live"] # [doc = ""] # [doc = " @param author Signature with author and author time of commit"] # [doc = ""] # [doc = " @param committer Signature with committer and * commit time of commit"] # [doc = ""] # [doc = " @param message_encoding The encoding for the message in the"] # [doc = "  commit, represented with a standard encoding name."] # [doc = "  E.g. \"UTF-8\". If NULL, no encoding header is written and"] # [doc = "  UTF-8 is assumed."] # [doc = ""] # [doc = " @param message Full message for this commit"] # [doc = ""] # [doc = " @param tree An instance of a `git_tree` object that will"] # [doc = "  be used as the tree for the commit. This tree object must"] # [doc = "  also be owned by the given `repo`."] # [doc = ""] # [doc = " @param parent_count Number of parents for this commit"] # [doc = ""] # [doc = " @param parents Array of `parent_count` pointers to `git_commit`"] # [doc = "  objects that will be used as the parents for this commit. This"] # [doc = "  array may be NULL if `parent_count` is 0 (root commit). All the"] # [doc = "  given commits must be owned by the `repo`."] # [doc = ""] # [doc = " @return 0 or an error code"] pub fn git_commit_create_buffer (out : * mut git_buf , repo : * mut git_repository , author : * const git_signature , committer : * const git_signature , message_encoding : * const :: std :: os :: raw :: c_char , message : * const :: std :: os :: raw :: c_char , tree : * const git_tree , parent_count : size_t , parents : * mut * const git_commit) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a commit object from the given buffer and signature"] # [doc = ""] # [doc = " Given the unsigned commit object's contents, its signature and the"] # [doc = " header field in which to store the signature, attach the signature"] # [doc = " to the commit and write it into the given repository."] # [doc = ""] # [doc = " @param out the resulting commit id"] # [doc = " @param commit_content the content of the unsigned commit object"] # [doc = " @param signature the signature to add to the commit. Leave `NULL`"] # [doc = " to create a commit without adding a signature field."] # [doc = " @param signature_field which header field should contain this"] # [doc = " signature. Leave `NULL` for the default of \"gpgsig\""] # [doc = " @return 0 or an error code"] pub fn git_commit_create_with_signature (out : * mut git_oid , repo : * mut git_repository , commit_content : * const :: std :: os :: raw :: c_char , signature : * const :: std :: os :: raw :: c_char , signature_field : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create an in-memory copy of a commit. The copy must be explicitly"] # [doc = " free'd or it will leak."] # [doc = ""] # [doc = " @param out Pointer to store the copy of the commit"] # [doc = " @param source Original commit to copy"] pub fn git_commit_dup (out : * mut * mut git_commit , source : * mut git_commit) -> :: std :: os :: raw :: c_int ; } # [doc = " Commit creation callback: used when a function is going to create"] # [doc = " commits (for example, in `git_rebase_commit`) to allow callers to"] # [doc = " override the commit creation behavior.  For example, users may"] # [doc = " wish to sign commits by providing this information to"] # [doc = " `git_commit_create_buffer`, signing that buffer, then calling"] # [doc = " `git_commit_create_with_signature`.  The resultant commit id"] # [doc = " should be set in the `out` object id parameter."] # [doc = ""] # [doc = " @param out pointer that this callback will populate with the object"] # [doc = "            id of the commit that is created"] # [doc = " @param author the author name and time of the commit"] # [doc = " @param committer the committer name and time of the commit"] # [doc = " @param message_encoding the encoding of the given message, or NULL"] # [doc = "                         to assume UTF8"] # [doc = " @param message the commit message"] # [doc = " @param tree the tree to be committed"] # [doc = " @param parent_count the number of parents for this commit"] # [doc = " @param parents the commit parents"] # [doc = " @param payload the payload pointer in the rebase options"] # [doc = " @return 0 if this callback has created the commit and populated the out"] # [doc = "         parameter, GIT_PASSTHROUGH if the callback has not created a"] # [doc = "         commit and wants the calling function to create the commit as"] # [doc = "         if no callback had been specified, any other value to stop"] # [doc = "         and return a failure"] pub type git_commit_create_cb = :: std :: option :: Option < unsafe extern "C" fn (out : * mut git_oid , author : * const git_signature , committer : * const git_signature , message_encoding : * const :: std :: os :: raw :: c_char , message : * const :: std :: os :: raw :: c_char , tree : * const git_tree , parent_count : size_t , parents : * mut * const git_commit , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = " System-wide on Windows, for compatibility with portable git"] pub const git_config_level_t_GIT_CONFIG_LEVEL_PROGRAMDATA : git_config_level_t = 1 ; # [doc = " System-wide configuration file; /etc/gitconfig on Linux systems"] pub const git_config_level_t_GIT_CONFIG_LEVEL_SYSTEM : git_config_level_t = 2 ; # [doc = " XDG compatible configuration file; typically ~/.config/git/config"] pub const git_config_level_t_GIT_CONFIG_LEVEL_XDG : git_config_level_t = 3 ; # [doc = " User-specific configuration file (also called Global configuration"] # [doc = " file); typically ~/.gitconfig"] pub const git_config_level_t_GIT_CONFIG_LEVEL_GLOBAL : git_config_level_t = 4 ; # [doc = " Repository specific configuration file; $WORK_DIR/.git/config on"] # [doc = " non-bare repos"] pub const git_config_level_t_GIT_CONFIG_LEVEL_LOCAL : git_config_level_t = 5 ; # [doc = " Application specific configuration file; freely defined by applications"] pub const git_config_level_t_GIT_CONFIG_LEVEL_APP : git_config_level_t = 6 ; # [doc = " Represents the highest level available config file (i.e. the most"] # [doc = " specific config file available that actually is loaded)"] pub const git_config_level_t_GIT_CONFIG_HIGHEST_LEVEL : git_config_level_t = - 1 ; # [doc = " Priority level of a config file."] # [doc = " These priority levels correspond to the natural escalation logic"] # [doc = " (from higher to lower) when searching for config entries in git.git."] # [doc = ""] # [doc = " git_config_open_default() and git_repository_config() honor those"] # [doc = " priority levels as well."] pub type git_config_level_t = :: std :: os :: raw :: c_int ; # [doc = " An entry in a configuration file"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_config_entry { # [doc = "< Name of the entry (normalised)"] pub name : * const :: std :: os :: raw :: c_char , # [doc = "< String value of the entry"] pub value : * const :: std :: os :: raw :: c_char , # [doc = "< Depth of includes where this variable was found"] pub include_depth : :: std :: os :: raw :: c_uint , # [doc = "< Which config file this was found in"] pub level : git_config_level_t , pub free : :: std :: option :: Option < unsafe extern "C" fn (entry : * mut git_config_entry) > , # [doc = "< Opaque value for the free function. Do not read or write"] pub payload : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_git_config_entry () { assert_eq ! (:: std :: mem :: size_of :: < git_config_entry > () , 40usize , concat ! ("Size of: " , stringify ! (git_config_entry))) ; assert_eq ! (:: std :: mem :: align_of :: < git_config_entry > () , 8usize , concat ! ("Alignment of " , stringify ! (git_config_entry))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_config_entry > ())) . name as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_config_entry) , "::" , stringify ! (name))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_config_entry > ())) . value as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_config_entry) , "::" , stringify ! (value))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_config_entry > ())) . include_depth as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_config_entry) , "::" , stringify ! (include_depth))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_config_entry > ())) . level as * const _ as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (git_config_entry) , "::" , stringify ! (level))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_config_entry > ())) . free as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_config_entry) , "::" , stringify ! (free))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_config_entry > ())) . payload as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (git_config_entry) , "::" , stringify ! (payload))) ; } extern "C" { # [doc = " Free a config entry"] pub fn git_config_entry_free (arg1 : * mut git_config_entry) ; } # [doc = " A config enumeration callback"] # [doc = ""] # [doc = " @param entry the entry currently being enumerated"] # [doc = " @param payload a user-specified pointer"] pub type git_config_foreach_cb = :: std :: option :: Option < unsafe extern "C" fn (entry : * const git_config_entry , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_config_iterator { _unused : [u8 ; 0] , } pub const git_configmap_t_GIT_CONFIGMAP_FALSE : git_configmap_t = 0 ; pub const git_configmap_t_GIT_CONFIGMAP_TRUE : git_configmap_t = 1 ; pub const git_configmap_t_GIT_CONFIGMAP_INT32 : git_configmap_t = 2 ; pub const git_configmap_t_GIT_CONFIGMAP_STRING : git_configmap_t = 3 ; # [doc = " Config var type"] pub type git_configmap_t = :: std :: os :: raw :: c_uint ; # [doc = " Mapping from config variables to values."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_configmap { pub type_ : git_configmap_t , pub str_match : * const :: std :: os :: raw :: c_char , pub map_value : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_git_configmap () { assert_eq ! (:: std :: mem :: size_of :: < git_configmap > () , 24usize , concat ! ("Size of: " , stringify ! (git_configmap))) ; assert_eq ! (:: std :: mem :: align_of :: < git_configmap > () , 8usize , concat ! ("Alignment of " , stringify ! (git_configmap))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_configmap > ())) . type_ as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_configmap) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_configmap > ())) . str_match as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_configmap) , "::" , stringify ! (str_match))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_configmap > ())) . map_value as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_configmap) , "::" , stringify ! (map_value))) ; } extern "C" { # [doc = " Locate the path to the global configuration file"] # [doc = ""] # [doc = " The user or global configuration file is usually"] # [doc = " located in `$HOME/.gitconfig`."] # [doc = ""] # [doc = " This method will try to guess the full path to that"] # [doc = " file, if the file exists. The returned path"] # [doc = " may be used on any `git_config` call to load the"] # [doc = " global configuration file."] # [doc = ""] # [doc = " This method will not guess the path to the xdg compatible"] # [doc = " config file (.config/git/config)."] # [doc = ""] # [doc = " @param out Pointer to a user-allocated git_buf in which to store the path"] # [doc = " @return 0 if a global configuration file has been found. Its path will be stored in `out`."] pub fn git_config_find_global (out : * mut git_buf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Locate the path to the global xdg compatible configuration file"] # [doc = ""] # [doc = " The xdg compatible configuration file is usually"] # [doc = " located in `$HOME/.config/git/config`."] # [doc = ""] # [doc = " This method will try to guess the full path to that"] # [doc = " file, if the file exists. The returned path"] # [doc = " may be used on any `git_config` call to load the"] # [doc = " xdg compatible configuration file."] # [doc = ""] # [doc = " @param out Pointer to a user-allocated git_buf in which to store the path"] # [doc = " @return 0 if a xdg compatible configuration file has been"] # [doc = "\tfound. Its path will be stored in `out`."] pub fn git_config_find_xdg (out : * mut git_buf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Locate the path to the system configuration file"] # [doc = ""] # [doc = " If /etc/gitconfig doesn't exist, it will look for"] # [doc = " %PROGRAMFILES%\\Git\\etc\\gitconfig."] # [doc = ""] # [doc = " @param out Pointer to a user-allocated git_buf in which to store the path"] # [doc = " @return 0 if a system configuration file has been"] # [doc = "\tfound. Its path will be stored in `out`."] pub fn git_config_find_system (out : * mut git_buf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Locate the path to the configuration file in ProgramData"] # [doc = ""] # [doc = " Look for the file in %PROGRAMDATA%\\Git\\config used by portable git."] # [doc = ""] # [doc = " @param out Pointer to a user-allocated git_buf in which to store the path"] # [doc = " @return 0 if a ProgramData configuration file has been"] # [doc = "\tfound. Its path will be stored in `out`."] pub fn git_config_find_programdata (out : * mut git_buf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Open the global, XDG and system configuration files"] # [doc = ""] # [doc = " Utility wrapper that finds the global, XDG and system configuration files"] # [doc = " and opens them into a single prioritized config object that can be"] # [doc = " used when accessing default config data outside a repository."] # [doc = ""] # [doc = " @param out Pointer to store the config instance"] # [doc = " @return 0 or an error code"] pub fn git_config_open_default (out : * mut * mut git_config) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Allocate a new configuration object"] # [doc = ""] # [doc = " This object is empty, so you have to add a file to it before you"] # [doc = " can do anything with it."] # [doc = ""] # [doc = " @param out pointer to the new configuration"] # [doc = " @return 0 or an error code"] pub fn git_config_new (out : * mut * mut git_config) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Add an on-disk config file instance to an existing config"] # [doc = ""] # [doc = " The on-disk file pointed at by `path` will be opened and"] # [doc = " parsed; it's expected to be a native Git config file following"] # [doc = " the default Git config syntax (see man git-config)."] # [doc = ""] # [doc = " If the file does not exist, the file will still be added and it"] # [doc = " will be created the first time we write to it."] # [doc = ""] # [doc = " Note that the configuration object will free the file"] # [doc = " automatically."] # [doc = ""] # [doc = " Further queries on this config object will access each"] # [doc = " of the config file instances in order (instances with"] # [doc = " a higher priority level will be accessed first)."] # [doc = ""] # [doc = " @param cfg the configuration to add the file to"] # [doc = " @param path path to the configuration file to add"] # [doc = " @param level the priority level of the backend"] # [doc = " @param force replace config file at the given priority level"] # [doc = " @param repo optional repository to allow parsing of"] # [doc = "  conditional includes"] # [doc = " @return 0 on success, GIT_EEXISTS when adding more than one file"] # [doc = "  for a given priority level (and force_replace set to 0),"] # [doc = "  GIT_ENOTFOUND when the file doesn't exist or error code"] pub fn git_config_add_file_ondisk (cfg : * mut git_config , path : * const :: std :: os :: raw :: c_char , level : git_config_level_t , repo : * const git_repository , force : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a new config instance containing a single on-disk file"] # [doc = ""] # [doc = " This method is a simple utility wrapper for the following sequence"] # [doc = " of calls:"] # [doc = "\t- git_config_new"] # [doc = "\t- git_config_add_file_ondisk"] # [doc = ""] # [doc = " @param out The configuration instance to create"] # [doc = " @param path Path to the on-disk file to open"] # [doc = " @return 0 on success, or an error code"] pub fn git_config_open_ondisk (out : * mut * mut git_config , path : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Build a single-level focused config object from a multi-level one."] # [doc = ""] # [doc = " The returned config object can be used to perform get/set/delete operations"] # [doc = " on a single specific level."] # [doc = ""] # [doc = " Getting several times the same level from the same parent multi-level config"] # [doc = " will return different config instances, but containing the same config_file"] # [doc = " instance."] # [doc = ""] # [doc = " @param out The configuration instance to create"] # [doc = " @param parent Multi-level config to search for the given level"] # [doc = " @param level Configuration level to search for"] # [doc = " @return 0, GIT_ENOTFOUND if the passed level cannot be found in the"] # [doc = " multi-level parent config, or an error code"] pub fn git_config_open_level (out : * mut * mut git_config , parent : * const git_config , level : git_config_level_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Open the global/XDG configuration file according to git's rules"] # [doc = ""] # [doc = " Git allows you to store your global configuration at"] # [doc = " `$HOME/.gitconfig` or `$XDG_CONFIG_HOME/git/config`. For backwards"] # [doc = " compatibility, the XDG file shouldn't be used unless the use has"] # [doc = " created it explicitly. With this function you'll open the correct"] # [doc = " one to write to."] # [doc = ""] # [doc = " @param out pointer in which to store the config object"] # [doc = " @param config the config object in which to look"] pub fn git_config_open_global (out : * mut * mut git_config , config : * mut git_config) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a snapshot of the configuration"] # [doc = ""] # [doc = " Create a snapshot of the current state of a configuration, which"] # [doc = " allows you to look into a consistent view of the configuration for"] # [doc = " looking up complex values (e.g. a remote, submodule)."] # [doc = ""] # [doc = " The string returned when querying such a config object is valid"] # [doc = " until it is freed."] # [doc = ""] # [doc = " @param out pointer in which to store the snapshot config object"] # [doc = " @param config configuration to snapshot"] # [doc = " @return 0 or an error code"] pub fn git_config_snapshot (out : * mut * mut git_config , config : * mut git_config) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free the configuration and its associated memory and files"] # [doc = ""] # [doc = " @param cfg the configuration to free"] pub fn git_config_free (cfg : * mut git_config) ; } extern "C" { # [doc = " Get the git_config_entry of a config variable."] # [doc = ""] # [doc = " Free the git_config_entry after use with `git_config_entry_free()`."] # [doc = ""] # [doc = " @param out pointer to the variable git_config_entry"] # [doc = " @param cfg where to look for the variable"] # [doc = " @param name the variable's name"] # [doc = " @return 0 or an error code"] pub fn git_config_get_entry (out : * mut * mut git_config_entry , cfg : * const git_config , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the value of an integer config variable."] # [doc = ""] # [doc = " All config files will be looked into, in the order of their"] # [doc = " defined level. A higher level means a higher priority. The"] # [doc = " first occurrence of the variable will be returned here."] # [doc = ""] # [doc = " @param out pointer to the variable where the value should be stored"] # [doc = " @param cfg where to look for the variable"] # [doc = " @param name the variable's name"] # [doc = " @return 0 or an error code"] pub fn git_config_get_int32 (out : * mut i32 , cfg : * const git_config , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the value of a long integer config variable."] # [doc = ""] # [doc = " All config files will be looked into, in the order of their"] # [doc = " defined level. A higher level means a higher priority. The"] # [doc = " first occurrence of the variable will be returned here."] # [doc = ""] # [doc = " @param out pointer to the variable where the value should be stored"] # [doc = " @param cfg where to look for the variable"] # [doc = " @param name the variable's name"] # [doc = " @return 0 or an error code"] pub fn git_config_get_int64 (out : * mut i64 , cfg : * const git_config , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the value of a boolean config variable."] # [doc = ""] # [doc = " This function uses the usual C convention of 0 being false and"] # [doc = " anything else true."] # [doc = ""] # [doc = " All config files will be looked into, in the order of their"] # [doc = " defined level. A higher level means a higher priority. The"] # [doc = " first occurrence of the variable will be returned here."] # [doc = ""] # [doc = " @param out pointer to the variable where the value should be stored"] # [doc = " @param cfg where to look for the variable"] # [doc = " @param name the variable's name"] # [doc = " @return 0 or an error code"] pub fn git_config_get_bool (out : * mut :: std :: os :: raw :: c_int , cfg : * const git_config , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the value of a path config variable."] # [doc = ""] # [doc = " A leading '~' will be expanded to the global search path (which"] # [doc = " defaults to the user's home directory but can be overridden via"] # [doc = " `git_libgit2_opts()`."] # [doc = ""] # [doc = " All config files will be looked into, in the order of their"] # [doc = " defined level. A higher level means a higher priority. The"] # [doc = " first occurrence of the variable will be returned here."] # [doc = ""] # [doc = " @param out the buffer in which to store the result"] # [doc = " @param cfg where to look for the variable"] # [doc = " @param name the variable's name"] # [doc = " @return 0 or an error code"] pub fn git_config_get_path (out : * mut git_buf , cfg : * const git_config , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the value of a string config variable."] # [doc = ""] # [doc = " This function can only be used on snapshot config objects. The"] # [doc = " string is owned by the config and should not be freed by the"] # [doc = " user. The pointer will be valid until the config is freed."] # [doc = ""] # [doc = " All config files will be looked into, in the order of their"] # [doc = " defined level. A higher level means a higher priority. The"] # [doc = " first occurrence of the variable will be returned here."] # [doc = ""] # [doc = " @param out pointer to the string"] # [doc = " @param cfg where to look for the variable"] # [doc = " @param name the variable's name"] # [doc = " @return 0 or an error code"] pub fn git_config_get_string (out : * mut * const :: std :: os :: raw :: c_char , cfg : * const git_config , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the value of a string config variable."] # [doc = ""] # [doc = " The value of the config will be copied into the buffer."] # [doc = ""] # [doc = " All config files will be looked into, in the order of their"] # [doc = " defined level. A higher level means a higher priority. The"] # [doc = " first occurrence of the variable will be returned here."] # [doc = ""] # [doc = " @param out buffer in which to store the string"] # [doc = " @param cfg where to look for the variable"] # [doc = " @param name the variable's name"] # [doc = " @return 0 or an error code"] pub fn git_config_get_string_buf (out : * mut git_buf , cfg : * const git_config , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get each value of a multivar in a foreach callback"] # [doc = ""] # [doc = " The callback will be called on each variable found"] # [doc = ""] # [doc = " The regular expression is applied case-sensitively on the normalized form of"] # [doc = " the variable name: the section and variable parts are lower-cased. The"] # [doc = " subsection is left unchanged."] # [doc = ""] # [doc = " @param cfg where to look for the variable"] # [doc = " @param name the variable's name"] # [doc = " @param regexp regular expression to filter which variables we're"] # [doc = " interested in. Use NULL to indicate all"] # [doc = " @param callback the function to be called on each value of the variable"] # [doc = " @param payload opaque pointer to pass to the callback"] pub fn git_config_get_multivar_foreach (cfg : * const git_config , name : * const :: std :: os :: raw :: c_char , regexp : * const :: std :: os :: raw :: c_char , callback : git_config_foreach_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get each value of a multivar"] # [doc = ""] # [doc = " The regular expression is applied case-sensitively on the normalized form of"] # [doc = " the variable name: the section and variable parts are lower-cased. The"] # [doc = " subsection is left unchanged."] # [doc = ""] # [doc = " @param out pointer to store the iterator"] # [doc = " @param cfg where to look for the variable"] # [doc = " @param name the variable's name"] # [doc = " @param regexp regular expression to filter which variables we're"] # [doc = " interested in. Use NULL to indicate all"] pub fn git_config_multivar_iterator_new (out : * mut * mut git_config_iterator , cfg : * const git_config , name : * const :: std :: os :: raw :: c_char , regexp : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Return the current entry and advance the iterator"] # [doc = ""] # [doc = " The pointers returned by this function are valid until the iterator"] # [doc = " is freed."] # [doc = ""] # [doc = " @param entry pointer to store the entry"] # [doc = " @param iter the iterator"] # [doc = " @return 0 or an error code. GIT_ITEROVER if the iteration has completed"] pub fn git_config_next (entry : * mut * mut git_config_entry , iter : * mut git_config_iterator) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free a config iterator"] # [doc = ""] # [doc = " @param iter the iterator to free"] pub fn git_config_iterator_free (iter : * mut git_config_iterator) ; } extern "C" { # [doc = " Set the value of an integer config variable in the config file"] # [doc = " with the highest level (usually the local one)."] # [doc = ""] # [doc = " @param cfg where to look for the variable"] # [doc = " @param name the variable's name"] # [doc = " @param value Integer value for the variable"] # [doc = " @return 0 or an error code"] pub fn git_config_set_int32 (cfg : * mut git_config , name : * const :: std :: os :: raw :: c_char , value : i32) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Set the value of a long integer config variable in the config file"] # [doc = " with the highest level (usually the local one)."] # [doc = ""] # [doc = " @param cfg where to look for the variable"] # [doc = " @param name the variable's name"] # [doc = " @param value Long integer value for the variable"] # [doc = " @return 0 or an error code"] pub fn git_config_set_int64 (cfg : * mut git_config , name : * const :: std :: os :: raw :: c_char , value : i64) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Set the value of a boolean config variable in the config file"] # [doc = " with the highest level (usually the local one)."] # [doc = ""] # [doc = " @param cfg where to look for the variable"] # [doc = " @param name the variable's name"] # [doc = " @param value the value to store"] # [doc = " @return 0 or an error code"] pub fn git_config_set_bool (cfg : * mut git_config , name : * const :: std :: os :: raw :: c_char , value : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Set the value of a string config variable in the config file"] # [doc = " with the highest level (usually the local one)."] # [doc = ""] # [doc = " A copy of the string is made and the user is free to use it"] # [doc = " afterwards."] # [doc = ""] # [doc = " @param cfg where to look for the variable"] # [doc = " @param name the variable's name"] # [doc = " @param value the string to store."] # [doc = " @return 0 or an error code"] pub fn git_config_set_string (cfg : * mut git_config , name : * const :: std :: os :: raw :: c_char , value : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Set a multivar in the local config file."] # [doc = ""] # [doc = " The regular expression is applied case-sensitively on the value."] # [doc = ""] # [doc = " @param cfg where to look for the variable"] # [doc = " @param name the variable's name"] # [doc = " @param regexp a regular expression to indicate which values to replace"] # [doc = " @param value the new value."] pub fn git_config_set_multivar (cfg : * mut git_config , name : * const :: std :: os :: raw :: c_char , regexp : * const :: std :: os :: raw :: c_char , value : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Delete a config variable from the config file"] # [doc = " with the highest level (usually the local one)."] # [doc = ""] # [doc = " @param cfg the configuration"] # [doc = " @param name the variable to delete"] pub fn git_config_delete_entry (cfg : * mut git_config , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Deletes one or several entries from a multivar in the local config file."] # [doc = ""] # [doc = " The regular expression is applied case-sensitively on the value."] # [doc = ""] # [doc = " @param cfg where to look for the variables"] # [doc = " @param name the variable's name"] # [doc = " @param regexp a regular expression to indicate which values to delete"] # [doc = ""] # [doc = " @return 0 or an error code"] pub fn git_config_delete_multivar (cfg : * mut git_config , name : * const :: std :: os :: raw :: c_char , regexp : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Perform an operation on each config variable."] # [doc = ""] # [doc = " The callback receives the normalized name and value of each variable"] # [doc = " in the config backend, and the data pointer passed to this function."] # [doc = " If the callback returns a non-zero value, the function stops iterating"] # [doc = " and returns that value to the caller."] # [doc = ""] # [doc = " The pointers passed to the callback are only valid as long as the"] # [doc = " iteration is ongoing."] # [doc = ""] # [doc = " @param cfg where to get the variables from"] # [doc = " @param callback the function to call on each variable"] # [doc = " @param payload the data to pass to the callback"] # [doc = " @return 0 on success, non-zero callback return value, or error code"] pub fn git_config_foreach (cfg : * const git_config , callback : git_config_foreach_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Iterate over all the config variables"] # [doc = ""] # [doc = " Use `git_config_next` to advance the iteration and"] # [doc = " `git_config_iterator_free` when done."] # [doc = ""] # [doc = " @param out pointer to store the iterator"] # [doc = " @param cfg where to ge the variables from"] pub fn git_config_iterator_new (out : * mut * mut git_config_iterator , cfg : * const git_config) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Iterate over all the config variables whose name matches a pattern"] # [doc = ""] # [doc = " Use `git_config_next` to advance the iteration and"] # [doc = " `git_config_iterator_free` when done."] # [doc = ""] # [doc = " The regular expression is applied case-sensitively on the normalized form of"] # [doc = " the variable name: the section and variable parts are lower-cased. The"] # [doc = " subsection is left unchanged."] # [doc = ""] # [doc = " @param out pointer to store the iterator"] # [doc = " @param cfg where to ge the variables from"] # [doc = " @param regexp regular expression to match the names"] pub fn git_config_iterator_glob_new (out : * mut * mut git_config_iterator , cfg : * const git_config , regexp : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Perform an operation on each config variable matching a regular expression."] # [doc = ""] # [doc = " This behaves like `git_config_foreach` with an additional filter of a"] # [doc = " regular expression that filters which config keys are passed to the"] # [doc = " callback."] # [doc = ""] # [doc = " The regular expression is applied case-sensitively on the normalized form of"] # [doc = " the variable name: the section and variable parts are lower-cased. The"] # [doc = " subsection is left unchanged."] # [doc = ""] # [doc = " The regular expression is applied case-sensitively on the normalized form of"] # [doc = " the variable name: the case-insensitive parts are lower-case."] # [doc = ""] # [doc = " @param cfg where to get the variables from"] # [doc = " @param regexp regular expression to match against config names"] # [doc = " @param callback the function to call on each variable"] # [doc = " @param payload the data to pass to the callback"] # [doc = " @return 0 or the return value of the callback which didn't return 0"] pub fn git_config_foreach_match (cfg : * const git_config , regexp : * const :: std :: os :: raw :: c_char , callback : git_config_foreach_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Query the value of a config variable and return it mapped to"] # [doc = " an integer constant."] # [doc = ""] # [doc = " This is a helper method to easily map different possible values"] # [doc = " to a variable to integer constants that easily identify them."] # [doc = ""] # [doc = " A mapping array looks as follows:"] # [doc = ""] # [doc = "\tgit_configmap autocrlf_mapping[] = {"] # [doc = "\t\t{GIT_CVAR_FALSE, NULL, GIT_AUTO_CRLF_FALSE},"] # [doc = "\t\t{GIT_CVAR_TRUE, NULL, GIT_AUTO_CRLF_TRUE},"] # [doc = "\t\t{GIT_CVAR_STRING, \"input\", GIT_AUTO_CRLF_INPUT},"] # [doc = "\t\t{GIT_CVAR_STRING, \"default\", GIT_AUTO_CRLF_DEFAULT}};"] # [doc = ""] # [doc = " On any \"false\" value for the variable (e.g. \"false\", \"FALSE\", \"no\"), the"] # [doc = " mapping will store `GIT_AUTO_CRLF_FALSE` in the `out` parameter."] # [doc = ""] # [doc = " The same thing applies for any \"true\" value such as \"true\", \"yes\" or \"1\", storing"] # [doc = " the `GIT_AUTO_CRLF_TRUE` variable."] # [doc = ""] # [doc = " Otherwise, if the value matches the string \"input\" (with case insensitive comparison),"] # [doc = " the given constant will be stored in `out`, and likewise for \"default\"."] # [doc = ""] # [doc = " If not a single match can be made to store in `out`, an error code will be"] # [doc = " returned."] # [doc = ""] # [doc = " @param out place to store the result of the mapping"] # [doc = " @param cfg config file to get the variables from"] # [doc = " @param name name of the config variable to lookup"] # [doc = " @param maps array of `git_configmap` objects specifying the possible mappings"] # [doc = " @param map_n number of mapping objects in `maps`"] # [doc = " @return 0 on success, error code otherwise"] pub fn git_config_get_mapped (out : * mut :: std :: os :: raw :: c_int , cfg : * const git_config , name : * const :: std :: os :: raw :: c_char , maps : * const git_configmap , map_n : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Maps a string value to an integer constant"] # [doc = ""] # [doc = " @param out place to store the result of the parsing"] # [doc = " @param maps array of `git_configmap` objects specifying the possible mappings"] # [doc = " @param map_n number of mapping objects in `maps`"] # [doc = " @param value value to parse"] pub fn git_config_lookup_map_value (out : * mut :: std :: os :: raw :: c_int , maps : * const git_configmap , map_n : size_t , value : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Parse a string value as a bool."] # [doc = ""] # [doc = " Valid values for true are: 'true', 'yes', 'on', 1 or any"] # [doc = "  number different from 0"] # [doc = " Valid values for false are: 'false', 'no', 'off', 0"] # [doc = ""] # [doc = " @param out place to store the result of the parsing"] # [doc = " @param value value to parse"] pub fn git_config_parse_bool (out : * mut :: std :: os :: raw :: c_int , value : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Parse a string value as an int32."] # [doc = ""] # [doc = " An optional value suffix of 'k', 'm', or 'g' will"] # [doc = " cause the value to be multiplied by 1024, 1048576,"] # [doc = " or 1073741824 prior to output."] # [doc = ""] # [doc = " @param out place to store the result of the parsing"] # [doc = " @param value value to parse"] pub fn git_config_parse_int32 (out : * mut i32 , value : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Parse a string value as an int64."] # [doc = ""] # [doc = " An optional value suffix of 'k', 'm', or 'g' will"] # [doc = " cause the value to be multiplied by 1024, 1048576,"] # [doc = " or 1073741824 prior to output."] # [doc = ""] # [doc = " @param out place to store the result of the parsing"] # [doc = " @param value value to parse"] pub fn git_config_parse_int64 (out : * mut i64 , value : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Parse a string value as a path."] # [doc = ""] # [doc = " A leading '~' will be expanded to the global search path (which"] # [doc = " defaults to the user's home directory but can be overridden via"] # [doc = " `git_libgit2_opts()`."] # [doc = ""] # [doc = " If the value does not begin with a tilde, the input will be"] # [doc = " returned."] # [doc = ""] # [doc = " @param out placae to store the result of parsing"] # [doc = " @param value the path to evaluate"] pub fn git_config_parse_path (out : * mut git_buf , value : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Perform an operation on each config variable in a given config backend,"] # [doc = " matching a regular expression."] # [doc = ""] # [doc = " This behaves like `git_config_foreach_match` except that only config"] # [doc = " entries from the given backend entry are enumerated."] # [doc = ""] # [doc = " The regular expression is applied case-sensitively on the normalized form of"] # [doc = " the variable name: the section and variable parts are lower-cased. The"] # [doc = " subsection is left unchanged."] # [doc = ""] # [doc = " @param backend where to get the variables from"] # [doc = " @param regexp regular expression to match against config names (can be NULL)"] # [doc = " @param callback the function to call on each variable"] # [doc = " @param payload the data to pass to the callback"] pub fn git_config_backend_foreach_match (backend : * mut git_config_backend , regexp : * const :: std :: os :: raw :: c_char , callback : git_config_foreach_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Lock the backend with the highest priority"] # [doc = ""] # [doc = " Locking disallows anybody else from writing to that backend. Any"] # [doc = " updates made after locking will not be visible to a reader until"] # [doc = " the file is unlocked."] # [doc = ""] # [doc = " You can apply the changes by calling `git_transaction_commit()`"] # [doc = " before freeing the transaction. Either of these actions will unlock"] # [doc = " the config."] # [doc = ""] # [doc = " @param tx the resulting transaction, use this to commit or undo the"] # [doc = " changes"] # [doc = " @param cfg the configuration in which to lock"] # [doc = " @return 0 or an error code"] pub fn git_config_lock (tx : * mut * mut git_transaction , cfg : * mut git_config) -> :: std :: os :: raw :: c_int ; } pub const git_describe_strategy_t_GIT_DESCRIBE_DEFAULT : git_describe_strategy_t = 0 ; pub const git_describe_strategy_t_GIT_DESCRIBE_TAGS : git_describe_strategy_t = 1 ; pub const git_describe_strategy_t_GIT_DESCRIBE_ALL : git_describe_strategy_t = 2 ; # [doc = " Reference lookup strategy"] # [doc = ""] # [doc = " These behave like the --tags and --all options to git-describe,"] # [doc = " namely they say to look for any reference in either refs/tags/ or"] # [doc = " refs/ respectively."] pub type git_describe_strategy_t = :: std :: os :: raw :: c_uint ; # [doc = " Describe options structure"] # [doc = ""] # [doc = " Initialize with `GIT_DESCRIBE_OPTIONS_INIT`. Alternatively, you can"] # [doc = " use `git_describe_options_init`."] # [doc = ""] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_describe_options { pub version : :: std :: os :: raw :: c_uint , # [doc = "< default: 10"] pub max_candidates_tags : :: std :: os :: raw :: c_uint , # [doc = "< default: GIT_DESCRIBE_DEFAULT"] pub describe_strategy : :: std :: os :: raw :: c_uint , pub pattern : * const :: std :: os :: raw :: c_char , # [doc = " When calculating the distance from the matching tag or"] # [doc = " reference, only walk down the first-parent ancestry."] pub only_follow_first_parent : :: std :: os :: raw :: c_int , # [doc = " If no matching tag or reference is found, the describe"] # [doc = " operation would normally fail. If this option is set, it"] # [doc = " will instead fall back to showing the full id of the"] # [doc = " commit."] pub show_commit_oid_as_fallback : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_git_describe_options () { assert_eq ! (:: std :: mem :: size_of :: < git_describe_options > () , 32usize , concat ! ("Size of: " , stringify ! (git_describe_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_describe_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_describe_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_describe_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_describe_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_describe_options > ())) . max_candidates_tags as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_describe_options) , "::" , stringify ! (max_candidates_tags))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_describe_options > ())) . describe_strategy as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_describe_options) , "::" , stringify ! (describe_strategy))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_describe_options > ())) . pattern as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_describe_options) , "::" , stringify ! (pattern))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_describe_options > ())) . only_follow_first_parent as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_describe_options) , "::" , stringify ! (only_follow_first_parent))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_describe_options > ())) . show_commit_oid_as_fallback as * const _ as usize } , 28usize , concat ! ("Offset of field: " , stringify ! (git_describe_options) , "::" , stringify ! (show_commit_oid_as_fallback))) ; } extern "C" { # [doc = " Initialize git_describe_options structure"] # [doc = ""] # [doc = " Initializes a `git_describe_options` with default values. Equivalent to creating"] # [doc = " an instance with GIT_DESCRIBE_OPTIONS_INIT."] # [doc = ""] # [doc = " @param opts The `git_describe_options` struct to initialize."] # [doc = " @param version The struct version; pass `GIT_DESCRIBE_OPTIONS_VERSION`."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_describe_options_init (opts : * mut git_describe_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } # [doc = " Describe format options structure"] # [doc = ""] # [doc = " Initialize with `GIT_DESCRIBE_FORMAT_OPTIONS_INIT`. Alternatively, you can"] # [doc = " use `git_describe_format_options_init`."] # [doc = ""] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_describe_format_options { pub version : :: std :: os :: raw :: c_uint , # [doc = " Size of the abbreviated commit id to use. This value is the"] # [doc = " lower bound for the length of the abbreviated string. The"] # [doc = " default is 7."] pub abbreviated_size : :: std :: os :: raw :: c_uint , # [doc = " Set to use the long format even when a shorter name could be used."] pub always_use_long_format : :: std :: os :: raw :: c_int , # [doc = " If the workdir is dirty and this is set, this string will"] # [doc = " be appended to the description string."] pub dirty_suffix : * const :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_git_describe_format_options () { assert_eq ! (:: std :: mem :: size_of :: < git_describe_format_options > () , 24usize , concat ! ("Size of: " , stringify ! (git_describe_format_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_describe_format_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_describe_format_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_describe_format_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_describe_format_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_describe_format_options > ())) . abbreviated_size as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_describe_format_options) , "::" , stringify ! (abbreviated_size))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_describe_format_options > ())) . always_use_long_format as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_describe_format_options) , "::" , stringify ! (always_use_long_format))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_describe_format_options > ())) . dirty_suffix as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_describe_format_options) , "::" , stringify ! (dirty_suffix))) ; } extern "C" { # [doc = " Initialize git_describe_format_options structure"] # [doc = ""] # [doc = " Initializes a `git_describe_format_options` with default values. Equivalent to creating"] # [doc = " an instance with GIT_DESCRIBE_FORMAT_OPTIONS_INIT."] # [doc = ""] # [doc = " @param opts The `git_describe_format_options` struct to initialize."] # [doc = " @param version The struct version; pass `GIT_DESCRIBE_FORMAT_OPTIONS_VERSION`."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_describe_format_options_init (opts : * mut git_describe_format_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_describe_result { _unused : [u8 ; 0] , } extern "C" { # [doc = " Describe a commit"] # [doc = ""] # [doc = " Perform the describe operation on the given committish object."] # [doc = ""] # [doc = " @param result pointer to store the result. You must free this once"] # [doc = " you're done with it."] # [doc = " @param committish a committish to describe"] # [doc = " @param opts the lookup options (or NULL for defaults)"] pub fn git_describe_commit (result : * mut * mut git_describe_result , committish : * mut git_object , opts : * mut git_describe_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Describe a commit"] # [doc = ""] # [doc = " Perform the describe operation on the current commit and the"] # [doc = " worktree. After peforming describe on HEAD, a status is run and the"] # [doc = " description is considered to be dirty if there are."] # [doc = ""] # [doc = " @param out pointer to store the result. You must free this once"] # [doc = " you're done with it."] # [doc = " @param repo the repository in which to perform the describe"] # [doc = " @param opts the lookup options (or NULL for defaults)"] pub fn git_describe_workdir (out : * mut * mut git_describe_result , repo : * mut git_repository , opts : * mut git_describe_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Print the describe result to a buffer"] # [doc = ""] # [doc = " @param out The buffer to store the result"] # [doc = " @param result the result from `git_describe_commit()` or"] # [doc = " `git_describe_workdir()`."] # [doc = " @param opts the formatting options (or NULL for defaults)"] pub fn git_describe_format (out : * mut git_buf , result : * const git_describe_result , opts : * const git_describe_format_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free the describe result."] pub fn git_describe_result_free (result : * mut git_describe_result) ; } # [doc = "< No error"] pub const git_error_code_GIT_OK : git_error_code = 0 ; # [doc = "< Generic error"] pub const git_error_code_GIT_ERROR : git_error_code = - 1 ; # [doc = "< Requested object could not be found"] pub const git_error_code_GIT_ENOTFOUND : git_error_code = - 3 ; # [doc = "< Object exists preventing operation"] pub const git_error_code_GIT_EEXISTS : git_error_code = - 4 ; # [doc = "< More than one object matches"] pub const git_error_code_GIT_EAMBIGUOUS : git_error_code = - 5 ; # [doc = "< Output buffer too short to hold data"] pub const git_error_code_GIT_EBUFS : git_error_code = - 6 ; # [doc = " GIT_EUSER is a special error that is never generated by libgit2"] # [doc = " code.  You can return it from a callback (e.g to stop an iteration)"] # [doc = " to know that it was generated by the callback and not by libgit2."] pub const git_error_code_GIT_EUSER : git_error_code = - 7 ; # [doc = "< Operation not allowed on bare repository"] pub const git_error_code_GIT_EBAREREPO : git_error_code = - 8 ; # [doc = "< HEAD refers to branch with no commits"] pub const git_error_code_GIT_EUNBORNBRANCH : git_error_code = - 9 ; # [doc = "< Merge in progress prevented operation"] pub const git_error_code_GIT_EUNMERGED : git_error_code = - 10 ; # [doc = "< Reference was not fast-forwardable"] pub const git_error_code_GIT_ENONFASTFORWARD : git_error_code = - 11 ; # [doc = "< Name/ref spec was not in a valid format"] pub const git_error_code_GIT_EINVALIDSPEC : git_error_code = - 12 ; # [doc = "< Checkout conflicts prevented operation"] pub const git_error_code_GIT_ECONFLICT : git_error_code = - 13 ; # [doc = "< Lock file prevented operation"] pub const git_error_code_GIT_ELOCKED : git_error_code = - 14 ; # [doc = "< Reference value does not match expected"] pub const git_error_code_GIT_EMODIFIED : git_error_code = - 15 ; # [doc = "< Authentication error"] pub const git_error_code_GIT_EAUTH : git_error_code = - 16 ; # [doc = "< Server certificate is invalid"] pub const git_error_code_GIT_ECERTIFICATE : git_error_code = - 17 ; # [doc = "< Patch/merge has already been applied"] pub const git_error_code_GIT_EAPPLIED : git_error_code = - 18 ; # [doc = "< The requested peel operation is not possible"] pub const git_error_code_GIT_EPEEL : git_error_code = - 19 ; # [doc = "< Unexpected EOF"] pub const git_error_code_GIT_EEOF : git_error_code = - 20 ; # [doc = "< Invalid operation or input"] pub const git_error_code_GIT_EINVALID : git_error_code = - 21 ; # [doc = "< Uncommitted changes in index prevented operation"] pub const git_error_code_GIT_EUNCOMMITTED : git_error_code = - 22 ; # [doc = "< The operation is not valid for a directory"] pub const git_error_code_GIT_EDIRECTORY : git_error_code = - 23 ; # [doc = "< A merge conflict exists and cannot continue"] pub const git_error_code_GIT_EMERGECONFLICT : git_error_code = - 24 ; # [doc = "< A user-configured callback refused to act"] pub const git_error_code_GIT_PASSTHROUGH : git_error_code = - 30 ; # [doc = "< Signals end of iteration with iterator"] pub const git_error_code_GIT_ITEROVER : git_error_code = - 31 ; # [doc = "< Internal only"] pub const git_error_code_GIT_RETRY : git_error_code = - 32 ; # [doc = "< Hashsum mismatch in object"] pub const git_error_code_GIT_EMISMATCH : git_error_code = - 33 ; # [doc = "< Unsaved changes in the index would be overwritten"] pub const git_error_code_GIT_EINDEXDIRTY : git_error_code = - 34 ; # [doc = "< Patch application failed"] pub const git_error_code_GIT_EAPPLYFAIL : git_error_code = - 35 ; # [doc = " Generic return codes"] pub type git_error_code = :: std :: os :: raw :: c_int ; # [doc = " Structure to store extra details of the last error that occurred."] # [doc = ""] # [doc = " This is kept on a per-thread basis if GIT_THREADS was defined when the"] # [doc = " library was build, otherwise one is kept globally for the library"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_error { pub message : * mut :: std :: os :: raw :: c_char , pub klass : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_git_error () { assert_eq ! (:: std :: mem :: size_of :: < git_error > () , 16usize , concat ! ("Size of: " , stringify ! (git_error))) ; assert_eq ! (:: std :: mem :: align_of :: < git_error > () , 8usize , concat ! ("Alignment of " , stringify ! (git_error))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_error > ())) . message as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_error) , "::" , stringify ! (message))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_error > ())) . klass as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_error) , "::" , stringify ! (klass))) ; } pub const git_error_t_GIT_ERROR_NONE : git_error_t = 0 ; pub const git_error_t_GIT_ERROR_NOMEMORY : git_error_t = 1 ; pub const git_error_t_GIT_ERROR_OS : git_error_t = 2 ; pub const git_error_t_GIT_ERROR_INVALID : git_error_t = 3 ; pub const git_error_t_GIT_ERROR_REFERENCE : git_error_t = 4 ; pub const git_error_t_GIT_ERROR_ZLIB : git_error_t = 5 ; pub const git_error_t_GIT_ERROR_REPOSITORY : git_error_t = 6 ; pub const git_error_t_GIT_ERROR_CONFIG : git_error_t = 7 ; pub const git_error_t_GIT_ERROR_REGEX : git_error_t = 8 ; pub const git_error_t_GIT_ERROR_ODB : git_error_t = 9 ; pub const git_error_t_GIT_ERROR_INDEX : git_error_t = 10 ; pub const git_error_t_GIT_ERROR_OBJECT : git_error_t = 11 ; pub const git_error_t_GIT_ERROR_NET : git_error_t = 12 ; pub const git_error_t_GIT_ERROR_TAG : git_error_t = 13 ; pub const git_error_t_GIT_ERROR_TREE : git_error_t = 14 ; pub const git_error_t_GIT_ERROR_INDEXER : git_error_t = 15 ; pub const git_error_t_GIT_ERROR_SSL : git_error_t = 16 ; pub const git_error_t_GIT_ERROR_SUBMODULE : git_error_t = 17 ; pub const git_error_t_GIT_ERROR_THREAD : git_error_t = 18 ; pub const git_error_t_GIT_ERROR_STASH : git_error_t = 19 ; pub const git_error_t_GIT_ERROR_CHECKOUT : git_error_t = 20 ; pub const git_error_t_GIT_ERROR_FETCHHEAD : git_error_t = 21 ; pub const git_error_t_GIT_ERROR_MERGE : git_error_t = 22 ; pub const git_error_t_GIT_ERROR_SSH : git_error_t = 23 ; pub const git_error_t_GIT_ERROR_FILTER : git_error_t = 24 ; pub const git_error_t_GIT_ERROR_REVERT : git_error_t = 25 ; pub const git_error_t_GIT_ERROR_CALLBACK : git_error_t = 26 ; pub const git_error_t_GIT_ERROR_CHERRYPICK : git_error_t = 27 ; pub const git_error_t_GIT_ERROR_DESCRIBE : git_error_t = 28 ; pub const git_error_t_GIT_ERROR_REBASE : git_error_t = 29 ; pub const git_error_t_GIT_ERROR_FILESYSTEM : git_error_t = 30 ; pub const git_error_t_GIT_ERROR_PATCH : git_error_t = 31 ; pub const git_error_t_GIT_ERROR_WORKTREE : git_error_t = 32 ; pub const git_error_t_GIT_ERROR_SHA1 : git_error_t = 33 ; pub const git_error_t_GIT_ERROR_HTTP : git_error_t = 34 ; pub const git_error_t_GIT_ERROR_INTERNAL : git_error_t = 35 ; # [doc = " Error classes"] pub type git_error_t = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = " Return the last `git_error` object that was generated for the"] # [doc = " current thread."] # [doc = ""] # [doc = " The default behaviour of this function is to return NULL if no previous error has occurred."] # [doc = " However, libgit2's error strings are not cleared aggressively, so a prior"] # [doc = " (unrelated) error may be returned. This can be avoided by only calling"] # [doc = " this function if the prior call to a libgit2 API returned an error."] # [doc = ""] # [doc = " @return A git_error object."] pub fn git_error_last () -> * const git_error ; } extern "C" { # [doc = " Clear the last library error that occurred for this thread."] pub fn git_error_clear () ; } extern "C" { # [doc = " Set the error message string for this thread."] # [doc = ""] # [doc = " This function is public so that custom ODB backends and the like can"] # [doc = " relay an error message through libgit2.  Most regular users of libgit2"] # [doc = " will never need to call this function -- actually, calling it in most"] # [doc = " circumstances (for example, calling from within a callback function)"] # [doc = " will just end up having the value overwritten by libgit2 internals."] # [doc = ""] # [doc = " This error message is stored in thread-local storage and only applies"] # [doc = " to the particular thread that this libgit2 call is made from."] # [doc = ""] # [doc = " @param error_class One of the `git_error_t` enum above describing the"] # [doc = "                    general subsystem that is responsible for the error."] # [doc = " @param string The formatted error message to keep"] # [doc = " @return 0 on success or -1 on failure"] pub fn git_error_set_str (error_class : :: std :: os :: raw :: c_int , string : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Set the error message to a special value for memory allocation failure."] # [doc = ""] # [doc = " The normal `git_error_set_str()` function attempts to `strdup()` the"] # [doc = " string that is passed in.  This is not a good idea when the error in"] # [doc = " question is a memory allocation failure.  That circumstance has a"] # [doc = " special setter function that sets the error string to a known and"] # [doc = " statically allocated internal value."] pub fn git_error_set_oom () ; } pub const git_filter_mode_t_GIT_FILTER_TO_WORKTREE : git_filter_mode_t = 0 ; pub const git_filter_mode_t_GIT_FILTER_SMUDGE : git_filter_mode_t = 0 ; pub const git_filter_mode_t_GIT_FILTER_TO_ODB : git_filter_mode_t = 1 ; pub const git_filter_mode_t_GIT_FILTER_CLEAN : git_filter_mode_t = 1 ; # [doc = " Filters are applied in one of two directions: smudging - which is"] # [doc = " exporting a file from the Git object database to the working directory,"] # [doc = " and cleaning - which is importing a file from the working directory to"] # [doc = " the Git object database.  These values control which direction of"] # [doc = " change is being applied."] pub type git_filter_mode_t = :: std :: os :: raw :: c_uint ; pub const git_filter_flag_t_GIT_FILTER_DEFAULT : git_filter_flag_t = 0 ; # [doc = " Don't error for `safecrlf` violations, allow them to continue."] pub const git_filter_flag_t_GIT_FILTER_ALLOW_UNSAFE : git_filter_flag_t = 1 ; # [doc = " Don't load `/etc/gitattributes` (or the system equivalent)"] pub const git_filter_flag_t_GIT_FILTER_NO_SYSTEM_ATTRIBUTES : git_filter_flag_t = 2 ; # [doc = " Load attributes from `.gitattributes` in the root of HEAD"] pub const git_filter_flag_t_GIT_FILTER_ATTRIBUTES_FROM_HEAD : git_filter_flag_t = 4 ; # [doc = " Load attributes from `.gitattributes` in a given commit."] # [doc = " This can only be specified in a `git_filter_options`."] pub const git_filter_flag_t_GIT_FILTER_ATTRIBUTES_FROM_COMMIT : git_filter_flag_t = 8 ; # [doc = " Filter option flags."] pub type git_filter_flag_t = :: std :: os :: raw :: c_uint ; # [doc = " Filtering options"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_filter_options { pub version : :: std :: os :: raw :: c_uint , # [doc = " See `git_filter_flag_t` above"] pub flags : u32 , pub commit_id : * mut git_oid , # [doc = " The commit to load attributes from, when"] # [doc = " `GIT_FILTER_ATTRIBUTES_FROM_COMMIT` is specified."] pub attr_commit_id : git_oid , } # [test] fn bindgen_test_layout_git_filter_options () { assert_eq ! (:: std :: mem :: size_of :: < git_filter_options > () , 40usize , concat ! ("Size of: " , stringify ! (git_filter_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_filter_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_filter_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_filter_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_filter_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_filter_options > ())) . flags as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_filter_options) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_filter_options > ())) . commit_id as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_filter_options) , "::" , stringify ! (commit_id))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_filter_options > ())) . attr_commit_id as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_filter_options) , "::" , stringify ! (attr_commit_id))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_filter { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_filter_list { _unused : [u8 ; 0] , } extern "C" { # [doc = " Load the filter list for a given path."] # [doc = ""] # [doc = " This will return 0 (success) but set the output git_filter_list to NULL"] # [doc = " if no filters are requested for the given file."] # [doc = ""] # [doc = " @param filters Output newly created git_filter_list (or NULL)"] # [doc = " @param repo Repository object that contains `path`"] # [doc = " @param blob The blob to which the filter will be applied (if known)"] # [doc = " @param path Relative path of the file to be filtered"] # [doc = " @param mode Filtering direction (WT->ODB or ODB->WT)"] # [doc = " @param flags Combination of `git_filter_flag_t` flags"] # [doc = " @return 0 on success (which could still return NULL if no filters are"] # [doc = "         needed for the requested file), <0 on error"] pub fn git_filter_list_load (filters : * mut * mut git_filter_list , repo : * mut git_repository , blob : * mut git_blob , path : * const :: std :: os :: raw :: c_char , mode : git_filter_mode_t , flags : u32) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Load the filter list for a given path."] # [doc = ""] # [doc = " This will return 0 (success) but set the output git_filter_list to NULL"] # [doc = " if no filters are requested for the given file."] # [doc = ""] # [doc = " @param filters Output newly created git_filter_list (or NULL)"] # [doc = " @param repo Repository object that contains `path`"] # [doc = " @param blob The blob to which the filter will be applied (if known)"] # [doc = " @param path Relative path of the file to be filtered"] # [doc = " @param mode Filtering direction (WT->ODB or ODB->WT)"] # [doc = " @param opts The `git_filter_options` to use when loading filters"] # [doc = " @return 0 on success (which could still return NULL if no filters are"] # [doc = "         needed for the requested file), <0 on error"] pub fn git_filter_list_load_ext (filters : * mut * mut git_filter_list , repo : * mut git_repository , blob : * mut git_blob , path : * const :: std :: os :: raw :: c_char , mode : git_filter_mode_t , opts : * mut git_filter_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Query the filter list to see if a given filter (by name) will run."] # [doc = " The built-in filters \"crlf\" and \"ident\" can be queried, otherwise this"] # [doc = " is the name of the filter specified by the filter attribute."] # [doc = ""] # [doc = " This will return 0 if the given filter is not in the list, or 1 if"] # [doc = " the filter will be applied."] # [doc = ""] # [doc = " @param filters A loaded git_filter_list (or NULL)"] # [doc = " @param name The name of the filter to query"] # [doc = " @return 1 if the filter is in the list, 0 otherwise"] pub fn git_filter_list_contains (filters : * mut git_filter_list , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Apply filter list to a data buffer."] # [doc = ""] # [doc = " @param out Buffer to store the result of the filtering"] # [doc = " @param filters A loaded git_filter_list (or NULL)"] # [doc = " @param in Buffer containing the data to filter"] # [doc = " @param in_len The length of the input buffer"] # [doc = " @return 0 on success, an error code otherwise"] pub fn git_filter_list_apply_to_buffer (out : * mut git_buf , filters : * mut git_filter_list , in_ : * const :: std :: os :: raw :: c_char , in_len : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Apply a filter list to the contents of a file on disk"] # [doc = ""] # [doc = " @param out buffer into which to store the filtered file"] # [doc = " @param filters the list of filters to apply"] # [doc = " @param repo the repository in which to perform the filtering"] # [doc = " @param path the path of the file to filter, a relative path will be"] # [doc = " taken as relative to the workdir"] pub fn git_filter_list_apply_to_file (out : * mut git_buf , filters : * mut git_filter_list , repo : * mut git_repository , path : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Apply a filter list to the contents of a blob"] # [doc = ""] # [doc = " @param out buffer into which to store the filtered file"] # [doc = " @param filters the list of filters to apply"] # [doc = " @param blob the blob to filter"] pub fn git_filter_list_apply_to_blob (out : * mut git_buf , filters : * mut git_filter_list , blob : * mut git_blob) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Apply a filter list to an arbitrary buffer as a stream"] # [doc = ""] # [doc = " @param filters the list of filters to apply"] # [doc = " @param buffer the buffer to filter"] # [doc = " @param len the size of the buffer"] # [doc = " @param target the stream into which the data will be written"] pub fn git_filter_list_stream_buffer (filters : * mut git_filter_list , buffer : * const :: std :: os :: raw :: c_char , len : size_t , target : * mut git_writestream) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Apply a filter list to a file as a stream"] # [doc = ""] # [doc = " @param filters the list of filters to apply"] # [doc = " @param repo the repository in which to perform the filtering"] # [doc = " @param path the path of the file to filter, a relative path will be"] # [doc = " taken as relative to the workdir"] # [doc = " @param target the stream into which the data will be written"] pub fn git_filter_list_stream_file (filters : * mut git_filter_list , repo : * mut git_repository , path : * const :: std :: os :: raw :: c_char , target : * mut git_writestream) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Apply a filter list to a blob as a stream"] # [doc = ""] # [doc = " @param filters the list of filters to apply"] # [doc = " @param blob the blob to filter"] # [doc = " @param target the stream into which the data will be written"] pub fn git_filter_list_stream_blob (filters : * mut git_filter_list , blob : * mut git_blob , target : * mut git_writestream) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free a git_filter_list"] # [doc = ""] # [doc = " @param filters A git_filter_list created by `git_filter_list_load`"] pub fn git_filter_list_free (filters : * mut git_filter_list) ; } # [doc = " Rebase options"] # [doc = ""] # [doc = " Use to tell the rebase machinery how to operate."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_rebase_options { pub version : :: std :: os :: raw :: c_uint , # [doc = " Used by `git_rebase_init`, this will instruct other clients working"] # [doc = " on this rebase that you want a quiet rebase experience, which they"] # [doc = " may choose to provide in an application-specific manner.  This has no"] # [doc = " effect upon libgit2 directly, but is provided for interoperability"] # [doc = " between Git tools."] pub quiet : :: std :: os :: raw :: c_int , # [doc = " Used by `git_rebase_init`, this will begin an in-memory rebase,"] # [doc = " which will allow callers to step through the rebase operations and"] # [doc = " commit the rebased changes, but will not rewind HEAD or update the"] # [doc = " repository to be in a rebasing state.  This will not interfere with"] # [doc = " the working directory (if there is one)."] pub inmemory : :: std :: os :: raw :: c_int , # [doc = " Used by `git_rebase_finish`, this is the name of the notes reference"] # [doc = " used to rewrite notes for rebased commits when finishing the rebase;"] # [doc = " if NULL, the contents of the configuration option `notes.rewriteRef`"] # [doc = " is examined, unless the configuration option `notes.rewrite.rebase`"] # [doc = " is set to false.  If `notes.rewriteRef` is also NULL, notes will"] # [doc = " not be rewritten."] pub rewrite_notes_ref : * const :: std :: os :: raw :: c_char , # [doc = " Options to control how trees are merged during `git_rebase_next`."] pub merge_options : git_merge_options , # [doc = " Options to control how files are written during `git_rebase_init`,"] # [doc = " `git_rebase_next` and `git_rebase_abort`.  Note that a minimum"] # [doc = " strategy of `GIT_CHECKOUT_SAFE` is defaulted in `init` and `next`,"] # [doc = " and a minimum strategy of `GIT_CHECKOUT_FORCE` is defaulted in"] # [doc = " `abort` to match git semantics."] pub checkout_options : git_checkout_options , # [doc = " Optional callback that allows users to override commit"] # [doc = " creation in `git_rebase_commit`.  If specified, users can"] # [doc = " create their own commit and provide the commit ID, which"] # [doc = " may be useful for signing commits or otherwise customizing"] # [doc = " the commit creation."] # [doc = ""] # [doc = " If this callback returns `GIT_PASSTHROUGH`, then"] # [doc = " `git_rebase_commit` will continue to create the commit."] pub commit_create_cb : git_commit_create_cb , # [doc = " If provided, this will be called with the commit content, allowing"] # [doc = " a signature to be added to the rebase commit. Can be skipped with"] # [doc = " GIT_PASSTHROUGH. If GIT_PASSTHROUGH is returned, a commit will be made"] # [doc = " without a signature."] # [doc = ""] # [doc = " This field is only used when performing git_rebase_commit."] # [doc = ""] # [doc = " This callback is not invoked if a `git_commit_create_cb` is"] # [doc = " specified."] # [doc = ""] # [doc = " This callback is deprecated; users should provide a"] # [doc = " creation callback as `commit_create_cb` that produces a"] # [doc = " commit buffer, signs it, and commits it."] pub signing_cb : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut git_buf , arg2 : * mut git_buf , arg3 : * const :: std :: os :: raw :: c_char , arg4 : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = " This will be passed to each of the callbacks in this struct"] # [doc = " as the last parameter."] pub payload : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_git_rebase_options () { assert_eq ! (:: std :: mem :: size_of :: < git_rebase_options > () , 240usize , concat ! ("Size of: " , stringify ! (git_rebase_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_rebase_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_rebase_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_rebase_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_rebase_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_rebase_options > ())) . quiet as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_rebase_options) , "::" , stringify ! (quiet))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_rebase_options > ())) . inmemory as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_rebase_options) , "::" , stringify ! (inmemory))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_rebase_options > ())) . rewrite_notes_ref as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_rebase_options) , "::" , stringify ! (rewrite_notes_ref))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_rebase_options > ())) . merge_options as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_rebase_options) , "::" , stringify ! (merge_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_rebase_options > ())) . checkout_options as * const _ as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (git_rebase_options) , "::" , stringify ! (checkout_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_rebase_options > ())) . commit_create_cb as * const _ as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (git_rebase_options) , "::" , stringify ! (commit_create_cb))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_rebase_options > ())) . signing_cb as * const _ as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (git_rebase_options) , "::" , stringify ! (signing_cb))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_rebase_options > ())) . payload as * const _ as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (git_rebase_options) , "::" , stringify ! (payload))) ; } # [doc = " The given commit is to be cherry-picked.  The client should commit"] # [doc = " the changes and continue if there are no conflicts."] pub const git_rebase_operation_t_GIT_REBASE_OPERATION_PICK : git_rebase_operation_t = 0 ; # [doc = " The given commit is to be cherry-picked, but the client should prompt"] # [doc = " the user to provide an updated commit message."] pub const git_rebase_operation_t_GIT_REBASE_OPERATION_REWORD : git_rebase_operation_t = 1 ; # [doc = " The given commit is to be cherry-picked, but the client should stop"] # [doc = " to allow the user to edit the changes before committing them."] pub const git_rebase_operation_t_GIT_REBASE_OPERATION_EDIT : git_rebase_operation_t = 2 ; # [doc = " The given commit is to be squashed into the previous commit.  The"] # [doc = " commit message will be merged with the previous message."] pub const git_rebase_operation_t_GIT_REBASE_OPERATION_SQUASH : git_rebase_operation_t = 3 ; # [doc = " The given commit is to be squashed into the previous commit.  The"] # [doc = " commit message from this commit will be discarded."] pub const git_rebase_operation_t_GIT_REBASE_OPERATION_FIXUP : git_rebase_operation_t = 4 ; # [doc = " No commit will be cherry-picked.  The client should run the given"] # [doc = " command and (if successful) continue."] pub const git_rebase_operation_t_GIT_REBASE_OPERATION_EXEC : git_rebase_operation_t = 5 ; # [doc = " Type of rebase operation in-progress after calling `git_rebase_next`."] pub type git_rebase_operation_t = :: std :: os :: raw :: c_uint ; # [doc = " A rebase operation"] # [doc = ""] # [doc = " Describes a single instruction/operation to be performed during the"] # [doc = " rebase."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_rebase_operation { # [doc = " The type of rebase operation."] pub type_ : git_rebase_operation_t , # [doc = " The commit ID being cherry-picked.  This will be populated for"] # [doc = " all operations except those of type `GIT_REBASE_OPERATION_EXEC`."] pub id : git_oid , # [doc = " The executable the user has requested be run.  This will only"] # [doc = " be populated for operations of type `GIT_REBASE_OPERATION_EXEC`."] pub exec : * const :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_git_rebase_operation () { assert_eq ! (:: std :: mem :: size_of :: < git_rebase_operation > () , 32usize , concat ! ("Size of: " , stringify ! (git_rebase_operation))) ; assert_eq ! (:: std :: mem :: align_of :: < git_rebase_operation > () , 8usize , concat ! ("Alignment of " , stringify ! (git_rebase_operation))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_rebase_operation > ())) . type_ as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_rebase_operation) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_rebase_operation > ())) . id as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_rebase_operation) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_rebase_operation > ())) . exec as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_rebase_operation) , "::" , stringify ! (exec))) ; } extern "C" { # [doc = " Initialize git_rebase_options structure"] # [doc = ""] # [doc = " Initializes a `git_rebase_options` with default values. Equivalent to"] # [doc = " creating an instance with `GIT_REBASE_OPTIONS_INIT`."] # [doc = ""] # [doc = " @param opts The `git_rebase_options` struct to initialize."] # [doc = " @param version The struct version; pass `GIT_REBASE_OPTIONS_VERSION`."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_rebase_options_init (opts : * mut git_rebase_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Initializes a rebase operation to rebase the changes in `branch`"] # [doc = " relative to `upstream` onto another branch.  To begin the rebase"] # [doc = " process, call `git_rebase_next`.  When you have finished with this"] # [doc = " object, call `git_rebase_free`."] # [doc = ""] # [doc = " @param out Pointer to store the rebase object"] # [doc = " @param repo The repository to perform the rebase"] # [doc = " @param branch The terminal commit to rebase, or NULL to rebase the"] # [doc = "               current branch"] # [doc = " @param upstream The commit to begin rebasing from, or NULL to rebase all"] # [doc = "                 reachable commits"] # [doc = " @param onto The branch to rebase onto, or NULL to rebase onto the given"] # [doc = "             upstream"] # [doc = " @param opts Options to specify how rebase is performed, or NULL"] # [doc = " @return Zero on success; -1 on failure."] pub fn git_rebase_init (out : * mut * mut git_rebase , repo : * mut git_repository , branch : * const git_annotated_commit , upstream : * const git_annotated_commit , onto : * const git_annotated_commit , opts : * const git_rebase_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Opens an existing rebase that was previously started by either an"] # [doc = " invocation of `git_rebase_init` or by another client."] # [doc = ""] # [doc = " @param out Pointer to store the rebase object"] # [doc = " @param repo The repository that has a rebase in-progress"] # [doc = " @param opts Options to specify how rebase is performed"] # [doc = " @return Zero on success; -1 on failure."] pub fn git_rebase_open (out : * mut * mut git_rebase , repo : * mut git_repository , opts : * const git_rebase_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Gets the original `HEAD` ref name for merge rebases."] # [doc = ""] # [doc = " @return The original `HEAD` ref name"] pub fn git_rebase_orig_head_name (rebase : * mut git_rebase) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Gets the original `HEAD` id for merge rebases."] # [doc = ""] # [doc = " @return The original `HEAD` id"] pub fn git_rebase_orig_head_id (rebase : * mut git_rebase) -> * const git_oid ; } extern "C" { # [doc = " Gets the `onto` ref name for merge rebases."] # [doc = ""] # [doc = " @return The `onto` ref name"] pub fn git_rebase_onto_name (rebase : * mut git_rebase) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Gets the `onto` id for merge rebases."] # [doc = ""] # [doc = " @return The `onto` id"] pub fn git_rebase_onto_id (rebase : * mut git_rebase) -> * const git_oid ; } extern "C" { # [doc = " Gets the count of rebase operations that are to be applied."] # [doc = ""] # [doc = " @param rebase The in-progress rebase"] # [doc = " @return The number of rebase operations in total"] pub fn git_rebase_operation_entrycount (rebase : * mut git_rebase) -> size_t ; } extern "C" { # [doc = " Gets the index of the rebase operation that is currently being applied."] # [doc = " If the first operation has not yet been applied (because you have"] # [doc = " called `init` but not yet `next`) then this returns"] # [doc = " `GIT_REBASE_NO_OPERATION`."] # [doc = ""] # [doc = " @param rebase The in-progress rebase"] # [doc = " @return The index of the rebase operation currently being applied."] pub fn git_rebase_operation_current (rebase : * mut git_rebase) -> size_t ; } extern "C" { # [doc = " Gets the rebase operation specified by the given index."] # [doc = ""] # [doc = " @param rebase The in-progress rebase"] # [doc = " @param idx The index of the rebase operation to retrieve"] # [doc = " @return The rebase operation or NULL if `idx` was out of bounds"] pub fn git_rebase_operation_byindex (rebase : * mut git_rebase , idx : size_t) -> * mut git_rebase_operation ; } extern "C" { # [doc = " Performs the next rebase operation and returns the information about it."] # [doc = " If the operation is one that applies a patch (which is any operation except"] # [doc = " GIT_REBASE_OPERATION_EXEC) then the patch will be applied and the index and"] # [doc = " working directory will be updated with the changes.  If there are conflicts,"] # [doc = " you will need to address those before committing the changes."] # [doc = ""] # [doc = " @param operation Pointer to store the rebase operation that is to be performed next"] # [doc = " @param rebase The rebase in progress"] # [doc = " @return Zero on success; -1 on failure."] pub fn git_rebase_next (operation : * mut * mut git_rebase_operation , rebase : * mut git_rebase) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Gets the index produced by the last operation, which is the result"] # [doc = " of `git_rebase_next` and which will be committed by the next"] # [doc = " invocation of `git_rebase_commit`.  This is useful for resolving"] # [doc = " conflicts in an in-memory rebase before committing them.  You must"] # [doc = " call `git_index_free` when you are finished with this."] # [doc = ""] # [doc = " This is only applicable for in-memory rebases; for rebases within"] # [doc = " a working directory, the changes were applied to the repository's"] # [doc = " index."] pub fn git_rebase_inmemory_index (index : * mut * mut git_index , rebase : * mut git_rebase) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Commits the current patch.  You must have resolved any conflicts that"] # [doc = " were introduced during the patch application from the `git_rebase_next`"] # [doc = " invocation."] # [doc = ""] # [doc = " @param id Pointer in which to store the OID of the newly created commit"] # [doc = " @param rebase The rebase that is in-progress"] # [doc = " @param author The author of the updated commit, or NULL to keep the"] # [doc = "        author from the original commit"] # [doc = " @param committer The committer of the rebase"] # [doc = " @param message_encoding The encoding for the message in the commit,"] # [doc = "        represented with a standard encoding name.  If message is NULL,"] # [doc = "        this should also be NULL, and the encoding from the original"] # [doc = "        commit will be maintained.  If message is specified, this may be"] # [doc = "        NULL to indicate that \"UTF-8\" is to be used."] # [doc = " @param message The message for this commit, or NULL to use the message"] # [doc = "        from the original commit."] # [doc = " @return Zero on success, GIT_EUNMERGED if there are unmerged changes in"] # [doc = "        the index, GIT_EAPPLIED if the current commit has already"] # [doc = "        been applied to the upstream and there is nothing to commit,"] # [doc = "        -1 on failure."] pub fn git_rebase_commit (id : * mut git_oid , rebase : * mut git_rebase , author : * const git_signature , committer : * const git_signature , message_encoding : * const :: std :: os :: raw :: c_char , message : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Aborts a rebase that is currently in progress, resetting the repository"] # [doc = " and working directory to their state before rebase began."] # [doc = ""] # [doc = " @param rebase The rebase that is in-progress"] # [doc = " @return Zero on success; GIT_ENOTFOUND if a rebase is not in progress,"] # [doc = "         -1 on other errors."] pub fn git_rebase_abort (rebase : * mut git_rebase) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Finishes a rebase that is currently in progress once all patches have"] # [doc = " been applied."] # [doc = ""] # [doc = " @param rebase The rebase that is in-progress"] # [doc = " @param signature The identity that is finishing the rebase (optional)"] # [doc = " @return Zero on success; -1 on error"] pub fn git_rebase_finish (rebase : * mut git_rebase , signature : * const git_signature) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Frees the `git_rebase` object."] # [doc = ""] # [doc = " @param rebase The rebase object"] pub fn git_rebase_free (rebase : * mut git_rebase) ; } # [doc = " No tracing will be performed."] pub const git_trace_level_t_GIT_TRACE_NONE : git_trace_level_t = 0 ; # [doc = " Severe errors that may impact the program's execution"] pub const git_trace_level_t_GIT_TRACE_FATAL : git_trace_level_t = 1 ; # [doc = " Errors that do not impact the program's execution"] pub const git_trace_level_t_GIT_TRACE_ERROR : git_trace_level_t = 2 ; # [doc = " Warnings that suggest abnormal data"] pub const git_trace_level_t_GIT_TRACE_WARN : git_trace_level_t = 3 ; # [doc = " Informational messages about program execution"] pub const git_trace_level_t_GIT_TRACE_INFO : git_trace_level_t = 4 ; # [doc = " Detailed data that allows for debugging"] pub const git_trace_level_t_GIT_TRACE_DEBUG : git_trace_level_t = 5 ; # [doc = " Exceptionally detailed debugging data"] pub const git_trace_level_t_GIT_TRACE_TRACE : git_trace_level_t = 6 ; # [doc = " Available tracing levels.  When tracing is set to a particular level,"] # [doc = " callers will be provided tracing at the given level and all lower levels."] pub type git_trace_level_t = :: std :: os :: raw :: c_uint ; # [doc = " An instance for a tracing function"] pub type git_trace_cb = :: std :: option :: Option < unsafe extern "C" fn (level : git_trace_level_t , msg : * const :: std :: os :: raw :: c_char) > ; extern "C" { # [doc = " Sets the system tracing configuration to the specified level with the"] # [doc = " specified callback.  When system events occur at a level equal to, or"] # [doc = " lower than, the given level they will be reported to the given callback."] # [doc = ""] # [doc = " @param level Level to set tracing to"] # [doc = " @param cb Function to call with trace data"] # [doc = " @return 0 or an error code"] pub fn git_trace_set (level : git_trace_level_t , cb : git_trace_cb) -> :: std :: os :: raw :: c_int ; } # [doc = " Options for revert"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_revert_options { pub version : :: std :: os :: raw :: c_uint , # [doc = " For merge commits, the \"mainline\" is treated as the parent."] pub mainline : :: std :: os :: raw :: c_uint , # [doc = "< Options for the merging"] pub merge_opts : git_merge_options , # [doc = "< Options for the checkout"] pub checkout_opts : git_checkout_options , } # [test] fn bindgen_test_layout_git_revert_options () { assert_eq ! (:: std :: mem :: size_of :: < git_revert_options > () , 200usize , concat ! ("Size of: " , stringify ! (git_revert_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_revert_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_revert_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_revert_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_revert_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_revert_options > ())) . mainline as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_revert_options) , "::" , stringify ! (mainline))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_revert_options > ())) . merge_opts as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_revert_options) , "::" , stringify ! (merge_opts))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_revert_options > ())) . checkout_opts as * const _ as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (git_revert_options) , "::" , stringify ! (checkout_opts))) ; } extern "C" { # [doc = " Initialize git_revert_options structure"] # [doc = ""] # [doc = " Initializes a `git_revert_options` with default values. Equivalent to"] # [doc = " creating an instance with `GIT_REVERT_OPTIONS_INIT`."] # [doc = ""] # [doc = " @param opts The `git_revert_options` struct to initialize."] # [doc = " @param version The struct version; pass `GIT_REVERT_OPTIONS_VERSION`."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_revert_options_init (opts : * mut git_revert_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Reverts the given commit against the given \"our\" commit, producing an"] # [doc = " index that reflects the result of the revert."] # [doc = ""] # [doc = " The returned index must be freed explicitly with `git_index_free`."] # [doc = ""] # [doc = " @param out pointer to store the index result in"] # [doc = " @param repo the repository that contains the given commits"] # [doc = " @param revert_commit the commit to revert"] # [doc = " @param our_commit the commit to revert against (eg, HEAD)"] # [doc = " @param mainline the parent of the revert commit, if it is a merge"] # [doc = " @param merge_options the merge options (or null for defaults)"] # [doc = " @return zero on success, -1 on failure."] pub fn git_revert_commit (out : * mut * mut git_index , repo : * mut git_repository , revert_commit : * mut git_commit , our_commit : * mut git_commit , mainline : :: std :: os :: raw :: c_uint , merge_options : * const git_merge_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Reverts the given commit, producing changes in the index and working directory."] # [doc = ""] # [doc = " @param repo the repository to revert"] # [doc = " @param commit the commit to revert"] # [doc = " @param given_opts the revert options (or null for defaults)"] # [doc = " @return zero on success, -1 on failure."] pub fn git_revert (repo : * mut git_repository , commit : * mut git_commit , given_opts : * const git_revert_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Find a single object, as specified by a revision string."] # [doc = ""] # [doc = " See `man gitrevisions`, or"] # [doc = " http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for"] # [doc = " information on the syntax accepted."] # [doc = ""] # [doc = " The returned object should be released with `git_object_free` when no"] # [doc = " longer needed."] # [doc = ""] # [doc = " @param out pointer to output object"] # [doc = " @param repo the repository to search in"] # [doc = " @param spec the textual specification for an object"] # [doc = " @return 0 on success, GIT_ENOTFOUND, GIT_EAMBIGUOUS, GIT_EINVALIDSPEC or an error code"] pub fn git_revparse_single (out : * mut * mut git_object , repo : * mut git_repository , spec : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Find a single object and intermediate reference by a revision string."] # [doc = ""] # [doc = " See `man gitrevisions`, or"] # [doc = " http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for"] # [doc = " information on the syntax accepted."] # [doc = ""] # [doc = " In some cases (`@{<-n>}` or `<branchname>@{upstream}`), the expression may"] # [doc = " point to an intermediate reference. When such expressions are being passed"] # [doc = " in, `reference_out` will be valued as well."] # [doc = ""] # [doc = " The returned object should be released with `git_object_free` and the"] # [doc = " returned reference with `git_reference_free` when no longer needed."] # [doc = ""] # [doc = " @param object_out pointer to output object"] # [doc = " @param reference_out pointer to output reference or NULL"] # [doc = " @param repo the repository to search in"] # [doc = " @param spec the textual specification for an object"] # [doc = " @return 0 on success, GIT_ENOTFOUND, GIT_EAMBIGUOUS, GIT_EINVALIDSPEC"] # [doc = " or an error code"] pub fn git_revparse_ext (object_out : * mut * mut git_object , reference_out : * mut * mut git_reference , repo : * mut git_repository , spec : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } # [doc = " The spec targeted a single object."] pub const git_revspec_t_GIT_REVSPEC_SINGLE : git_revspec_t = 1 ; # [doc = " The spec targeted a range of commits."] pub const git_revspec_t_GIT_REVSPEC_RANGE : git_revspec_t = 2 ; # [doc = " The spec used the '...' operator, which invokes special semantics."] pub const git_revspec_t_GIT_REVSPEC_MERGE_BASE : git_revspec_t = 4 ; # [doc = " Revparse flags.  These indicate the intended behavior of the spec passed to"] # [doc = " git_revparse."] pub type git_revspec_t = :: std :: os :: raw :: c_uint ; # [doc = " Git Revision Spec: output of a `git_revparse` operation"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_revspec { # [doc = " The left element of the revspec; must be freed by the user"] pub from : * mut git_object , # [doc = " The right element of the revspec; must be freed by the user"] pub to : * mut git_object , # [doc = " The intent of the revspec (i.e. `git_revspec_mode_t` flags)"] pub flags : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_git_revspec () { assert_eq ! (:: std :: mem :: size_of :: < git_revspec > () , 24usize , concat ! ("Size of: " , stringify ! (git_revspec))) ; assert_eq ! (:: std :: mem :: align_of :: < git_revspec > () , 8usize , concat ! ("Alignment of " , stringify ! (git_revspec))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_revspec > ())) . from as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_revspec) , "::" , stringify ! (from))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_revspec > ())) . to as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_revspec) , "::" , stringify ! (to))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_revspec > ())) . flags as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_revspec) , "::" , stringify ! (flags))) ; } extern "C" { # [doc = " Parse a revision string for `from`, `to`, and intent."] # [doc = ""] # [doc = " See `man gitrevisions` or"] # [doc = " http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for"] # [doc = " information on the syntax accepted."] # [doc = ""] # [doc = " @param revspec Pointer to an user-allocated git_revspec struct where"] # [doc = "\t              the result of the rev-parse will be stored"] # [doc = " @param repo the repository to search in"] # [doc = " @param spec the rev-parse spec to parse"] # [doc = " @return 0 on success, GIT_INVALIDSPEC, GIT_ENOTFOUND, GIT_EAMBIGUOUS or an error code"] pub fn git_revparse (revspec : * mut git_revspec , repo : * mut git_repository , spec : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } # [doc = " No option, default"] pub const git_stash_flags_GIT_STASH_DEFAULT : git_stash_flags = 0 ; # [doc = " All changes already added to the index are left intact in"] # [doc = " the working directory"] pub const git_stash_flags_GIT_STASH_KEEP_INDEX : git_stash_flags = 1 ; # [doc = " All untracked files are also stashed and then cleaned up"] # [doc = " from the working directory"] pub const git_stash_flags_GIT_STASH_INCLUDE_UNTRACKED : git_stash_flags = 2 ; # [doc = " All ignored files are also stashed and then cleaned up from"] # [doc = " the working directory"] pub const git_stash_flags_GIT_STASH_INCLUDE_IGNORED : git_stash_flags = 4 ; # [doc = " Stash flags"] pub type git_stash_flags = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = " Save the local modifications to a new stash."] # [doc = ""] # [doc = " @param out Object id of the commit containing the stashed state."] # [doc = " This commit is also the target of the direct reference refs/stash."] # [doc = ""] # [doc = " @param repo The owning repository."] # [doc = ""] # [doc = " @param stasher The identity of the person performing the stashing."] # [doc = ""] # [doc = " @param message Optional description along with the stashed state."] # [doc = ""] # [doc = " @param flags Flags to control the stashing process. (see GIT_STASH_* above)"] # [doc = ""] # [doc = " @return 0 on success, GIT_ENOTFOUND where there's nothing to stash,"] # [doc = " or error code."] pub fn git_stash_save (out : * mut git_oid , repo : * mut git_repository , stasher : * const git_signature , message : * const :: std :: os :: raw :: c_char , flags : u32) -> :: std :: os :: raw :: c_int ; } pub const git_stash_apply_flags_GIT_STASH_APPLY_DEFAULT : git_stash_apply_flags = 0 ; pub const git_stash_apply_flags_GIT_STASH_APPLY_REINSTATE_INDEX : git_stash_apply_flags = 1 ; # [doc = " Stash application flags."] pub type git_stash_apply_flags = :: std :: os :: raw :: c_uint ; pub const git_stash_apply_progress_t_GIT_STASH_APPLY_PROGRESS_NONE : git_stash_apply_progress_t = 0 ; # [doc = " Loading the stashed data from the object database."] pub const git_stash_apply_progress_t_GIT_STASH_APPLY_PROGRESS_LOADING_STASH : git_stash_apply_progress_t = 1 ; # [doc = " The stored index is being analyzed."] pub const git_stash_apply_progress_t_GIT_STASH_APPLY_PROGRESS_ANALYZE_INDEX : git_stash_apply_progress_t = 2 ; # [doc = " The modified files are being analyzed."] pub const git_stash_apply_progress_t_GIT_STASH_APPLY_PROGRESS_ANALYZE_MODIFIED : git_stash_apply_progress_t = 3 ; # [doc = " The untracked and ignored files are being analyzed."] pub const git_stash_apply_progress_t_GIT_STASH_APPLY_PROGRESS_ANALYZE_UNTRACKED : git_stash_apply_progress_t = 4 ; # [doc = " The untracked files are being written to disk."] pub const git_stash_apply_progress_t_GIT_STASH_APPLY_PROGRESS_CHECKOUT_UNTRACKED : git_stash_apply_progress_t = 5 ; # [doc = " The modified files are being written to disk."] pub const git_stash_apply_progress_t_GIT_STASH_APPLY_PROGRESS_CHECKOUT_MODIFIED : git_stash_apply_progress_t = 6 ; # [doc = " The stash was applied successfully."] pub const git_stash_apply_progress_t_GIT_STASH_APPLY_PROGRESS_DONE : git_stash_apply_progress_t = 7 ; # [doc = " Stash apply progression states"] pub type git_stash_apply_progress_t = :: std :: os :: raw :: c_uint ; # [doc = " Stash application progress notification function."] # [doc = " Return 0 to continue processing, or a negative value to"] # [doc = " abort the stash application."] pub type git_stash_apply_progress_cb = :: std :: option :: Option < unsafe extern "C" fn (progress : git_stash_apply_progress_t , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = " Stash application options structure"] # [doc = ""] # [doc = " Initialize with `GIT_STASH_APPLY_OPTIONS_INIT`. Alternatively, you can"] # [doc = " use `git_stash_apply_options_init`."] # [doc = ""] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_stash_apply_options { pub version : :: std :: os :: raw :: c_uint , # [doc = " See `git_stash_apply_flags`, above."] pub flags : u32 , # [doc = " Options to use when writing files to the working directory."] pub checkout_options : git_checkout_options , # [doc = " Optional callback to notify the consumer of application progress."] pub progress_cb : git_stash_apply_progress_cb , pub progress_payload : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_git_stash_apply_options () { assert_eq ! (:: std :: mem :: size_of :: < git_stash_apply_options > () , 168usize , concat ! ("Size of: " , stringify ! (git_stash_apply_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_stash_apply_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_stash_apply_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_stash_apply_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_stash_apply_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_stash_apply_options > ())) . flags as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_stash_apply_options) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_stash_apply_options > ())) . checkout_options as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_stash_apply_options) , "::" , stringify ! (checkout_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_stash_apply_options > ())) . progress_cb as * const _ as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (git_stash_apply_options) , "::" , stringify ! (progress_cb))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_stash_apply_options > ())) . progress_payload as * const _ as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (git_stash_apply_options) , "::" , stringify ! (progress_payload))) ; } extern "C" { # [doc = " Initialize git_stash_apply_options structure"] # [doc = ""] # [doc = " Initializes a `git_stash_apply_options` with default values. Equivalent to"] # [doc = " creating an instance with `GIT_STASH_APPLY_OPTIONS_INIT`."] # [doc = ""] # [doc = " @param opts The `git_stash_apply_options` struct to initialize."] # [doc = " @param version The struct version; pass `GIT_STASH_APPLY_OPTIONS_VERSION`."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_stash_apply_options_init (opts : * mut git_stash_apply_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Apply a single stashed state from the stash list."] # [doc = ""] # [doc = " If local changes in the working directory conflict with changes in the"] # [doc = " stash then GIT_EMERGECONFLICT will be returned.  In this case, the index"] # [doc = " will always remain unmodified and all files in the working directory will"] # [doc = " remain unmodified.  However, if you are restoring untracked files or"] # [doc = " ignored files and there is a conflict when applying the modified files,"] # [doc = " then those files will remain in the working directory."] # [doc = ""] # [doc = " If passing the GIT_STASH_APPLY_REINSTATE_INDEX flag and there would be"] # [doc = " conflicts when reinstating the index, the function will return"] # [doc = " GIT_EMERGECONFLICT and both the working directory and index will be left"] # [doc = " unmodified."] # [doc = ""] # [doc = " Note that a minimum checkout strategy of `GIT_CHECKOUT_SAFE` is implied."] # [doc = ""] # [doc = " @param repo The owning repository."] # [doc = " @param index The position within the stash list. 0 points to the"] # [doc = "              most recent stashed state."] # [doc = " @param options Optional options to control how stashes are applied."] # [doc = ""] # [doc = " @return 0 on success, GIT_ENOTFOUND if there's no stashed state for the"] # [doc = "         given index, GIT_EMERGECONFLICT if changes exist in the working"] # [doc = "         directory, or an error code"] pub fn git_stash_apply (repo : * mut git_repository , index : size_t , options : * const git_stash_apply_options) -> :: std :: os :: raw :: c_int ; } # [doc = " This is a callback function you can provide to iterate over all the"] # [doc = " stashed states that will be invoked per entry."] # [doc = ""] # [doc = " @param index The position within the stash list. 0 points to the"] # [doc = "              most recent stashed state."] # [doc = " @param message The stash message."] # [doc = " @param stash_id The commit oid of the stashed state."] # [doc = " @param payload Extra parameter to callback function."] # [doc = " @return 0 to continue iterating or non-zero to stop."] pub type git_stash_cb = :: std :: option :: Option < unsafe extern "C" fn (index : size_t , message : * const :: std :: os :: raw :: c_char , stash_id : * const git_oid , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; extern "C" { # [doc = " Loop over all the stashed states and issue a callback for each one."] # [doc = ""] # [doc = " If the callback returns a non-zero value, this will stop looping."] # [doc = ""] # [doc = " @param repo Repository where to find the stash."] # [doc = ""] # [doc = " @param callback Callback to invoke per found stashed state. The most"] # [doc = "                 recent stash state will be enumerated first."] # [doc = ""] # [doc = " @param payload Extra parameter to callback function."] # [doc = ""] # [doc = " @return 0 on success, non-zero callback return value, or error code."] pub fn git_stash_foreach (repo : * mut git_repository , callback : git_stash_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Remove a single stashed state from the stash list."] # [doc = ""] # [doc = " @param repo The owning repository."] # [doc = ""] # [doc = " @param index The position within the stash list. 0 points to the"] # [doc = " most recent stashed state."] # [doc = ""] # [doc = " @return 0 on success, GIT_ENOTFOUND if there's no stashed state for the given"] # [doc = " index, or error code."] pub fn git_stash_drop (repo : * mut git_repository , index : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Apply a single stashed state from the stash list and remove it from the list"] # [doc = " if successful."] # [doc = ""] # [doc = " @param repo The owning repository."] # [doc = " @param index The position within the stash list. 0 points to the"] # [doc = "              most recent stashed state."] # [doc = " @param options Optional options to control how stashes are applied."] # [doc = ""] # [doc = " @return 0 on success, GIT_ENOTFOUND if there's no stashed state for the given"] # [doc = " index, or error code. (see git_stash_apply() above for details)"] pub fn git_stash_pop (repo : * mut git_repository , index : size_t , options : * const git_stash_apply_options) -> :: std :: os :: raw :: c_int ; } pub const git_status_t_GIT_STATUS_CURRENT : git_status_t = 0 ; pub const git_status_t_GIT_STATUS_INDEX_NEW : git_status_t = 1 ; pub const git_status_t_GIT_STATUS_INDEX_MODIFIED : git_status_t = 2 ; pub const git_status_t_GIT_STATUS_INDEX_DELETED : git_status_t = 4 ; pub const git_status_t_GIT_STATUS_INDEX_RENAMED : git_status_t = 8 ; pub const git_status_t_GIT_STATUS_INDEX_TYPECHANGE : git_status_t = 16 ; pub const git_status_t_GIT_STATUS_WT_NEW : git_status_t = 128 ; pub const git_status_t_GIT_STATUS_WT_MODIFIED : git_status_t = 256 ; pub const git_status_t_GIT_STATUS_WT_DELETED : git_status_t = 512 ; pub const git_status_t_GIT_STATUS_WT_TYPECHANGE : git_status_t = 1024 ; pub const git_status_t_GIT_STATUS_WT_RENAMED : git_status_t = 2048 ; pub const git_status_t_GIT_STATUS_WT_UNREADABLE : git_status_t = 4096 ; pub const git_status_t_GIT_STATUS_IGNORED : git_status_t = 16384 ; pub const git_status_t_GIT_STATUS_CONFLICTED : git_status_t = 32768 ; # [doc = " Status flags for a single file."] # [doc = ""] # [doc = " A combination of these values will be returned to indicate the status of"] # [doc = " a file.  Status compares the working directory, the index, and the"] # [doc = " current HEAD of the repository.  The `GIT_STATUS_INDEX` set of flags"] # [doc = " represents the status of file in the index relative to the HEAD, and the"] # [doc = " `GIT_STATUS_WT` set of flags represent the status of the file in the"] # [doc = " working directory relative to the index."] pub type git_status_t = :: std :: os :: raw :: c_uint ; # [doc = " Function pointer to receive status on individual files"] # [doc = ""] # [doc = " `path` is the relative path to the file from the root of the repository."] # [doc = ""] # [doc = " `status_flags` is a combination of `git_status_t` values that apply."] # [doc = ""] # [doc = " `payload` is the value you passed to the foreach function as payload."] pub type git_status_cb = :: std :: option :: Option < unsafe extern "C" fn (path : * const :: std :: os :: raw :: c_char , status_flags : :: std :: os :: raw :: c_uint , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = " The default. This roughly matches `git status --porcelain` regarding"] # [doc = " which files are included and in what order."] pub const git_status_show_t_GIT_STATUS_SHOW_INDEX_AND_WORKDIR : git_status_show_t = 0 ; # [doc = " Only gives status based on HEAD to index comparison, not looking at"] # [doc = " working directory changes."] pub const git_status_show_t_GIT_STATUS_SHOW_INDEX_ONLY : git_status_show_t = 1 ; # [doc = " Only gives status based on index to working directory comparison,"] # [doc = " not comparing the index to the HEAD."] pub const git_status_show_t_GIT_STATUS_SHOW_WORKDIR_ONLY : git_status_show_t = 2 ; # [doc = " Select the files on which to report status."] # [doc = ""] # [doc = " With `git_status_foreach_ext`, this will control which changes get"] # [doc = " callbacks.  With `git_status_list_new`, these will control which"] # [doc = " changes are included in the list."] pub type git_status_show_t = :: std :: os :: raw :: c_uint ; # [doc = " Says that callbacks should be made on untracked files."] # [doc = " These will only be made if the workdir files are included in the status"] # [doc = " \"show\" option."] pub const git_status_opt_t_GIT_STATUS_OPT_INCLUDE_UNTRACKED : git_status_opt_t = 1 ; # [doc = " Says that ignored files get callbacks."] # [doc = " Again, these callbacks will only be made if the workdir files are"] # [doc = " included in the status \"show\" option."] pub const git_status_opt_t_GIT_STATUS_OPT_INCLUDE_IGNORED : git_status_opt_t = 2 ; # [doc = " Indicates that callback should be made even on unmodified files."] pub const git_status_opt_t_GIT_STATUS_OPT_INCLUDE_UNMODIFIED : git_status_opt_t = 4 ; # [doc = " Indicates that submodules should be skipped."] # [doc = " This only applies if there are no pending typechanges to the submodule"] # [doc = " (either from or to another type)."] pub const git_status_opt_t_GIT_STATUS_OPT_EXCLUDE_SUBMODULES : git_status_opt_t = 8 ; # [doc = " Indicates that all files in untracked directories should be included."] # [doc = " Normally if an entire directory is new, then just the top-level"] # [doc = " directory is included (with a trailing slash on the entry name)."] # [doc = " This flag says to include all of the individual files in the directory"] # [doc = " instead."] pub const git_status_opt_t_GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS : git_status_opt_t = 16 ; # [doc = " Indicates that the given path should be treated as a literal path,"] # [doc = " and not as a pathspec pattern."] pub const git_status_opt_t_GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH : git_status_opt_t = 32 ; # [doc = " Indicates that the contents of ignored directories should be included"] # [doc = " in the status. This is like doing `git ls-files -o -i --exclude-standard`"] # [doc = " with core git."] pub const git_status_opt_t_GIT_STATUS_OPT_RECURSE_IGNORED_DIRS : git_status_opt_t = 64 ; # [doc = " Indicates that rename detection should be processed between the head and"] # [doc = " the index and enables the GIT_STATUS_INDEX_RENAMED as a possible status"] # [doc = " flag."] pub const git_status_opt_t_GIT_STATUS_OPT_RENAMES_HEAD_TO_INDEX : git_status_opt_t = 128 ; # [doc = " Indicates that rename detection should be run between the index and the"] # [doc = " working directory and enabled GIT_STATUS_WT_RENAMED as a possible status"] # [doc = " flag."] pub const git_status_opt_t_GIT_STATUS_OPT_RENAMES_INDEX_TO_WORKDIR : git_status_opt_t = 256 ; # [doc = " Overrides the native case sensitivity for the file system and forces"] # [doc = " the output to be in case-sensitive order."] pub const git_status_opt_t_GIT_STATUS_OPT_SORT_CASE_SENSITIVELY : git_status_opt_t = 512 ; # [doc = " Overrides the native case sensitivity for the file system and forces"] # [doc = " the output to be in case-insensitive order."] pub const git_status_opt_t_GIT_STATUS_OPT_SORT_CASE_INSENSITIVELY : git_status_opt_t = 1024 ; # [doc = " Iindicates that rename detection should include rewritten files."] pub const git_status_opt_t_GIT_STATUS_OPT_RENAMES_FROM_REWRITES : git_status_opt_t = 2048 ; # [doc = " Bypasses the default status behavior of doing a \"soft\" index reload"] # [doc = " (i.e. reloading the index data if the file on disk has been modified"] # [doc = " outside libgit2)."] pub const git_status_opt_t_GIT_STATUS_OPT_NO_REFRESH : git_status_opt_t = 4096 ; # [doc = " Tells libgit2 to refresh the stat cache in the index for files that are"] # [doc = " unchanged but have out of date stat einformation in the index."] # [doc = " It will result in less work being done on subsequent calls to get status."] # [doc = " This is mutually exclusive with the NO_REFRESH option."] pub const git_status_opt_t_GIT_STATUS_OPT_UPDATE_INDEX : git_status_opt_t = 8192 ; # [doc = " Normally files that cannot be opened or read are ignored as"] # [doc = " these are often transient files; this option will return"] # [doc = " unreadable files as `GIT_STATUS_WT_UNREADABLE`."] pub const git_status_opt_t_GIT_STATUS_OPT_INCLUDE_UNREADABLE : git_status_opt_t = 16384 ; # [doc = " Unreadable files will be detected and given the status"] # [doc = " untracked instead of unreadable."] pub const git_status_opt_t_GIT_STATUS_OPT_INCLUDE_UNREADABLE_AS_UNTRACKED : git_status_opt_t = 32768 ; # [doc = " Flags to control status callbacks"] # [doc = ""] # [doc = " Calling `git_status_foreach()` is like calling the extended version"] # [doc = " with: GIT_STATUS_OPT_INCLUDE_IGNORED, GIT_STATUS_OPT_INCLUDE_UNTRACKED,"] # [doc = " and GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS.  Those options are bundled"] # [doc = " together as `GIT_STATUS_OPT_DEFAULTS` if you want them as a baseline."] pub type git_status_opt_t = :: std :: os :: raw :: c_uint ; # [doc = " Options to control how `git_status_foreach_ext()` will issue callbacks."] # [doc = ""] # [doc = " Initialize with `GIT_STATUS_OPTIONS_INIT`. Alternatively, you can"] # [doc = " use `git_status_options_init`."] # [doc = ""] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_status_options { # [doc = " The struct version; pass `GIT_STATUS_OPTIONS_VERSION`."] pub version : :: std :: os :: raw :: c_uint , # [doc = " The `show` value is one of the `git_status_show_t` constants that"] # [doc = " control which files to scan and in what order."] pub show : git_status_show_t , # [doc = " The `flags` value is an OR'ed combination of the"] # [doc = " `git_status_opt_t` values above."] pub flags : :: std :: os :: raw :: c_uint , # [doc = " The `pathspec` is an array of path patterns to match (using"] # [doc = " fnmatch-style matching), or just an array of paths to match"] # [doc = " exactly if `GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH` is specified"] # [doc = " in the flags."] pub pathspec : git_strarray , # [doc = " The `baseline` is the tree to be used for comparison to the"] # [doc = " working directory and index; defaults to HEAD."] pub baseline : * mut git_tree , } # [test] fn bindgen_test_layout_git_status_options () { assert_eq ! (:: std :: mem :: size_of :: < git_status_options > () , 40usize , concat ! ("Size of: " , stringify ! (git_status_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_status_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_status_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_status_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_status_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_status_options > ())) . show as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_status_options) , "::" , stringify ! (show))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_status_options > ())) . flags as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_status_options) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_status_options > ())) . pathspec as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_status_options) , "::" , stringify ! (pathspec))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_status_options > ())) . baseline as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (git_status_options) , "::" , stringify ! (baseline))) ; } extern "C" { # [doc = " Initialize git_status_options structure"] # [doc = ""] # [doc = " Initializes a `git_status_options` with default values. Equivalent to"] # [doc = " creating an instance with `GIT_STATUS_OPTIONS_INIT`."] # [doc = ""] # [doc = " @param opts The `git_status_options` struct to initialize."] # [doc = " @param version The struct version; pass `GIT_STATUS_OPTIONS_VERSION`."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_status_options_init (opts : * mut git_status_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } # [doc = " A status entry, providing the differences between the file as it exists"] # [doc = " in HEAD and the index, and providing the differences between the index"] # [doc = " and the working directory."] # [doc = ""] # [doc = " The `status` value provides the status flags for this file."] # [doc = ""] # [doc = " The `head_to_index` value provides detailed information about the"] # [doc = " differences between the file in HEAD and the file in the index."] # [doc = ""] # [doc = " The `index_to_workdir` value provides detailed information about the"] # [doc = " differences between the file in the index and the file in the"] # [doc = " working directory."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_status_entry { pub status : git_status_t , pub head_to_index : * mut git_diff_delta , pub index_to_workdir : * mut git_diff_delta , } # [test] fn bindgen_test_layout_git_status_entry () { assert_eq ! (:: std :: mem :: size_of :: < git_status_entry > () , 24usize , concat ! ("Size of: " , stringify ! (git_status_entry))) ; assert_eq ! (:: std :: mem :: align_of :: < git_status_entry > () , 8usize , concat ! ("Alignment of " , stringify ! (git_status_entry))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_status_entry > ())) . status as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_status_entry) , "::" , stringify ! (status))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_status_entry > ())) . head_to_index as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_status_entry) , "::" , stringify ! (head_to_index))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_status_entry > ())) . index_to_workdir as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_status_entry) , "::" , stringify ! (index_to_workdir))) ; } extern "C" { # [doc = " Gather file statuses and run a callback for each one."] # [doc = ""] # [doc = " The callback is passed the path of the file, the status (a combination of"] # [doc = " the `git_status_t` values above) and the `payload` data pointer passed"] # [doc = " into this function."] # [doc = ""] # [doc = " If the callback returns a non-zero value, this function will stop looping"] # [doc = " and return that value to caller."] # [doc = ""] # [doc = " @param repo A repository object"] # [doc = " @param callback The function to call on each file"] # [doc = " @param payload Pointer to pass through to callback function"] # [doc = " @return 0 on success, non-zero callback return value, or error code"] pub fn git_status_foreach (repo : * mut git_repository , callback : git_status_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Gather file status information and run callbacks as requested."] # [doc = ""] # [doc = " This is an extended version of the `git_status_foreach()` API that"] # [doc = " allows for more granular control over which paths will be processed and"] # [doc = " in what order.  See the `git_status_options` structure for details"] # [doc = " about the additional controls that this makes available."] # [doc = ""] # [doc = " Note that if a `pathspec` is given in the `git_status_options` to filter"] # [doc = " the status, then the results from rename detection (if you enable it) may"] # [doc = " not be accurate.  To do rename detection properly, this must be called"] # [doc = " with no `pathspec` so that all files can be considered."] # [doc = ""] # [doc = " @param repo Repository object"] # [doc = " @param opts Status options structure"] # [doc = " @param callback The function to call on each file"] # [doc = " @param payload Pointer to pass through to callback function"] # [doc = " @return 0 on success, non-zero callback return value, or error code"] pub fn git_status_foreach_ext (repo : * mut git_repository , opts : * const git_status_options , callback : git_status_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get file status for a single file."] # [doc = ""] # [doc = " This tries to get status for the filename that you give.  If no files"] # [doc = " match that name (in either the HEAD, index, or working directory), this"] # [doc = " returns GIT_ENOTFOUND."] # [doc = ""] # [doc = " If the name matches multiple files (for example, if the `path` names a"] # [doc = " directory or if running on a case- insensitive filesystem and yet the"] # [doc = " HEAD has two entries that both match the path), then this returns"] # [doc = " GIT_EAMBIGUOUS because it cannot give correct results."] # [doc = ""] # [doc = " This does not do any sort of rename detection.  Renames require a set of"] # [doc = " targets and because of the path filtering, there is not enough"] # [doc = " information to check renames correctly.  To check file status with rename"] # [doc = " detection, there is no choice but to do a full `git_status_list_new` and"] # [doc = " scan through looking for the path that you are interested in."] # [doc = ""] # [doc = " @param status_flags Output combination of git_status_t values for file"] # [doc = " @param repo A repository object"] # [doc = " @param path The exact path to retrieve status for relative to the"] # [doc = " repository working directory"] # [doc = " @return 0 on success, GIT_ENOTFOUND if the file is not found in the HEAD,"] # [doc = "      index, and work tree, GIT_EAMBIGUOUS if `path` matches multiple files"] # [doc = "      or if it refers to a folder, and -1 on other errors."] pub fn git_status_file (status_flags : * mut :: std :: os :: raw :: c_uint , repo : * mut git_repository , path : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Gather file status information and populate the `git_status_list`."] # [doc = ""] # [doc = " Note that if a `pathspec` is given in the `git_status_options` to filter"] # [doc = " the status, then the results from rename detection (if you enable it) may"] # [doc = " not be accurate.  To do rename detection properly, this must be called"] # [doc = " with no `pathspec` so that all files can be considered."] # [doc = ""] # [doc = " @param out Pointer to store the status results in"] # [doc = " @param repo Repository object"] # [doc = " @param opts Status options structure"] # [doc = " @return 0 on success or error code"] pub fn git_status_list_new (out : * mut * mut git_status_list , repo : * mut git_repository , opts : * const git_status_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Gets the count of status entries in this list."] # [doc = ""] # [doc = " If there are no changes in status (at least according the options given"] # [doc = " when the status list was created), this can return 0."] # [doc = ""] # [doc = " @param statuslist Existing status list object"] # [doc = " @return the number of status entries"] pub fn git_status_list_entrycount (statuslist : * mut git_status_list) -> size_t ; } extern "C" { # [doc = " Get a pointer to one of the entries in the status list."] # [doc = ""] # [doc = " The entry is not modifiable and should not be freed."] # [doc = ""] # [doc = " @param statuslist Existing status list object"] # [doc = " @param idx Position of the entry"] # [doc = " @return Pointer to the entry; NULL if out of bounds"] pub fn git_status_byindex (statuslist : * mut git_status_list , idx : size_t) -> * const git_status_entry ; } extern "C" { # [doc = " Free an existing status list"] # [doc = ""] # [doc = " @param statuslist Existing status list object"] pub fn git_status_list_free (statuslist : * mut git_status_list) ; } extern "C" { # [doc = " Test if the ignore rules apply to a given file."] # [doc = ""] # [doc = " This function checks the ignore rules to see if they would apply to the"] # [doc = " given file.  This indicates if the file would be ignored regardless of"] # [doc = " whether the file is already in the index or committed to the repository."] # [doc = ""] # [doc = " One way to think of this is if you were to do \"git add .\" on the"] # [doc = " directory containing the file, would it be added or not?"] # [doc = ""] # [doc = " @param ignored Boolean returning 0 if the file is not ignored, 1 if it is"] # [doc = " @param repo A repository object"] # [doc = " @param path The file to check ignores for, rooted at the repo's workdir."] # [doc = " @return 0 if ignore rules could be processed for the file (regardless"] # [doc = "         of whether it exists or not), or an error < 0 if they could not."] pub fn git_status_should_ignore (ignored : * mut :: std :: os :: raw :: c_int , repo : * mut git_repository , path : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } pub const git_submodule_status_t_GIT_SUBMODULE_STATUS_IN_HEAD : git_submodule_status_t = 1 ; pub const git_submodule_status_t_GIT_SUBMODULE_STATUS_IN_INDEX : git_submodule_status_t = 2 ; pub const git_submodule_status_t_GIT_SUBMODULE_STATUS_IN_CONFIG : git_submodule_status_t = 4 ; pub const git_submodule_status_t_GIT_SUBMODULE_STATUS_IN_WD : git_submodule_status_t = 8 ; pub const git_submodule_status_t_GIT_SUBMODULE_STATUS_INDEX_ADDED : git_submodule_status_t = 16 ; pub const git_submodule_status_t_GIT_SUBMODULE_STATUS_INDEX_DELETED : git_submodule_status_t = 32 ; pub const git_submodule_status_t_GIT_SUBMODULE_STATUS_INDEX_MODIFIED : git_submodule_status_t = 64 ; pub const git_submodule_status_t_GIT_SUBMODULE_STATUS_WD_UNINITIALIZED : git_submodule_status_t = 128 ; pub const git_submodule_status_t_GIT_SUBMODULE_STATUS_WD_ADDED : git_submodule_status_t = 256 ; pub const git_submodule_status_t_GIT_SUBMODULE_STATUS_WD_DELETED : git_submodule_status_t = 512 ; pub const git_submodule_status_t_GIT_SUBMODULE_STATUS_WD_MODIFIED : git_submodule_status_t = 1024 ; pub const git_submodule_status_t_GIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED : git_submodule_status_t = 2048 ; pub const git_submodule_status_t_GIT_SUBMODULE_STATUS_WD_WD_MODIFIED : git_submodule_status_t = 4096 ; pub const git_submodule_status_t_GIT_SUBMODULE_STATUS_WD_UNTRACKED : git_submodule_status_t = 8192 ; # [doc = " Return codes for submodule status."] # [doc = ""] # [doc = " A combination of these flags will be returned to describe the status of a"] # [doc = " submodule.  Depending on the \"ignore\" property of the submodule, some of"] # [doc = " the flags may never be returned because they indicate changes that are"] # [doc = " supposed to be ignored."] # [doc = ""] # [doc = " Submodule info is contained in 4 places: the HEAD tree, the index, config"] # [doc = " files (both .git/config and .gitmodules), and the working directory.  Any"] # [doc = " or all of those places might be missing information about the submodule"] # [doc = " depending on what state the repo is in.  We consider all four places to"] # [doc = " build the combination of status flags."] # [doc = ""] # [doc = " There are four values that are not really status, but give basic info"] # [doc = " about what sources of submodule data are available.  These will be"] # [doc = " returned even if ignore is set to \"ALL\"."] # [doc = ""] # [doc = " * IN_HEAD   - superproject head contains submodule"] # [doc = " * IN_INDEX  - superproject index contains submodule"] # [doc = " * IN_CONFIG - superproject gitmodules has submodule"] # [doc = " * IN_WD     - superproject workdir has submodule"] # [doc = ""] # [doc = " The following values will be returned so long as ignore is not \"ALL\"."] # [doc = ""] # [doc = " * INDEX_ADDED       - in index, not in head"] # [doc = " * INDEX_DELETED     - in head, not in index"] # [doc = " * INDEX_MODIFIED    - index and head don't match"] # [doc = " * WD_UNINITIALIZED  - workdir contains empty directory"] # [doc = " * WD_ADDED          - in workdir, not index"] # [doc = " * WD_DELETED        - in index, not workdir"] # [doc = " * WD_MODIFIED       - index and workdir head don't match"] # [doc = ""] # [doc = " The following can only be returned if ignore is \"NONE\" or \"UNTRACKED\"."] # [doc = ""] # [doc = " * WD_INDEX_MODIFIED - submodule workdir index is dirty"] # [doc = " * WD_WD_MODIFIED    - submodule workdir has modified files"] # [doc = ""] # [doc = " Lastly, the following will only be returned for ignore \"NONE\"."] # [doc = ""] # [doc = " * WD_UNTRACKED      - wd contains untracked files"] pub type git_submodule_status_t = :: std :: os :: raw :: c_uint ; # [doc = " Function pointer to receive each submodule"] # [doc = ""] # [doc = " @param sm git_submodule currently being visited"] # [doc = " @param name name of the submodule"] # [doc = " @param payload value you passed to the foreach function as payload"] # [doc = " @return 0 on success or error code"] pub type git_submodule_cb = :: std :: option :: Option < unsafe extern "C" fn (sm : * mut git_submodule , name : * const :: std :: os :: raw :: c_char , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = " Submodule update options structure"] # [doc = ""] # [doc = " Initialize with `GIT_SUBMODULE_UPDATE_OPTIONS_INIT`. Alternatively, you can"] # [doc = " use `git_submodule_update_options_init`."] # [doc = ""] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_submodule_update_options { pub version : :: std :: os :: raw :: c_uint , # [doc = " These options are passed to the checkout step. To disable"] # [doc = " checkout, set the `checkout_strategy` to"] # [doc = " `GIT_CHECKOUT_NONE`. Generally you will want the use"] # [doc = " GIT_CHECKOUT_SAFE to update files in the working"] # [doc = " directory."] pub checkout_opts : git_checkout_options , # [doc = " Options which control the fetch, including callbacks."] # [doc = ""] # [doc = " The callbacks to use for reporting fetch progress, and for acquiring"] # [doc = " credentials in the event they are needed."] pub fetch_opts : git_fetch_options , # [doc = " Allow fetching from the submodule's default remote if the target"] # [doc = " commit isn't found. Enabled by default."] pub allow_fetch : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_git_submodule_update_options () { assert_eq ! (:: std :: mem :: size_of :: < git_submodule_update_options > () , 360usize , concat ! ("Size of: " , stringify ! (git_submodule_update_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_submodule_update_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_submodule_update_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_submodule_update_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_submodule_update_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_submodule_update_options > ())) . checkout_opts as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_submodule_update_options) , "::" , stringify ! (checkout_opts))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_submodule_update_options > ())) . fetch_opts as * const _ as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (git_submodule_update_options) , "::" , stringify ! (fetch_opts))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_submodule_update_options > ())) . allow_fetch as * const _ as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (git_submodule_update_options) , "::" , stringify ! (allow_fetch))) ; } extern "C" { # [doc = " Initialize git_submodule_update_options structure"] # [doc = ""] # [doc = " Initializes a `git_submodule_update_options` with default values. Equivalent to"] # [doc = " creating an instance with `GIT_SUBMODULE_UPDATE_OPTIONS_INIT`."] # [doc = ""] # [doc = " @param opts The `git_submodule_update_options` struct to initialize."] # [doc = " @param version The struct version; pass `GIT_SUBMODULE_UPDATE_OPTIONS_VERSION`."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_submodule_update_options_init (opts : * mut git_submodule_update_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Update a submodule. This will clone a missing submodule and"] # [doc = " checkout the subrepository to the commit specified in the index of"] # [doc = " the containing repository. If the submodule repository doesn't contain"] # [doc = " the target commit (e.g. because fetchRecurseSubmodules isn't set), then"] # [doc = " the submodule is fetched using the fetch options supplied in options."] # [doc = ""] # [doc = " @param submodule Submodule object"] # [doc = " @param init If the submodule is not initialized, setting this flag to true"] # [doc = "        will initialize the submodule before updating. Otherwise, this will"] # [doc = "        return an error if attempting to update an uninitialzed repository."] # [doc = "        but setting this to true forces them to be updated."] # [doc = " @param options configuration options for the update.  If NULL, the"] # [doc = "        function works as though GIT_SUBMODULE_UPDATE_OPTIONS_INIT was passed."] # [doc = " @return 0 on success, any non-zero return value from a callback"] # [doc = "         function, or a negative value to indicate an error (use"] # [doc = "         `git_error_last` for a detailed error message)."] pub fn git_submodule_update (submodule : * mut git_submodule , init : :: std :: os :: raw :: c_int , options : * mut git_submodule_update_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Lookup submodule information by name or path."] # [doc = ""] # [doc = " Given either the submodule name or path (they are usually the same), this"] # [doc = " returns a structure describing the submodule."] # [doc = ""] # [doc = " There are two expected error scenarios:"] # [doc = ""] # [doc = " - The submodule is not mentioned in the HEAD, the index, and the config,"] # [doc = "   but does \"exist\" in the working directory (i.e. there is a subdirectory"] # [doc = "   that appears to be a Git repository).  In this case, this function"] # [doc = "   returns GIT_EEXISTS to indicate a sub-repository exists but not in a"] # [doc = "   state where a git_submodule can be instantiated."] # [doc = " - The submodule is not mentioned in the HEAD, index, or config and the"] # [doc = "   working directory doesn't contain a value git repo at that path."] # [doc = "   There may or may not be anything else at that path, but nothing that"] # [doc = "   looks like a submodule.  In this case, this returns GIT_ENOTFOUND."] # [doc = ""] # [doc = " You must call `git_submodule_free` when done with the submodule."] # [doc = ""] # [doc = " @param out Output ptr to submodule; pass NULL to just get return code"] # [doc = " @param repo The parent repository"] # [doc = " @param name The name of or path to the submodule; trailing slashes okay"] # [doc = " @return 0 on success, GIT_ENOTFOUND if submodule does not exist,"] # [doc = "         GIT_EEXISTS if a repository is found in working directory only,"] # [doc = "         -1 on other errors."] pub fn git_submodule_lookup (out : * mut * mut git_submodule , repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create an in-memory copy of a submodule. The copy must be explicitly"] # [doc = " free'd or it will leak."] # [doc = ""] # [doc = " @param out Pointer to store the copy of the submodule."] # [doc = " @param source Original submodule to copy."] pub fn git_submodule_dup (out : * mut * mut git_submodule , source : * mut git_submodule) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Release a submodule"] # [doc = ""] # [doc = " @param submodule Submodule object"] pub fn git_submodule_free (submodule : * mut git_submodule) ; } extern "C" { # [doc = " Iterate over all tracked submodules of a repository."] # [doc = ""] # [doc = " See the note on `git_submodule` above.  This iterates over the tracked"] # [doc = " submodules as described therein."] # [doc = ""] # [doc = " If you are concerned about items in the working directory that look like"] # [doc = " submodules but are not tracked, the diff API will generate a diff record"] # [doc = " for workdir items that look like submodules but are not tracked, showing"] # [doc = " them as added in the workdir.  Also, the status API will treat the entire"] # [doc = " subdirectory of a contained git repo as a single GIT_STATUS_WT_NEW item."] # [doc = ""] # [doc = " @param repo The repository"] # [doc = " @param callback Function to be called with the name of each submodule."] # [doc = "        Return a non-zero value to terminate the iteration."] # [doc = " @param payload Extra data to pass to callback"] # [doc = " @return 0 on success, -1 on error, or non-zero return value of callback"] pub fn git_submodule_foreach (repo : * mut git_repository , callback : git_submodule_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Set up a new git submodule for checkout."] # [doc = ""] # [doc = " This does \"git submodule add\" up to the fetch and checkout of the"] # [doc = " submodule contents.  It preps a new submodule, creates an entry in"] # [doc = " .gitmodules and creates an empty initialized repository either at the"] # [doc = " given path in the working directory or in .git/modules with a gitlink"] # [doc = " from the working directory to the new repo."] # [doc = ""] # [doc = " To fully emulate \"git submodule add\" call this function, then open the"] # [doc = " submodule repo and perform the clone step as needed (if you don't need"] # [doc = " anything custom see `git_submodule_add_clone()`). Lastly, call"] # [doc = " `git_submodule_add_finalize()` to wrap up adding the new submodule and"] # [doc = " .gitmodules to the index to be ready to commit."] # [doc = ""] # [doc = " You must call `git_submodule_free` on the submodule object when done."] # [doc = ""] # [doc = " @param out The newly created submodule ready to open for clone"] # [doc = " @param repo The repository in which you want to create the submodule"] # [doc = " @param url URL for the submodule's remote"] # [doc = " @param path Path at which the submodule should be created"] # [doc = " @param use_gitlink Should workdir contain a gitlink to the repo in"] # [doc = "        .git/modules vs. repo directly in workdir."] # [doc = " @return 0 on success, GIT_EEXISTS if submodule already exists,"] # [doc = "         -1 on other errors."] pub fn git_submodule_add_setup (out : * mut * mut git_submodule , repo : * mut git_repository , url : * const :: std :: os :: raw :: c_char , path : * const :: std :: os :: raw :: c_char , use_gitlink : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Perform the clone step for a newly created submodule."] # [doc = ""] # [doc = " This performs the necessary `git_clone` to setup a newly-created submodule."] # [doc = ""] # [doc = " @param out The newly created repository object. Optional."] # [doc = " @param submodule The submodule currently waiting for its clone."] # [doc = " @param opts The options to use."] # [doc = ""] # [doc = " @return 0 on success, -1 on other errors (see git_clone)."] pub fn git_submodule_clone (out : * mut * mut git_repository , submodule : * mut git_submodule , opts : * const git_submodule_update_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Resolve the setup of a new git submodule."] # [doc = ""] # [doc = " This should be called on a submodule once you have called add setup"] # [doc = " and done the clone of the submodule.  This adds the .gitmodules file"] # [doc = " and the newly cloned submodule to the index to be ready to be committed"] # [doc = " (but doesn't actually do the commit)."] # [doc = ""] # [doc = " @param submodule The submodule to finish adding."] pub fn git_submodule_add_finalize (submodule : * mut git_submodule) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Add current submodule HEAD commit to index of superproject."] # [doc = ""] # [doc = " @param submodule The submodule to add to the index"] # [doc = " @param write_index Boolean if this should immediately write the index"] # [doc = "            file.  If you pass this as false, you will have to get the"] # [doc = "            git_index and explicitly call `git_index_write()` on it to"] # [doc = "            save the change."] # [doc = " @return 0 on success, <0 on failure"] pub fn git_submodule_add_to_index (submodule : * mut git_submodule , write_index : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the containing repository for a submodule."] # [doc = ""] # [doc = " This returns a pointer to the repository that contains the submodule."] # [doc = " This is a just a reference to the repository that was passed to the"] # [doc = " original `git_submodule_lookup()` call, so if that repository has been"] # [doc = " freed, then this may be a dangling reference."] # [doc = ""] # [doc = " @param submodule Pointer to submodule object"] # [doc = " @return Pointer to `git_repository`"] pub fn git_submodule_owner (submodule : * mut git_submodule) -> * mut git_repository ; } extern "C" { # [doc = " Get the name of submodule."] # [doc = ""] # [doc = " @param submodule Pointer to submodule object"] # [doc = " @return Pointer to the submodule name"] pub fn git_submodule_name (submodule : * mut git_submodule) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Get the path to the submodule."] # [doc = ""] # [doc = " The path is almost always the same as the submodule name, but the"] # [doc = " two are actually not required to match."] # [doc = ""] # [doc = " @param submodule Pointer to submodule object"] # [doc = " @return Pointer to the submodule path"] pub fn git_submodule_path (submodule : * mut git_submodule) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Get the URL for the submodule."] # [doc = ""] # [doc = " @param submodule Pointer to submodule object"] # [doc = " @return Pointer to the submodule url"] pub fn git_submodule_url (submodule : * mut git_submodule) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Resolve a submodule url relative to the given repository."] # [doc = ""] # [doc = " @param out buffer to store the absolute submodule url in"] # [doc = " @param repo Pointer to repository object"] # [doc = " @param url Relative url"] # [doc = " @return 0 or an error code"] pub fn git_submodule_resolve_url (out : * mut git_buf , repo : * mut git_repository , url : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the branch for the submodule."] # [doc = ""] # [doc = " @param submodule Pointer to submodule object"] # [doc = " @return Pointer to the submodule branch"] pub fn git_submodule_branch (submodule : * mut git_submodule) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Set the branch for the submodule in the configuration"] # [doc = ""] # [doc = " After calling this, you may wish to call `git_submodule_sync()` to"] # [doc = " write the changes to the checked out submodule repository."] # [doc = ""] # [doc = " @param repo the repository to affect"] # [doc = " @param name the name of the submodule to configure"] # [doc = " @param branch Branch that should be used for the submodule"] # [doc = " @return 0 on success, <0 on failure"] pub fn git_submodule_set_branch (repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char , branch : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Set the URL for the submodule in the configuration"] # [doc = ""] # [doc = ""] # [doc = " After calling this, you may wish to call `git_submodule_sync()` to"] # [doc = " write the changes to the checked out submodule repository."] # [doc = ""] # [doc = " @param repo the repository to affect"] # [doc = " @param name the name of the submodule to configure"] # [doc = " @param url URL that should be used for the submodule"] # [doc = " @return 0 on success, <0 on failure"] pub fn git_submodule_set_url (repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char , url : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the OID for the submodule in the index."] # [doc = ""] # [doc = " @param submodule Pointer to submodule object"] # [doc = " @return Pointer to git_oid or NULL if submodule is not in index."] pub fn git_submodule_index_id (submodule : * mut git_submodule) -> * const git_oid ; } extern "C" { # [doc = " Get the OID for the submodule in the current HEAD tree."] # [doc = ""] # [doc = " @param submodule Pointer to submodule object"] # [doc = " @return Pointer to git_oid or NULL if submodule is not in the HEAD."] pub fn git_submodule_head_id (submodule : * mut git_submodule) -> * const git_oid ; } extern "C" { # [doc = " Get the OID for the submodule in the current working directory."] # [doc = ""] # [doc = " This returns the OID that corresponds to looking up 'HEAD' in the checked"] # [doc = " out submodule.  If there are pending changes in the index or anything"] # [doc = " else, this won't notice that.  You should call `git_submodule_status()`"] # [doc = " for a more complete picture about the state of the working directory."] # [doc = ""] # [doc = " @param submodule Pointer to submodule object"] # [doc = " @return Pointer to git_oid or NULL if submodule is not checked out."] pub fn git_submodule_wd_id (submodule : * mut git_submodule) -> * const git_oid ; } extern "C" { # [doc = " Get the ignore rule that will be used for the submodule."] # [doc = ""] # [doc = " These values control the behavior of `git_submodule_status()` for this"] # [doc = " submodule.  There are four ignore values:"] # [doc = ""] # [doc = "  - **GIT_SUBMODULE_IGNORE_NONE** will consider any change to the contents"] # [doc = "    of the submodule from a clean checkout to be dirty, including the"] # [doc = "    addition of untracked files.  This is the default if unspecified."] # [doc = "  - **GIT_SUBMODULE_IGNORE_UNTRACKED** examines the contents of the"] # [doc = "    working tree (i.e. call `git_status_foreach()` on the submodule) but"] # [doc = "    UNTRACKED files will not count as making the submodule dirty."] # [doc = "  - **GIT_SUBMODULE_IGNORE_DIRTY** means to only check if the HEAD of the"] # [doc = "    submodule has moved for status.  This is fast since it does not need to"] # [doc = "    scan the working tree of the submodule at all."] # [doc = "  - **GIT_SUBMODULE_IGNORE_ALL** means not to open the submodule repo."] # [doc = "    The working directory will be consider clean so long as there is a"] # [doc = "    checked out version present."] # [doc = ""] # [doc = " @param submodule The submodule to check"] # [doc = " @return The current git_submodule_ignore_t valyue what will be used for"] # [doc = "         this submodule."] pub fn git_submodule_ignore (submodule : * mut git_submodule) -> git_submodule_ignore_t ; } extern "C" { # [doc = " Set the ignore rule for the submodule in the configuration"] # [doc = ""] # [doc = " This does not affect any currently-loaded instances."] # [doc = ""] # [doc = " @param repo the repository to affect"] # [doc = " @param name the name of the submdule"] # [doc = " @param ignore The new value for the ignore rule"] # [doc = " @return 0 or an error code"] pub fn git_submodule_set_ignore (repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char , ignore : git_submodule_ignore_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the update rule that will be used for the submodule."] # [doc = ""] # [doc = " This value controls the behavior of the `git submodule update` command."] # [doc = " There are four useful values documented with `git_submodule_update_t`."] # [doc = ""] # [doc = " @param submodule The submodule to check"] # [doc = " @return The current git_submodule_update_t value that will be used"] # [doc = "         for this submodule."] pub fn git_submodule_update_strategy (submodule : * mut git_submodule) -> git_submodule_update_t ; } extern "C" { # [doc = " Set the update rule for the submodule in the configuration"] # [doc = ""] # [doc = " This setting won't affect any existing instances."] # [doc = ""] # [doc = " @param repo the repository to affect"] # [doc = " @param name the name of the submodule to configure"] # [doc = " @param update The new value to use"] # [doc = " @return 0 or an error code"] pub fn git_submodule_set_update (repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char , update : git_submodule_update_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Read the fetchRecurseSubmodules rule for a submodule."] # [doc = ""] # [doc = " This accesses the submodule.<name>.fetchRecurseSubmodules value for"] # [doc = " the submodule that controls fetching behavior for the submodule."] # [doc = ""] # [doc = " Note that at this time, libgit2 does not honor this setting and the"] # [doc = " fetch functionality current ignores submodules."] # [doc = ""] # [doc = " @return 0 if fetchRecurseSubmodules is false, 1 if true"] pub fn git_submodule_fetch_recurse_submodules (submodule : * mut git_submodule) -> git_submodule_recurse_t ; } extern "C" { # [doc = " Set the fetchRecurseSubmodules rule for a submodule in the configuration"] # [doc = ""] # [doc = " This setting won't affect any existing instances."] # [doc = ""] # [doc = " @param repo the repository to affect"] # [doc = " @param name the submodule to configure"] # [doc = " @param fetch_recurse_submodules Boolean value"] # [doc = " @return old value for fetchRecurseSubmodules"] pub fn git_submodule_set_fetch_recurse_submodules (repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char , fetch_recurse_submodules : git_submodule_recurse_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Copy submodule info into \".git/config\" file."] # [doc = ""] # [doc = " Just like \"git submodule init\", this copies information about the"] # [doc = " submodule into \".git/config\".  You can use the accessor functions"] # [doc = " above to alter the in-memory git_submodule object and control what"] # [doc = " is written to the config, overriding what is in .gitmodules."] # [doc = ""] # [doc = " @param submodule The submodule to write into the superproject config"] # [doc = " @param overwrite By default, existing entries will not be overwritten,"] # [doc = "                  but setting this to true forces them to be updated."] # [doc = " @return 0 on success, <0 on failure."] pub fn git_submodule_init (submodule : * mut git_submodule , overwrite : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Set up the subrepository for a submodule in preparation for clone."] # [doc = ""] # [doc = " This function can be called to init and set up a submodule"] # [doc = " repository from a submodule in preparation to clone it from"] # [doc = " its remote."] # [doc = ""] # [doc = " @param out Output pointer to the created git repository."] # [doc = " @param sm The submodule to create a new subrepository from."] # [doc = " @param use_gitlink Should the workdir contain a gitlink to"] # [doc = "        the repo in .git/modules vs. repo directly in workdir."] # [doc = " @return 0 on success, <0 on failure."] pub fn git_submodule_repo_init (out : * mut * mut git_repository , sm : * const git_submodule , use_gitlink : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Copy submodule remote info into submodule repo."] # [doc = ""] # [doc = " This copies the information about the submodules URL into the checked out"] # [doc = " submodule config, acting like \"git submodule sync\".  This is useful if"] # [doc = " you have altered the URL for the submodule (or it has been altered by a"] # [doc = " fetch of upstream changes) and you need to update your local repo."] pub fn git_submodule_sync (submodule : * mut git_submodule) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Open the repository for a submodule."] # [doc = ""] # [doc = " This is a newly opened repository object.  The caller is responsible for"] # [doc = " calling `git_repository_free()` on it when done.  Multiple calls to this"] # [doc = " function will return distinct `git_repository` objects.  This will only"] # [doc = " work if the submodule is checked out into the working directory."] # [doc = ""] # [doc = " @param repo Pointer to the submodule repo which was opened"] # [doc = " @param submodule Submodule to be opened"] # [doc = " @return 0 on success, <0 if submodule repo could not be opened."] pub fn git_submodule_open (repo : * mut * mut git_repository , submodule : * mut git_submodule) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Reread submodule info from config, index, and HEAD."] # [doc = ""] # [doc = " Call this to reread cached submodule information for this submodule if"] # [doc = " you have reason to believe that it has changed."] # [doc = ""] # [doc = " @param submodule The submodule to reload"] # [doc = " @param force Force reload even if the data doesn't seem out of date"] # [doc = " @return 0 on success, <0 on error"] pub fn git_submodule_reload (submodule : * mut git_submodule , force : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the status for a submodule."] # [doc = ""] # [doc = " This looks at a submodule and tries to determine the status.  It"] # [doc = " will return a combination of the `GIT_SUBMODULE_STATUS` values above."] # [doc = " How deeply it examines the working directory to do this will depend"] # [doc = " on the `git_submodule_ignore_t` value for the submodule."] # [doc = ""] # [doc = " @param status Combination of `GIT_SUBMODULE_STATUS` flags"] # [doc = " @param repo the repository in which to look"] # [doc = " @param name name of the submodule"] # [doc = " @param ignore the ignore rules to follow"] # [doc = " @return 0 on success, <0 on error"] pub fn git_submodule_status (status : * mut :: std :: os :: raw :: c_uint , repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char , ignore : git_submodule_ignore_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the locations of submodule information."] # [doc = ""] # [doc = " This is a bit like a very lightweight version of `git_submodule_status`."] # [doc = " It just returns a made of the first four submodule status values (i.e."] # [doc = " the ones like GIT_SUBMODULE_STATUS_IN_HEAD, etc) that tell you where the"] # [doc = " submodule data comes from (i.e. the HEAD commit, gitmodules file, etc.)."] # [doc = " This can be useful if you want to know if the submodule is present in the"] # [doc = " working directory at this point in time, etc."] # [doc = ""] # [doc = " @param location_status Combination of first four `GIT_SUBMODULE_STATUS` flags"] # [doc = " @param submodule Submodule for which to get status"] # [doc = " @return 0 on success, <0 on error"] pub fn git_submodule_location (location_status : * mut :: std :: os :: raw :: c_uint , submodule : * mut git_submodule) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " List names of linked working trees"] # [doc = ""] # [doc = " The returned list should be released with `git_strarray_free`"] # [doc = " when no longer needed."] # [doc = ""] # [doc = " @param out pointer to the array of working tree names"] # [doc = " @param repo the repo to use when listing working trees"] # [doc = " @return 0 or an error code"] pub fn git_worktree_list (out : * mut git_strarray , repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Lookup a working tree by its name for a given repository"] # [doc = ""] # [doc = " @param out Output pointer to looked up worktree or `NULL`"] # [doc = " @param repo The repository containing worktrees"] # [doc = " @param name Name of the working tree to look up"] # [doc = " @return 0 or an error code"] pub fn git_worktree_lookup (out : * mut * mut git_worktree , repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Open a worktree of a given repository"] # [doc = ""] # [doc = " If a repository is not the main tree but a worktree, this"] # [doc = " function will look up the worktree inside the parent"] # [doc = " repository and create a new `git_worktree` structure."] # [doc = ""] # [doc = " @param out Out-pointer for the newly allocated worktree"] # [doc = " @param repo Repository to look up worktree for"] pub fn git_worktree_open_from_repository (out : * mut * mut git_worktree , repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free a previously allocated worktree"] # [doc = ""] # [doc = " @param wt worktree handle to close. If NULL nothing occurs."] pub fn git_worktree_free (wt : * mut git_worktree) ; } extern "C" { # [doc = " Check if worktree is valid"] # [doc = ""] # [doc = " A valid worktree requires both the git data structures inside"] # [doc = " the linked parent repository and the linked working copy to be"] # [doc = " present."] # [doc = ""] # [doc = " @param wt Worktree to check"] # [doc = " @return 0 when worktree is valid, error-code otherwise"] pub fn git_worktree_validate (wt : * const git_worktree) -> :: std :: os :: raw :: c_int ; } # [doc = " Worktree add options structure"] # [doc = ""] # [doc = " Initialize with `GIT_WORKTREE_ADD_OPTIONS_INIT`. Alternatively, you can"] # [doc = " use `git_worktree_add_options_init`."] # [doc = ""] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_worktree_add_options { pub version : :: std :: os :: raw :: c_uint , # [doc = "< lock newly created worktree"] pub lock : :: std :: os :: raw :: c_int , # [doc = "< reference to use for the new worktree HEAD"] pub ref_ : * mut git_reference , } # [test] fn bindgen_test_layout_git_worktree_add_options () { assert_eq ! (:: std :: mem :: size_of :: < git_worktree_add_options > () , 16usize , concat ! ("Size of: " , stringify ! (git_worktree_add_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_worktree_add_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_worktree_add_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_worktree_add_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_worktree_add_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_worktree_add_options > ())) . lock as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_worktree_add_options) , "::" , stringify ! (lock))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_worktree_add_options > ())) . ref_ as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_worktree_add_options) , "::" , stringify ! (ref_))) ; } extern "C" { # [doc = " Initialize git_worktree_add_options structure"] # [doc = ""] # [doc = " Initializes a `git_worktree_add_options` with default values. Equivalent to"] # [doc = " creating an instance with `GIT_WORKTREE_ADD_OPTIONS_INIT`."] # [doc = ""] # [doc = " @param opts The `git_worktree_add_options` struct to initialize."] # [doc = " @param version The struct version; pass `GIT_WORKTREE_ADD_OPTIONS_VERSION`."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_worktree_add_options_init (opts : * mut git_worktree_add_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Add a new working tree"] # [doc = ""] # [doc = " Add a new working tree for the repository, that is create the"] # [doc = " required data structures inside the repository and check out"] # [doc = " the current HEAD at `path`"] # [doc = ""] # [doc = " @param out Output pointer containing new working tree"] # [doc = " @param repo Repository to create working tree for"] # [doc = " @param name Name of the working tree"] # [doc = " @param path Path to create working tree at"] # [doc = " @param opts Options to modify default behavior. May be NULL"] # [doc = " @return 0 or an error code"] pub fn git_worktree_add (out : * mut * mut git_worktree , repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char , path : * const :: std :: os :: raw :: c_char , opts : * const git_worktree_add_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Lock worktree if not already locked"] # [doc = ""] # [doc = " Lock a worktree, optionally specifying a reason why the linked"] # [doc = " working tree is being locked."] # [doc = ""] # [doc = " @param wt Worktree to lock"] # [doc = " @param reason Reason why the working tree is being locked"] # [doc = " @return 0 on success, non-zero otherwise"] pub fn git_worktree_lock (wt : * mut git_worktree , reason : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Unlock a locked worktree"] # [doc = ""] # [doc = " @param wt Worktree to unlock"] # [doc = " @return 0 on success, 1 if worktree was not locked, error-code"] # [doc = "  otherwise"] pub fn git_worktree_unlock (wt : * mut git_worktree) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Check if worktree is locked"] # [doc = ""] # [doc = " A worktree may be locked if the linked working tree is stored"] # [doc = " on a portable device which is not available."] # [doc = ""] # [doc = " @param reason Buffer to store reason in. If NULL no reason is stored."] # [doc = " @param wt Worktree to check"] # [doc = " @return 0 when the working tree not locked, a value greater"] # [doc = "  than zero if it is locked, less than zero if there was an"] # [doc = "  error"] pub fn git_worktree_is_locked (reason : * mut git_buf , wt : * const git_worktree) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Retrieve the name of the worktree"] # [doc = ""] # [doc = " @param wt Worktree to get the name for"] # [doc = " @return The worktree's name. The pointer returned is valid for the"] # [doc = "  lifetime of the git_worktree"] pub fn git_worktree_name (wt : * const git_worktree) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Retrieve the filesystem path for the worktree"] # [doc = ""] # [doc = " @param wt Worktree to get the path for"] # [doc = " @return The worktree's filesystem path. The pointer returned"] # [doc = "  is valid for the lifetime of the git_worktree."] pub fn git_worktree_path (wt : * const git_worktree) -> * const :: std :: os :: raw :: c_char ; } pub const git_worktree_prune_t_GIT_WORKTREE_PRUNE_VALID : git_worktree_prune_t = 1 ; pub const git_worktree_prune_t_GIT_WORKTREE_PRUNE_LOCKED : git_worktree_prune_t = 2 ; pub const git_worktree_prune_t_GIT_WORKTREE_PRUNE_WORKING_TREE : git_worktree_prune_t = 4 ; # [doc = " Flags which can be passed to git_worktree_prune to alter its"] # [doc = " behavior."] pub type git_worktree_prune_t = :: std :: os :: raw :: c_uint ; # [doc = " Worktree prune options structure"] # [doc = ""] # [doc = " Initialize with `GIT_WORKTREE_PRUNE_OPTIONS_INIT`. Alternatively, you can"] # [doc = " use `git_worktree_prune_options_init`."] # [doc = ""] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_worktree_prune_options { pub version : :: std :: os :: raw :: c_uint , # [doc = " A combination of `git_worktree_prune_t`"] pub flags : u32 , } # [test] fn bindgen_test_layout_git_worktree_prune_options () { assert_eq ! (:: std :: mem :: size_of :: < git_worktree_prune_options > () , 8usize , concat ! ("Size of: " , stringify ! (git_worktree_prune_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_worktree_prune_options > () , 4usize , concat ! ("Alignment of " , stringify ! (git_worktree_prune_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_worktree_prune_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_worktree_prune_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_worktree_prune_options > ())) . flags as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_worktree_prune_options) , "::" , stringify ! (flags))) ; } extern "C" { # [doc = " Initialize git_worktree_prune_options structure"] # [doc = ""] # [doc = " Initializes a `git_worktree_prune_options` with default values. Equivalent to"] # [doc = " creating an instance with `GIT_WORKTREE_PRUNE_OPTIONS_INIT`."] # [doc = ""] # [doc = " @param opts The `git_worktree_prune_options` struct to initialize."] # [doc = " @param version The struct version; pass `GIT_WORKTREE_PRUNE_OPTIONS_VERSION`."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_worktree_prune_options_init (opts : * mut git_worktree_prune_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Is the worktree prunable with the given options?"] # [doc = ""] # [doc = " A worktree is not prunable in the following scenarios:"] # [doc = ""] # [doc = " - the worktree is linking to a valid on-disk worktree. The"] # [doc = "   `valid` member will cause this check to be ignored."] # [doc = " - the worktree is locked. The `locked` flag will cause this"] # [doc = "   check to be ignored."] # [doc = ""] # [doc = " If the worktree is not valid and not locked or if the above"] # [doc = " flags have been passed in, this function will return a"] # [doc = " positive value."] pub fn git_worktree_is_prunable (wt : * mut git_worktree , opts : * mut git_worktree_prune_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Prune working tree"] # [doc = ""] # [doc = " Prune the working tree, that is remove the git data"] # [doc = " structures on disk. The repository will only be pruned of"] # [doc = " `git_worktree_is_prunable` succeeds."] # [doc = ""] # [doc = " @param wt Worktree to prune"] # [doc = " @param opts Specifies which checks to override. See"] # [doc = "        `git_worktree_is_prunable`. May be NULL"] # [doc = " @return 0 or an error code"] pub fn git_worktree_prune (wt : * mut git_worktree , opts : * mut git_worktree_prune_options) -> :: std :: os :: raw :: c_int ; } # [doc = " Payload for git_credential_userpass_plaintext."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_credential_userpass_payload { pub username : * const :: std :: os :: raw :: c_char , pub password : * const :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_git_credential_userpass_payload () { assert_eq ! (:: std :: mem :: size_of :: < git_credential_userpass_payload > () , 16usize , concat ! ("Size of: " , stringify ! (git_credential_userpass_payload))) ; assert_eq ! (:: std :: mem :: align_of :: < git_credential_userpass_payload > () , 8usize , concat ! ("Alignment of " , stringify ! (git_credential_userpass_payload))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_credential_userpass_payload > ())) . username as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_credential_userpass_payload) , "::" , stringify ! (username))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_credential_userpass_payload > ())) . password as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_credential_userpass_payload) , "::" , stringify ! (password))) ; } extern "C" { # [doc = " Stock callback usable as a git_credential_acquire_cb.  This calls"] # [doc = " git_cred_userpass_plaintext_new unless the protocol has not specified"] # [doc = " `GIT_CREDENTIAL_USERPASS_PLAINTEXT` as an allowed type."] # [doc = ""] # [doc = " @param out The newly created credential object."] # [doc = " @param url The resource for which we are demanding a credential."] # [doc = " @param user_from_url The username that was embedded in a \"user\\@host\""] # [doc = "                          remote url, or NULL if not included."] # [doc = " @param allowed_types A bitmask stating which credential types are OK to return."] # [doc = " @param payload The payload provided when specifying this callback.  (This is"] # [doc = "        interpreted as a `git_credential_userpass_payload*`.)"] pub fn git_credential_userpass (out : * mut * mut git_credential , url : * const :: std :: os :: raw :: c_char , user_from_url : * const :: std :: os :: raw :: c_char , allowed_types : :: std :: os :: raw :: c_uint , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } # [doc = " The base structure for all credential types"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_credential { # [doc = "< A type of credential"] pub credtype : git_credential_t , pub free : :: std :: option :: Option < unsafe extern "C" fn (cred : * mut git_credential) > , } # [test] fn bindgen_test_layout_git_credential () { assert_eq ! (:: std :: mem :: size_of :: < git_credential > () , 16usize , concat ! ("Size of: " , stringify ! (git_credential))) ; assert_eq ! (:: std :: mem :: align_of :: < git_credential > () , 8usize , concat ! ("Alignment of " , stringify ! (git_credential))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_credential > ())) . credtype as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_credential) , "::" , stringify ! (credtype))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_credential > ())) . free as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_credential) , "::" , stringify ! (free))) ; } # [doc = " A plaintext username and password"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_credential_userpass_plaintext { # [doc = "< The parent credential"] pub parent : git_credential , # [doc = "< The username to authenticate as"] pub username : * mut :: std :: os :: raw :: c_char , # [doc = "< The password to use"] pub password : * mut :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_git_credential_userpass_plaintext () { assert_eq ! (:: std :: mem :: size_of :: < git_credential_userpass_plaintext > () , 32usize , concat ! ("Size of: " , stringify ! (git_credential_userpass_plaintext))) ; assert_eq ! (:: std :: mem :: align_of :: < git_credential_userpass_plaintext > () , 8usize , concat ! ("Alignment of " , stringify ! (git_credential_userpass_plaintext))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_credential_userpass_plaintext > ())) . parent as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_credential_userpass_plaintext) , "::" , stringify ! (parent))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_credential_userpass_plaintext > ())) . username as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_credential_userpass_plaintext) , "::" , stringify ! (username))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_credential_userpass_plaintext > ())) . password as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_credential_userpass_plaintext) , "::" , stringify ! (password))) ; } # [doc = " Username-only credential information"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_credential_username { # [doc = "< The parent credential"] pub parent : git_credential , # [doc = "< The username to authenticate as"] pub username : [:: std :: os :: raw :: c_char ; 1usize] , } # [test] fn bindgen_test_layout_git_credential_username () { assert_eq ! (:: std :: mem :: size_of :: < git_credential_username > () , 24usize , concat ! ("Size of: " , stringify ! (git_credential_username))) ; assert_eq ! (:: std :: mem :: align_of :: < git_credential_username > () , 8usize , concat ! ("Alignment of " , stringify ! (git_credential_username))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_credential_username > ())) . parent as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_credential_username) , "::" , stringify ! (parent))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_credential_username > ())) . username as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_credential_username) , "::" , stringify ! (username))) ; } # [doc = " A ssh key from disk"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_credential_ssh_key { # [doc = "< The parent credential"] pub parent : git_credential , # [doc = "< The username to authenticate as"] pub username : * mut :: std :: os :: raw :: c_char , # [doc = "< The path to a public key"] pub publickey : * mut :: std :: os :: raw :: c_char , # [doc = "< The path to a private key"] pub privatekey : * mut :: std :: os :: raw :: c_char , # [doc = "< Passphrase to decrypt the private key"] pub passphrase : * mut :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_git_credential_ssh_key () { assert_eq ! (:: std :: mem :: size_of :: < git_credential_ssh_key > () , 48usize , concat ! ("Size of: " , stringify ! (git_credential_ssh_key))) ; assert_eq ! (:: std :: mem :: align_of :: < git_credential_ssh_key > () , 8usize , concat ! ("Alignment of " , stringify ! (git_credential_ssh_key))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_credential_ssh_key > ())) . parent as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_credential_ssh_key) , "::" , stringify ! (parent))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_credential_ssh_key > ())) . username as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_credential_ssh_key) , "::" , stringify ! (username))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_credential_ssh_key > ())) . publickey as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_credential_ssh_key) , "::" , stringify ! (publickey))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_credential_ssh_key > ())) . privatekey as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (git_credential_ssh_key) , "::" , stringify ! (privatekey))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_credential_ssh_key > ())) . passphrase as * const _ as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (git_credential_ssh_key) , "::" , stringify ! (passphrase))) ; } # [doc = " Keyboard-interactive based ssh authentication"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_credential_ssh_interactive { # [doc = "< The parent credential"] pub parent : git_credential , # [doc = "< The username to authenticate as"] pub username : * mut :: std :: os :: raw :: c_char , # [doc = " Callback used for authentication."] pub prompt_callback : git_credential_ssh_interactive_cb , # [doc = "< Payload passed to prompt_callback"] pub payload : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_git_credential_ssh_interactive () { assert_eq ! (:: std :: mem :: size_of :: < git_credential_ssh_interactive > () , 40usize , concat ! ("Size of: " , stringify ! (git_credential_ssh_interactive))) ; assert_eq ! (:: std :: mem :: align_of :: < git_credential_ssh_interactive > () , 8usize , concat ! ("Alignment of " , stringify ! (git_credential_ssh_interactive))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_credential_ssh_interactive > ())) . parent as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_credential_ssh_interactive) , "::" , stringify ! (parent))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_credential_ssh_interactive > ())) . username as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_credential_ssh_interactive) , "::" , stringify ! (username))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_credential_ssh_interactive > ())) . prompt_callback as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_credential_ssh_interactive) , "::" , stringify ! (prompt_callback))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_credential_ssh_interactive > ())) . payload as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (git_credential_ssh_interactive) , "::" , stringify ! (payload))) ; } # [doc = " A key with a custom signature function"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_credential_ssh_custom { # [doc = "< The parent credential"] pub parent : git_credential , # [doc = "< The username to authenticate as"] pub username : * mut :: std :: os :: raw :: c_char , # [doc = "< The public key data"] pub publickey : * mut :: std :: os :: raw :: c_char , # [doc = "< Length of the public key"] pub publickey_len : size_t , # [doc = " Callback used to sign the data."] pub sign_callback : git_credential_sign_cb , # [doc = "< Payload passed to prompt_callback"] pub payload : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_git_credential_ssh_custom () { assert_eq ! (:: std :: mem :: size_of :: < git_credential_ssh_custom > () , 56usize , concat ! ("Size of: " , stringify ! (git_credential_ssh_custom))) ; assert_eq ! (:: std :: mem :: align_of :: < git_credential_ssh_custom > () , 8usize , concat ! ("Alignment of " , stringify ! (git_credential_ssh_custom))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_credential_ssh_custom > ())) . parent as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_credential_ssh_custom) , "::" , stringify ! (parent))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_credential_ssh_custom > ())) . username as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_credential_ssh_custom) , "::" , stringify ! (username))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_credential_ssh_custom > ())) . publickey as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_credential_ssh_custom) , "::" , stringify ! (publickey))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_credential_ssh_custom > ())) . publickey_len as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (git_credential_ssh_custom) , "::" , stringify ! (publickey_len))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_credential_ssh_custom > ())) . sign_callback as * const _ as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (git_credential_ssh_custom) , "::" , stringify ! (sign_callback))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_credential_ssh_custom > ())) . payload as * const _ as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (git_credential_ssh_custom) , "::" , stringify ! (payload))) ; } # [doc = " Possible states for an attribute"] pub use self :: git_attr_value_t as git_attr_t ; extern "C" { pub fn git_blob_create_fromworkdir (id : * mut git_oid , repo : * mut git_repository , relative_path : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_blob_create_fromdisk (id : * mut git_oid , repo : * mut git_repository , path : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_blob_create_fromstream (out : * mut * mut git_writestream , repo : * mut git_repository , hintpath : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_blob_create_fromstream_commit (out : * mut git_oid , stream : * mut git_writestream) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_blob_create_frombuffer (id : * mut git_oid , repo : * mut git_repository , buffer : * const :: std :: os :: raw :: c_void , len : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Deprecated in favor of `git_blob_filter`."] # [doc = ""] # [doc = " @deprecated Use git_blob_filter"] # [doc = " @see git_blob_filter"] pub fn git_blob_filtered_content (out : * mut git_buf , blob : * mut git_blob , as_path : * const :: std :: os :: raw :: c_char , check_for_binary_data : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Deprecated in favor of `git_filter_list_stream_buffer`."] # [doc = ""] # [doc = " @deprecated Use git_filter_list_stream_buffer"] # [doc = " @see Use git_filter_list_stream_buffer"] pub fn git_filter_list_stream_data (filters : * mut git_filter_list , data : * mut git_buf , target : * mut git_writestream) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Deprecated in favor of `git_filter_list_apply_to_buffer`."] # [doc = ""] # [doc = " @deprecated Use git_filter_list_apply_to_buffer"] # [doc = " @see Use git_filter_list_apply_to_buffer"] pub fn git_filter_list_apply_to_data (out : * mut git_buf , filters : * mut git_filter_list , in_ : * mut git_buf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Write the contents of the tree builder as a tree object."] # [doc = " This is an alias of `git_treebuilder_write` and is preserved"] # [doc = " for backward compatibility."] # [doc = ""] # [doc = " This function is deprecated, but there is no plan to remove this"] # [doc = " function at this time."] # [doc = ""] # [doc = " @deprecated Use git_treebuilder_write"] # [doc = " @see git_treebuilder_write"] pub fn git_treebuilder_write_with_buffer (oid : * mut git_oid , bld : * mut git_treebuilder , tree : * mut git_buf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free the memory referred to by the git_buf.  This is an alias of"] # [doc = " `git_buf_dispose` and is preserved for backward compatibility."] # [doc = ""] # [doc = " This function is deprecated, but there is no plan to remove this"] # [doc = " function at this time."] # [doc = ""] # [doc = " @deprecated Use git_buf_dispose"] # [doc = " @see git_buf_dispose"] pub fn git_buf_free (buffer : * mut git_buf) ; } # [doc = " Provide a commit signature during commit creation."] # [doc = ""] # [doc = " Callers should instead define a `git_commit_create_cb` that"] # [doc = " generates a commit buffer using `git_commit_create_buffer`, sign"] # [doc = " that buffer and call `git_commit_create_with_signature`."] # [doc = ""] # [doc = " @deprecated use a `git_commit_create_cb` instead"] pub type git_commit_signing_cb = :: std :: option :: Option < unsafe extern "C" fn (signature : * mut git_buf , signature_field : * mut git_buf , commit_content : * const :: std :: os :: raw :: c_char , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = " Mapping from config variables to values."] pub type git_cvar_map = git_configmap ; # [doc = " Normal patch, the default"] pub const git_diff_format_email_flags_t_GIT_DIFF_FORMAT_EMAIL_NONE : git_diff_format_email_flags_t = 0 ; # [doc = " Don't insert \"[PATCH]\" in the subject header"] pub const git_diff_format_email_flags_t_GIT_DIFF_FORMAT_EMAIL_EXCLUDE_SUBJECT_PATCH_MARKER : git_diff_format_email_flags_t = 1 ; # [doc = " Formatting options for diff e-mail generation"] pub type git_diff_format_email_flags_t = :: std :: os :: raw :: c_uint ; # [doc = " Options for controlling the formatting of the generated e-mail."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_diff_format_email_options { pub version : :: std :: os :: raw :: c_uint , # [doc = " see `git_diff_format_email_flags_t` above"] pub flags : u32 , # [doc = " This patch number"] pub patch_no : size_t , # [doc = " Total number of patches in this series"] pub total_patches : size_t , # [doc = " id to use for the commit"] pub id : * const git_oid , # [doc = " Summary of the change"] pub summary : * const :: std :: os :: raw :: c_char , # [doc = " Commit message's body"] pub body : * const :: std :: os :: raw :: c_char , # [doc = " Author of the change"] pub author : * const git_signature , } # [test] fn bindgen_test_layout_git_diff_format_email_options () { assert_eq ! (:: std :: mem :: size_of :: < git_diff_format_email_options > () , 56usize , concat ! ("Size of: " , stringify ! (git_diff_format_email_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_diff_format_email_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_diff_format_email_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_format_email_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_diff_format_email_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_format_email_options > ())) . flags as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_diff_format_email_options) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_format_email_options > ())) . patch_no as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_diff_format_email_options) , "::" , stringify ! (patch_no))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_format_email_options > ())) . total_patches as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_diff_format_email_options) , "::" , stringify ! (total_patches))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_format_email_options > ())) . id as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_diff_format_email_options) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_format_email_options > ())) . summary as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (git_diff_format_email_options) , "::" , stringify ! (summary))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_format_email_options > ())) . body as * const _ as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (git_diff_format_email_options) , "::" , stringify ! (body))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_diff_format_email_options > ())) . author as * const _ as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (git_diff_format_email_options) , "::" , stringify ! (author))) ; } extern "C" { # [doc = " Create an e-mail ready patch from a diff."] # [doc = ""] # [doc = " @deprecated git_email_create_from_diff"] # [doc = " @see git_email_create_from_diff"] pub fn git_diff_format_email (out : * mut git_buf , diff : * mut git_diff , opts : * const git_diff_format_email_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create an e-mail ready patch for a commit."] # [doc = ""] # [doc = " @deprecated git_email_create_from_commit"] # [doc = " @see git_email_create_from_commit"] pub fn git_diff_commit_as_email (out : * mut git_buf , repo : * mut git_repository , commit : * mut git_commit , patch_no : size_t , total_patches : size_t , flags : u32 , diff_opts : * const git_diff_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Initialize git_diff_format_email_options structure"] # [doc = ""] # [doc = " Initializes a `git_diff_format_email_options` with default values. Equivalent"] # [doc = " to creating an instance with GIT_DIFF_FORMAT_EMAIL_OPTIONS_INIT."] # [doc = ""] # [doc = " @param opts The `git_blame_options` struct to initialize."] # [doc = " @param version The struct version; pass `GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION`."] # [doc = " @return Zero on success; -1 on failure."] pub fn git_diff_format_email_options_init (opts : * mut git_diff_format_email_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Return the last `git_error` object that was generated for the"] # [doc = " current thread.  This is an alias of `git_error_last` and is"] # [doc = " preserved for backward compatibility."] # [doc = ""] # [doc = " This function is deprecated, but there is no plan to remove this"] # [doc = " function at this time."] # [doc = ""] # [doc = " @deprecated Use git_error_last"] # [doc = " @see git_error_last"] pub fn giterr_last () -> * const git_error ; } extern "C" { # [doc = " Clear the last error.  This is an alias of `git_error_last` and is"] # [doc = " preserved for backward compatibility."] # [doc = ""] # [doc = " This function is deprecated, but there is no plan to remove this"] # [doc = " function at this time."] # [doc = ""] # [doc = " @deprecated Use git_error_clear"] # [doc = " @see git_error_clear"] pub fn giterr_clear () ; } extern "C" { # [doc = " Sets the error message to the given string.  This is an alias of"] # [doc = " `git_error_set_str` and is preserved for backward compatibility."] # [doc = ""] # [doc = " This function is deprecated, but there is no plan to remove this"] # [doc = " function at this time."] # [doc = ""] # [doc = " @deprecated Use git_error_set_str"] # [doc = " @see git_error_set_str"] pub fn giterr_set_str (error_class : :: std :: os :: raw :: c_int , string : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = " Indicates that an out-of-memory situation occurred.  This is an alias"] # [doc = " of `git_error_set_oom` and is preserved for backward compatibility."] # [doc = ""] # [doc = " This function is deprecated, but there is no plan to remove this"] # [doc = " function at this time."] # [doc = ""] # [doc = " @deprecated Use git_error_set_oom"] # [doc = " @see git_error_set_oom"] pub fn giterr_set_oom () ; } extern "C" { pub fn git_index_add_frombuffer (index : * mut git_index , entry : * const git_index_entry , buffer : * const :: std :: os :: raw :: c_void , len : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the size in bytes for the structure which"] # [doc = " acts as an in-memory representation of any given"] # [doc = " object type."] # [doc = ""] # [doc = " For all the core types, this would the equivalent"] # [doc = " of calling `sizeof(git_commit)` if the core types"] # [doc = " were not opaque on the external API."] # [doc = ""] # [doc = " @param type object type to get its size"] # [doc = " @return size in bytes of the object"] pub fn git_object__size (type_ : git_object_t) -> size_t ; } extern "C" { # [doc = " Ensure the remote name is well-formed."] # [doc = ""] # [doc = " @deprecated Use git_remote_name_is_valid"] # [doc = " @param remote_name name to be checked."] # [doc = " @return 1 if the reference name is acceptable; 0 if it isn't"] pub fn git_remote_is_valid_name (remote_name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Ensure the reference name is well-formed."] # [doc = ""] # [doc = " Valid reference names must follow one of two patterns:"] # [doc = ""] # [doc = " 1. Top-level names must contain only capital letters and underscores,"] # [doc = "    and must begin and end with a letter. (e.g. \"HEAD\", \"ORIG_HEAD\")."] # [doc = " 2. Names prefixed with \"refs/\" can be almost anything.  You must avoid"] # [doc = "    the characters '~', '^', ':', '\\\\', '?', '[', and '*', and the"] # [doc = "    sequences \"..\" and \"@{\" which have special meaning to revparse."] # [doc = ""] # [doc = " @deprecated Use git_reference_name_is_valid"] # [doc = " @param refname name to be checked."] # [doc = " @return 1 if the reference name is acceptable; 0 if it isn't"] pub fn git_reference_is_valid_name (refname : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_tag_create_frombuffer (oid : * mut git_oid , repo : * mut git_repository , buffer : * const :: std :: os :: raw :: c_char , force : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } # [doc = " Revparse flags.  These indicate the intended behavior of the spec passed to"] # [doc = " git_revparse."] pub use self :: git_revspec_t as git_revparse_mode_t ; # [doc = " The base structure for all credential types"] pub type git_cred = git_credential ; # [doc = " A plaintext username and password"] pub type git_cred_userpass_plaintext = git_credential_userpass_plaintext ; # [doc = " Username-only credential information"] pub type git_cred_username = git_credential_username ; # [doc = " The base structure for all credential types"] pub type git_cred_default = git_credential_default ; # [doc = " A ssh key from disk"] pub type git_cred_ssh_key = git_credential_ssh_key ; # [doc = " Keyboard-interactive based ssh authentication"] pub type git_cred_ssh_interactive = git_credential_ssh_interactive ; # [doc = " A key with a custom signature function"] pub type git_cred_ssh_custom = git_credential_ssh_custom ; pub type git_cred_acquire_cb = git_credential_acquire_cb ; pub type git_cred_sign_callback = git_credential_sign_cb ; pub type git_cred_sign_cb = git_credential_sign_cb ; pub type git_cred_ssh_interactive_callback = git_credential_ssh_interactive_cb ; pub type git_cred_ssh_interactive_cb = git_credential_ssh_interactive_cb ; extern "C" { pub fn git_cred_free (cred : * mut git_credential) ; } extern "C" { pub fn git_cred_has_username (cred : * mut git_credential) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_cred_get_username (cred : * mut git_credential) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn git_cred_userpass_plaintext_new (out : * mut * mut git_credential , username : * const :: std :: os :: raw :: c_char , password : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_cred_default_new (out : * mut * mut git_credential) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_cred_username_new (out : * mut * mut git_credential , username : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_cred_ssh_key_new (out : * mut * mut git_credential , username : * const :: std :: os :: raw :: c_char , publickey : * const :: std :: os :: raw :: c_char , privatekey : * const :: std :: os :: raw :: c_char , passphrase : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_cred_ssh_key_memory_new (out : * mut * mut git_credential , username : * const :: std :: os :: raw :: c_char , publickey : * const :: std :: os :: raw :: c_char , privatekey : * const :: std :: os :: raw :: c_char , passphrase : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_cred_ssh_interactive_new (out : * mut * mut git_credential , username : * const :: std :: os :: raw :: c_char , prompt_callback : git_credential_ssh_interactive_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_cred_ssh_key_from_agent (out : * mut * mut git_credential , username : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_cred_ssh_custom_new (out : * mut * mut git_credential , username : * const :: std :: os :: raw :: c_char , publickey : * const :: std :: os :: raw :: c_char , publickey_len : size_t , sign_callback : git_credential_sign_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } # [doc = " Payload for git_credential_userpass_plaintext."] pub type git_cred_userpass_payload = git_credential_userpass_payload ; extern "C" { pub fn git_cred_userpass (out : * mut * mut git_credential , url : * const :: std :: os :: raw :: c_char , user_from_url : * const :: std :: os :: raw :: c_char , allowed_types : :: std :: os :: raw :: c_uint , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } # [doc = " @name Deprecated Trace Callback Types"] # [doc = ""] # [doc = " These types are retained for backward compatibility.  The newer"] # [doc = " versions of these values should be preferred in all new code."] # [doc = ""] # [doc = " There is no plan to remove these backward compatibility values at"] # [doc = " this time."] pub type git_trace_callback = git_trace_cb ; extern "C" { # [doc = " @name Deprecated Object ID Types"] # [doc = ""] # [doc = " These types are retained for backward compatibility.  The newer"] # [doc = " versions of these values should be preferred in all new code."] # [doc = ""] # [doc = " There is no plan to remove these backward compatibility values at"] # [doc = " this time."] pub fn git_oid_iszero (id : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free the memory referred to by the git_oidarray.  This is an alias of"] # [doc = " `git_oidarray_dispose` and is preserved for backward compatibility."] # [doc = ""] # [doc = " This function is deprecated, but there is no plan to remove this"] # [doc = " function at this time."] # [doc = ""] # [doc = " @deprecated Use git_oidarray_dispose"] # [doc = " @see git_oidarray_dispose"] pub fn git_oidarray_free (array : * mut git_oidarray) ; } # [doc = " This structure is used to provide callers information about the"] # [doc = " progress of indexing a packfile, either directly or part of a"] # [doc = " fetch or clone that downloads a packfile."] pub type git_transfer_progress = git_indexer_progress ; # [doc = " Type definition for progress callbacks during indexing."] # [doc = ""] # [doc = " This type is deprecated, but there is no plan to remove this"] # [doc = " type definition at this time."] pub type git_transfer_progress_cb = git_indexer_progress_cb ; # [doc = " Type definition for push transfer progress callbacks."] # [doc = ""] # [doc = " This type is deprecated, but there is no plan to remove this"] # [doc = " type definition at this time."] pub type git_push_transfer_progress = git_push_transfer_progress_cb ; # [doc = " Callback for listing the remote heads"] pub type git_headlist_cb = :: std :: option :: Option < unsafe extern "C" fn (rhead : * mut git_remote_head , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; extern "C" { # [doc = " Free the memory referred to by the git_strarray.  This is an alias of"] # [doc = " `git_strarray_dispose` and is preserved for backward compatibility."] # [doc = ""] # [doc = " This function is deprecated, but there is no plan to remove this"] # [doc = " function at this time."] # [doc = ""] # [doc = " @deprecated Use git_strarray_dispose"] # [doc = " @see git_strarray_dispose"] pub fn git_strarray_free (array : * mut git_strarray) ; } extern "C" { # [doc = " @name Deprecated Options Initialization Functions"] # [doc = ""] # [doc = " These functions are retained for backward compatibility.  The newer"] # [doc = " versions of these functions should be preferred in all new code."] # [doc = ""] # [doc = " There is no plan to remove these backward compatibility functions at"] # [doc = " this time."] pub fn git_blame_init_options (opts : * mut git_blame_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_checkout_init_options (opts : * mut git_checkout_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_cherrypick_init_options (opts : * mut git_cherrypick_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_clone_init_options (opts : * mut git_clone_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_describe_init_options (opts : * mut git_describe_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_describe_init_format_options (opts : * mut git_describe_format_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_diff_init_options (opts : * mut git_diff_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_diff_find_init_options (opts : * mut git_diff_find_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_diff_format_email_init_options (opts : * mut git_diff_format_email_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_diff_patchid_init_options (opts : * mut git_diff_patchid_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_fetch_init_options (opts : * mut git_fetch_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_indexer_init_options (opts : * mut git_indexer_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_merge_init_options (opts : * mut git_merge_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_merge_file_init_input (input : * mut git_merge_file_input , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_merge_file_init_options (opts : * mut git_merge_file_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_proxy_init_options (opts : * mut git_proxy_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_push_init_options (opts : * mut git_push_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_rebase_init_options (opts : * mut git_rebase_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_remote_create_init_options (opts : * mut git_remote_create_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_repository_init_init_options (opts : * mut git_repository_init_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_revert_init_options (opts : * mut git_revert_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_stash_apply_init_options (opts : * mut git_stash_apply_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_status_init_options (opts : * mut git_status_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_submodule_update_init_options (opts : * mut git_submodule_update_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_worktree_add_init_options (opts : * mut git_worktree_add_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn git_worktree_prune_init_options (opts : * mut git_worktree_prune_options , version : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } # [doc = " Normal patch, the default"] pub const git_email_create_flags_t_GIT_EMAIL_CREATE_DEFAULT : git_email_create_flags_t = 0 ; # [doc = " Do not include patch numbers in the subject prefix."] pub const git_email_create_flags_t_GIT_EMAIL_CREATE_OMIT_NUMBERS : git_email_create_flags_t = 1 ; # [doc = " Include numbers in the subject prefix even when the"] # [doc = " patch is for a single commit (1/1)."] pub const git_email_create_flags_t_GIT_EMAIL_CREATE_ALWAYS_NUMBER : git_email_create_flags_t = 2 ; # [doc = " Do not perform rename or similarity detection."] pub const git_email_create_flags_t_GIT_EMAIL_CREATE_NO_RENAMES : git_email_create_flags_t = 4 ; # [doc = " Formatting options for diff e-mail generation"] pub type git_email_create_flags_t = :: std :: os :: raw :: c_uint ; # [doc = " Options for controlling the formatting of the generated e-mail."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_email_create_options { pub version : :: std :: os :: raw :: c_uint , # [doc = " see `git_email_create_flags_t` above"] pub flags : u32 , # [doc = " Options to use when creating diffs"] pub diff_opts : git_diff_options , # [doc = " Options for finding similarities within diffs"] pub diff_find_opts : git_diff_find_options , # [doc = " The subject prefix, by default \"PATCH\".  If set to an empty"] # [doc = " string (\"\") then only the patch numbers will be shown in the"] # [doc = " prefix.  If the subject_prefix is empty and patch numbers"] # [doc = " are not being shown, the prefix will be omitted entirely."] pub subject_prefix : * const :: std :: os :: raw :: c_char , # [doc = " The starting patch number; this cannot be 0.  By default,"] # [doc = " this is 1."] pub start_number : size_t , # [doc = " The \"re-roll\" number.  By default, there is no re-roll."] pub reroll_number : size_t , } # [test] fn bindgen_test_layout_git_email_create_options () { assert_eq ! (:: std :: mem :: size_of :: < git_email_create_options > () , 160usize , concat ! ("Size of: " , stringify ! (git_email_create_options))) ; assert_eq ! (:: std :: mem :: align_of :: < git_email_create_options > () , 8usize , concat ! ("Alignment of " , stringify ! (git_email_create_options))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_email_create_options > ())) . version as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_email_create_options) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_email_create_options > ())) . flags as * const _ as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (git_email_create_options) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_email_create_options > ())) . diff_opts as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_email_create_options) , "::" , stringify ! (diff_opts))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_email_create_options > ())) . diff_find_opts as * const _ as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (git_email_create_options) , "::" , stringify ! (diff_find_opts))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_email_create_options > ())) . subject_prefix as * const _ as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (git_email_create_options) , "::" , stringify ! (subject_prefix))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_email_create_options > ())) . start_number as * const _ as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (git_email_create_options) , "::" , stringify ! (start_number))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_email_create_options > ())) . reroll_number as * const _ as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (git_email_create_options) , "::" , stringify ! (reroll_number))) ; } extern "C" { # [doc = " Create a diff for a commit in mbox format for sending via email."] # [doc = ""] # [doc = " @param out buffer to store the e-mail patch in"] # [doc = " @param diff the changes to include in the email"] # [doc = " @param patch_idx the patch index"] # [doc = " @param patch_count the total number of patches that will be included"] # [doc = " @param commit_id the commit id for this change"] # [doc = " @param summary the commit message for this change"] # [doc = " @param body optional text to include above the diffstat"] # [doc = " @param author the person who authored this commit"] # [doc = " @param opts email creation options"] pub fn git_email_create_from_diff (out : * mut git_buf , diff : * mut git_diff , patch_idx : size_t , patch_count : size_t , commit_id : * const git_oid , summary : * const :: std :: os :: raw :: c_char , body : * const :: std :: os :: raw :: c_char , author : * const git_signature , opts : * const git_email_create_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a diff for a commit in mbox format for sending via email."] # [doc = " The commit must not be a merge commit."] # [doc = ""] # [doc = " @param out buffer to store the e-mail patch in"] # [doc = " @param commit commit to create a patch for"] # [doc = " @param opts email creation options"] pub fn git_email_create_from_commit (out : * mut git_buf , commit : * mut git_commit , opts : * const git_email_create_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Init the global state"] # [doc = ""] # [doc = " This function must be called before any other libgit2 function in"] # [doc = " order to set up global state and threading."] # [doc = ""] # [doc = " This function may be called multiple times - it will return the number"] # [doc = " of times the initialization has been called (including this one) that have"] # [doc = " not subsequently been shutdown."] # [doc = ""] # [doc = " @return the number of initializations of the library, or an error code."] pub fn git_libgit2_init () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Shutdown the global state"] # [doc = ""] # [doc = " Clean up the global state and threading context after calling it as"] # [doc = " many times as `git_libgit2_init()` was called - it will return the"] # [doc = " number of remainining initializations that have not been shutdown"] # [doc = " (after this one)."] # [doc = ""] # [doc = " @return the number of remaining initializations of the library, or an"] # [doc = " error code."] pub fn git_libgit2_shutdown () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Count the number of unique commits between two commit objects"] # [doc = ""] # [doc = " There is no need for branches containing the commits to have any"] # [doc = " upstream relationship, but it helps to think of one as a branch and"] # [doc = " the other as its upstream, the `ahead` and `behind` values will be"] # [doc = " what git would report for the branches."] # [doc = ""] # [doc = " @param ahead number of unique from commits in `upstream`"] # [doc = " @param behind number of unique from commits in `local`"] # [doc = " @param repo the repository where the commits exist"] # [doc = " @param local the commit for local"] # [doc = " @param upstream the commit for upstream"] pub fn git_graph_ahead_behind (ahead : * mut size_t , behind : * mut size_t , repo : * mut git_repository , local : * const git_oid , upstream : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Determine if a commit is the descendant of another commit."] # [doc = ""] # [doc = " Note that a commit is not considered a descendant of itself, in contrast"] # [doc = " to `git merge-base --is-ancestor`."] # [doc = ""] # [doc = " @param repo the repository where the commits exist"] # [doc = " @param commit a previously loaded commit"] # [doc = " @param ancestor a potential ancestor commit"] # [doc = " @return 1 if the given commit is a descendant of the potential ancestor,"] # [doc = " 0 if not, error code otherwise."] pub fn git_graph_descendant_of (repo : * mut git_repository , commit : * const git_oid , ancestor : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Determine if a commit is reachable from any of a list of commits by"] # [doc = " following parent edges."] # [doc = ""] # [doc = " @param repo the repository where the commits exist"] # [doc = " @param commit a previously loaded commit"] # [doc = " @param length the number of commits in the provided `descendant_array`"] # [doc = " @param descendant_array oids of the commits"] # [doc = " @return 1 if the given commit is an ancestor of any of the given potential"] # [doc = " descendants, 0 if not, error code otherwise."] pub fn git_graph_reachable_from_any (repo : * mut git_repository , commit : * const git_oid , descendant_array : * const git_oid , length : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Add ignore rules for a repository."] # [doc = ""] # [doc = " Excludesfile rules (i.e. .gitignore rules) are generally read from"] # [doc = " .gitignore files in the repository tree or from a shared system file"] # [doc = " only if a \"core.excludesfile\" config value is set.  The library also"] # [doc = " keeps a set of per-repository internal ignores that can be configured"] # [doc = " in-memory and will not persist.  This function allows you to add to"] # [doc = " that internal rules list."] # [doc = ""] # [doc = " Example usage:"] # [doc = ""] # [doc = "     error = git_ignore_add_rule(myrepo, \"*.c\\ndir/\\nFile with space\\n\");"] # [doc = ""] # [doc = " This would add three rules to the ignores."] # [doc = ""] # [doc = " @param repo The repository to add ignore rules to."] # [doc = " @param rules Text of rules, a la the contents of a .gitignore file."] # [doc = "              It is okay to have multiple rules in the text; if so,"] # [doc = "              each rule should be terminated with a newline."] # [doc = " @return 0 on success"] pub fn git_ignore_add_rule (repo : * mut git_repository , rules : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Clear ignore rules that were explicitly added."] # [doc = ""] # [doc = " Resets to the default internal ignore rules.  This will not turn off"] # [doc = " rules in .gitignore files that actually exist in the filesystem."] # [doc = ""] # [doc = " The default internal ignores ignore \".\", \"..\" and \".git\" entries."] # [doc = ""] # [doc = " @param repo The repository to remove ignore rules from."] # [doc = " @return 0 on success"] pub fn git_ignore_clear_internal_rules (repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Test if the ignore rules apply to a given path."] # [doc = ""] # [doc = " This function checks the ignore rules to see if they would apply to the"] # [doc = " given file.  This indicates if the file would be ignored regardless of"] # [doc = " whether the file is already in the index or committed to the repository."] # [doc = ""] # [doc = " One way to think of this is if you were to do \"git check-ignore --no-index\""] # [doc = " on the given file, would it be shown or not?"] # [doc = ""] # [doc = " @param ignored boolean returning 0 if the file is not ignored, 1 if it is"] # [doc = " @param repo a repository object"] # [doc = " @param path the file to check ignores for, relative to the repo's workdir."] # [doc = " @return 0 if ignore rules could be processed for the file (regardless"] # [doc = "         of whether it exists or not), or an error < 0 if they could not."] pub fn git_ignore_path_is_ignored (ignored : * mut :: std :: os :: raw :: c_int , repo : * mut git_repository , path : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Allocate a new mailmap object."] # [doc = ""] # [doc = " This object is empty, so you'll have to add a mailmap file before you can do"] # [doc = " anything with it. The mailmap must be freed with 'git_mailmap_free'."] # [doc = ""] # [doc = " @param out pointer to store the new mailmap"] # [doc = " @return 0 on success, or an error code"] pub fn git_mailmap_new (out : * mut * mut git_mailmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free the mailmap and its associated memory."] # [doc = ""] # [doc = " @param mm the mailmap to free"] pub fn git_mailmap_free (mm : * mut git_mailmap) ; } extern "C" { # [doc = " Add a single entry to the given mailmap object. If the entry already exists,"] # [doc = " it will be replaced with the new entry."] # [doc = ""] # [doc = " @param mm mailmap to add the entry to"] # [doc = " @param real_name the real name to use, or NULL"] # [doc = " @param real_email the real email to use, or NULL"] # [doc = " @param replace_name the name to replace, or NULL"] # [doc = " @param replace_email the email to replace"] # [doc = " @return 0 on success, or an error code"] pub fn git_mailmap_add_entry (mm : * mut git_mailmap , real_name : * const :: std :: os :: raw :: c_char , real_email : * const :: std :: os :: raw :: c_char , replace_name : * const :: std :: os :: raw :: c_char , replace_email : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a new mailmap instance containing a single mailmap file"] # [doc = ""] # [doc = " @param out pointer to store the new mailmap"] # [doc = " @param buf buffer to parse the mailmap from"] # [doc = " @param len the length of the input buffer"] # [doc = " @return 0 on success, or an error code"] pub fn git_mailmap_from_buffer (out : * mut * mut git_mailmap , buf : * const :: std :: os :: raw :: c_char , len : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a new mailmap instance from a repository, loading mailmap files based"] # [doc = " on the repository's configuration."] # [doc = ""] # [doc = " Mailmaps are loaded in the following order:"] # [doc = "  1. '.mailmap' in the root of the repository's working directory, if present."] # [doc = "  2. The blob object identified by the 'mailmap.blob' config entry, if set."] # [doc = " \t   [NOTE: 'mailmap.blob' defaults to 'HEAD:.mailmap' in bare repositories]"] # [doc = "  3. The path in the 'mailmap.file' config entry, if set."] # [doc = ""] # [doc = " @param out pointer to store the new mailmap"] # [doc = " @param repo repository to load mailmap information from"] # [doc = " @return 0 on success, or an error code"] pub fn git_mailmap_from_repository (out : * mut * mut git_mailmap , repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Resolve a name and email to the corresponding real name and email."] # [doc = ""] # [doc = " The lifetime of the strings are tied to `mm`, `name`, and `email` parameters."] # [doc = ""] # [doc = " @param real_name pointer to store the real name"] # [doc = " @param real_email pointer to store the real email"] # [doc = " @param mm the mailmap to perform a lookup with (may be NULL)"] # [doc = " @param name the name to look up"] # [doc = " @param email the email to look up"] # [doc = " @return 0 on success, or an error code"] pub fn git_mailmap_resolve (real_name : * mut * const :: std :: os :: raw :: c_char , real_email : * mut * const :: std :: os :: raw :: c_char , mm : * const git_mailmap , name : * const :: std :: os :: raw :: c_char , email : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Resolve a signature to use real names and emails with a mailmap."] # [doc = ""] # [doc = " Call `git_signature_free()` to free the data."] # [doc = ""] # [doc = " @param out new signature"] # [doc = " @param mm mailmap to resolve with"] # [doc = " @param sig signature to resolve"] # [doc = " @return 0 or an error code"] pub fn git_mailmap_resolve_signature (out : * mut * mut git_signature , mm : * const git_mailmap , sig : * const git_signature) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Clean up excess whitespace and make sure there is a trailing newline in the message."] # [doc = ""] # [doc = " Optionally, it can remove lines which start with the comment character."] # [doc = ""] # [doc = " @param out The user-allocated git_buf which will be filled with the"] # [doc = "     cleaned up message."] # [doc = ""] # [doc = " @param message The message to be prettified."] # [doc = ""] # [doc = " @param strip_comments Non-zero to remove comment lines, 0 to leave them in."] # [doc = ""] # [doc = " @param comment_char Comment character. Lines starting with this character"] # [doc = " are considered to be comments and removed if `strip_comments` is non-zero."] # [doc = ""] # [doc = " @return 0 or an error code."] pub fn git_message_prettify (out : * mut git_buf , message : * const :: std :: os :: raw :: c_char , strip_comments : :: std :: os :: raw :: c_int , comment_char : :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } # [doc = " Represents a single git message trailer."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_message_trailer { pub key : * const :: std :: os :: raw :: c_char , pub value : * const :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_git_message_trailer () { assert_eq ! (:: std :: mem :: size_of :: < git_message_trailer > () , 16usize , concat ! ("Size of: " , stringify ! (git_message_trailer))) ; assert_eq ! (:: std :: mem :: align_of :: < git_message_trailer > () , 8usize , concat ! ("Alignment of " , stringify ! (git_message_trailer))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_message_trailer > ())) . key as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_message_trailer) , "::" , stringify ! (key))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_message_trailer > ())) . value as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_message_trailer) , "::" , stringify ! (value))) ; } # [doc = " Represents an array of git message trailers."] # [doc = ""] # [doc = " Struct members under the private comment are private, subject to change"] # [doc = " and should not be used by callers."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_message_trailer_array { pub trailers : * mut git_message_trailer , pub count : size_t , pub _trailer_block : * mut :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_git_message_trailer_array () { assert_eq ! (:: std :: mem :: size_of :: < git_message_trailer_array > () , 24usize , concat ! ("Size of: " , stringify ! (git_message_trailer_array))) ; assert_eq ! (:: std :: mem :: align_of :: < git_message_trailer_array > () , 8usize , concat ! ("Alignment of " , stringify ! (git_message_trailer_array))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_message_trailer_array > ())) . trailers as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_message_trailer_array) , "::" , stringify ! (trailers))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_message_trailer_array > ())) . count as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_message_trailer_array) , "::" , stringify ! (count))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_message_trailer_array > ())) . _trailer_block as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_message_trailer_array) , "::" , stringify ! (_trailer_block))) ; } extern "C" { # [doc = " Parse trailers out of a message, filling the array pointed to by +arr+."] # [doc = ""] # [doc = " Trailers are key/value pairs in the last paragraph of a message, not"] # [doc = " including any patches or conflicts that may be present."] # [doc = ""] # [doc = " @param arr A pre-allocated git_message_trailer_array struct to be filled in"] # [doc = "            with any trailers found during parsing."] # [doc = " @param message The message to be parsed"] # [doc = " @return 0 on success, or non-zero on error."] pub fn git_message_trailers (arr : * mut git_message_trailer_array , message : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Clean's up any allocated memory in the git_message_trailer_array filled by"] # [doc = " a call to git_message_trailers."] pub fn git_message_trailer_array_free (arr : * mut git_message_trailer_array) ; } # [doc = " Callback for git_note_foreach."] # [doc = ""] # [doc = " Receives:"] # [doc = " - blob_id: Oid of the blob containing the message"] # [doc = " - annotated_object_id: Oid of the git object being annotated"] # [doc = " - payload: Payload data passed to `git_note_foreach`"] pub type git_note_foreach_cb = :: std :: option :: Option < unsafe extern "C" fn (blob_id : * const git_oid , annotated_object_id : * const git_oid , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_iterator { _unused : [u8 ; 0] , } # [doc = " note iterator"] pub type git_note_iterator = git_iterator ; extern "C" { # [doc = " Creates a new iterator for notes"] # [doc = ""] # [doc = " The iterator must be freed manually by the user."] # [doc = ""] # [doc = " @param out pointer to the iterator"] # [doc = " @param repo repository where to look up the note"] # [doc = " @param notes_ref canonical name of the reference to use (optional); defaults to"] # [doc = "                  \"refs/notes/commits\""] # [doc = ""] # [doc = " @return 0 or an error code"] pub fn git_note_iterator_new (out : * mut * mut git_note_iterator , repo : * mut git_repository , notes_ref : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Creates a new iterator for notes from a commit"] # [doc = ""] # [doc = " The iterator must be freed manually by the user."] # [doc = ""] # [doc = " @param out pointer to the iterator"] # [doc = " @param notes_commit a pointer to the notes commit object"] # [doc = ""] # [doc = " @return 0 or an error code"] pub fn git_note_commit_iterator_new (out : * mut * mut git_note_iterator , notes_commit : * mut git_commit) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Frees an git_note_iterator"] # [doc = ""] # [doc = " @param it pointer to the iterator"] pub fn git_note_iterator_free (it : * mut git_note_iterator) ; } extern "C" { # [doc = " Return the current item (note_id and annotated_id) and advance the iterator"] # [doc = " internally to the next value"] # [doc = ""] # [doc = " @param note_id id of blob containing the message"] # [doc = " @param annotated_id id of the git object being annotated"] # [doc = " @param it pointer to the iterator"] # [doc = ""] # [doc = " @return 0 (no error), GIT_ITEROVER (iteration is done) or an error code"] # [doc = "         (negative value)"] pub fn git_note_next (note_id : * mut git_oid , annotated_id : * mut git_oid , it : * mut git_note_iterator) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Read the note for an object"] # [doc = ""] # [doc = " The note must be freed manually by the user."] # [doc = ""] # [doc = " @param out pointer to the read note; NULL in case of error"] # [doc = " @param repo repository where to look up the note"] # [doc = " @param notes_ref canonical name of the reference to use (optional); defaults to"] # [doc = "                  \"refs/notes/commits\""] # [doc = " @param oid OID of the git object to read the note from"] # [doc = ""] # [doc = " @return 0 or an error code"] pub fn git_note_read (out : * mut * mut git_note , repo : * mut git_repository , notes_ref : * const :: std :: os :: raw :: c_char , oid : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Read the note for an object from a note commit"] # [doc = ""] # [doc = " The note must be freed manually by the user."] # [doc = ""] # [doc = " @param out pointer to the read note; NULL in case of error"] # [doc = " @param repo repository where to look up the note"] # [doc = " @param notes_commit a pointer to the notes commit object"] # [doc = " @param oid OID of the git object to read the note from"] # [doc = ""] # [doc = " @return 0 or an error code"] pub fn git_note_commit_read (out : * mut * mut git_note , repo : * mut git_repository , notes_commit : * mut git_commit , oid : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the note author"] # [doc = ""] # [doc = " @param note the note"] # [doc = " @return the author"] pub fn git_note_author (note : * const git_note) -> * const git_signature ; } extern "C" { # [doc = " Get the note committer"] # [doc = ""] # [doc = " @param note the note"] # [doc = " @return the committer"] pub fn git_note_committer (note : * const git_note) -> * const git_signature ; } extern "C" { # [doc = " Get the note message"] # [doc = ""] # [doc = " @param note the note"] # [doc = " @return the note message"] pub fn git_note_message (note : * const git_note) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Get the note object's id"] # [doc = ""] # [doc = " @param note the note"] # [doc = " @return the note object's id"] pub fn git_note_id (note : * const git_note) -> * const git_oid ; } extern "C" { # [doc = " Add a note for an object"] # [doc = ""] # [doc = " @param out pointer to store the OID (optional); NULL in case of error"] # [doc = " @param repo repository where to store the note"] # [doc = " @param notes_ref canonical name of the reference to use (optional);"] # [doc = "\t\t\t\t\tdefaults to \"refs/notes/commits\""] # [doc = " @param author signature of the notes commit author"] # [doc = " @param committer signature of the notes commit committer"] # [doc = " @param oid OID of the git object to decorate"] # [doc = " @param note Content of the note to add for object oid"] # [doc = " @param force Overwrite existing note"] # [doc = ""] # [doc = " @return 0 or an error code"] pub fn git_note_create (out : * mut git_oid , repo : * mut git_repository , notes_ref : * const :: std :: os :: raw :: c_char , author : * const git_signature , committer : * const git_signature , oid : * const git_oid , note : * const :: std :: os :: raw :: c_char , force : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Add a note for an object from a commit"] # [doc = ""] # [doc = " This function will create a notes commit for a given object,"] # [doc = " the commit is a dangling commit, no reference is created."] # [doc = ""] # [doc = " @param notes_commit_out pointer to store the commit (optional);"] # [doc = "\t\t\t\t\tNULL in case of error"] # [doc = " @param notes_blob_out a point to the id of a note blob (optional)"] # [doc = " @param repo repository where the note will live"] # [doc = " @param parent Pointer to parent note"] # [doc = "\t\t\t\t\tor NULL if this shall start a new notes tree"] # [doc = " @param author signature of the notes commit author"] # [doc = " @param committer signature of the notes commit committer"] # [doc = " @param oid OID of the git object to decorate"] # [doc = " @param note Content of the note to add for object oid"] # [doc = " @param allow_note_overwrite Overwrite existing note"] # [doc = ""] # [doc = " @return 0 or an error code"] pub fn git_note_commit_create (notes_commit_out : * mut git_oid , notes_blob_out : * mut git_oid , repo : * mut git_repository , parent : * mut git_commit , author : * const git_signature , committer : * const git_signature , oid : * const git_oid , note : * const :: std :: os :: raw :: c_char , allow_note_overwrite : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Remove the note for an object"] # [doc = ""] # [doc = " @param repo repository where the note lives"] # [doc = " @param notes_ref canonical name of the reference to use (optional);"] # [doc = "\t\t\t\t\tdefaults to \"refs/notes/commits\""] # [doc = " @param author signature of the notes commit author"] # [doc = " @param committer signature of the notes commit committer"] # [doc = " @param oid OID of the git object to remove the note from"] # [doc = ""] # [doc = " @return 0 or an error code"] pub fn git_note_remove (repo : * mut git_repository , notes_ref : * const :: std :: os :: raw :: c_char , author : * const git_signature , committer : * const git_signature , oid : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Remove the note for an object"] # [doc = ""] # [doc = " @param notes_commit_out pointer to store the new notes commit (optional);"] # [doc = "\t\t\t\t\tNULL in case of error."] # [doc = "\t\t\t\t\tWhen removing a note a new tree containing all notes"] # [doc = "\t\t\t\t\tsans the note to be removed is created and a new commit"] # [doc = "\t\t\t\t\tpointing to that tree is also created."] # [doc = "\t\t\t\t\tIn the case where the resulting tree is an empty tree"] # [doc = "\t\t\t\t\ta new commit pointing to this empty tree will be returned."] # [doc = " @param repo repository where the note lives"] # [doc = " @param notes_commit a pointer to the notes commit object"] # [doc = " @param author signature of the notes commit author"] # [doc = " @param committer signature of the notes commit committer"] # [doc = " @param oid OID of the git object to remove the note from"] # [doc = ""] # [doc = " @return 0 or an error code"] pub fn git_note_commit_remove (notes_commit_out : * mut git_oid , repo : * mut git_repository , notes_commit : * mut git_commit , author : * const git_signature , committer : * const git_signature , oid : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free a git_note object"] # [doc = ""] # [doc = " @param note git_note object"] pub fn git_note_free (note : * mut git_note) ; } extern "C" { # [doc = " Get the default notes reference for a repository"] # [doc = ""] # [doc = " @param out buffer in which to store the name of the default notes reference"] # [doc = " @param repo The Git repository"] # [doc = ""] # [doc = " @return 0 or an error code"] pub fn git_note_default_ref (out : * mut git_buf , repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Loop over all the notes within a specified namespace"] # [doc = " and issue a callback for each one."] # [doc = ""] # [doc = " @param repo Repository where to find the notes."] # [doc = ""] # [doc = " @param notes_ref Reference to read from (optional); defaults to"] # [doc = "        \"refs/notes/commits\"."] # [doc = ""] # [doc = " @param note_cb Callback to invoke per found annotation.  Return non-zero"] # [doc = "        to stop looping."] # [doc = ""] # [doc = " @param payload Extra parameter to callback function."] # [doc = ""] # [doc = " @return 0 on success, non-zero callback return value, or error code"] pub fn git_note_foreach (repo : * mut git_repository , notes_ref : * const :: std :: os :: raw :: c_char , note_cb : git_note_foreach_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } # [doc = " Function type for callbacks from git_odb_foreach."] pub type git_odb_foreach_cb = :: std :: option :: Option < unsafe extern "C" fn (id : * const git_oid , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; extern "C" { # [doc = " Create a new object database with no backends."] # [doc = ""] # [doc = " Before the ODB can be used for read/writing, a custom database"] # [doc = " backend must be manually added using `git_odb_add_backend()`"] # [doc = ""] # [doc = " @param out location to store the database pointer, if opened."] # [doc = "\t\t\tSet to NULL if the open failed."] # [doc = " @return 0 or an error code"] pub fn git_odb_new (out : * mut * mut git_odb) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a new object database and automatically add"] # [doc = " the two default backends:"] # [doc = ""] # [doc = "\t- git_odb_backend_loose: read and write loose object files"] # [doc = "\t\tfrom disk, assuming `objects_dir` as the Objects folder"] # [doc = ""] # [doc = "\t- git_odb_backend_pack: read objects from packfiles,"] # [doc = "\t\tassuming `objects_dir` as the Objects folder which"] # [doc = "\t\tcontains a 'pack/' folder with the corresponding data"] # [doc = ""] # [doc = " @param out location to store the database pointer, if opened."] # [doc = "\t\t\tSet to NULL if the open failed."] # [doc = " @param objects_dir path of the backends' \"objects\" directory."] # [doc = " @return 0 or an error code"] pub fn git_odb_open (out : * mut * mut git_odb , objects_dir : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Add an on-disk alternate to an existing Object DB."] # [doc = ""] # [doc = " Note that the added path must point to an `objects`, not"] # [doc = " to a full repository, to use it as an alternate store."] # [doc = ""] # [doc = " Alternate backends are always checked for objects *after*"] # [doc = " all the main backends have been exhausted."] # [doc = ""] # [doc = " Writing is disabled on alternate backends."] # [doc = ""] # [doc = " @param odb database to add the backend to"] # [doc = " @param path path to the objects folder for the alternate"] # [doc = " @return 0 on success, error code otherwise"] pub fn git_odb_add_disk_alternate (odb : * mut git_odb , path : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Close an open object database."] # [doc = ""] # [doc = " @param db database pointer to close. If NULL no action is taken."] pub fn git_odb_free (db : * mut git_odb) ; } extern "C" { # [doc = " Read an object from the database."] # [doc = ""] # [doc = " This method queries all available ODB backends"] # [doc = " trying to read the given OID."] # [doc = ""] # [doc = " The returned object is reference counted and"] # [doc = " internally cached, so it should be closed"] # [doc = " by the user once it's no longer in use."] # [doc = ""] # [doc = " @param out pointer where to store the read object"] # [doc = " @param db database to search for the object in."] # [doc = " @param id identity of the object to read."] # [doc = " @return 0 if the object was read, GIT_ENOTFOUND if the object is"] # [doc = "         not in the database."] pub fn git_odb_read (out : * mut * mut git_odb_object , db : * mut git_odb , id : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Read an object from the database, given a prefix"] # [doc = " of its identifier."] # [doc = ""] # [doc = " This method queries all available ODB backends"] # [doc = " trying to match the 'len' first hexadecimal"] # [doc = " characters of the 'short_id'."] # [doc = " The remaining (GIT_OID_HEXSZ-len)*4 bits of"] # [doc = " 'short_id' must be 0s."] # [doc = " 'len' must be at least GIT_OID_MINPREFIXLEN,"] # [doc = " and the prefix must be long enough to identify"] # [doc = " a unique object in all the backends; the"] # [doc = " method will fail otherwise."] # [doc = ""] # [doc = " The returned object is reference counted and"] # [doc = " internally cached, so it should be closed"] # [doc = " by the user once it's no longer in use."] # [doc = ""] # [doc = " @param out pointer where to store the read object"] # [doc = " @param db database to search for the object in."] # [doc = " @param short_id a prefix of the id of the object to read."] # [doc = " @param len the length of the prefix"] # [doc = " @return 0 if the object was read, GIT_ENOTFOUND if the object is not in the"] # [doc = "         database. GIT_EAMBIGUOUS if the prefix is ambiguous"] # [doc = "         (several objects match the prefix)"] pub fn git_odb_read_prefix (out : * mut * mut git_odb_object , db : * mut git_odb , short_id : * const git_oid , len : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Read the header of an object from the database, without"] # [doc = " reading its full contents."] # [doc = ""] # [doc = " The header includes the length and the type of an object."] # [doc = ""] # [doc = " Note that most backends do not support reading only the header"] # [doc = " of an object, so the whole object will be read and then the"] # [doc = " header will be returned."] # [doc = ""] # [doc = " @param len_out pointer where to store the length"] # [doc = " @param type_out pointer where to store the type"] # [doc = " @param db database to search for the object in."] # [doc = " @param id identity of the object to read."] # [doc = " @return 0 if the object was read, GIT_ENOTFOUND if the object is not"] # [doc = "         in the database."] pub fn git_odb_read_header (len_out : * mut size_t , type_out : * mut git_object_t , db : * mut git_odb , id : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Determine if the given object can be found in the object database."] # [doc = ""] # [doc = " @param db database to be searched for the given object."] # [doc = " @param id the object to search for."] # [doc = " @return 1 if the object was found, 0 otherwise"] pub fn git_odb_exists (db : * mut git_odb , id : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Determine if an object can be found in the object database by an"] # [doc = " abbreviated object ID."] # [doc = ""] # [doc = " @param out The full OID of the found object if just one is found."] # [doc = " @param db The database to be searched for the given object."] # [doc = " @param short_id A prefix of the id of the object to read."] # [doc = " @param len The length of the prefix."] # [doc = " @return 0 if found, GIT_ENOTFOUND if not found, GIT_EAMBIGUOUS if multiple"] # [doc = "         matches were found, other value < 0 if there was a read error."] pub fn git_odb_exists_prefix (out : * mut git_oid , db : * mut git_odb , short_id : * const git_oid , len : size_t) -> :: std :: os :: raw :: c_int ; } # [doc = " The information about object IDs to query in `git_odb_expand_ids`,"] # [doc = " which will be populated upon return."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_odb_expand_id { # [doc = " The object ID to expand"] pub id : git_oid , # [doc = " The length of the object ID (in nibbles, or packets of 4 bits; the"] # [doc = " number of hex characters)"] pub length : :: std :: os :: raw :: c_ushort , # [doc = " The (optional) type of the object to search for; leave as `0` or set"] # [doc = " to `GIT_OBJECT_ANY` to query for any object matching the ID."] pub type_ : git_object_t , } # [test] fn bindgen_test_layout_git_odb_expand_id () { assert_eq ! (:: std :: mem :: size_of :: < git_odb_expand_id > () , 28usize , concat ! ("Size of: " , stringify ! (git_odb_expand_id))) ; assert_eq ! (:: std :: mem :: align_of :: < git_odb_expand_id > () , 4usize , concat ! ("Alignment of " , stringify ! (git_odb_expand_id))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_odb_expand_id > ())) . id as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_odb_expand_id) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_odb_expand_id > ())) . length as * const _ as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (git_odb_expand_id) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_odb_expand_id > ())) . type_ as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_odb_expand_id) , "::" , stringify ! (type_))) ; } extern "C" { # [doc = " Determine if one or more objects can be found in the object database"] # [doc = " by their abbreviated object ID and type.  The given array will be"] # [doc = " updated in place:  for each abbreviated ID that is unique in the"] # [doc = " database, and of the given type (if specified), the full object ID,"] # [doc = " object ID length (`GIT_OID_HEXSZ`) and type will be written back to"] # [doc = " the array.  For IDs that are not found (or are ambiguous), the"] # [doc = " array entry will be zeroed."] # [doc = ""] # [doc = " Note that since this function operates on multiple objects, the"] # [doc = " underlying database will not be asked to be reloaded if an object is"] # [doc = " not found (which is unlike other object database operations.)"] # [doc = ""] # [doc = " @param db The database to be searched for the given objects."] # [doc = " @param ids An array of short object IDs to search for"] # [doc = " @param count The length of the `ids` array"] # [doc = " @return 0 on success or an error code on failure"] pub fn git_odb_expand_ids (db : * mut git_odb , ids : * mut git_odb_expand_id , count : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Refresh the object database to load newly added files."] # [doc = ""] # [doc = " If the object databases have changed on disk while the library"] # [doc = " is running, this function will force a reload of the underlying"] # [doc = " indexes."] # [doc = ""] # [doc = " Use this function when you're confident that an external"] # [doc = " application has tampered with the ODB."] # [doc = ""] # [doc = " NOTE that it is not necessary to call this function at all. The"] # [doc = " library will automatically attempt to refresh the ODB"] # [doc = " when a lookup fails, to see if the looked up object exists"] # [doc = " on disk but hasn't been loaded yet."] # [doc = ""] # [doc = " @param db database to refresh"] # [doc = " @return 0 on success, error code otherwise"] pub fn git_odb_refresh (db : * mut git_odb) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " List all objects available in the database"] # [doc = ""] # [doc = " The callback will be called for each object available in the"] # [doc = " database. Note that the objects are likely to be returned in the index"] # [doc = " order, which would make accessing the objects in that order inefficient."] # [doc = " Return a non-zero value from the callback to stop looping."] # [doc = ""] # [doc = " @param db database to use"] # [doc = " @param cb the callback to call for each object"] # [doc = " @param payload data to pass to the callback"] # [doc = " @return 0 on success, non-zero callback return value, or error code"] pub fn git_odb_foreach (db : * mut git_odb , cb : git_odb_foreach_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Write an object directly into the ODB"] # [doc = ""] # [doc = " This method writes a full object straight into the ODB."] # [doc = " For most cases, it is preferred to write objects through a write"] # [doc = " stream, which is both faster and less memory intensive, specially"] # [doc = " for big objects."] # [doc = ""] # [doc = " This method is provided for compatibility with custom backends"] # [doc = " which are not able to support streaming writes"] # [doc = ""] # [doc = " @param out pointer to store the OID result of the write"] # [doc = " @param odb object database where to store the object"] # [doc = " @param data buffer with the data to store"] # [doc = " @param len size of the buffer"] # [doc = " @param type type of the data to store"] # [doc = " @return 0 or an error code"] pub fn git_odb_write (out : * mut git_oid , odb : * mut git_odb , data : * const :: std :: os :: raw :: c_void , len : size_t , type_ : git_object_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Open a stream to write an object into the ODB"] # [doc = ""] # [doc = " The type and final length of the object must be specified"] # [doc = " when opening the stream."] # [doc = ""] # [doc = " The returned stream will be of type `GIT_STREAM_WRONLY`, and it"] # [doc = " won't be effective until `git_odb_stream_finalize_write` is called"] # [doc = " and returns without an error"] # [doc = ""] # [doc = " The stream must always be freed when done with `git_odb_stream_free` or"] # [doc = " will leak memory."] # [doc = ""] # [doc = " @see git_odb_stream"] # [doc = ""] # [doc = " @param out pointer where to store the stream"] # [doc = " @param db object database where the stream will write"] # [doc = " @param size final size of the object that will be written"] # [doc = " @param type type of the object that will be written"] # [doc = " @return 0 if the stream was created; error code otherwise"] pub fn git_odb_open_wstream (out : * mut * mut git_odb_stream , db : * mut git_odb , size : git_object_size_t , type_ : git_object_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Write to an odb stream"] # [doc = ""] # [doc = " This method will fail if the total number of received bytes exceeds the"] # [doc = " size declared with `git_odb_open_wstream()`"] # [doc = ""] # [doc = " @param stream the stream"] # [doc = " @param buffer the data to write"] # [doc = " @param len the buffer's length"] # [doc = " @return 0 if the write succeeded, error code otherwise"] pub fn git_odb_stream_write (stream : * mut git_odb_stream , buffer : * const :: std :: os :: raw :: c_char , len : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Finish writing to an odb stream"] # [doc = ""] # [doc = " The object will take its final name and will be available to the"] # [doc = " odb."] # [doc = ""] # [doc = " This method will fail if the total number of received bytes"] # [doc = " differs from the size declared with `git_odb_open_wstream()`"] # [doc = ""] # [doc = " @param out pointer to store the resulting object's id"] # [doc = " @param stream the stream"] # [doc = " @return 0 on success, an error code otherwise"] pub fn git_odb_stream_finalize_write (out : * mut git_oid , stream : * mut git_odb_stream) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Read from an odb stream"] # [doc = ""] # [doc = " Most backends don't implement streaming reads"] pub fn git_odb_stream_read (stream : * mut git_odb_stream , buffer : * mut :: std :: os :: raw :: c_char , len : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free an odb stream"] # [doc = ""] # [doc = " @param stream the stream to free"] pub fn git_odb_stream_free (stream : * mut git_odb_stream) ; } extern "C" { # [doc = " Open a stream to read an object from the ODB"] # [doc = ""] # [doc = " Note that most backends do *not* support streaming reads"] # [doc = " because they store their objects as compressed/delta'ed blobs."] # [doc = ""] # [doc = " It's recommended to use `git_odb_read` instead, which is"] # [doc = " assured to work on all backends."] # [doc = ""] # [doc = " The returned stream will be of type `GIT_STREAM_RDONLY` and"] # [doc = " will have the following methods:"] # [doc = ""] # [doc = "\t\t- stream->read: read `n` bytes from the stream"] # [doc = "\t\t- stream->free: free the stream"] # [doc = ""] # [doc = " The stream must always be free'd or will leak memory."] # [doc = ""] # [doc = " @see git_odb_stream"] # [doc = ""] # [doc = " @param out pointer where to store the stream"] # [doc = " @param len pointer where to store the length of the object"] # [doc = " @param type pointer where to store the type of the object"] # [doc = " @param db object database where the stream will read from"] # [doc = " @param oid oid of the object the stream will read from"] # [doc = " @return 0 if the stream was created, error code otherwise"] pub fn git_odb_open_rstream (out : * mut * mut git_odb_stream , len : * mut size_t , type_ : * mut git_object_t , db : * mut git_odb , oid : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Open a stream for writing a pack file to the ODB."] # [doc = ""] # [doc = " If the ODB layer understands pack files, then the given"] # [doc = " packfile will likely be streamed directly to disk (and a"] # [doc = " corresponding index created).  If the ODB layer does not"] # [doc = " understand pack files, the objects will be stored in whatever"] # [doc = " format the ODB layer uses."] # [doc = ""] # [doc = " @see git_odb_writepack"] # [doc = ""] # [doc = " @param out pointer to the writepack functions"] # [doc = " @param db object database where the stream will read from"] # [doc = " @param progress_cb function to call with progress information."] # [doc = " Be aware that this is called inline with network and indexing operations,"] # [doc = " so performance may be affected."] # [doc = " @param progress_payload payload for the progress callback"] pub fn git_odb_write_pack (out : * mut * mut git_odb_writepack , db : * mut git_odb , progress_cb : git_indexer_progress_cb , progress_payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Write a `multi-pack-index` file from all the `.pack` files in the ODB."] # [doc = ""] # [doc = " If the ODB layer understands pack files, then this will create a file called"] # [doc = " `multi-pack-index` next to the `.pack` and `.idx` files, which will contain"] # [doc = " an index of all objects stored in `.pack` files. This will allow for"] # [doc = " O(log n) lookup for n objects (regardless of how many packfiles there"] # [doc = " exist)."] # [doc = ""] # [doc = " @param db object database where the `multi-pack-index` file will be written."] pub fn git_odb_write_multi_pack_index (db : * mut git_odb) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Determine the object-ID (sha1 hash) of a data buffer"] # [doc = ""] # [doc = " The resulting SHA-1 OID will be the identifier for the data"] # [doc = " buffer as if the data buffer it were to written to the ODB."] # [doc = ""] # [doc = " @param out the resulting object-ID."] # [doc = " @param data data to hash"] # [doc = " @param len size of the data"] # [doc = " @param type of the data to hash"] # [doc = " @return 0 or an error code"] pub fn git_odb_hash (out : * mut git_oid , data : * const :: std :: os :: raw :: c_void , len : size_t , type_ : git_object_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Read a file from disk and fill a git_oid with the object id"] # [doc = " that the file would have if it were written to the Object"] # [doc = " Database as an object of the given type (w/o applying filters)."] # [doc = " Similar functionality to git.git's `git hash-object` without"] # [doc = " the `-w` flag, however, with the --no-filters flag."] # [doc = " If you need filters, see git_repository_hashfile."] # [doc = ""] # [doc = " @param out oid structure the result is written into."] # [doc = " @param path file to read and determine object id for"] # [doc = " @param type the type of the object that will be hashed"] # [doc = " @return 0 or an error code"] pub fn git_odb_hashfile (out : * mut git_oid , path : * const :: std :: os :: raw :: c_char , type_ : git_object_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a copy of an odb_object"] # [doc = ""] # [doc = " The returned copy must be manually freed with `git_odb_object_free`."] # [doc = " Note that because of an implementation detail, the returned copy will be"] # [doc = " the same pointer as `source`: the object is internally refcounted, so the"] # [doc = " copy still needs to be freed twice."] # [doc = ""] # [doc = " @param dest pointer where to store the copy"] # [doc = " @param source object to copy"] # [doc = " @return 0 or an error code"] pub fn git_odb_object_dup (dest : * mut * mut git_odb_object , source : * mut git_odb_object) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Close an ODB object"] # [doc = ""] # [doc = " This method must always be called once a `git_odb_object` is no"] # [doc = " longer needed, otherwise memory will leak."] # [doc = ""] # [doc = " @param object object to close"] pub fn git_odb_object_free (object : * mut git_odb_object) ; } extern "C" { # [doc = " Return the OID of an ODB object"] # [doc = ""] # [doc = " This is the OID from which the object was read from"] # [doc = ""] # [doc = " @param object the object"] # [doc = " @return a pointer to the OID"] pub fn git_odb_object_id (object : * mut git_odb_object) -> * const git_oid ; } extern "C" { # [doc = " Return the data of an ODB object"] # [doc = ""] # [doc = " This is the uncompressed, raw data as read from the ODB,"] # [doc = " without the leading header."] # [doc = ""] # [doc = " This pointer is owned by the object and shall not be free'd."] # [doc = ""] # [doc = " @param object the object"] # [doc = " @return a pointer to the data"] pub fn git_odb_object_data (object : * mut git_odb_object) -> * const :: std :: os :: raw :: c_void ; } extern "C" { # [doc = " Return the size of an ODB object"] # [doc = ""] # [doc = " This is the real size of the `data` buffer, not the"] # [doc = " actual size of the object."] # [doc = ""] # [doc = " @param object the object"] # [doc = " @return the size"] pub fn git_odb_object_size (object : * mut git_odb_object) -> size_t ; } extern "C" { # [doc = " Return the type of an ODB object"] # [doc = ""] # [doc = " @param object the object"] # [doc = " @return the type"] pub fn git_odb_object_type (object : * mut git_odb_object) -> git_object_t ; } extern "C" { # [doc = " Add a custom backend to an existing Object DB"] # [doc = ""] # [doc = " The backends are checked in relative ordering, based on the"] # [doc = " value of the `priority` parameter."] # [doc = ""] # [doc = " Read <sys/odb_backend.h> for more information."] # [doc = ""] # [doc = " @param odb database to add the backend to"] # [doc = " @param backend pointer to a git_odb_backend instance"] # [doc = " @param priority Value for ordering the backends queue"] # [doc = " @return 0 on success, error code otherwise"] pub fn git_odb_add_backend (odb : * mut git_odb , backend : * mut git_odb_backend , priority : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Add a custom backend to an existing Object DB; this"] # [doc = " backend will work as an alternate."] # [doc = ""] # [doc = " Alternate backends are always checked for objects *after*"] # [doc = " all the main backends have been exhausted."] # [doc = ""] # [doc = " The backends are checked in relative ordering, based on the"] # [doc = " value of the `priority` parameter."] # [doc = ""] # [doc = " Writing is disabled on alternate backends."] # [doc = ""] # [doc = " Read <sys/odb_backend.h> for more information."] # [doc = ""] # [doc = " @param odb database to add the backend to"] # [doc = " @param backend pointer to a git_odb_backend instance"] # [doc = " @param priority Value for ordering the backends queue"] # [doc = " @return 0 on success, error code otherwise"] pub fn git_odb_add_alternate (odb : * mut git_odb , backend : * mut git_odb_backend , priority : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the number of ODB backend objects"] # [doc = ""] # [doc = " @param odb object database"] # [doc = " @return number of backends in the ODB"] pub fn git_odb_num_backends (odb : * mut git_odb) -> size_t ; } extern "C" { # [doc = " Lookup an ODB backend object by index"] # [doc = ""] # [doc = " @param out output pointer to ODB backend at pos"] # [doc = " @param odb object database"] # [doc = " @param pos index into object database backend list"] # [doc = " @return 0 on success, GIT_ENOTFOUND if pos is invalid, other errors < 0"] pub fn git_odb_get_backend (out : * mut * mut git_odb_backend , odb : * mut git_odb , pos : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Set the git commit-graph for the ODB."] # [doc = ""] # [doc = " After a successfull call, the ownership of the cgraph parameter will be"] # [doc = " transferred to libgit2, and the caller should not free it."] # [doc = ""] # [doc = " The commit-graph can also be unset by explicitly passing NULL as the cgraph"] # [doc = " parameter."] # [doc = ""] # [doc = " @param odb object database"] # [doc = " @param cgraph the git commit-graph"] # [doc = " @return 0 on success; error code otherwise"] pub fn git_odb_set_commit_graph (odb : * mut git_odb , cgraph : * mut git_commit_graph) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a backend for the packfiles."] # [doc = ""] # [doc = " @param out location to store the odb backend pointer"] # [doc = " @param objects_dir the Git repository's objects directory"] # [doc = ""] # [doc = " @return 0 or an error code"] pub fn git_odb_backend_pack (out : * mut * mut git_odb_backend , objects_dir : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a backend for loose objects"] # [doc = ""] # [doc = " @param out location to store the odb backend pointer"] # [doc = " @param objects_dir the Git repository's objects directory"] # [doc = " @param compression_level zlib compression level to use"] # [doc = " @param do_fsync whether to do an fsync() after writing"] # [doc = " @param dir_mode permissions to use creating a directory or 0 for defaults"] # [doc = " @param file_mode permissions to use creating a file or 0 for defaults"] # [doc = ""] # [doc = " @return 0 or an error code"] pub fn git_odb_backend_loose (out : * mut * mut git_odb_backend , objects_dir : * const :: std :: os :: raw :: c_char , compression_level : :: std :: os :: raw :: c_int , do_fsync : :: std :: os :: raw :: c_int , dir_mode : :: std :: os :: raw :: c_uint , file_mode : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a backend out of a single packfile"] # [doc = ""] # [doc = " This can be useful for inspecting the contents of a single"] # [doc = " packfile."] # [doc = ""] # [doc = " @param out location to store the odb backend pointer"] # [doc = " @param index_file path to the packfile's .idx file"] # [doc = ""] # [doc = " @return 0 or an error code"] pub fn git_odb_backend_one_pack (out : * mut * mut git_odb_backend , index_file : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } pub const git_odb_stream_t_GIT_STREAM_RDONLY : git_odb_stream_t = 2 ; pub const git_odb_stream_t_GIT_STREAM_WRONLY : git_odb_stream_t = 4 ; pub const git_odb_stream_t_GIT_STREAM_RW : git_odb_stream_t = 6 ; # [doc = " Streaming mode"] pub type git_odb_stream_t = :: std :: os :: raw :: c_uint ; # [doc = " A stream to read/write from a backend."] # [doc = ""] # [doc = " This represents a stream of data being written to or read from a"] # [doc = " backend. When writing, the frontend functions take care of"] # [doc = " calculating the object's id and all `finalize_write` needs to do is"] # [doc = " store the object with the id it is passed."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_odb_stream { pub backend : * mut git_odb_backend , pub mode : :: std :: os :: raw :: c_uint , pub hash_ctx : * mut :: std :: os :: raw :: c_void , pub declared_size : git_object_size_t , pub received_bytes : git_object_size_t , pub read : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut git_odb_stream , buffer : * mut :: std :: os :: raw :: c_char , len : size_t) -> :: std :: os :: raw :: c_int > , pub write : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut git_odb_stream , buffer : * const :: std :: os :: raw :: c_char , len : size_t) -> :: std :: os :: raw :: c_int > , pub finalize_write : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut git_odb_stream , oid : * const git_oid) -> :: std :: os :: raw :: c_int > , pub free : :: std :: option :: Option < unsafe extern "C" fn (stream : * mut git_odb_stream) > , } # [test] fn bindgen_test_layout_git_odb_stream () { assert_eq ! (:: std :: mem :: size_of :: < git_odb_stream > () , 72usize , concat ! ("Size of: " , stringify ! (git_odb_stream))) ; assert_eq ! (:: std :: mem :: align_of :: < git_odb_stream > () , 8usize , concat ! ("Alignment of " , stringify ! (git_odb_stream))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_odb_stream > ())) . backend as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_odb_stream) , "::" , stringify ! (backend))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_odb_stream > ())) . mode as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_odb_stream) , "::" , stringify ! (mode))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_odb_stream > ())) . hash_ctx as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_odb_stream) , "::" , stringify ! (hash_ctx))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_odb_stream > ())) . declared_size as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_odb_stream) , "::" , stringify ! (declared_size))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_odb_stream > ())) . received_bytes as * const _ as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (git_odb_stream) , "::" , stringify ! (received_bytes))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_odb_stream > ())) . read as * const _ as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (git_odb_stream) , "::" , stringify ! (read))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_odb_stream > ())) . write as * const _ as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (git_odb_stream) , "::" , stringify ! (write))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_odb_stream > ())) . finalize_write as * const _ as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (git_odb_stream) , "::" , stringify ! (finalize_write))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_odb_stream > ())) . free as * const _ as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (git_odb_stream) , "::" , stringify ! (free))) ; } # [doc = " A stream to write a pack file to the ODB"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_odb_writepack { pub backend : * mut git_odb_backend , pub append : :: std :: option :: Option < unsafe extern "C" fn (writepack : * mut git_odb_writepack , data : * const :: std :: os :: raw :: c_void , size : size_t , stats : * mut git_indexer_progress) -> :: std :: os :: raw :: c_int > , pub commit : :: std :: option :: Option < unsafe extern "C" fn (writepack : * mut git_odb_writepack , stats : * mut git_indexer_progress) -> :: std :: os :: raw :: c_int > , pub free : :: std :: option :: Option < unsafe extern "C" fn (writepack : * mut git_odb_writepack) > , } # [test] fn bindgen_test_layout_git_odb_writepack () { assert_eq ! (:: std :: mem :: size_of :: < git_odb_writepack > () , 32usize , concat ! ("Size of: " , stringify ! (git_odb_writepack))) ; assert_eq ! (:: std :: mem :: align_of :: < git_odb_writepack > () , 8usize , concat ! ("Alignment of " , stringify ! (git_odb_writepack))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_odb_writepack > ())) . backend as * const _ as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (git_odb_writepack) , "::" , stringify ! (backend))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_odb_writepack > ())) . append as * const _ as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (git_odb_writepack) , "::" , stringify ! (append))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_odb_writepack > ())) . commit as * const _ as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (git_odb_writepack) , "::" , stringify ! (commit))) ; assert_eq ! (unsafe { & (* (:: std :: ptr :: null :: < git_odb_writepack > ())) . free as * const _ as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (git_odb_writepack) , "::" , stringify ! (free))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_patch { _unused : [u8 ; 0] , } extern "C" { # [doc = " Get the repository associated with this patch. May be NULL."] # [doc = ""] # [doc = " @param patch the patch"] # [doc = " @return a pointer to the repository"] pub fn git_patch_owner (patch : * const git_patch) -> * mut git_repository ; } extern "C" { # [doc = " Return a patch for an entry in the diff list."] # [doc = ""] # [doc = " The `git_patch` is a newly created object contains the text diffs"] # [doc = " for the delta.  You have to call `git_patch_free()` when you are"] # [doc = " done with it.  You can use the patch object to loop over all the hunks"] # [doc = " and lines in the diff of the one delta."] # [doc = ""] # [doc = " For an unchanged file or a binary file, no `git_patch` will be"] # [doc = " created, the output will be set to NULL, and the `binary` flag will be"] # [doc = " set true in the `git_diff_delta` structure."] # [doc = ""] # [doc = " It is okay to pass NULL for either of the output parameters; if you pass"] # [doc = " NULL for the `git_patch`, then the text diff will not be calculated."] # [doc = ""] # [doc = " @param out Output parameter for the delta patch object"] # [doc = " @param diff Diff list object"] # [doc = " @param idx Index into diff list"] # [doc = " @return 0 on success, other value < 0 on error"] pub fn git_patch_from_diff (out : * mut * mut git_patch , diff : * mut git_diff , idx : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Directly generate a patch from the difference between two blobs."] # [doc = ""] # [doc = " This is just like `git_diff_blobs()` except it generates a patch object"] # [doc = " for the difference instead of directly making callbacks.  You can use the"] # [doc = " standard `git_patch` accessor functions to read the patch data, and"] # [doc = " you must call `git_patch_free()` on the patch when done."] # [doc = ""] # [doc = " @param out The generated patch; NULL on error"] # [doc = " @param old_blob Blob for old side of diff, or NULL for empty blob"] # [doc = " @param old_as_path Treat old blob as if it had this filename; can be NULL"] # [doc = " @param new_blob Blob for new side of diff, or NULL for empty blob"] # [doc = " @param new_as_path Treat new blob as if it had this filename; can be NULL"] # [doc = " @param opts Options for diff, or NULL for default options"] # [doc = " @return 0 on success or error code < 0"] pub fn git_patch_from_blobs (out : * mut * mut git_patch , old_blob : * const git_blob , old_as_path : * const :: std :: os :: raw :: c_char , new_blob : * const git_blob , new_as_path : * const :: std :: os :: raw :: c_char , opts : * const git_diff_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Directly generate a patch from the difference between a blob and a buffer."] # [doc = ""] # [doc = " This is just like `git_diff_blob_to_buffer()` except it generates a patch"] # [doc = " object for the difference instead of directly making callbacks.  You can"] # [doc = " use the standard `git_patch` accessor functions to read the patch"] # [doc = " data, and you must call `git_patch_free()` on the patch when done."] # [doc = ""] # [doc = " @param out The generated patch; NULL on error"] # [doc = " @param old_blob Blob for old side of diff, or NULL for empty blob"] # [doc = " @param old_as_path Treat old blob as if it had this filename; can be NULL"] # [doc = " @param buffer Raw data for new side of diff, or NULL for empty"] # [doc = " @param buffer_len Length of raw data for new side of diff"] # [doc = " @param buffer_as_path Treat buffer as if it had this filename; can be NULL"] # [doc = " @param opts Options for diff, or NULL for default options"] # [doc = " @return 0 on success or error code < 0"] pub fn git_patch_from_blob_and_buffer (out : * mut * mut git_patch , old_blob : * const git_blob , old_as_path : * const :: std :: os :: raw :: c_char , buffer : * const :: std :: os :: raw :: c_void , buffer_len : size_t , buffer_as_path : * const :: std :: os :: raw :: c_char , opts : * const git_diff_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Directly generate a patch from the difference between two buffers."] # [doc = ""] # [doc = " This is just like `git_diff_buffers()` except it generates a patch"] # [doc = " object for the difference instead of directly making callbacks.  You can"] # [doc = " use the standard `git_patch` accessor functions to read the patch"] # [doc = " data, and you must call `git_patch_free()` on the patch when done."] # [doc = ""] # [doc = " @param out The generated patch; NULL on error"] # [doc = " @param old_buffer Raw data for old side of diff, or NULL for empty"] # [doc = " @param old_len Length of the raw data for old side of the diff"] # [doc = " @param old_as_path Treat old buffer as if it had this filename; can be NULL"] # [doc = " @param new_buffer Raw data for new side of diff, or NULL for empty"] # [doc = " @param new_len Length of raw data for new side of diff"] # [doc = " @param new_as_path Treat buffer as if it had this filename; can be NULL"] # [doc = " @param opts Options for diff, or NULL for default options"] # [doc = " @return 0 on success or error code < 0"] pub fn git_patch_from_buffers (out : * mut * mut git_patch , old_buffer : * const :: std :: os :: raw :: c_void , old_len : size_t , old_as_path : * const :: std :: os :: raw :: c_char , new_buffer : * const :: std :: os :: raw :: c_void , new_len : size_t , new_as_path : * const :: std :: os :: raw :: c_char , opts : * const git_diff_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free a git_patch object."] pub fn git_patch_free (patch : * mut git_patch) ; } extern "C" { # [doc = " Get the delta associated with a patch.  This delta points to internal"] # [doc = " data and you do not have to release it when you are done with it."] pub fn git_patch_get_delta (patch : * const git_patch) -> * const git_diff_delta ; } extern "C" { # [doc = " Get the number of hunks in a patch"] pub fn git_patch_num_hunks (patch : * const git_patch) -> size_t ; } extern "C" { # [doc = " Get line counts of each type in a patch."] # [doc = ""] # [doc = " This helps imitate a diff --numstat type of output.  For that purpose,"] # [doc = " you only need the `total_additions` and `total_deletions` values, but we"] # [doc = " include the `total_context` line count in case you want the total number"] # [doc = " of lines of diff output that will be generated."] # [doc = ""] # [doc = " All outputs are optional. Pass NULL if you don't need a particular count."] # [doc = ""] # [doc = " @param total_context Count of context lines in output, can be NULL."] # [doc = " @param total_additions Count of addition lines in output, can be NULL."] # [doc = " @param total_deletions Count of deletion lines in output, can be NULL."] # [doc = " @param patch The git_patch object"] # [doc = " @return 0 on success, <0 on error"] pub fn git_patch_line_stats (total_context : * mut size_t , total_additions : * mut size_t , total_deletions : * mut size_t , patch : * const git_patch) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the information about a hunk in a patch"] # [doc = ""] # [doc = " Given a patch and a hunk index into the patch, this returns detailed"] # [doc = " information about that hunk.  Any of the output pointers can be passed"] # [doc = " as NULL if you don't care about that particular piece of information."] # [doc = ""] # [doc = " @param out Output pointer to git_diff_hunk of hunk"] # [doc = " @param lines_in_hunk Output count of total lines in this hunk"] # [doc = " @param patch Input pointer to patch object"] # [doc = " @param hunk_idx Input index of hunk to get information about"] # [doc = " @return 0 on success, GIT_ENOTFOUND if hunk_idx out of range, <0 on error"] pub fn git_patch_get_hunk (out : * mut * const git_diff_hunk , lines_in_hunk : * mut size_t , patch : * mut git_patch , hunk_idx : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the number of lines in a hunk."] # [doc = ""] # [doc = " @param patch The git_patch object"] # [doc = " @param hunk_idx Index of the hunk"] # [doc = " @return Number of lines in hunk or GIT_ENOTFOUND if invalid hunk index"] pub fn git_patch_num_lines_in_hunk (patch : * const git_patch , hunk_idx : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get data about a line in a hunk of a patch."] # [doc = ""] # [doc = " Given a patch, a hunk index, and a line index in the hunk, this"] # [doc = " will return a lot of details about that line.  If you pass a hunk"] # [doc = " index larger than the number of hunks or a line index larger than"] # [doc = " the number of lines in the hunk, this will return -1."] # [doc = ""] # [doc = " @param out The git_diff_line data for this line"] # [doc = " @param patch The patch to look in"] # [doc = " @param hunk_idx The index of the hunk"] # [doc = " @param line_of_hunk The index of the line in the hunk"] # [doc = " @return 0 on success, <0 on failure"] pub fn git_patch_get_line_in_hunk (out : * mut * const git_diff_line , patch : * mut git_patch , hunk_idx : size_t , line_of_hunk : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Look up size of patch diff data in bytes"] # [doc = ""] # [doc = " This returns the raw size of the patch data.  This only includes the"] # [doc = " actual data from the lines of the diff, not the file or hunk headers."] # [doc = ""] # [doc = " If you pass `include_context` as true (non-zero), this will be the size"] # [doc = " of all of the diff output; if you pass it as false (zero), this will"] # [doc = " only include the actual changed lines (as if `context_lines` was 0)."] # [doc = ""] # [doc = " @param patch A git_patch representing changes to one file"] # [doc = " @param include_context Include context lines in size if non-zero"] # [doc = " @param include_hunk_headers Include hunk header lines if non-zero"] # [doc = " @param include_file_headers Include file header lines if non-zero"] # [doc = " @return The number of bytes of data"] pub fn git_patch_size (patch : * mut git_patch , include_context : :: std :: os :: raw :: c_int , include_hunk_headers : :: std :: os :: raw :: c_int , include_file_headers : :: std :: os :: raw :: c_int) -> size_t ; } extern "C" { # [doc = " Serialize the patch to text via callback."] # [doc = ""] # [doc = " Returning a non-zero value from the callback will terminate the iteration"] # [doc = " and return that value to the caller."] # [doc = ""] # [doc = " @param patch A git_patch representing changes to one file"] # [doc = " @param print_cb Callback function to output lines of the patch.  Will be"] # [doc = "                 called for file headers, hunk headers, and diff lines."] # [doc = " @param payload Reference pointer that will be passed to your callbacks."] # [doc = " @return 0 on success, non-zero callback return value, or error code"] pub fn git_patch_print (patch : * mut git_patch , print_cb : git_diff_line_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the content of a patch as a single diff text."] # [doc = ""] # [doc = " @param out The git_buf to be filled in"] # [doc = " @param patch A git_patch representing changes to one file"] # [doc = " @return 0 on success, <0 on failure."] pub fn git_patch_to_buf (out : * mut git_buf , patch : * mut git_patch) -> :: std :: os :: raw :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_pathspec { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct git_pathspec_match_list { _unused : [u8 ; 0] , } pub const git_pathspec_flag_t_GIT_PATHSPEC_DEFAULT : git_pathspec_flag_t = 0 ; # [doc = " GIT_PATHSPEC_IGNORE_CASE forces match to ignore case; otherwise"] # [doc = " match will use native case sensitivity of platform filesystem"] pub const git_pathspec_flag_t_GIT_PATHSPEC_IGNORE_CASE : git_pathspec_flag_t = 1 ; # [doc = " GIT_PATHSPEC_USE_CASE forces case sensitive match; otherwise"] # [doc = " match will use native case sensitivity of platform filesystem"] pub const git_pathspec_flag_t_GIT_PATHSPEC_USE_CASE : git_pathspec_flag_t = 2 ; # [doc = " GIT_PATHSPEC_NO_GLOB disables glob patterns and just uses simple"] # [doc = " string comparison for matching"] pub const git_pathspec_flag_t_GIT_PATHSPEC_NO_GLOB : git_pathspec_flag_t = 4 ; # [doc = " GIT_PATHSPEC_NO_MATCH_ERROR means the match functions return error"] # [doc = " code GIT_ENOTFOUND if no matches are found; otherwise no matches is"] # [doc = " still success (return 0) but `git_pathspec_match_list_entrycount`"] # [doc = " will indicate 0 matches."] pub const git_pathspec_flag_t_GIT_PATHSPEC_NO_MATCH_ERROR : git_pathspec_flag_t = 8 ; # [doc = " GIT_PATHSPEC_FIND_FAILURES means that the `git_pathspec_match_list`"] # [doc = " should track which patterns matched which files so that at the end of"] # [doc = " the match we can identify patterns that did not match any files."] pub const git_pathspec_flag_t_GIT_PATHSPEC_FIND_FAILURES : git_pathspec_flag_t = 16 ; # [doc = " GIT_PATHSPEC_FAILURES_ONLY means that the `git_pathspec_match_list`"] # [doc = " does not need to keep the actual matching filenames.  Use this to"] # [doc = " just test if there were any matches at all or in combination with"] # [doc = " GIT_PATHSPEC_FIND_FAILURES to validate a pathspec."] pub const git_pathspec_flag_t_GIT_PATHSPEC_FAILURES_ONLY : git_pathspec_flag_t = 32 ; # [doc = " Options controlling how pathspec match should be executed"] pub type git_pathspec_flag_t = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = " Compile a pathspec"] # [doc = ""] # [doc = " @param out Output of the compiled pathspec"] # [doc = " @param pathspec A git_strarray of the paths to match"] # [doc = " @return 0 on success, <0 on failure"] pub fn git_pathspec_new (out : * mut * mut git_pathspec , pathspec : * const git_strarray) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free a pathspec"] # [doc = ""] # [doc = " @param ps The compiled pathspec"] pub fn git_pathspec_free (ps : * mut git_pathspec) ; } extern "C" { # [doc = " Try to match a path against a pathspec"] # [doc = ""] # [doc = " Unlike most of the other pathspec matching functions, this will not"] # [doc = " fall back on the native case-sensitivity for your platform.  You must"] # [doc = " explicitly pass flags to control case sensitivity or else this will"] # [doc = " fall back on being case sensitive."] # [doc = ""] # [doc = " @param ps The compiled pathspec"] # [doc = " @param flags Combination of git_pathspec_flag_t options to control match"] # [doc = " @param path The pathname to attempt to match"] # [doc = " @return 1 is path matches spec, 0 if it does not"] pub fn git_pathspec_matches_path (ps : * const git_pathspec , flags : u32 , path : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Match a pathspec against the working directory of a repository."] # [doc = ""] # [doc = " This matches the pathspec against the current files in the working"] # [doc = " directory of the repository.  It is an error to invoke this on a bare"] # [doc = " repo.  This handles git ignores (i.e. ignored files will not be"] # [doc = " considered to match the `pathspec` unless the file is tracked in the"] # [doc = " index)."] # [doc = ""] # [doc = " If `out` is not NULL, this returns a `git_patchspec_match_list`.  That"] # [doc = " contains the list of all matched filenames (unless you pass the"] # [doc = " `GIT_PATHSPEC_FAILURES_ONLY` flag) and may also contain the list of"] # [doc = " pathspecs with no match (if you used the `GIT_PATHSPEC_FIND_FAILURES`"] # [doc = " flag).  You must call `git_pathspec_match_list_free()` on this object."] # [doc = ""] # [doc = " @param out Output list of matches; pass NULL to just get return value"] # [doc = " @param repo The repository in which to match; bare repo is an error"] # [doc = " @param flags Combination of git_pathspec_flag_t options to control match"] # [doc = " @param ps Pathspec to be matched"] # [doc = " @return 0 on success, -1 on error, GIT_ENOTFOUND if no matches and"] # [doc = "         the GIT_PATHSPEC_NO_MATCH_ERROR flag was given"] pub fn git_pathspec_match_workdir (out : * mut * mut git_pathspec_match_list , repo : * mut git_repository , flags : u32 , ps : * mut git_pathspec) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Match a pathspec against entries in an index."] # [doc = ""] # [doc = " This matches the pathspec against the files in the repository index."] # [doc = ""] # [doc = " NOTE: At the moment, the case sensitivity of this match is controlled"] # [doc = " by the current case-sensitivity of the index object itself and the"] # [doc = " USE_CASE and IGNORE_CASE flags will have no effect.  This behavior will"] # [doc = " be corrected in a future release."] # [doc = ""] # [doc = " If `out` is not NULL, this returns a `git_patchspec_match_list`.  That"] # [doc = " contains the list of all matched filenames (unless you pass the"] # [doc = " `GIT_PATHSPEC_FAILURES_ONLY` flag) and may also contain the list of"] # [doc = " pathspecs with no match (if you used the `GIT_PATHSPEC_FIND_FAILURES`"] # [doc = " flag).  You must call `git_pathspec_match_list_free()` on this object."] # [doc = ""] # [doc = " @param out Output list of matches; pass NULL to just get return value"] # [doc = " @param index The index to match against"] # [doc = " @param flags Combination of git_pathspec_flag_t options to control match"] # [doc = " @param ps Pathspec to be matched"] # [doc = " @return 0 on success, -1 on error, GIT_ENOTFOUND if no matches and"] # [doc = "         the GIT_PATHSPEC_NO_MATCH_ERROR flag is used"] pub fn git_pathspec_match_index (out : * mut * mut git_pathspec_match_list , index : * mut git_index , flags : u32 , ps : * mut git_pathspec) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Match a pathspec against files in a tree."] # [doc = ""] # [doc = " This matches the pathspec against the files in the given tree."] # [doc = ""] # [doc = " If `out` is not NULL, this returns a `git_patchspec_match_list`.  That"] # [doc = " contains the list of all matched filenames (unless you pass the"] # [doc = " `GIT_PATHSPEC_FAILURES_ONLY` flag) and may also contain the list of"] # [doc = " pathspecs with no match (if you used the `GIT_PATHSPEC_FIND_FAILURES`"] # [doc = " flag).  You must call `git_pathspec_match_list_free()` on this object."] # [doc = ""] # [doc = " @param out Output list of matches; pass NULL to just get return value"] # [doc = " @param tree The root-level tree to match against"] # [doc = " @param flags Combination of git_pathspec_flag_t options to control match"] # [doc = " @param ps Pathspec to be matched"] # [doc = " @return 0 on success, -1 on error, GIT_ENOTFOUND if no matches and"] # [doc = "         the GIT_PATHSPEC_NO_MATCH_ERROR flag is used"] pub fn git_pathspec_match_tree (out : * mut * mut git_pathspec_match_list , tree : * mut git_tree , flags : u32 , ps : * mut git_pathspec) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Match a pathspec against files in a diff list."] # [doc = ""] # [doc = " This matches the pathspec against the files in the given diff list."] # [doc = ""] # [doc = " If `out` is not NULL, this returns a `git_patchspec_match_list`.  That"] # [doc = " contains the list of all matched filenames (unless you pass the"] # [doc = " `GIT_PATHSPEC_FAILURES_ONLY` flag) and may also contain the list of"] # [doc = " pathspecs with no match (if you used the `GIT_PATHSPEC_FIND_FAILURES`"] # [doc = " flag).  You must call `git_pathspec_match_list_free()` on this object."] # [doc = ""] # [doc = " @param out Output list of matches; pass NULL to just get return value"] # [doc = " @param diff A generated diff list"] # [doc = " @param flags Combination of git_pathspec_flag_t options to control match"] # [doc = " @param ps Pathspec to be matched"] # [doc = " @return 0 on success, -1 on error, GIT_ENOTFOUND if no matches and"] # [doc = "         the GIT_PATHSPEC_NO_MATCH_ERROR flag is used"] pub fn git_pathspec_match_diff (out : * mut * mut git_pathspec_match_list , diff : * mut git_diff , flags : u32 , ps : * mut git_pathspec) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free memory associates with a git_pathspec_match_list"] # [doc = ""] # [doc = " @param m The git_pathspec_match_list to be freed"] pub fn git_pathspec_match_list_free (m : * mut git_pathspec_match_list) ; } extern "C" { # [doc = " Get the number of items in a match list."] # [doc = ""] # [doc = " @param m The git_pathspec_match_list object"] # [doc = " @return Number of items in match list"] pub fn git_pathspec_match_list_entrycount (m : * const git_pathspec_match_list) -> size_t ; } extern "C" { # [doc = " Get a matching filename by position."] # [doc = ""] # [doc = " This routine cannot be used if the match list was generated by"] # [doc = " `git_pathspec_match_diff`.  If so, it will always return NULL."] # [doc = ""] # [doc = " @param m The git_pathspec_match_list object"] # [doc = " @param pos The index into the list"] # [doc = " @return The filename of the match"] pub fn git_pathspec_match_list_entry (m : * const git_pathspec_match_list , pos : size_t) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Get a matching diff delta by position."] # [doc = ""] # [doc = " This routine can only be used if the match list was generated by"] # [doc = " `git_pathspec_match_diff`.  Otherwise it will always return NULL."] # [doc = ""] # [doc = " @param m The git_pathspec_match_list object"] # [doc = " @param pos The index into the list"] # [doc = " @return The filename of the match"] pub fn git_pathspec_match_list_diff_entry (m : * const git_pathspec_match_list , pos : size_t) -> * const git_diff_delta ; } extern "C" { # [doc = " Get the number of pathspec items that did not match."] # [doc = ""] # [doc = " This will be zero unless you passed GIT_PATHSPEC_FIND_FAILURES when"] # [doc = " generating the git_pathspec_match_list."] # [doc = ""] # [doc = " @param m The git_pathspec_match_list object"] # [doc = " @return Number of items in original pathspec that had no matches"] pub fn git_pathspec_match_list_failed_entrycount (m : * const git_pathspec_match_list) -> size_t ; } extern "C" { # [doc = " Get an original pathspec string that had no matches."] # [doc = ""] # [doc = " This will be return NULL for positions out of range."] # [doc = ""] # [doc = " @param m The git_pathspec_match_list object"] # [doc = " @param pos The index into the failed items"] # [doc = " @return The pathspec pattern that didn't match anything"] pub fn git_pathspec_match_list_failed_entry (m : * const git_pathspec_match_list , pos : size_t) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Create a new reference database with no backends."] # [doc = ""] # [doc = " Before the Ref DB can be used for read/writing, a custom database"] # [doc = " backend must be manually set using `git_refdb_set_backend()`"] # [doc = ""] # [doc = " @param out location to store the database pointer, if opened."] # [doc = "\t\t\tSet to NULL if the open failed."] # [doc = " @param repo the repository"] # [doc = " @return 0 or an error code"] pub fn git_refdb_new (out : * mut * mut git_refdb , repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a new reference database and automatically add"] # [doc = " the default backends:"] # [doc = ""] # [doc = "  - git_refdb_dir: read and write loose and packed refs"] # [doc = "      from disk, assuming the repository dir as the folder"] # [doc = ""] # [doc = " @param out location to store the database pointer, if opened."] # [doc = "\t\t\tSet to NULL if the open failed."] # [doc = " @param repo the repository"] # [doc = " @return 0 or an error code"] pub fn git_refdb_open (out : * mut * mut git_refdb , repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Suggests that the given refdb compress or optimize its references."] # [doc = " This mechanism is implementation specific.  For on-disk reference"] # [doc = " databases, for example, this may pack all loose references."] pub fn git_refdb_compress (refdb : * mut git_refdb) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Close an open reference database."] # [doc = ""] # [doc = " @param refdb reference database pointer or NULL"] pub fn git_refdb_free (refdb : * mut git_refdb) ; } extern "C" { # [doc = " Read the reflog for the given reference"] # [doc = ""] # [doc = " If there is no reflog file for the given"] # [doc = " reference yet, an empty reflog object will"] # [doc = " be returned."] # [doc = ""] # [doc = " The reflog must be freed manually by using"] # [doc = " git_reflog_free()."] # [doc = ""] # [doc = " @param out pointer to reflog"] # [doc = " @param repo the repostiory"] # [doc = " @param name reference to look up"] # [doc = " @return 0 or an error code"] pub fn git_reflog_read (out : * mut * mut git_reflog , repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Write an existing in-memory reflog object back to disk"] # [doc = " using an atomic file lock."] # [doc = ""] # [doc = " @param reflog an existing reflog object"] # [doc = " @return 0 or an error code"] pub fn git_reflog_write (reflog : * mut git_reflog) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Add a new entry to the in-memory reflog."] # [doc = ""] # [doc = " `msg` is optional and can be NULL."] # [doc = ""] # [doc = " @param reflog an existing reflog object"] # [doc = " @param id the OID the reference is now pointing to"] # [doc = " @param committer the signature of the committer"] # [doc = " @param msg the reflog message"] # [doc = " @return 0 or an error code"] pub fn git_reflog_append (reflog : * mut git_reflog , id : * const git_oid , committer : * const git_signature , msg : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Rename a reflog"] # [doc = ""] # [doc = " The reflog to be renamed is expected to already exist"] # [doc = ""] # [doc = " The new name will be checked for validity."] # [doc = " See `git_reference_create_symbolic()` for rules about valid names."] # [doc = ""] # [doc = " @param repo the repository"] # [doc = " @param old_name the old name of the reference"] # [doc = " @param name the new name of the reference"] # [doc = " @return 0 on success, GIT_EINVALIDSPEC or an error code"] pub fn git_reflog_rename (repo : * mut git_repository , old_name : * const :: std :: os :: raw :: c_char , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Delete the reflog for the given reference"] # [doc = ""] # [doc = " @param repo the repository"] # [doc = " @param name the reflog to delete"] # [doc = " @return 0 or an error code"] pub fn git_reflog_delete (repo : * mut git_repository , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the number of log entries in a reflog"] # [doc = ""] # [doc = " @param reflog the previously loaded reflog"] # [doc = " @return the number of log entries"] pub fn git_reflog_entrycount (reflog : * mut git_reflog) -> size_t ; } extern "C" { # [doc = " Lookup an entry by its index"] # [doc = ""] # [doc = " Requesting the reflog entry with an index of 0 (zero) will"] # [doc = " return the most recently created entry."] # [doc = ""] # [doc = " @param reflog a previously loaded reflog"] # [doc = " @param idx the position of the entry to lookup. Should be greater than or"] # [doc = " equal to 0 (zero) and less than `git_reflog_entrycount()`."] # [doc = " @return the entry; NULL if not found"] pub fn git_reflog_entry_byindex (reflog : * const git_reflog , idx : size_t) -> * const git_reflog_entry ; } extern "C" { # [doc = " Remove an entry from the reflog by its index"] # [doc = ""] # [doc = " To ensure there's no gap in the log history, set `rewrite_previous_entry`"] # [doc = " param value to 1. When deleting entry `n`, member old_oid of entry `n-1`"] # [doc = " (if any) will be updated with the value of member new_oid of entry `n+1`."] # [doc = ""] # [doc = " @param reflog a previously loaded reflog."] # [doc = ""] # [doc = " @param idx the position of the entry to remove. Should be greater than or"] # [doc = " equal to 0 (zero) and less than `git_reflog_entrycount()`."] # [doc = ""] # [doc = " @param rewrite_previous_entry 1 to rewrite the history; 0 otherwise."] # [doc = ""] # [doc = " @return 0 on success, GIT_ENOTFOUND if the entry doesn't exist"] # [doc = " or an error code."] pub fn git_reflog_drop (reflog : * mut git_reflog , idx : size_t , rewrite_previous_entry : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the old oid"] # [doc = ""] # [doc = " @param entry a reflog entry"] # [doc = " @return the old oid"] pub fn git_reflog_entry_id_old (entry : * const git_reflog_entry) -> * const git_oid ; } extern "C" { # [doc = " Get the new oid"] # [doc = ""] # [doc = " @param entry a reflog entry"] # [doc = " @return the new oid at this time"] pub fn git_reflog_entry_id_new (entry : * const git_reflog_entry) -> * const git_oid ; } extern "C" { # [doc = " Get the committer of this entry"] # [doc = ""] # [doc = " @param entry a reflog entry"] # [doc = " @return the committer"] pub fn git_reflog_entry_committer (entry : * const git_reflog_entry) -> * const git_signature ; } extern "C" { # [doc = " Get the log message"] # [doc = ""] # [doc = " @param entry a reflog entry"] # [doc = " @return the log msg"] pub fn git_reflog_entry_message (entry : * const git_reflog_entry) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Free the reflog"] # [doc = ""] # [doc = " @param reflog reflog to free"] pub fn git_reflog_free (reflog : * mut git_reflog) ; } # [doc = "< Move the head to the given commit"] pub const git_reset_t_GIT_RESET_SOFT : git_reset_t = 1 ; # [doc = "< SOFT plus reset index to the commit"] pub const git_reset_t_GIT_RESET_MIXED : git_reset_t = 2 ; # [doc = "< MIXED plus changes in working tree discarded"] pub const git_reset_t_GIT_RESET_HARD : git_reset_t = 3 ; # [doc = " Kinds of reset operation"] pub type git_reset_t = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = " Sets the current head to the specified commit oid and optionally"] # [doc = " resets the index and working tree to match."] # [doc = ""] # [doc = " SOFT reset means the Head will be moved to the commit."] # [doc = ""] # [doc = " MIXED reset will trigger a SOFT reset, plus the index will be replaced"] # [doc = " with the content of the commit tree."] # [doc = ""] # [doc = " HARD reset will trigger a MIXED reset and the working directory will be"] # [doc = " replaced with the content of the index.  (Untracked and ignored files"] # [doc = " will be left alone, however.)"] # [doc = ""] # [doc = " TODO: Implement remaining kinds of resets."] # [doc = ""] # [doc = " @param repo Repository where to perform the reset operation."] # [doc = ""] # [doc = " @param target Committish to which the Head should be moved to. This object"] # [doc = " must belong to the given `repo` and can either be a git_commit or a"] # [doc = " git_tag. When a git_tag is being passed, it should be dereferencable"] # [doc = " to a git_commit which oid will be used as the target of the branch."] # [doc = ""] # [doc = " @param reset_type Kind of reset operation to perform."] # [doc = ""] # [doc = " @param checkout_opts Optional checkout options to be used for a HARD reset."] # [doc = " The checkout_strategy field will be overridden (based on reset_type)."] # [doc = " This parameter can be used to propagate notify and progress callbacks."] # [doc = ""] # [doc = " @return 0 on success or an error code"] pub fn git_reset (repo : * mut git_repository , target : * const git_object , reset_type : git_reset_t , checkout_opts : * const git_checkout_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Sets the current head to the specified commit oid and optionally"] # [doc = " resets the index and working tree to match."] # [doc = ""] # [doc = " This behaves like `git_reset()` but takes an annotated commit,"] # [doc = " which lets you specify which extended sha syntax string was"] # [doc = " specified by a user, allowing for more exact reflog messages."] # [doc = ""] # [doc = " See the documentation for `git_reset()`."] # [doc = ""] # [doc = " @see git_reset"] pub fn git_reset_from_annotated (repo : * mut git_repository , commit : * const git_annotated_commit , reset_type : git_reset_t , checkout_opts : * const git_checkout_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Updates some entries in the index from the target commit tree."] # [doc = ""] # [doc = " The scope of the updated entries is determined by the paths"] # [doc = " being passed in the `pathspec` parameters."] # [doc = ""] # [doc = " Passing a NULL `target` will result in removing"] # [doc = " entries in the index matching the provided pathspecs."] # [doc = ""] # [doc = " @param repo Repository where to perform the reset operation."] # [doc = ""] # [doc = " @param target The committish which content will be used to reset the content"] # [doc = " of the index."] # [doc = ""] # [doc = " @param pathspecs List of pathspecs to operate on."] # [doc = ""] # [doc = " @return 0 on success or an error code < 0"] pub fn git_reset_default (repo : * mut git_repository , target : * const git_object , pathspecs : * const git_strarray) -> :: std :: os :: raw :: c_int ; } # [doc = " Sort the output with the same default method from `git`: reverse"] # [doc = " chronological order. This is the default sorting for new walkers."] pub const git_sort_t_GIT_SORT_NONE : git_sort_t = 0 ; # [doc = " Sort the repository contents in topological order (no parents before"] # [doc = " all of its children are shown); this sorting mode can be combined"] # [doc = " with time sorting to produce `git`'s `--date-order``."] pub const git_sort_t_GIT_SORT_TOPOLOGICAL : git_sort_t = 1 ; # [doc = " Sort the repository contents by commit time;"] # [doc = " this sorting mode can be combined with"] # [doc = " topological sorting."] pub const git_sort_t_GIT_SORT_TIME : git_sort_t = 2 ; # [doc = " Iterate through the repository contents in reverse"] # [doc = " order; this sorting mode can be combined with"] # [doc = " any of the above."] pub const git_sort_t_GIT_SORT_REVERSE : git_sort_t = 4 ; # [doc = " Flags to specify the sorting which a revwalk should perform."] pub type git_sort_t = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = " Allocate a new revision walker to iterate through a repo."] # [doc = ""] # [doc = " This revision walker uses a custom memory pool and an internal"] # [doc = " commit cache, so it is relatively expensive to allocate."] # [doc = ""] # [doc = " For maximum performance, this revision walker should be"] # [doc = " reused for different walks."] # [doc = ""] # [doc = " This revision walker is *not* thread safe: it may only be"] # [doc = " used to walk a repository on a single thread; however,"] # [doc = " it is possible to have several revision walkers in"] # [doc = " several different threads walking the same repository."] # [doc = ""] # [doc = " @param out pointer to the new revision walker"] # [doc = " @param repo the repo to walk through"] # [doc = " @return 0 or an error code"] pub fn git_revwalk_new (out : * mut * mut git_revwalk , repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Reset the revision walker for reuse."] # [doc = ""] # [doc = " This will clear all the pushed and hidden commits, and"] # [doc = " leave the walker in a blank state (just like at"] # [doc = " creation) ready to receive new commit pushes and"] # [doc = " start a new walk."] # [doc = ""] # [doc = " The revision walk is automatically reset when a walk"] # [doc = " is over."] # [doc = ""] # [doc = " @param walker handle to reset."] # [doc = " @return 0 or an error code"] pub fn git_revwalk_reset (walker : * mut git_revwalk) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Add a new root for the traversal"] # [doc = ""] # [doc = " The pushed commit will be marked as one of the roots from which to"] # [doc = " start the walk. This commit may not be walked if it or a child is"] # [doc = " hidden."] # [doc = ""] # [doc = " At least one commit must be pushed onto the walker before a walk"] # [doc = " can be started."] # [doc = ""] # [doc = " The given id must belong to a committish on the walked"] # [doc = " repository."] # [doc = ""] # [doc = " @param walk the walker being used for the traversal."] # [doc = " @param id the oid of the commit to start from."] # [doc = " @return 0 or an error code"] pub fn git_revwalk_push (walk : * mut git_revwalk , id : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Push matching references"] # [doc = ""] # [doc = " The OIDs pointed to by the references that match the given glob"] # [doc = " pattern will be pushed to the revision walker."] # [doc = ""] # [doc = " A leading 'refs/' is implied if not present as well as a trailing"] # [doc = " '/\\*' if the glob lacks '?', '\\*' or '['."] # [doc = ""] # [doc = " Any references matching this glob which do not point to a"] # [doc = " committish will be ignored."] # [doc = ""] # [doc = " @param walk the walker being used for the traversal"] # [doc = " @param glob the glob pattern references should match"] # [doc = " @return 0 or an error code"] pub fn git_revwalk_push_glob (walk : * mut git_revwalk , glob : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Push the repository's HEAD"] # [doc = ""] # [doc = " @param walk the walker being used for the traversal"] # [doc = " @return 0 or an error code"] pub fn git_revwalk_push_head (walk : * mut git_revwalk) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Mark a commit (and its ancestors) uninteresting for the output."] # [doc = ""] # [doc = " The given id must belong to a committish on the walked"] # [doc = " repository."] # [doc = ""] # [doc = " The resolved commit and all its parents will be hidden from the"] # [doc = " output on the revision walk."] # [doc = ""] # [doc = " @param walk the walker being used for the traversal."] # [doc = " @param commit_id the oid of commit that will be ignored during the traversal"] # [doc = " @return 0 or an error code"] pub fn git_revwalk_hide (walk : * mut git_revwalk , commit_id : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Hide matching references."] # [doc = ""] # [doc = " The OIDs pointed to by the references that match the given glob"] # [doc = " pattern and their ancestors will be hidden from the output on the"] # [doc = " revision walk."] # [doc = ""] # [doc = " A leading 'refs/' is implied if not present as well as a trailing"] # [doc = " '/\\*' if the glob lacks '?', '\\*' or '['."] # [doc = ""] # [doc = " Any references matching this glob which do not point to a"] # [doc = " committish will be ignored."] # [doc = ""] # [doc = " @param walk the walker being used for the traversal"] # [doc = " @param glob the glob pattern references should match"] # [doc = " @return 0 or an error code"] pub fn git_revwalk_hide_glob (walk : * mut git_revwalk , glob : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Hide the repository's HEAD"] # [doc = ""] # [doc = " @param walk the walker being used for the traversal"] # [doc = " @return 0 or an error code"] pub fn git_revwalk_hide_head (walk : * mut git_revwalk) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Push the OID pointed to by a reference"] # [doc = ""] # [doc = " The reference must point to a committish."] # [doc = ""] # [doc = " @param walk the walker being used for the traversal"] # [doc = " @param refname the reference to push"] # [doc = " @return 0 or an error code"] pub fn git_revwalk_push_ref (walk : * mut git_revwalk , refname : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Hide the OID pointed to by a reference"] # [doc = ""] # [doc = " The reference must point to a committish."] # [doc = ""] # [doc = " @param walk the walker being used for the traversal"] # [doc = " @param refname the reference to hide"] # [doc = " @return 0 or an error code"] pub fn git_revwalk_hide_ref (walk : * mut git_revwalk , refname : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the next commit from the revision walk."] # [doc = ""] # [doc = " The initial call to this method is *not* blocking when"] # [doc = " iterating through a repo with a time-sorting mode."] # [doc = ""] # [doc = " Iterating with Topological or inverted modes makes the initial"] # [doc = " call blocking to preprocess the commit list, but this block should be"] # [doc = " mostly unnoticeable on most repositories (topological preprocessing"] # [doc = " times at 0.3s on the git.git repo)."] # [doc = ""] # [doc = " The revision walker is reset when the walk is over."] # [doc = ""] # [doc = " @param out Pointer where to store the oid of the next commit"] # [doc = " @param walk the walker to pop the commit from."] # [doc = " @return 0 if the next commit was found;"] # [doc = "\tGIT_ITEROVER if there are no commits left to iterate"] pub fn git_revwalk_next (out : * mut git_oid , walk : * mut git_revwalk) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Change the sorting mode when iterating through the"] # [doc = " repository's contents."] # [doc = ""] # [doc = " Changing the sorting mode resets the walker."] # [doc = ""] # [doc = " @param walk the walker being used for the traversal."] # [doc = " @param sort_mode combination of GIT_SORT_XXX flags"] # [doc = " @return 0 or an error code"] pub fn git_revwalk_sorting (walk : * mut git_revwalk , sort_mode : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Push and hide the respective endpoints of the given range."] # [doc = ""] # [doc = " The range should be of the form"] # [doc = "   <commit>..<commit>"] # [doc = " where each <commit> is in the form accepted by 'git_revparse_single'."] # [doc = " The left-hand commit will be hidden and the right-hand commit pushed."] # [doc = ""] # [doc = " @param walk the walker being used for the traversal"] # [doc = " @param range the range"] # [doc = " @return 0 or an error code"] # [doc = ""] pub fn git_revwalk_push_range (walk : * mut git_revwalk , range : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Simplify the history by first-parent"] # [doc = ""] # [doc = " No parents other than the first for each commit will be enqueued."] # [doc = ""] # [doc = " @return 0 or an error code"] pub fn git_revwalk_simplify_first_parent (walk : * mut git_revwalk) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free a revision walker previously allocated."] # [doc = ""] # [doc = " @param walk traversal handle to close. If NULL nothing occurs."] pub fn git_revwalk_free (walk : * mut git_revwalk) ; } extern "C" { # [doc = " Return the repository on which this walker"] # [doc = " is operating."] # [doc = ""] # [doc = " @param walk the revision walker"] # [doc = " @return the repository being walked"] pub fn git_revwalk_repository (walk : * mut git_revwalk) -> * mut git_repository ; } # [doc = " This is a callback function that user can provide to hide a"] # [doc = " commit and its parents. If the callback function returns non-zero value,"] # [doc = " then this commit and its parents will be hidden."] # [doc = ""] # [doc = " @param commit_id oid of Commit"] # [doc = " @param payload User-specified pointer to data to be passed as data payload"] pub type git_revwalk_hide_cb = :: std :: option :: Option < unsafe extern "C" fn (commit_id : * const git_oid , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; extern "C" { # [doc = " Adds, changes or removes a callback function to hide a commit and its parents"] # [doc = ""] # [doc = " @param walk the revision walker"] # [doc = " @param hide_cb  callback function to hide a commit and its parents"] # [doc = " @param payload  data payload to be passed to callback function"] pub fn git_revwalk_add_hide_cb (walk : * mut git_revwalk , hide_cb : git_revwalk_hide_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a new action signature."] # [doc = ""] # [doc = " Call `git_signature_free()` to free the data."] # [doc = ""] # [doc = " Note: angle brackets ('<' and '>') characters are not allowed"] # [doc = " to be used in either the `name` or the `email` parameter."] # [doc = ""] # [doc = " @param out new signature, in case of error NULL"] # [doc = " @param name name of the person"] # [doc = " @param email email of the person"] # [doc = " @param time time (in seconds from epoch) when the action happened"] # [doc = " @param offset timezone offset (in minutes) for the time"] # [doc = " @return 0 or an error code"] pub fn git_signature_new (out : * mut * mut git_signature , name : * const :: std :: os :: raw :: c_char , email : * const :: std :: os :: raw :: c_char , time : git_time_t , offset : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a new action signature with a timestamp of 'now'."] # [doc = ""] # [doc = " Call `git_signature_free()` to free the data."] # [doc = ""] # [doc = " @param out new signature, in case of error NULL"] # [doc = " @param name name of the person"] # [doc = " @param email email of the person"] # [doc = " @return 0 or an error code"] pub fn git_signature_now (out : * mut * mut git_signature , name : * const :: std :: os :: raw :: c_char , email : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a new action signature with default user and now timestamp."] # [doc = ""] # [doc = " This looks up the user.name and user.email from the configuration and"] # [doc = " uses the current time as the timestamp, and creates a new signature"] # [doc = " based on that information.  It will return GIT_ENOTFOUND if either the"] # [doc = " user.name or user.email are not set."] # [doc = ""] # [doc = " @param out new signature"] # [doc = " @param repo repository pointer"] # [doc = " @return 0 on success, GIT_ENOTFOUND if config is missing, or error code"] pub fn git_signature_default (out : * mut * mut git_signature , repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a new signature by parsing the given buffer, which is"] # [doc = " expected to be in the format \"Real Name <email> timestamp tzoffset\","] # [doc = " where `timestamp` is the number of seconds since the Unix epoch and"] # [doc = " `tzoffset` is the timezone offset in `hhmm` format (note the lack"] # [doc = " of a colon separator)."] # [doc = ""] # [doc = " @param out new signature"] # [doc = " @param buf signature string"] # [doc = " @return 0 on success, or an error code"] pub fn git_signature_from_buffer (out : * mut * mut git_signature , buf : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a copy of an existing signature.  All internal strings are also"] # [doc = " duplicated."] # [doc = ""] # [doc = " Call `git_signature_free()` to free the data."] # [doc = ""] # [doc = " @param dest pointer where to store the copy"] # [doc = " @param sig signature to duplicate"] # [doc = " @return 0 or an error code"] pub fn git_signature_dup (dest : * mut * mut git_signature , sig : * const git_signature) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free an existing signature."] # [doc = ""] # [doc = " Because the signature is not an opaque structure, it is legal to free it"] # [doc = " manually, but be sure to free the \"name\" and \"email\" strings in addition"] # [doc = " to the structure itself."] # [doc = ""] # [doc = " @param sig signature to free"] pub fn git_signature_free (sig : * mut git_signature) ; } extern "C" { # [doc = " Lookup a tag object from the repository."] # [doc = ""] # [doc = " @param out pointer to the looked up tag"] # [doc = " @param repo the repo to use when locating the tag."] # [doc = " @param id identity of the tag to locate."] # [doc = " @return 0 or an error code"] pub fn git_tag_lookup (out : * mut * mut git_tag , repo : * mut git_repository , id : * const git_oid) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Lookup a tag object from the repository,"] # [doc = " given a prefix of its identifier (short id)."] # [doc = ""] # [doc = " @see git_object_lookup_prefix"] # [doc = ""] # [doc = " @param out pointer to the looked up tag"] # [doc = " @param repo the repo to use when locating the tag."] # [doc = " @param id identity of the tag to locate."] # [doc = " @param len the length of the short identifier"] # [doc = " @return 0 or an error code"] pub fn git_tag_lookup_prefix (out : * mut * mut git_tag , repo : * mut git_repository , id : * const git_oid , len : size_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Close an open tag"] # [doc = ""] # [doc = " You can no longer use the git_tag pointer after this call."] # [doc = ""] # [doc = " IMPORTANT: You MUST call this method when you are through with a tag to"] # [doc = " release memory. Failure to do so will cause a memory leak."] # [doc = ""] # [doc = " @param tag the tag to close"] pub fn git_tag_free (tag : * mut git_tag) ; } extern "C" { # [doc = " Get the id of a tag."] # [doc = ""] # [doc = " @param tag a previously loaded tag."] # [doc = " @return object identity for the tag."] pub fn git_tag_id (tag : * const git_tag) -> * const git_oid ; } extern "C" { # [doc = " Get the repository that contains the tag."] # [doc = ""] # [doc = " @param tag A previously loaded tag."] # [doc = " @return Repository that contains this tag."] pub fn git_tag_owner (tag : * const git_tag) -> * mut git_repository ; } extern "C" { # [doc = " Get the tagged object of a tag"] # [doc = ""] # [doc = " This method performs a repository lookup for the"] # [doc = " given object and returns it"] # [doc = ""] # [doc = " @param target_out pointer where to store the target"] # [doc = " @param tag a previously loaded tag."] # [doc = " @return 0 or an error code"] pub fn git_tag_target (target_out : * mut * mut git_object , tag : * const git_tag) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get the OID of the tagged object of a tag"] # [doc = ""] # [doc = " @param tag a previously loaded tag."] # [doc = " @return pointer to the OID"] pub fn git_tag_target_id (tag : * const git_tag) -> * const git_oid ; } extern "C" { # [doc = " Get the type of a tag's tagged object"] # [doc = ""] # [doc = " @param tag a previously loaded tag."] # [doc = " @return type of the tagged object"] pub fn git_tag_target_type (tag : * const git_tag) -> git_object_t ; } extern "C" { # [doc = " Get the name of a tag"] # [doc = ""] # [doc = " @param tag a previously loaded tag."] # [doc = " @return name of the tag"] pub fn git_tag_name (tag : * const git_tag) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Get the tagger (author) of a tag"] # [doc = ""] # [doc = " @param tag a previously loaded tag."] # [doc = " @return reference to the tag's author or NULL when unspecified"] pub fn git_tag_tagger (tag : * const git_tag) -> * const git_signature ; } extern "C" { # [doc = " Get the message of a tag"] # [doc = ""] # [doc = " @param tag a previously loaded tag."] # [doc = " @return message of the tag or NULL when unspecified"] pub fn git_tag_message (tag : * const git_tag) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Create a new tag in the repository from an object"] # [doc = ""] # [doc = " A new reference will also be created pointing to"] # [doc = " this tag object. If `force` is true and a reference"] # [doc = " already exists with the given name, it'll be replaced."] # [doc = ""] # [doc = " The message will not be cleaned up. This can be achieved"] # [doc = " through `git_message_prettify()`."] # [doc = ""] # [doc = " The tag name will be checked for validity. You must avoid"] # [doc = " the characters '~', '^', ':', '\\\\', '?', '[', and '*', and the"] # [doc = " sequences \"..\" and \"@{\" which have special meaning to revparse."] # [doc = ""] # [doc = " @param oid Pointer where to store the OID of the"] # [doc = " newly created tag. If the tag already exists, this parameter"] # [doc = " will be the oid of the existing tag, and the function will"] # [doc = " return a GIT_EEXISTS error code."] # [doc = ""] # [doc = " @param repo Repository where to store the tag"] # [doc = ""] # [doc = " @param tag_name Name for the tag; this name is validated"] # [doc = " for consistency. It should also not conflict with an"] # [doc = " already existing tag name"] # [doc = ""] # [doc = " @param target Object to which this tag points. This object"] # [doc = " must belong to the given `repo`."] # [doc = ""] # [doc = " @param tagger Signature of the tagger for this tag, and"] # [doc = " of the tagging time"] # [doc = ""] # [doc = " @param message Full message for this tag"] # [doc = ""] # [doc = " @param force Overwrite existing references"] # [doc = ""] # [doc = " @return 0 on success, GIT_EINVALIDSPEC or an error code"] # [doc = "\tA tag object is written to the ODB, and a proper reference"] # [doc = "\tis written in the /refs/tags folder, pointing to it"] pub fn git_tag_create (oid : * mut git_oid , repo : * mut git_repository , tag_name : * const :: std :: os :: raw :: c_char , target : * const git_object , tagger : * const git_signature , message : * const :: std :: os :: raw :: c_char , force : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a new tag in the object database pointing to a git_object"] # [doc = ""] # [doc = " The message will not be cleaned up. This can be achieved"] # [doc = " through `git_message_prettify()`."] # [doc = ""] # [doc = " @param oid Pointer where to store the OID of the"] # [doc = " newly created tag"] # [doc = ""] # [doc = " @param repo Repository where to store the tag"] # [doc = ""] # [doc = " @param tag_name Name for the tag"] # [doc = ""] # [doc = " @param target Object to which this tag points. This object"] # [doc = " must belong to the given `repo`."] # [doc = ""] # [doc = " @param tagger Signature of the tagger for this tag, and"] # [doc = " of the tagging time"] # [doc = ""] # [doc = " @param message Full message for this tag"] # [doc = ""] # [doc = " @return 0 on success or an error code"] pub fn git_tag_annotation_create (oid : * mut git_oid , repo : * mut git_repository , tag_name : * const :: std :: os :: raw :: c_char , target : * const git_object , tagger : * const git_signature , message : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a new tag in the repository from a buffer"] # [doc = ""] # [doc = " @param oid Pointer where to store the OID of the newly created tag"] # [doc = " @param repo Repository where to store the tag"] # [doc = " @param buffer Raw tag data"] # [doc = " @param force Overwrite existing tags"] # [doc = " @return 0 on success; error code otherwise"] pub fn git_tag_create_from_buffer (oid : * mut git_oid , repo : * mut git_repository , buffer : * const :: std :: os :: raw :: c_char , force : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a new lightweight tag pointing at a target object"] # [doc = ""] # [doc = " A new direct reference will be created pointing to"] # [doc = " this target object. If `force` is true and a reference"] # [doc = " already exists with the given name, it'll be replaced."] # [doc = ""] # [doc = " The tag name will be checked for validity."] # [doc = " See `git_tag_create()` for rules about valid names."] # [doc = ""] # [doc = " @param oid Pointer where to store the OID of the provided"] # [doc = " target object. If the tag already exists, this parameter"] # [doc = " will be filled with the oid of the existing pointed object"] # [doc = " and the function will return a GIT_EEXISTS error code."] # [doc = ""] # [doc = " @param repo Repository where to store the lightweight tag"] # [doc = ""] # [doc = " @param tag_name Name for the tag; this name is validated"] # [doc = " for consistency. It should also not conflict with an"] # [doc = " already existing tag name"] # [doc = ""] # [doc = " @param target Object to which this tag points. This object"] # [doc = " must belong to the given `repo`."] # [doc = ""] # [doc = " @param force Overwrite existing references"] # [doc = ""] # [doc = " @return 0 on success, GIT_EINVALIDSPEC or an error code"] # [doc = "\tA proper reference is written in the /refs/tags folder,"] # [doc = " pointing to the provided target object"] pub fn git_tag_create_lightweight (oid : * mut git_oid , repo : * mut git_repository , tag_name : * const :: std :: os :: raw :: c_char , target : * const git_object , force : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Delete an existing tag reference."] # [doc = ""] # [doc = " The tag name will be checked for validity."] # [doc = " See `git_tag_create()` for rules about valid names."] # [doc = ""] # [doc = " @param repo Repository where lives the tag"] # [doc = ""] # [doc = " @param tag_name Name of the tag to be deleted;"] # [doc = " this name is validated for consistency."] # [doc = ""] # [doc = " @return 0 on success, GIT_EINVALIDSPEC or an error code"] pub fn git_tag_delete (repo : * mut git_repository , tag_name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Fill a list with all the tags in the Repository"] # [doc = ""] # [doc = " The string array will be filled with the names of the"] # [doc = " matching tags; these values are owned by the user and"] # [doc = " should be free'd manually when no longer needed, using"] # [doc = " `git_strarray_free`."] # [doc = ""] # [doc = " @param tag_names Pointer to a git_strarray structure where"] # [doc = "\t\tthe tag names will be stored"] # [doc = " @param repo Repository where to find the tags"] # [doc = " @return 0 or an error code"] pub fn git_tag_list (tag_names : * mut git_strarray , repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Fill a list with all the tags in the Repository"] # [doc = " which name match a defined pattern"] # [doc = ""] # [doc = " If an empty pattern is provided, all the tags"] # [doc = " will be returned."] # [doc = ""] # [doc = " The string array will be filled with the names of the"] # [doc = " matching tags; these values are owned by the user and"] # [doc = " should be free'd manually when no longer needed, using"] # [doc = " `git_strarray_free`."] # [doc = ""] # [doc = " @param tag_names Pointer to a git_strarray structure where"] # [doc = "\t\tthe tag names will be stored"] # [doc = " @param pattern Standard fnmatch pattern"] # [doc = " @param repo Repository where to find the tags"] # [doc = " @return 0 or an error code"] pub fn git_tag_list_match (tag_names : * mut git_strarray , pattern : * const :: std :: os :: raw :: c_char , repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } # [doc = " Callback used to iterate over tag names"] # [doc = ""] # [doc = " @see git_tag_foreach"] # [doc = ""] # [doc = " @param name The tag name"] # [doc = " @param oid The tag's OID"] # [doc = " @param payload Payload passed to git_tag_foreach"] # [doc = " @return non-zero to terminate the iteration"] pub type git_tag_foreach_cb = :: std :: option :: Option < unsafe extern "C" fn (name : * const :: std :: os :: raw :: c_char , oid : * mut git_oid , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; extern "C" { # [doc = " Call callback `cb' for each tag in the repository"] # [doc = ""] # [doc = " @param repo Repository"] # [doc = " @param callback Callback function"] # [doc = " @param payload Pointer to callback data (optional)"] pub fn git_tag_foreach (repo : * mut git_repository , callback : git_tag_foreach_cb , payload : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Recursively peel a tag until a non tag git_object is found"] # [doc = ""] # [doc = " The retrieved `tag_target` object is owned by the repository"] # [doc = " and should be closed with the `git_object_free` method."] # [doc = ""] # [doc = " @param tag_target_out Pointer to the peeled git_object"] # [doc = " @param tag The tag to be processed"] # [doc = " @return 0 or an error code"] pub fn git_tag_peel (tag_target_out : * mut * mut git_object , tag : * const git_tag) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create an in-memory copy of a tag. The copy must be explicitly"] # [doc = " free'd or it will leak."] # [doc = ""] # [doc = " @param out Pointer to store the copy of the tag"] # [doc = " @param source Original tag to copy"] pub fn git_tag_dup (out : * mut * mut git_tag , source : * mut git_tag) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Determine whether a tag name is valid, meaning that (when prefixed"] # [doc = " with `refs/tags/`) that it is a valid reference name, and that any"] # [doc = " additional tag name restrictions are imposed (eg, it cannot start"] # [doc = " with a `-`)."] # [doc = ""] # [doc = " @param valid output pointer to set with validity of given tag name"] # [doc = " @param name a tag name to test"] # [doc = " @return 0 on success or an error code"] pub fn git_tag_name_is_valid (valid : * mut :: std :: os :: raw :: c_int , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Create a new transaction object"] # [doc = ""] # [doc = " This does not lock anything, but sets up the transaction object to"] # [doc = " know from which repository to lock."] # [doc = ""] # [doc = " @param out the resulting transaction"] # [doc = " @param repo the repository in which to lock"] # [doc = " @return 0 or an error code"] pub fn git_transaction_new (out : * mut * mut git_transaction , repo : * mut git_repository) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Lock a reference"] # [doc = ""] # [doc = " Lock the specified reference. This is the first step to updating a"] # [doc = " reference."] # [doc = ""] # [doc = " @param tx the transaction"] # [doc = " @param refname the reference to lock"] # [doc = " @return 0 or an error message"] pub fn git_transaction_lock_ref (tx : * mut git_transaction , refname : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Set the target of a reference"] # [doc = ""] # [doc = " Set the target of the specified reference. This reference must be"] # [doc = " locked."] # [doc = ""] # [doc = " @param tx the transaction"] # [doc = " @param refname reference to update"] # [doc = " @param target target to set the reference to"] # [doc = " @param sig signature to use in the reflog; pass NULL to read the identity from the config"] # [doc = " @param msg message to use in the reflog"] # [doc = " @return 0, GIT_ENOTFOUND if the reference is not among the locked ones, or an error code"] pub fn git_transaction_set_target (tx : * mut git_transaction , refname : * const :: std :: os :: raw :: c_char , target : * const git_oid , sig : * const git_signature , msg : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Set the target of a reference"] # [doc = ""] # [doc = " Set the target of the specified reference. This reference must be"] # [doc = " locked."] # [doc = ""] # [doc = " @param tx the transaction"] # [doc = " @param refname reference to update"] # [doc = " @param target target to set the reference to"] # [doc = " @param sig signature to use in the reflog; pass NULL to read the identity from the config"] # [doc = " @param msg message to use in the reflog"] # [doc = " @return 0, GIT_ENOTFOUND if the reference is not among the locked ones, or an error code"] pub fn git_transaction_set_symbolic_target (tx : * mut git_transaction , refname : * const :: std :: os :: raw :: c_char , target : * const :: std :: os :: raw :: c_char , sig : * const git_signature , msg : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Set the reflog of a reference"] # [doc = ""] # [doc = " Set the specified reference's reflog. If this is combined with"] # [doc = " setting the target, that update won't be written to the reflog."] # [doc = ""] # [doc = " @param tx the transaction"] # [doc = " @param refname the reference whose reflog to set"] # [doc = " @param reflog the reflog as it should be written out"] # [doc = " @return 0, GIT_ENOTFOUND if the reference is not among the locked ones, or an error code"] pub fn git_transaction_set_reflog (tx : * mut git_transaction , refname : * const :: std :: os :: raw :: c_char , reflog : * const git_reflog) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Remove a reference"] # [doc = ""] # [doc = " @param tx the transaction"] # [doc = " @param refname the reference to remove"] # [doc = " @return 0, GIT_ENOTFOUND if the reference is not among the locked ones, or an error code"] pub fn git_transaction_remove (tx : * mut git_transaction , refname : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Commit the changes from the transaction"] # [doc = ""] # [doc = " Perform the changes that have been queued. The updates will be made"] # [doc = " one by one, and the first failure will stop the processing."] # [doc = ""] # [doc = " @param tx the transaction"] # [doc = " @return 0 or an error code"] pub fn git_transaction_commit (tx : * mut git_transaction) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Free the resources allocated by this transaction"] # [doc = ""] # [doc = " If any references remain locked, they will be unlocked without any"] # [doc = " changes made to them."] # [doc = ""] # [doc = " @param tx the transaction"] pub fn git_transaction_free (tx : * mut git_transaction) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct __locale_data { pub _address : u8 , }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               +                                                                                                                                                                                                                                                                                                                                           +
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: 13 warnings emitted
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stderr]     Finished dev [unoptimized + debuginfo] target(s) in 11.17s
[INFO] running `Command { std: "docker" "inspect" "b041fadc8833d87c27407131973e97a925c28d079d972aee6efed554fe323a76", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "b041fadc8833d87c27407131973e97a925c28d079d972aee6efed554fe323a76", kill_on_drop: false }`
[INFO] [stdout] b041fadc8833d87c27407131973e97a925c28d079d972aee6efed554fe323a76
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-e" "DOCS_RS=1" "-e" "RUSTC_BOOTSTRAP=1" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:5ff2268d62e97bff2cde7d5815dd6ed5b47097566f13b8d0ca110b04b60e07ed" "/opt/rustwide/cargo-home/bin/cargo" "+1.69.0" "rustdoc" "--lib" "-Zrustdoc-map" "-Z" "unstable-options" "--config" "build.rustdocflags=[\"-Z\", \"unstable-options\", \"--document-private-items\"]" "--frozen" "--message-format=json", kill_on_drop: false }`
[INFO] [stdout] 3dc4cca0e400a93e2e466036cf86831731420119ca6ff58500ed6e9b1bdad654
[INFO] running `Command { std: "docker" "start" "-a" "3dc4cca0e400a93e2e466036cf86831731420119ca6ff58500ed6e9b1bdad654", kill_on_drop: false }`
[INFO] [stderr] error: manifest path `/opt/rustwide/workdir/Cargo.toml` is a virtual manifest, but this command requires running against an actual package in this workspace
[INFO] running `Command { std: "docker" "inspect" "3dc4cca0e400a93e2e466036cf86831731420119ca6ff58500ed6e9b1bdad654", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "3dc4cca0e400a93e2e466036cf86831731420119ca6ff58500ed6e9b1bdad654", kill_on_drop: false }`
[INFO] [stdout] 3dc4cca0e400a93e2e466036cf86831731420119ca6ff58500ed6e9b1bdad654
