| [ Web Proxy ] |
| Viewing: https://raw.githubusercontent.com/elfscript/nodegit/master/generate/input/libgit2-docs.json | [Back] [Original] |
Creates a git_annotated_commit from the given reference.\n The resulting git_annotated_commit must be freed with\n git_annotated_commit_free.
Creates a git_annotated_commit from the given fetch head data.\n The resulting git_annotated_commit must be freed with\n git_annotated_commit_free.
Creates a git_annotated_commit from the given commit id.\n The resulting git_annotated_commit must be freed with\n git_annotated_commit_free.
An annotated commit contains information about how it was looked up, which may be useful for functions like merge or rebase to provide context to the operation. For example, conflict files will include the name of the source or target branches being merged. It is therefore preferable to use the most specific function (eg git_annotated_commit_from_ref) instead of this one when that data is known.
Creates a git_annotated_comit from a revision string.
See man gitrevisions, or http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for information on the syntax accepted.
Gets the commit ID that the given git_annotated_commit refers to.
Frees a git_annotated_commit.
Return the value type for a given attribute.
\n", "comments": "This can be either TRUE, FALSE, UNSPECIFIED (if the attribute was not set at all), or VALUE, if the attribute was set to an actual string.
If the attribute has a VALUE string, it can be accessed normally as a NULL-terminated C string.
Look up the value of one git attribute for path.
\n", "comments": "", "group": "attr" }, "git_attr_get_many": { "type": "function", "file": "attr.h", "line": 181, "lineto": 187, "args": [ { "name": "values_out", "type": "const char **", "comment": "An array of num_attr entries that will have string\n pointers written into it for the values of the attributes.\n You should not modify or free the values that are written\n into this array (although of course, you should free the\n array itself if you allocated it)." }, { "name": "repo", "type": "git_repository *", "comment": "The repository containing the path." }, { "name": "flags", "type": "uint32_t", "comment": "A combination of GIT_ATTR_CHECK... flags." }, { "name": "path", "type": "const char *", "comment": "The path inside the repo to check attributes. This\n does not have to exist, but if it does not, then\n it will be treated as a plain file (i.e. not a directory)." }, { "name": "num_attr", "type": "size_t", "comment": "The number of attributes being looked up" }, { "name": "names", "type": "const char **", "comment": "An array of num_attr strings containing attribute names." } ], "argline": "const char **values_out, git_repository *repo, uint32_t flags, const char *path, size_t num_attr, const char **names", "sig": "const char **::git_repository *::uint32_t::const char *::size_t::const char **", "return": { "type": "int", "comment": null }, "description": "Look up a list of git attributes for path.
\n", "comments": "Use this if you have a known list of attributes that you want to look up in a single call. This is somewhat more efficient than calling git_attr_get() multiple times.
For example, you might write:
\n\n const char *attrs[] = { "crlf", "diff", "foo" }; const char **values[3]; git_attr_get_many(values, repo, 0, "my/fun/file.c", 3, attrs);\n\n\nThen you could loop through the 3 values to get the settings for the three attributes you asked about.
\n", "group": "attr" }, "git_attr_foreach": { "type": "function", "file": "attr.h", "line": 209, "lineto": 214, "args": [ { "name": "repo", "type": "git_repository *", "comment": "The repository containing the path." }, { "name": "flags", "type": "uint32_t", "comment": "A combination of GIT_ATTR_CHECK... flags." }, { "name": "path", "type": "const char *", "comment": "Path inside the repo to check attributes. This does not have\n to exist, but if it does not, then it will be treated as a\n plain file (i.e. not a directory)." }, { "name": "callback", "type": "git_attr_foreach_cb", "comment": "Function to invoke on each attribute name and value. The\n value may be NULL is the attribute is explicitly set to\n UNSPECIFIED using the '!' sign. Callback will be invoked\n only once per attribute name, even if there are multiple\n rules for a given file. The highest priority rule will be\n used. Return a non-zero value from this to stop looping.\n The value will be returned from `git_attr_foreach`." }, { "name": "payload", "type": "void *", "comment": "Passed on as extra parameter to callback function." } ], "argline": "git_repository *repo, uint32_t flags, const char *path, git_attr_foreach_cb callback, void *payload", "sig": "git_repository *::uint32_t::const char *::git_attr_foreach_cb::void *", "return": { "type": "int", "comment": " 0 on success, non-zero callback return value, or error code" }, "description": "Loop over all the git attributes for a path.
\n", "comments": "", "group": "attr" }, "git_attr_cache_flush": { "type": "function", "file": "attr.h", "line": 224, "lineto": 225, "args": [ { "name": "repo", "type": "git_repository *", "comment": null } ], "argline": "git_repository *repo", "sig": "git_repository *", "return": { "type": "void", "comment": null }, "description": "Flush the gitattributes cache.
\n", "comments": "Call this if you have reason to believe that the attributes files on disk no longer match the cached contents of memory. This will cause the attributes files to be reloaded the next time that an attribute access function is called.
\n", "group": "attr" }, "git_attr_add_macro": { "type": "function", "file": "attr.h", "line": 237, "lineto": 240, "args": [ { "name": "repo", "type": "git_repository *", "comment": null }, { "name": "name", "type": "const char *", "comment": null }, { "name": "values", "type": "const char *", "comment": null } ], "argline": "git_repository *repo, const char *name, const char *values", "sig": "git_repository *::const char *::const char *", "return": { "type": "int", "comment": null }, "description": "Add a macro definition.
\n", "comments": "Macros will automatically be loaded from the top level .gitattributes file of the repository (plus the build-in "binary" macro). This function allows you to add others. For example, to add the default macro, you would call:
git_attr_add_macro(repo, "binary", "-diff -crlf");\n\n",
"group": "attr"
},
"git_blame_init_options": {
"type": "function",
"file": "blame.h",
"line": 92,
"lineto": 94,
"args": [
{
"name": "opts",
"type": "git_blame_options *",
"comment": "The `git_blame_options` struct to initialize"
},
{
"name": "version",
"type": "unsigned int",
"comment": "Version of struct; pass `GIT_BLAME_OPTIONS_VERSION`"
}
],
"argline": "git_blame_options *opts, unsigned int version",
"sig": "git_blame_options *::unsigned int",
"return": {
"type": "int",
"comment": " Zero on success; -1 on failure."
},
"description": "Initializes a git_blame_options with default values. Equivalent to\n creating an instance with GIT_BLAME_OPTIONS_INIT.
Gets the number of hunks that exist in the blame structure.
\n", "comments": "", "group": "blame" }, "git_blame_get_hunk_byindex": { "type": "function", "file": "blame.h", "line": 146, "lineto": 148, "args": [ { "name": "blame", "type": "git_blame *", "comment": "the blame structure to query" }, { "name": "index", "type": "uint32_t", "comment": "index of the hunk to retrieve" } ], "argline": "git_blame *blame, uint32_t index", "sig": "git_blame *::uint32_t", "return": { "type": "const git_blame_hunk *", "comment": " the hunk at the given index, or NULL on error" }, "description": "Gets the blame hunk at the given index.
\n", "comments": "", "group": "blame" }, "git_blame_get_hunk_byline": { "type": "function", "file": "blame.h", "line": 157, "lineto": 159, "args": [ { "name": "blame", "type": "git_blame *", "comment": "the blame structure to query" }, { "name": "lineno", "type": "size_t", "comment": "the (1-based) line number to find a hunk for" } ], "argline": "git_blame *blame, size_t lineno", "sig": "git_blame *::size_t", "return": { "type": "const git_blame_hunk *", "comment": " the hunk that contains the given line, or NULL on error" }, "description": "Gets the hunk that relates to the given line number in the newest commit.
\n", "comments": "", "group": "blame", "examples": { "blame.c": [ "ex/HEAD/blame.html#git_blame_get_hunk_byline-1" ] } }, "git_blame_file": { "type": "function", "file": "blame.h", "line": 172, "lineto": 176, "args": [ { "name": "out", "type": "git_blame **", "comment": "pointer that will receive the blame object" }, { "name": "repo", "type": "git_repository *", "comment": "repository whose history is to be walked" }, { "name": "path", "type": "const char *", "comment": "path to file to consider" }, { "name": "options", "type": "git_blame_options *", "comment": "options for the blame operation. If NULL, this is treated as\n though GIT_BLAME_OPTIONS_INIT were passed." } ], "argline": "git_blame **out, git_repository *repo, const char *path, git_blame_options *options", "sig": "git_blame **::git_repository *::const char *::git_blame_options *", "return": { "type": "int", "comment": " 0 on success, or an error code. (use giterr_last for information\n about the error.)" }, "description": "Get the blame for a single file.
\n", "comments": "", "group": "blame", "examples": { "blame.c": [ "ex/HEAD/blame.html#git_blame_file-2" ] } }, "git_blame_buffer": { "type": "function", "file": "blame.h", "line": 196, "lineto": 200, "args": [ { "name": "out", "type": "git_blame **", "comment": "pointer that will receive the resulting blame data" }, { "name": "reference", "type": "git_blame *", "comment": "cached blame from the history of the file (usually the output\n from git_blame_file)" }, { "name": "buffer", "type": "const char *", "comment": "the (possibly) modified contents of the file" }, { "name": "buffer_len", "type": "size_t", "comment": "number of valid bytes in the buffer" } ], "argline": "git_blame **out, git_blame *reference, const char *buffer, size_t buffer_len", "sig": "git_blame **::git_blame *::const char *::size_t", "return": { "type": "int", "comment": " 0 on success, or an error code. (use giterr_last for information\n about the error)" }, "description": "Get blame data for a file that has been modified in memory. The reference\n parameter is a pre-calculated blame for the in-odb history of the file. This\n means that once a file blame is completed (which can be expensive), updating\n the buffer blame is very fast.
Lines that differ between the buffer and the committed version are marked as having a zero OID for their final_commit_id.
\n", "group": "blame" }, "git_blame_free": { "type": "function", "file": "blame.h", "line": 207, "lineto": 207, "args": [ { "name": "blame", "type": "git_blame *", "comment": "the blame structure to free" } ], "argline": "git_blame *blame", "sig": "git_blame *", "return": { "type": "void", "comment": null }, "description": "Free memory allocated by git_blame_file or git_blame_buffer.
\n", "comments": "", "group": "blame", "examples": { "blame.c": [ "ex/HEAD/blame.html#git_blame_free-3" ] } }, "git_blob_lookup": { "type": "function", "file": "blob.h", "line": 33, "lineto": 33, "args": [ { "name": "blob", "type": "git_blob **", "comment": "pointer to the looked up blob" }, { "name": "repo", "type": "git_repository *", "comment": "the repo to use when locating the blob." }, { "name": "id", "type": "const git_oid *", "comment": "identity of the blob to locate." } ], "argline": "git_blob **blob, git_repository *repo, const git_oid *id", "sig": "git_blob **::git_repository *::const git_oid *", "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Lookup a blob object from a repository.
\n", "comments": "", "group": "blob", "examples": { "blame.c": [ "ex/HEAD/blame.html#git_blob_lookup-4" ], "general.c": [ "ex/HEAD/general.html#git_blob_lookup-1" ] } }, "git_blob_lookup_prefix": { "type": "function", "file": "blob.h", "line": 47, "lineto": 47, "args": [ { "name": "blob", "type": "git_blob **", "comment": "pointer to the looked up blob" }, { "name": "repo", "type": "git_repository *", "comment": "the repo to use when locating the blob." }, { "name": "id", "type": "const git_oid *", "comment": "identity of the blob to locate." }, { "name": "len", "type": "size_t", "comment": "the length of the short identifier" } ], "argline": "git_blob **blob, git_repository *repo, const git_oid *id, size_t len", "sig": "git_blob **::git_repository *::const git_oid *::size_t", "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Lookup a blob object from a repository,\n given a prefix of its identifier (short id).
\n", "comments": "", "group": "blob" }, "git_blob_free": { "type": "function", "file": "blob.h", "line": 60, "lineto": 60, "args": [ { "name": "blob", "type": "git_blob *", "comment": "the blob to close" } ], "argline": "git_blob *blob", "sig": "git_blob *", "return": { "type": "void", "comment": null }, "description": "Close an open blob
\n", "comments": "This is a wrapper around git_object_free()
\n\nIMPORTANT: It is necessary to call this method when you stop using a blob. Failure to do so will cause a memory leak.
\n", "group": "blob", "examples": { "blame.c": [ "ex/HEAD/blame.html#git_blob_free-5" ], "general.c": [ "ex/HEAD/general.html#git_blob_free-2" ] } }, "git_blob_id": { "type": "function", "file": "blob.h", "line": 68, "lineto": 68, "args": [ { "name": "blob", "type": "const git_blob *", "comment": "a previously loaded blob." } ], "argline": "const git_blob *blob", "sig": "const git_blob *", "return": { "type": "const git_oid *", "comment": " SHA1 hash for this blob." }, "description": "Get the id of a blob.
\n", "comments": "", "group": "blob" }, "git_blob_owner": { "type": "function", "file": "blob.h", "line": 76, "lineto": 76, "args": [ { "name": "blob", "type": "const git_blob *", "comment": "A previously loaded blob." } ], "argline": "const git_blob *blob", "sig": "const git_blob *", "return": { "type": "git_repository *", "comment": " Repository that contains this blob." }, "description": "Get the repository that contains the blob.
\n", "comments": "", "group": "blob" }, "git_blob_rawcontent": { "type": "function", "file": "blob.h", "line": 89, "lineto": 89, "args": [ { "name": "blob", "type": "const git_blob *", "comment": "pointer to the blob" } ], "argline": "const git_blob *blob", "sig": "const git_blob *", "return": { "type": "const void *", "comment": " the pointer" }, "description": "Get a read-only buffer with the raw content of a blob.
\n", "comments": "A pointer to the raw content of a blob is returned; this pointer is owned internally by the object and shall not be free'd. The pointer may be invalidated at a later time.
\n", "group": "blob", "examples": { "blame.c": [ "ex/HEAD/blame.html#git_blob_rawcontent-6" ], "cat-file.c": [ "ex/HEAD/cat-file.html#git_blob_rawcontent-1" ], "general.c": [ "ex/HEAD/general.html#git_blob_rawcontent-3" ] } }, "git_blob_rawsize": { "type": "function", "file": "blob.h", "line": 97, "lineto": 97, "args": [ { "name": "blob", "type": "const git_blob *", "comment": "pointer to the blob" } ], "argline": "const git_blob *blob", "sig": "const git_blob *", "return": { "type": "git_off_t", "comment": " size on bytes" }, "description": "Get the size in bytes of the contents of a blob
\n", "comments": "", "group": "blob", "examples": { "blame.c": [ "ex/HEAD/blame.html#git_blob_rawsize-7" ], "cat-file.c": [ "ex/HEAD/cat-file.html#git_blob_rawsize-2" ], "general.c": [ "ex/HEAD/general.html#git_blob_rawsize-4", "ex/HEAD/general.html#git_blob_rawsize-5" ] } }, "git_blob_filtered_content": { "type": "function", "file": "blob.h", "line": 122, "lineto": 126, "args": [ { "name": "out", "type": "git_buf *", "comment": "The git_buf to be filled in" }, { "name": "blob", "type": "git_blob *", "comment": "Pointer to the blob" }, { "name": "as_path", "type": "const char *", "comment": "Path used for file attribute lookups, etc." }, { "name": "check_for_binary_data", "type": "int", "comment": "Should this test if blob content contains\n NUL bytes / looks like binary data before applying filters?" } ], "argline": "git_buf *out, git_blob *blob, const char *as_path, int check_for_binary_data", "sig": "git_buf *::git_blob *::const char *::int", "return": { "type": "int", "comment": " 0 on success or an error code" }, "description": "Get a buffer with the filtered content of a blob.
\n", "comments": "This applies filters as if the blob was being checked out to the working directory under the specified filename. This may apply CRLF filtering or other types of changes depending on the file attributes set for the blob and the content detected in it.
\n\nThe output is written into a git_buf which the caller must free when done (via git_buf_free).
If no filters need to be applied, then the out buffer will just be populated with a pointer to the raw content of the blob. In that case, be careful to not free the blob until done with the buffer or copy it into memory you own.
Read a file from the working folder of a repository\n and write it to the Object Database as a loose blob
\n", "comments": "", "group": "blob" }, "git_blob_create_fromdisk": { "type": "function", "file": "blob.h", "line": 151, "lineto": 151, "args": [ { "name": "id", "type": "git_oid *", "comment": "return the id of the written blob" }, { "name": "repo", "type": "git_repository *", "comment": "repository where the blob will be written.\n\tthis repository can be bare or not" }, { "name": "path", "type": "const char *", "comment": "file from which the blob will be created" } ], "argline": "git_oid *id, git_repository *repo, const char *path", "sig": "git_oid *::git_repository *::const char *", "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Read a file from the filesystem and write its content\n to the Object Database as a loose blob
\n", "comments": "", "group": "blob" }, "git_blob_create_fromstream": { "type": "function", "file": "blob.h", "line": 178, "lineto": 181, "args": [ { "name": "out", "type": "git_writestream **", "comment": "the stream into which to write" }, { "name": "repo", "type": "git_repository *", "comment": "Repository where the blob will be written.\n This repository can be bare or not." }, { "name": "hintpath", "type": "const char *", "comment": "If not NULL, will be used to select data filters\n to apply onto the content of the blob to be created." } ], "argline": "git_writestream **out, git_repository *repo, const char *hintpath", "sig": "git_writestream **::git_repository *::const char *", "return": { "type": "int", "comment": " 0 or error code" }, "description": "Create a stream to write a new blob into the object db
\n", "comments": "This function may need to buffer the data on disk and will in general not be the right choice if you know the size of the data to write. If you have data in memory, use git_blob_create_frombuffer(). If you do not, but know the size of the contents (and don't want/need to perform filtering), use git_odb_open_wstream().
Don't close this stream yourself but pass it to git_blob_create_fromstream_commit() to commit the write to the object db and get the object id.
If the hintpath parameter is filled, it will be used to determine what git filters should be applied to the object before it is written to the object database.
Close the stream and write the blob to the object db
\n", "comments": "The stream will be closed and freed.
\n", "group": "blob" }, "git_blob_create_frombuffer": { "type": "function", "file": "blob.h", "line": 205, "lineto": 206, "args": [ { "name": "id", "type": "git_oid *", "comment": "return the id of the written blob" }, { "name": "repo", "type": "git_repository *", "comment": "repository where to blob will be written" }, { "name": "buffer", "type": "const void *", "comment": "data to be written into the blob" }, { "name": "len", "type": "size_t", "comment": "length of the data" } ], "argline": "git_oid *id, git_repository *repo, const void *buffer, size_t len", "sig": "git_oid *::git_repository *::const void *::size_t", "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Write an in-memory buffer to the ODB as a blob
\n", "comments": "", "group": "blob" }, "git_blob_is_binary": { "type": "function", "file": "blob.h", "line": 219, "lineto": 219, "args": [ { "name": "blob", "type": "const git_blob *", "comment": "The blob which content should be analyzed" } ], "argline": "const git_blob *blob", "sig": "const git_blob *", "return": { "type": "int", "comment": " 1 if the content of the blob is detected\n as binary; 0 otherwise." }, "description": "Determine if the blob content is most certainly binary or not.
\n", "comments": "The heuristic used to guess if a file is binary is taken from core git: Searching for NUL bytes and looking for a reasonable ratio of printable to non-printable characters among the first 8000 bytes.
\n", "group": "blob" }, "git_blob_dup": { "type": "function", "file": "blob.h", "line": 228, "lineto": 228, "args": [ { "name": "out", "type": "git_blob **", "comment": "Pointer to store the copy of the object" }, { "name": "source", "type": "git_blob *", "comment": "Original object to copy" } ], "argline": "git_blob **out, git_blob *source", "sig": "git_blob **::git_blob *", "return": { "type": "int", "comment": null }, "description": "Create an in-memory copy of a blob. The copy must be explicitly\n free'd or it will leak.
\n", "comments": "", "group": "blob" }, "git_branch_create": { "type": "function", "file": "branch.h", "line": 50, "lineto": 55, "args": [ { "name": "out", "type": "git_reference **", "comment": "Pointer where to store the underlying reference." }, { "name": "repo", "type": "git_repository *", "comment": null }, { "name": "branch_name", "type": "const char *", "comment": "Name for the branch; this name is\n validated for consistency. It should also not conflict with\n an already existing branch name." }, { "name": "target", "type": "const git_commit *", "comment": "Commit to which this branch should point. This object\n must belong to the given `repo`." }, { "name": "force", "type": "int", "comment": "Overwrite existing branch." } ], "argline": "git_reference **out, git_repository *repo, const char *branch_name, const git_commit *target, int force", "sig": "git_reference **::git_repository *::const char *::const git_commit *::int", "return": { "type": "int", "comment": " 0, GIT_EINVALIDSPEC or an error code.\n A proper reference is written in the refs/heads namespace\n pointing to the provided target commit." }, "description": "Create a new branch pointing at a target commit
\n", "comments": "A new direct reference will be created pointing to this target commit. If force is true and a reference already exists with the given name, it'll be replaced.
The returned reference must be freed by the user.
\n\nThe branch name will be checked for validity. See git_tag_create() for rules about valid names.
Create a new branch pointing at a target commit
\n", "comments": "This behaves like git_branch_create() but takes an annotated commit, which lets you specify which extended sha syntax string was specified by a user, allowing for more exact reflog messages.
See the documentation for git_branch_create().
Delete an existing branch reference.
\n", "comments": "If the branch is successfully deleted, the passed reference object will be invalidated. The reference must be freed manually by the user.
\n", "group": "branch" }, "git_branch_iterator_new": { "type": "function", "file": "branch.h", "line": 101, "lineto": 104, "args": [ { "name": "out", "type": "git_branch_iterator **", "comment": "the iterator" }, { "name": "repo", "type": "git_repository *", "comment": "Repository where to find the branches." }, { "name": "list_flags", "type": "git_branch_t", "comment": "Filtering flags for the branch\n listing. Valid values are GIT_BRANCH_LOCAL, GIT_BRANCH_REMOTE\n or GIT_BRANCH_ALL." } ], "argline": "git_branch_iterator **out, git_repository *repo, git_branch_t list_flags", "sig": "git_branch_iterator **::git_repository *::git_branch_t", "return": { "type": "int", "comment": " 0 on success or an error code" }, "description": "Create an iterator which loops over the requested branches.
\n", "comments": "", "group": "branch" }, "git_branch_next": { "type": "function", "file": "branch.h", "line": 114, "lineto": 114, "args": [ { "name": "out", "type": "git_reference **", "comment": "the reference" }, { "name": "out_type", "type": "git_branch_t *", "comment": "the type of branch (local or remote-tracking)" }, { "name": "iter", "type": "git_branch_iterator *", "comment": "the branch iterator" } ], "argline": "git_reference **out, git_branch_t *out_type, git_branch_iterator *iter", "sig": "git_reference **::git_branch_t *::git_branch_iterator *", "return": { "type": "int", "comment": " 0 on success, GIT_ITEROVER if there are no more branches or an error code." }, "description": "Retrieve the next branch from the iterator
\n", "comments": "", "group": "branch" }, "git_branch_iterator_free": { "type": "function", "file": "branch.h", "line": 121, "lineto": 121, "args": [ { "name": "iter", "type": "git_branch_iterator *", "comment": "the iterator to free" } ], "argline": "git_branch_iterator *iter", "sig": "git_branch_iterator *", "return": { "type": "void", "comment": null }, "description": "Free a branch iterator
\n", "comments": "", "group": "branch" }, "git_branch_move": { "type": "function", "file": "branch.h", "line": 138, "lineto": 142, "args": [ { "name": "out", "type": "git_reference **", "comment": null }, { "name": "branch", "type": "git_reference *", "comment": "Current underlying reference of the branch." }, { "name": "new_branch_name", "type": "const char *", "comment": "Target name of the branch once the move\n is performed; this name is validated for consistency." }, { "name": "force", "type": "int", "comment": "Overwrite existing branch." } ], "argline": "git_reference **out, git_reference *branch, const char *new_branch_name, int force", "sig": "git_reference **::git_reference *::const char *::int", "return": { "type": "int", "comment": " 0 on success, GIT_EINVALIDSPEC or an error code." }, "description": "Move/rename an existing local branch reference.
\n", "comments": "The new branch name will be checked for validity. See git_tag_create() for rules about valid names.
Lookup a branch by its name in a repository.
\n", "comments": "The generated reference must be freed by the user.
\n\nThe branch name will be checked for validity. See git_tag_create() for rules about valid names.
Return the name of the given local or remote branch.
\n", "comments": "The name of the branch matches the definition of the name for git_branch_lookup. That is, if the returned name is given to git_branch_lookup() then the reference is returned that was given to this function.
\n", "group": "branch" }, "git_branch_remote_name": { "type": "function", "file": "branch.h", "line": 274, "lineto": 277, "args": [ { "name": "out", "type": "git_buf *", "comment": "where the name is stored." }, { "name": "repo", "type": "git_respository *", "comment": "the repo to check." }, { "name": "canonical_branch_name", "type": "const char *", "comment": "the ref name of the branch" } ], "argline": "git_buf *out, git_repository *repo, const char *canonical_branch_name", "sig": "git_buf *::git_repository *::const char *", "return": { "type": "int", "comment": " 0 on success; otherwise an error code (e.g., if the\n ref is no local or remote branch)." }, "description": "Return the name of the given remote branch.
\n", "comments": "\n", "group": "branch" }, "git_branch_upstream": { "type": "function", "file": "branch.h", "line": 202, "lineto": 204, "args": [ { "name": "out", "type": "git_reference **", "comment": "Pointer where to store the retrieved\n reference." }, { "name": "branch", "type": "const git_reference *", "comment": "Current underlying reference of the branch." } ], "argline": "git_reference **out, const git_reference *branch", "sig": "git_reference **::const git_reference *", "return": { "type": "int", "comment": " 0 on success; GIT_ENOTFOUND when no remote tracking\n reference exists, otherwise an error code." }, "description": "Return the reference supporting the remote tracking branch,\n given a local branch reference.
\n", "comments": "", "group": "branch" }, "git_branch_set_upstream": { "type": "function", "file": "branch.h", "line": 216, "lineto": 216, "args": [ { "name": "branch", "type": "git_reference *", "comment": "the branch to configure" }, { "name": "upstream_name", "type": "const char *", "comment": "remote-tracking or local branch to set as\n upstream. Pass NULL to unset." } ], "argline": "git_reference *branch, const char *upstream_name", "sig": "git_reference *::const char *", "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Set the upstream configuration for a given local branch
\n", "comments": "", "group": "branch" }, "git_branch_is_head": { "type": "function", "file": "branch.h", "line": 245, "lineto": 246, "args": [ { "name": "branch", "type": "const git_reference *", "comment": "Current underlying reference of the branch." } ], "argline": "const git_reference *branch", "sig": "const git_reference *", "return": { "type": "int", "comment": " 1 if HEAD points at the branch, 0 if it isn't,\n error code otherwise." }, "description": "Determine if the current local branch is pointed at by HEAD.
\n", "comments": "", "group": "branch" }, "git_buf_free": { "type": "function", "file": "buffer.h", "line": 72, "lineto": 72, "args": [ { "name": "buffer", "type": "git_buf *", "comment": "The buffer to deallocate" } ], "argline": "git_buf *buffer", "sig": "git_buf *", "return": { "type": "void", "comment": null }, "description": "Free the memory referred to by the git_buf.
\n", "comments": "Note that this does not free the git_buf itself, just the memory pointed to by buffer->ptr. This will not free the memory if it looks like it was not allocated internally, but it will clear the buffer back to the empty state.
Resize the buffer allocation to make more space.
\n", "comments": "This will attempt to grow the buffer to accommodate the target size.
\n\nIf the buffer refers to memory that was not allocated by libgit2 (i.e. the asize field is zero), then ptr will be replaced with a newly allocated block of data. Be careful so that memory allocated by the caller is not lost. As a special variant, if you pass target_size as 0 and the memory is not allocated by libgit2, this will allocate a new buffer of size size and copy the external data into it.
Currently, this will never shrink a buffer, only expand it.
\n\nIf the allocation fails, this will return an error and the buffer will be marked as invalid for future operations, invaliding the contents.
\n", "group": "buf" }, "git_buf_set": { "type": "function", "file": "buffer.h", "line": 105, "lineto": 106, "args": [ { "name": "buffer", "type": "git_buf *", "comment": "The buffer to set" }, { "name": "data", "type": "const void *", "comment": "The data to copy into the buffer" }, { "name": "datalen", "type": "size_t", "comment": "The length of the data to copy into the buffer" } ], "argline": "git_buf *buffer, const void *data, size_t datalen", "sig": "git_buf *::const void *::size_t", "return": { "type": "int", "comment": " 0 on success, -1 on allocation failure" }, "description": "Set buffer to a copy of some raw data.
\n", "comments": "", "group": "buf" }, "git_buf_is_binary": { "type": "function", "file": "buffer.h", "line": 114, "lineto": 114, "args": [ { "name": "buf", "type": "const git_buf *", "comment": "Buffer to check" } ], "argline": "const git_buf *buf", "sig": "const git_buf *", "return": { "type": "int", "comment": " 1 if buffer looks like non-text data" }, "description": "Check quickly if buffer looks like it contains binary data
\n", "comments": "", "group": "buf" }, "git_buf_contains_nul": { "type": "function", "file": "buffer.h", "line": 122, "lineto": 122, "args": [ { "name": "buf", "type": "const git_buf *", "comment": "Buffer to check" } ], "argline": "const git_buf *buf", "sig": "const git_buf *", "return": { "type": "int", "comment": " 1 if buffer contains a NUL byte" }, "description": "Check quickly if buffer contains a NUL byte
\n", "comments": "", "group": "buf" }, "git_checkout_init_options": { "type": "function", "file": "checkout.h", "line": 308, "lineto": 310, "args": [ { "name": "opts", "type": "git_checkout_options *", "comment": "the `git_checkout_options` struct to initialize." }, { "name": "version", "type": "unsigned int", "comment": "Version of struct; pass `GIT_CHECKOUT_OPTIONS_VERSION`" } ], "argline": "git_checkout_options *opts, unsigned int version", "sig": "git_checkout_options *::unsigned int", "return": { "type": "int", "comment": " Zero on success; -1 on failure." }, "description": "Initializes a git_checkout_options with default values. Equivalent to\n creating an instance with GIT_CHECKOUT_OPTIONS_INIT.
| Web Proxy Viewer | New URL | Original Page |