{"files":[{"file":"git2/attr.h","functions":["git_attr_get","git_attr_foreach","git_attr_cache_flush","git_attr_add_macro"],"meta":{},"lines":237},{"file":"git2/blame.h","functions":["git_blame_init_options","git_blame_get_hunk_count","git_blame_get_hunk_byindex","git_blame_get_hunk_byline","git_blame_file","git_blame_free"],"meta":{},"lines":208},{"file":"git2/blob.h","functions":["git_blob_lookup","git_blob_free","git_blob_id","git_blob_owner","git_blob_rawcontent","git_blob_rawsize","git_blob_filtered_content","git_blob_create_fromworkdir","git_blob_create_fromdisk","git_blob_create_fromchunks","git_blob_is_binary"],"meta":{},"lines":219},{"file":"git2/branch.h","functions":["git_branch_create","git_branch_delete","git_branch_iterator_new","git_branch_next","git_branch_iterator_free","git_branch_move","git_branch_lookup","git_branch_name","git_branch_upstream","git_branch_set_upstream","git_branch_is_head"],"meta":{},"lines":242},{"file":"git2/buffer.h","functions":["git_buf_free"],"meta":{},"lines":72},{"file":"git2/checkout.h","functions":["git_checkout_notify_cb","git_checkout_progress_cb","git_checkout_init_options","git_checkout_head","git_checkout_index","git_checkout_tree"],"meta":{},"lines":323},{"file":"git2/cherrypick.h","functions":["git_cherry_pick_init_options","git_cherry_pick_commit","git_cherry_pick"],"meta":{},"lines":81},{"file":"git2/clone.h","functions":["git_clone_init_options","git_clone","git_clone_into","git_clone_local_into"],"meta":{},"lines":203},{"file":"git2/commit.h","functions":["git_commit_lookup","git_commit_free","git_commit_id","git_commit_owner","git_commit_message_encoding","git_commit_message","git_commit_message_raw","git_commit_summary","git_commit_time","git_commit_time_offset","git_commit_committer","git_commit_author","git_commit_raw_header","git_commit_tree","git_commit_tree_id","git_commit_parentcount","git_commit_parent","git_commit_parent_id","git_commit_nth_gen_ancestor","git_commit_amend"],"meta":{},"lines":353},{"file":"git2/common.h","functions":["git_libgit2_version","git_libgit2_features","git_libgit2_opts"],"meta":{},"lines":228},{"file":"git2/config.h","functions":["git_config_find_global","git_config_find_xdg","git_config_find_system","git_config_open_default","git_config_new","git_config_add_file_ondisk","git_config_open_ondisk","git_config_open_level","git_config_open_global","git_config_snapshot","git_config_refresh","git_config_free","git_config_get_entry","git_config_get_int32","git_config_get_int64","git_config_get_bool","git_config_get_string","git_config_get_multivar_foreach","git_config_multivar_iterator_new","git_config_next","git_config_iterator_free","git_config_set_int32","git_config_set_int64","git_config_set_bool","git_config_set_string","git_config_set_multivar","git_config_delete_entry","git_config_delete_multivar","git_config_foreach","git_config_iterator_new","git_config_iterator_glob_new","git_config_foreach_match","git_config_parse_bool","git_config_parse_int32","git_config_parse_int64","git_config_backend_foreach_match"],"meta":{},"lines":640},{"file":"git2/cred_helpers.h","functions":["git_cred_userpass"],"meta":{},"lines":48},{"file":"git2/diff.h","functions":["git_diff_notify_cb","git_diff_init_options","git_diff_file_cb","git_diff_hunk_cb","git_diff_line_cb","git_diff_find_init_options","git_diff_free","git_diff_tree_to_tree","git_diff_tree_to_index","git_diff_index_to_workdir","git_diff_tree_to_workdir","git_diff_tree_to_workdir_with_index","git_diff_merge","git_diff_find_similar","git_diff_is_sorted_icase","git_diff_foreach","git_diff_status_char","git_diff_print","git_diff_blobs","git_diff_get_stats","git_diff_stats_free","git_diff_format_email","git_diff_format_email_init_options"],"meta":{},"lines":1234},{"file":"git2/errors.h","functions":["giterr_last","giterr_clear","giterr_detach","giterr_set_str","giterr_set_oom"],"meta":{},"lines":149},{"file":"git2/filter.h","functions":["git_filter_list_load","git_filter_list_apply_to_data","git_filter_list_apply_to_file","git_filter_list_apply_to_blob","git_filter_list_free"],"meta":{},"lines":142},{"file":"git2/graph.h","functions":["git_graph_descendant_of"],"meta":{},"lines":51},{"file":"git2/ignore.h","functions":["git_ignore_add_rule","git_ignore_clear_internal_rules","git_ignore_path_is_ignored"],"meta":{},"lines":74},{"file":"git2/index.h","functions":["git_index_matched_path_cb","git_index_open","git_index_new","git_index_free","git_index_owner","git_index_caps","git_index_set_caps","git_index_read","git_index_write","git_index_path","git_index_read_tree","git_index_write_tree","git_index_write_tree_to","git_index_clear","git_index_get_bypath","git_index_remove","git_index_remove_directory","git_index_add","git_index_entry_stage","git_index_add_bypath","git_index_remove_bypath","git_index_add_all","git_index_remove_all","git_index_update_all","git_index_conflict_add","git_index_conflict_get","git_index_conflict_remove","git_index_conflict_cleanup","git_index_has_conflicts","git_index_conflict_iterator_new","git_index_conflict_next","git_index_conflict_iterator_free"],"meta":{},"lines":693},{"file":"git2/indexer.h","functions":["git_indexer_new","git_indexer_commit","git_indexer_hash","git_indexer_free"],"meta":{},"lines":72},{"file":"git2/merge.h","functions":["git_merge_file_init_input","git_merge_file_init_options","git_merge_init_options","git_merge_base","git_merge_head_from_ref","git_merge_head_from_fetchhead","git_merge_head_from_id","git_merge_head_id","git_merge_head_free","git_merge_file","git_merge_file_from_index","git_merge_file_result_free","git_merge_trees","git_merge_commits"],"meta":{},"lines":512},{"file":"git2/message.h","functions":["git_message_prettify"],"meta":{},"lines":39},{"file":"git2/net.h","functions":["git_headlist_cb"],"meta":{},"lines":54},{"file":"git2/notes.h","functions":["git_note_foreach_cb","git_note_iterator_new","git_note_iterator_free","git_note_next","git_note_read","git_note_message","git_note_id","git_note_create","git_note_remove","git_note_free","git_note_default_ref","git_note_foreach"],"meta":{},"lines":198},{"file":"git2/object.h","functions":["git_object_lookup","git_object_lookup_bypath","git_object_id","git_object_short_id","git_object_type","git_object_owner","git_object_free","git_object_type2string","git_object_string2type","git_object_typeisloose","git_object_peel","git_object_dup"],"meta":{},"lines":230},{"file":"git2/odb.h","functions":["git_odb_foreach_cb","git_odb_new","git_odb_open","git_odb_add_disk_alternate","git_odb_free","git_odb_read","git_odb_exists","git_odb_refresh","git_odb_foreach","git_odb_stream_finalize_write","git_odb_stream_free","git_odb_open_rstream","git_odb_write_pack","git_odb_hashfile","git_odb_object_dup","git_odb_object_free","git_odb_object_id","git_odb_object_data","git_odb_object_type","git_odb_add_backend","git_odb_add_alternate"],"meta":{},"lines":473},{"file":"git2/odb_backend.h","functions":["git_odb_backend_pack","git_odb_backend_loose","git_odb_backend_one_pack"],"meta":{},"lines":130},{"file":"git2/oid.h","functions":["git_oid_fromstr","git_oid_fromstrp","git_oid_fromraw","git_oid_fmt","git_oid_pathfmt","git_oid_allocfmt","git_oid_cpy","git_oid_cmp","git_oid_equal","git_oid_streq","git_oid_strcmp","git_oid_iszero","git_oid_shorten_add","git_oid_shorten_free"],"meta":{},"lines":261},{"file":"git2/pack.h","functions":["git_packbuilder_new","git_packbuilder_set_threads","git_packbuilder_insert","git_packbuilder_insert_tree","git_packbuilder_insert_commit","git_packbuilder_write","git_packbuilder_hash","git_packbuilder_foreach","git_packbuilder_object_count","git_packbuilder_written","git_packbuilder_progress","git_packbuilder_set_callbacks","git_packbuilder_free"],"meta":{},"lines":211},{"file":"git2/patch.h","functions":["git_patch_from_blobs","git_patch_free","git_patch_get_delta","git_patch_print","git_patch_to_buf"],"meta":{},"lines":271},{"file":"git2/pathspec.h","functions":["git_pathspec_new","git_pathspec_free","git_pathspec_matches_path","git_pathspec_match_workdir","git_pathspec_match_index","git_pathspec_match_tree","git_pathspec_match_diff","git_pathspec_match_list_free"],"meta":{},"lines":201},{"file":"git2/push.h","functions":["git_push_init_options","git_push_transfer_progress","git_push_new","git_push_set_options","git_push_set_callbacks","git_push_add_refspec","git_push_update_tips","git_push_finish","git_push_unpack_ok","git_push_status_foreach","git_push_free"],"meta":{},"lines":177},{"file":"git2/refdb.h","functions":["git_refdb_new","git_refdb_open","git_refdb_compress","git_refdb_free"],"meta":{},"lines":63},{"file":"git2/reflog.h","functions":["git_reflog_read","git_reflog_write","git_reflog_append","git_reflog_rename","git_reflog_delete","git_reflog_entry_id_old","git_reflog_entry_id_new","git_reflog_entry_committer","git_reflog_entry_message","git_reflog_free"],"meta":{},"lines":166},{"file":"git2/refs.h","functions":["git_reference_lookup","git_reference_name_to_id","git_reference_dwim","git_reference_symbolic_create_matching","git_reference_symbolic_create","git_reference_create","git_reference_create_matching","git_reference_target","git_reference_target_peel","git_reference_symbolic_target","git_reference_type","git_reference_name","git_reference_resolve","git_reference_owner","git_reference_symbolic_set_target","git_reference_set_target","git_reference_rename","git_reference_delete","git_reference_remove","git_reference_list","git_reference_foreach","git_reference_foreach_name","git_reference_free","git_reference_cmp","git_reference_iterator_new","git_reference_iterator_glob_new","git_reference_next","git_reference_next_name","git_reference_iterator_free","git_reference_foreach_glob","git_reference_has_log","git_reference_ensure_log","git_reference_is_branch","git_reference_is_remote","git_reference_is_tag","git_reference_is_note","git_reference_peel","git_reference_is_valid_name","git_reference_shorthand"],"meta":{},"lines":734},{"file":"git2/refspec.h","functions":["git_refspec_src","git_refspec_dst","git_refspec_string","git_refspec_force","git_refspec_direction","git_refspec_src_matches","git_refspec_dst_matches","git_refspec_transform","git_refspec_rtransform"],"meta":{},"lines":100},{"file":"git2/remote.h","functions":["git_remote_rename_problem_cb","git_remote_create","git_remote_create_with_fetchspec","git_remote_create_anonymous","git_remote_load","git_remote_save","git_remote_dup","git_remote_owner","git_remote_name","git_remote_url","git_remote_pushurl","git_remote_set_url","git_remote_set_pushurl","git_remote_add_fetch","git_remote_get_fetch_refspecs","git_remote_set_fetch_refspecs","git_remote_add_push","git_remote_get_push_refspecs","git_remote_set_push_refspecs","git_remote_clear_refspecs","git_remote_connect","git_remote_download","git_remote_connected","git_remote_stop","git_remote_disconnect","git_remote_free","git_remote_update_tips","git_remote_fetch","git_remote_valid_url","git_remote_supported_url","git_remote_list","git_remote_check_cert","git_remote_set_transport","git_remote_init_callbacks","git_remote_set_callbacks","git_remote_get_callbacks","git_remote_stats","git_remote_autotag","git_remote_set_autotag","git_remote_rename","git_remote_update_fetchhead","git_remote_set_update_fetchhead","git_remote_is_valid_name","git_remote_delete","git_remote_default_branch"],"meta":{},"lines":639},{"file":"git2/repository.h","functions":["git_repository_open","git_repository_wrap_odb","git_repository_discover","git_repository_open_ext","git_repository_open_bare","git_repository_free","git_repository_init","git_repository_init_init_options","git_repository_init_ext","git_repository_head","git_repository_head_detached","git_repository_head_unborn","git_repository_is_empty","git_repository_path","git_repository_workdir","git_repository_set_workdir","git_repository_is_bare","git_repository_config","git_repository_config_snapshot","git_repository_odb","git_repository_refdb","git_repository_index","git_repository_message","git_repository_message_remove","git_repository_state_cleanup","git_repository_fetchhead_foreach","git_repository_mergehead_foreach","git_repository_hashfile","git_repository_set_head","git_repository_set_head_detached","git_repository_detach_head","git_repository_state","git_repository_set_namespace","git_repository_get_namespace","git_repository_is_shallow"],"meta":{},"lines":712},{"file":"git2/revert.h","functions":["git_revert_init_options","git_revert_commit","git_revert"],"meta":{},"lines":81},{"file":"git2/revparse.h","functions":["git_revparse_single","git_revparse_ext","git_revparse"],"meta":{},"lines":108},{"file":"git2/revwalk.h","functions":["git_revwalk_new","git_revwalk_reset","git_revwalk_push","git_revwalk_push_glob","git_revwalk_push_head","git_revwalk_hide","git_revwalk_hide_glob","git_revwalk_hide_head","git_revwalk_push_ref","git_revwalk_hide_ref","git_revwalk_next","git_revwalk_sorting","git_revwalk_push_range","git_revwalk_simplify_first_parent","git_revwalk_free","git_revwalk_repository","git_revwalk_hide_cb","git_revwalk_add_hide_cb"],"meta":{},"lines":286},{"file":"git2/signature.h","functions":["git_signature_new","git_signature_now","git_signature_default","git_signature_dup","git_signature_free"],"meta":{},"lines":86},{"file":"git2/stash.h","functions":["git_stash_cb","git_stash_foreach"],"meta":{},"lines":98},{"file":"git2/status.h","functions":["git_status_cb","git_status_init_options","git_status_foreach","git_status_foreach_ext","git_status_file","git_status_list_new","git_status_list_free","git_status_should_ignore"],"meta":{},"lines":361},{"file":"git2/strarray.h","functions":["git_strarray_free","git_strarray_copy"],"meta":{},"lines":53},{"file":"git2/submodule.h","functions":["git_submodule_lookup","git_submodule_free","git_submodule_foreach","git_submodule_add_setup","git_submodule_add_finalize","git_submodule_add_to_index","git_submodule_save","git_submodule_owner","git_submodule_name","git_submodule_path","git_submodule_url","git_submodule_branch","git_submodule_set_url","git_submodule_index_id","git_submodule_head_id","git_submodule_wd_id","git_submodule_ignore","git_submodule_set_ignore","git_submodule_update","git_submodule_set_update","git_submodule_fetch_recurse_submodules","git_submodule_set_fetch_recurse_submodules","git_submodule_init","git_submodule_sync","git_submodule_open","git_submodule_reload","git_submodule_reload_all","git_submodule_status","git_submodule_location"],"meta":{},"lines":555},{"file":"git2/sys/config.h","functions":[],"meta":{},"lines":70},{"file":"git2/sys/filter.h","functions":["git_filter_init_fn","git_filter_shutdown_fn","git_filter_check_fn","git_filter_apply_fn","git_filter_cleanup_fn"],"meta":{},"lines":251},{"file":"git2/sys/refdb_backend.h","functions":[],"meta":{},"lines":156},{"file":"git2/tag.h","functions":["git_tag_lookup","git_tag_free","git_tag_id","git_tag_owner","git_tag_target","git_tag_target_id","git_tag_target_type","git_tag_name","git_tag_tagger","git_tag_message","git_tag_create","git_tag_annotation_create","git_tag_create_frombuffer","git_tag_create_lightweight","git_tag_delete","git_tag_list","git_tag_list_match","git_tag_foreach","git_tag_peel"],"meta":{},"lines":348},{"file":"git2/threads.h","functions":["git_threads_init","git_threads_shutdown"],"meta":{},"lines":45},{"file":"git2/trace.h","functions":["git_trace_callback","git_trace_set"],"meta":{},"lines":63},{"file":"git2/transport.h","functions":["git_cred_has_username","git_cred_userpass_plaintext_new","git_cred_ssh_key_new","git_cred_ssh_interactive_new","git_cred_ssh_key_from_agent","git_cred_default_new","git_cred_acquire_cb","git_transport_init","git_transport_new","git_transport_register","git_transport_unregister","git_transport_dummy","git_transport_local","git_transport_smart","git_smart_subtransport_http","git_smart_subtransport_git","git_smart_subtransport_ssh"],"meta":{},"lines":537},{"file":"git2/tree.h","functions":["git_tree_lookup","git_tree_free","git_tree_id","git_tree_owner","git_tree_entry_byname","git_tree_entry_byid","git_tree_entry_bypath","git_tree_entry_dup","git_tree_entry_free","git_tree_entry_name","git_tree_entry_id","git_tree_entry_type","git_tree_entry_filemode","git_tree_entry_filemode_raw","git_tree_entry_cmp","git_tree_entry_to_object","git_treebuilder_create","git_treebuilder_clear","git_treebuilder_entrycount","git_treebuilder_free","git_treebuilder_get","git_treebuilder_insert","git_treebuilder_remove","git_treebuilder_filter_cb","git_treebuilder_filter","git_treebuilder_write","git_treewalk_cb","git_tree_walk"],"meta":{},"lines":408},{"file":"git2/types.h","functions":["git_transfer_progress_cb"],"meta":{},"lines":344}],"functions":{"git_attr_get":{"type":"function","file":"git2/attr.h","line":142,"lineto":147,"args":[{"name":"value_out","type":"const char **","comment":"Output of the value of the attribute. Use the GIT_ATTR_...\n macros to test for TRUE, FALSE, UNSPECIFIED, etc. or just\n use the string value for attributes set to a value. You\n should NOT modify or free this value."},{"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 to check for attributes. Relative paths are\n interpreted relative to the repo root. The file does\n not have to exist, but if it does not, then it will be\n treated as a plain file (not a directory)."},{"name":"name","type":"const char *","comment":"The name of the attribute to look up."}],"argline":"const char **value_out, git_repository *repo, uint32_t flags, const char *path, const char *name","sig":"const char **::git_repository *::uint32_t::const char *::const char *","return":{"type":"int","comment":null},"description":"
Look up the value of one git attribute for path.
\n","comments":"","group":"attr"},"git_attr_foreach":{"type":"function","file":"git2/attr.h","line":206,"lineto":211,"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":"git2/attr.h","line":221,"lineto":222,"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":"git2/attr.h","line":234,"lineto":237,"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":"git2/blame.h","line":93,"lineto":95,"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":"git2/blame.h","line":147,"lineto":149,"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":"git2/blame.h","line":158,"lineto":160,"args":[{"name":"blame","type":"git_blame *","comment":"the blame structure to query"},{"name":"lineno","type":"uint32_t","comment":"the (1-based) line number to find a hunk for"}],"argline":"git_blame *blame, uint32_t lineno","sig":"git_blame *::uint32_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/v0.21.3/blame.html#git_blame_get_hunk_byline-1"]}},"git_blame_file":{"type":"function","file":"git2/blame.h","line":173,"lineto":177,"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/v0.21.3/blame.html#git_blame_file-2"]}},"git_blame_free":{"type":"function","file":"git2/blame.h","line":208,"lineto":208,"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/v0.21.3/blame.html#git_blame_free-3"]}},"git_blob_lookup":{"type":"function","file":"git2/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/v0.21.3/blame.html#git_blob_lookup-4"],"general.c":["ex/v0.21.3/general.html#git_blob_lookup-1"]}},"git_blob_free":{"type":"function","file":"git2/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/v0.21.3/blame.html#git_blob_free-5"]}},"git_blob_id":{"type":"function","file":"git2/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":"git2/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":"git2/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/v0.21.3/blame.html#git_blob_rawcontent-6"],"cat-file.c":["ex/v0.21.3/cat-file.html#git_blob_rawcontent-1"],"general.c":["ex/v0.21.3/general.html#git_blob_rawcontent-2"]}},"git_blob_rawsize":{"type":"function","file":"git2/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/v0.21.3/blame.html#git_blob_rawsize-7"],"cat-file.c":["ex/v0.21.3/cat-file.html#git_blob_rawsize-2"],"general.c":["ex/v0.21.3/general.html#git_blob_rawsize-3","ex/v0.21.3/general.html#git_blob_rawsize-4"]}},"git_blob_filtered_content":{"type":"function","file":"git2/blob.h","line":124,"lineto":128,"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. To keep the data detached from the blob, call git_buf_grow
on the buffer with a want_size
of 0 and the buffer will be reallocated to be detached from the blob.
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":"git2/blob.h","line":153,"lineto":153,"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_fromchunks":{"type":"function","file":"git2/blob.h","line":189,"lineto":194,"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 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."},{"name":"callback","type":"git_blob_chunk_cb","comment":null},{"name":"payload","type":"void *","comment":null}],"argline":"git_oid *id, git_repository *repo, const char *hintpath, git_blob_chunk_cb callback, void *payload","sig":"git_oid *::git_repository *::const char *::git_blob_chunk_cb::void *","return":{"type":"int","comment":" 0 or error code (from either libgit2 or callback function)"},"description":"Write a loose blob to the Object Database from a\n provider of chunks of data.
\n","comments":"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.
The implementation of the callback MUST respect the following rules:
\n\ncontent
must be filled by the callback. The maximum number of bytes that the buffer can accept per call is defined by the max_length
parameter. Allocation and freeing of the buffer will be taken care of by libgit2.
The callback
must return the number of bytes that have been written to the content
buffer.
When there is no more data to stream, callback
should return 0. This will prevent it from being invoked anymore.
If an error occurs, the callback should return a negative value. This value will be returned to the caller.
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_branch_create":{"type":"function","file":"git2/branch.h","line":56,"lineto":63,"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."},{"name":"signature","type":"const git_signature *","comment":"The identity that will used to populate the reflog entry"},{"name":"log_message","type":"const char *","comment":"The one line long message to be appended to the reflog.\n If NULL, the default is \"Branch: created\"; if you want something more\n useful, provide a message."}],"argline":"git_reference **out, git_repository *repo, const char *branch_name, const git_commit *target, int force, const git_signature *signature, const char *log_message","sig":"git_reference **::git_repository *::const char *::const git_commit *::int::const git_signature *::const char *","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.
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":"git2/branch.h","line":91,"lineto":94,"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":"git2/branch.h","line":104,"lineto":104,"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":"git2/branch.h","line":111,"lineto":111,"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":"git2/branch.h","line":132,"lineto":138,"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."},{"name":"signature","type":"const git_signature *","comment":"The identity that will used to populate the reflog entry"},{"name":"log_message","type":"const char *","comment":"The one line long message to be appended to the reflog"}],"argline":"git_reference **out, git_reference *branch, const char *new_branch_name, int force, const git_signature *signature, const char *log_message","sig":"git_reference **::git_reference *::const char *::int::const git_signature *::const char *","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_upstream":{"type":"function","file":"git2/branch.h","line":198,"lineto":200,"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":"git2/branch.h","line":212,"lineto":212,"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":"git2/branch.h","line":241,"lineto":242,"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":"git2/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.
Initializes a git_checkout_options
with default values. Equivalent to\n creating an instance with GIT_CHECKOUT_OPTIONS_INIT.
Updates files in the index and the working tree to match the content of\n the commit pointed at by HEAD.
\n","comments":"","group":"checkout"},"git_checkout_index":{"type":"function","file":"git2/checkout.h","line":304,"lineto":307,"args":[{"name":"repo","type":"git_repository *","comment":"repository into which to check out (must be non-bare)"},{"name":"index","type":"git_index *","comment":"index to be checked out (or NULL to use repository index)"},{"name":"opts","type":"const git_checkout_options *","comment":"specifies checkout options (may be NULL)"}],"argline":"git_repository *repo, git_index *index, const git_checkout_options *opts","sig":"git_repository *::git_index *::const git_checkout_options *","return":{"type":"int","comment":" 0 on success, non-zero return value from `notify_cb`, or error\n code \n<\n 0 (use giterr_last for error details)"},"description":"Updates files in the working tree to match the content of the index.
\n","comments":"","group":"checkout"},"git_checkout_tree":{"type":"function","file":"git2/checkout.h","line":320,"lineto":323,"args":[{"name":"repo","type":"git_repository *","comment":"repository to check out (must be non-bare)"},{"name":"treeish","type":"const git_object *","comment":"a commit, tag or tree which content will be used to update\n the working directory (or NULL to use HEAD)"},{"name":"opts","type":"const git_checkout_options *","comment":"specifies checkout options (may be NULL)"}],"argline":"git_repository *repo, const git_object *treeish, const git_checkout_options *opts","sig":"git_repository *::const git_object *::const git_checkout_options *","return":{"type":"int","comment":" 0 on success, non-zero return value from `notify_cb`, or error\n code \n<\n 0 (use giterr_last for error details)"},"description":"Updates files in the index and working tree to match the content of the\n tree pointed at by the treeish.
\n","comments":"","group":"checkout"},"git_cherry_pick_init_options":{"type":"function","file":"git2/cherrypick.h","line":44,"lineto":46,"args":[{"name":"opts","type":"git_cherry_pick_options *","comment":"the `git_cherry_pick_options` struct to initialize"},{"name":"version","type":"unsigned int","comment":"Version of struct; pass `GIT_CHERRY_PICK_OPTIONS_VERSION`"}],"argline":"git_cherry_pick_options *opts, unsigned int version","sig":"git_cherry_pick_options *::unsigned int","return":{"type":"int","comment":" Zero on success; -1 on failure."},"description":"Initializes a git_cherry_pick_options
with default values. Equivalent to\n creating an instance with GIT_CHERRY_PICK_OPTIONS_INIT.
Cherry-picks the given commit against the given "our" commit, producing an\n index that reflects the result of the cherry-pick.
\n","comments":"The returned index must be freed explicitly with git_index_free
.
Cherry-pick the given commit, producing changes in the index and working directory.
\n","comments":"","group":"cherry"},"git_clone_init_options":{"type":"function","file":"git2/clone.h","line":126,"lineto":128,"args":[{"name":"opts","type":"git_clone_options *","comment":"The `git_clone_options` struct to initialize"},{"name":"version","type":"unsigned int","comment":"Version of struct; pass `GIT_CLONE_OPTIONS_VERSION`"}],"argline":"git_clone_options *opts, unsigned int version","sig":"git_clone_options *::unsigned int","return":{"type":"int","comment":" Zero on success; -1 on failure."},"description":"Initializes a git_clone_options
with default values. Equivalent to\n creating an instance with GIT_CLONE_OPTIONS_INIT.
Clone a remote repository.
\n","comments":"This version handles the simple case. If you'd like to create the repository or remote with non-default settings, you can create and configure them and then use git_clone_into()
.
Clone into a repository
\n","comments":"After creating the repository and remote and configuring them for paths and callbacks respectively, you can call this function to perform the clone operation and optionally checkout files.
\n","group":"clone"},"git_clone_local_into":{"type":"function","file":"git2/clone.h","line":197,"lineto":203,"args":[{"name":"repo","type":"git_repository *","comment":"the repository to use"},{"name":"remote","type":"git_remote *","comment":"the remote repository to clone from"},{"name":"co_opts","type":"const git_checkout_options *","comment":"options to use during checkout"},{"name":"branch","type":"const char *","comment":"the branch to checkout after the clone, pass NULL for the\n remote's default branch"},{"name":"link","type":"int","comment":"wether to use hardlinks instead of copying\n objects. This is only possible if both repositories are on the same\n filesystem."},{"name":"signature","type":"const git_signature *","comment":"the identity used when updating the reflog"}],"argline":"git_repository *repo, git_remote *remote, const git_checkout_options *co_opts, const char *branch, int link, const git_signature *signature","sig":"git_repository *::git_remote *::const git_checkout_options *::const char *::int::const git_signature *","return":{"type":"int","comment":" 0 on success, any non-zero return value from a callback\n function, or a negative value to indicate an error (use\n `giterr_last` for a detailed error message)"},"description":"Perform a local clone into a repository
\n","comments":"A "local clone" bypasses any git-aware protocols and simply copies over the object database from the source repository. It is often faster than a git-aware clone, but no verification of the data is performed, and can copy over too much data.
\n","group":"clone"},"git_commit_lookup":{"type":"function","file":"git2/commit.h","line":36,"lineto":37,"args":[{"name":"commit","type":"git_commit **","comment":"pointer to the looked up commit"},{"name":"repo","type":"git_repository *","comment":"the repo to use when locating the commit."},{"name":"id","type":"const git_oid *","comment":"identity of the commit to locate. If the object is\n\t\tan annotated tag it will be peeled back to the commit."}],"argline":"git_commit **commit, git_repository *repo, const git_oid *id","sig":"git_commit **::git_repository *::const git_oid *","return":{"type":"int","comment":" 0 or an error code"},"description":"Lookup a commit object from a repository.
\n","comments":"The returned object should be released with git_commit_free
when no longer needed.
Close an open commit
\n","comments":"This is a wrapper around git_object_free()
\n\nIMPORTANT: It is necessary to call this method when you stop using a commit. Failure to do so will cause a memory leak.
\n","group":"commit","examples":{"general.c":["ex/v0.21.3/general.html#git_commit_free-8","ex/v0.21.3/general.html#git_commit_free-9","ex/v0.21.3/general.html#git_commit_free-10","ex/v0.21.3/general.html#git_commit_free-11"],"log.c":["ex/v0.21.3/log.html#git_commit_free-2","ex/v0.21.3/log.html#git_commit_free-3","ex/v0.21.3/log.html#git_commit_free-4","ex/v0.21.3/log.html#git_commit_free-5"]}},"git_commit_id":{"type":"function","file":"git2/commit.h","line":78,"lineto":78,"args":[{"name":"commit","type":"const git_commit *","comment":"a previously loaded commit."}],"argline":"const git_commit *commit","sig":"const git_commit *","return":{"type":"const git_oid *","comment":" object identity for the commit."},"description":"Get the id of a commit.
\n","comments":"","group":"commit","examples":{"general.c":["ex/v0.21.3/general.html#git_commit_id-12"],"log.c":["ex/v0.21.3/log.html#git_commit_id-6"]}},"git_commit_owner":{"type":"function","file":"git2/commit.h","line":86,"lineto":86,"args":[{"name":"commit","type":"const git_commit *","comment":"A previously loaded commit."}],"argline":"const git_commit *commit","sig":"const git_commit *","return":{"type":"git_repository *","comment":" Repository that contains this commit."},"description":"Get the repository that contains the commit.
\n","comments":"","group":"commit","examples":{"log.c":["ex/v0.21.3/log.html#git_commit_owner-7","ex/v0.21.3/log.html#git_commit_owner-8"]}},"git_commit_message_encoding":{"type":"function","file":"git2/commit.h","line":98,"lineto":98,"args":[{"name":"commit","type":"const git_commit *","comment":"a previously loaded commit."}],"argline":"const git_commit *commit","sig":"const git_commit *","return":{"type":"const char *","comment":" NULL, or the encoding"},"description":"Get the encoding for the message of a commit,\n as a string representing a standard encoding name.
\n","comments":"The encoding may be NULL if the encoding
header in the commit is missing; in that case UTF-8 is assumed.
Get the full message of a commit.
\n","comments":"The returned message will be slightly prettified by removing any potential leading newlines.
\n","group":"commit","examples":{"cat-file.c":["ex/v0.21.3/cat-file.html#git_commit_message-3","ex/v0.21.3/cat-file.html#git_commit_message-4"],"general.c":["ex/v0.21.3/general.html#git_commit_message-13","ex/v0.21.3/general.html#git_commit_message-14","ex/v0.21.3/general.html#git_commit_message-15"],"log.c":["ex/v0.21.3/log.html#git_commit_message-9","ex/v0.21.3/log.html#git_commit_message-10"],"tag.c":["ex/v0.21.3/tag.html#git_commit_message-2"]}},"git_commit_message_raw":{"type":"function","file":"git2/commit.h","line":117,"lineto":117,"args":[{"name":"commit","type":"const git_commit *","comment":"a previously loaded commit."}],"argline":"const git_commit *commit","sig":"const git_commit *","return":{"type":"const char *","comment":" the raw message of a commit"},"description":"Get the full raw message of a commit.
\n","comments":"","group":"commit"},"git_commit_summary":{"type":"function","file":"git2/commit.h","line":128,"lineto":128,"args":[{"name":"commit","type":"git_commit *","comment":"a previously loaded commit."}],"argline":"git_commit *commit","sig":"git_commit *","return":{"type":"const char *","comment":" the summary of a commit or NULL on error"},"description":"Get the short "summary" of the git commit message.
\n","comments":"The returned message is the summary of the commit, comprising the first paragraph of the message with whitespace trimmed and squashed.
\n","group":"commit"},"git_commit_time":{"type":"function","file":"git2/commit.h","line":136,"lineto":136,"args":[{"name":"commit","type":"const git_commit *","comment":"a previously loaded commit."}],"argline":"const git_commit *commit","sig":"const git_commit *","return":{"type":"git_time_t","comment":" the time of a commit"},"description":"Get the commit time (i.e. committer time) of a commit.
\n","comments":"","group":"commit","examples":{"general.c":["ex/v0.21.3/general.html#git_commit_time-16","ex/v0.21.3/general.html#git_commit_time-17"]}},"git_commit_time_offset":{"type":"function","file":"git2/commit.h","line":144,"lineto":144,"args":[{"name":"commit","type":"const git_commit *","comment":"a previously loaded commit."}],"argline":"const git_commit *commit","sig":"const git_commit *","return":{"type":"int","comment":" positive or negative timezone offset, in minutes from UTC"},"description":"Get the commit timezone offset (i.e. committer's preferred timezone) of a commit.
\n","comments":"","group":"commit"},"git_commit_committer":{"type":"function","file":"git2/commit.h","line":152,"lineto":152,"args":[{"name":"commit","type":"const git_commit *","comment":"a previously loaded commit."}],"argline":"const git_commit *commit","sig":"const git_commit *","return":{"type":"const git_signature *","comment":" the committer of a commit"},"description":"Get the committer of a commit.
\n","comments":"","group":"commit","examples":{"cat-file.c":["ex/v0.21.3/cat-file.html#git_commit_committer-5"],"general.c":["ex/v0.21.3/general.html#git_commit_committer-18"],"log.c":["ex/v0.21.3/log.html#git_commit_committer-11"]}},"git_commit_author":{"type":"function","file":"git2/commit.h","line":160,"lineto":160,"args":[{"name":"commit","type":"const git_commit *","comment":"a previously loaded commit."}],"argline":"const git_commit *commit","sig":"const git_commit *","return":{"type":"const git_signature *","comment":" the author of a commit"},"description":"Get the author of a commit.
\n","comments":"","group":"commit","examples":{"cat-file.c":["ex/v0.21.3/cat-file.html#git_commit_author-6"],"general.c":["ex/v0.21.3/general.html#git_commit_author-19","ex/v0.21.3/general.html#git_commit_author-20"],"log.c":["ex/v0.21.3/log.html#git_commit_author-12","ex/v0.21.3/log.html#git_commit_author-13"]}},"git_commit_raw_header":{"type":"function","file":"git2/commit.h","line":168,"lineto":168,"args":[{"name":"commit","type":"const git_commit *","comment":"a previously loaded commit"}],"argline":"const git_commit *commit","sig":"const git_commit *","return":{"type":"const char *","comment":" the header text of the commit"},"description":"Get the full raw text of the commit header.
\n","comments":"","group":"commit"},"git_commit_tree":{"type":"function","file":"git2/commit.h","line":177,"lineto":177,"args":[{"name":"tree_out","type":"git_tree **","comment":"pointer where to store the tree object"},{"name":"commit","type":"const git_commit *","comment":"a previously loaded commit."}],"argline":"git_tree **tree_out, const git_commit *commit","sig":"git_tree **::const git_commit *","return":{"type":"int","comment":" 0 or an error code"},"description":"Get the tree pointed to by a commit.
\n","comments":"","group":"commit","examples":{"log.c":["ex/v0.21.3/log.html#git_commit_tree-14","ex/v0.21.3/log.html#git_commit_tree-15","ex/v0.21.3/log.html#git_commit_tree-16","ex/v0.21.3/log.html#git_commit_tree-17","ex/v0.21.3/log.html#git_commit_tree-18"]}},"git_commit_tree_id":{"type":"function","file":"git2/commit.h","line":187,"lineto":187,"args":[{"name":"commit","type":"const git_commit *","comment":"a previously loaded commit."}],"argline":"const git_commit *commit","sig":"const git_commit *","return":{"type":"const git_oid *","comment":" the id of tree pointed to by commit."},"description":"Get the id of the tree pointed to by a commit. This differs from\n git_commit_tree
in that no attempts are made to fetch an object\n from the ODB.
Get the number of parents of this commit
\n","comments":"","group":"commit","examples":{"cat-file.c":["ex/v0.21.3/cat-file.html#git_commit_parentcount-8"],"general.c":["ex/v0.21.3/general.html#git_commit_parentcount-21"],"log.c":["ex/v0.21.3/log.html#git_commit_parentcount-19","ex/v0.21.3/log.html#git_commit_parentcount-20"]}},"git_commit_parent":{"type":"function","file":"git2/commit.h","line":205,"lineto":208,"args":[{"name":"out","type":"git_commit **","comment":"Pointer where to store the parent commit"},{"name":"commit","type":"const git_commit *","comment":"a previously loaded commit."},{"name":"n","type":"unsigned int","comment":"the position of the parent (from 0 to `parentcount`)"}],"argline":"git_commit **out, const git_commit *commit, unsigned int n","sig":"git_commit **::const git_commit *::unsigned int","return":{"type":"int","comment":" 0 or an error code"},"description":"Get the specified parent of the commit.
\n","comments":"","group":"commit","examples":{"general.c":["ex/v0.21.3/general.html#git_commit_parent-22"],"log.c":["ex/v0.21.3/log.html#git_commit_parent-21","ex/v0.21.3/log.html#git_commit_parent-22"]}},"git_commit_parent_id":{"type":"function","file":"git2/commit.h","line":219,"lineto":221,"args":[{"name":"commit","type":"const git_commit *","comment":"a previously loaded commit."},{"name":"n","type":"unsigned int","comment":"the position of the parent (from 0 to `parentcount`)"}],"argline":"const git_commit *commit, unsigned int n","sig":"const git_commit *::unsigned int","return":{"type":"const git_oid *","comment":" the id of the parent, NULL on error."},"description":"Get the oid of a specified parent for a commit. This is different from\n git_commit_parent
, which will attempt to load the parent commit from\n the ODB.
Get the commit object that is the \n<n
\n\n\n\n","comments":"th generation ancestor\n of the named commit object, following only the first parents.\n The returned commit has to be freed by the caller.
\n
Passing 0
as the generation number returns another instance of the base commit itself.
Amend an existing commit by replacing only non-NULL values.
\n","comments":"This creates a new commit that is exactly the same as the old commit, except that any non-NULL values will be updated. The new commit has the same parents as the old commit.
\n\nThe update_ref
value works as in the regular git_commit_create()
, updating the ref to point to the newly rewritten commit. If you want to amend a commit that is not currently the tip of the branch and then rewrite the following commits to reach a ref, pass this as NULL and update the rest of the commit chain and ref separately.
Unlike git_commit_create()
, the author
, committer
, message
, message_encoding
, and tree
parameters can be NULL in which case this will use the values from the original commit_to_amend
.
All parameters have the same meanings as in git_commit_create()
.
Return the version of the libgit2 library\n being currently used.
\n","comments":"","group":"libgit2"},"git_libgit2_features":{"type":"function","file":"git2/common.h","line":124,"lineto":124,"args":[],"argline":"","sig":"","return":{"type":"int","comment":" A combination of GIT_FEATURE_* values."},"description":"Query compile time options for libgit2.
\n","comments":"GIT_FEATURE_THREADS Libgit2 was compiled with thread support. Note that thread support is still to be seen as a 'work in progress' - basic object lookups are believed to be threadsafe, but other operations may not be.
GIT_FEATURE_HTTPS Libgit2 supports the https:// protocol. This requires the openssl library to be found when compiling libgit2.
GIT_FEATURE_SSH Libgit2 supports the SSH protocol for network operations. This requires the libssh2 library to be found when compiling libgit2
Set or query a library global option
\n","comments":"Available options:
\n\n* opts(GIT_OPT_GET_MWINDOW_SIZE, size_t *):\n\n > Get the maximum mmap window size\n\n* opts(GIT_OPT_SET_MWINDOW_SIZE, size_t):\n\n > Set the maximum mmap window size\n\n* opts(GIT_OPT_GET_MWINDOW_MAPPED_LIMIT, size_t *):\n\n > Get the maximum memory that will be mapped in total by the library\n\n* opts(GIT_OPT_SET_MWINDOW_MAPPED_LIMIT, size_t):\n\n >Set the maximum amount of memory that can be mapped at any time by the library\n\n* opts(GIT_OPT_GET_SEARCH_PATH, int level, git_buf *buf)\n\n > Get the search path for a given level of config data. "level" must > be one of `GIT_CONFIG_LEVEL_SYSTEM`, `GIT_CONFIG_LEVEL_GLOBAL`, or > `GIT_CONFIG_LEVEL_XDG`. The search path is written to the `out` > buffer.\n\n* opts(GIT_OPT_SET_SEARCH_PATH, int level, const char *path)\n\n > Set the search path for a level of config data. The search path > applied to shared attributes and ignore files, too. > > - `path` lists directories delimited by GIT_PATH_LIST_SEPARATOR. > Pass NULL to reset to the default (generally based on environment > variables). Use magic path `$PATH` to include the old value > of the path (if you want to prepend or append, for instance). > > - `level` must be GIT_CONFIG_LEVEL_SYSTEM, GIT_CONFIG_LEVEL_GLOBAL, > or GIT_CONFIG_LEVEL_XDG.\n\n* opts(GIT_OPT_SET_CACHE_OBJECT_LIMIT, git_otype type, size_t size)\n\n > Set the maximum data size for the given type of object to be > considered eligible for caching in memory. Setting to value to > zero means that that type of object will not be cached. > Defaults to 0 for GIT_OBJ_BLOB (i.e. won't cache blobs) and 4k > for GIT_OBJ_COMMIT, GIT_OBJ_TREE, and GIT_OBJ_TAG.\n\n* opts(GIT_OPT_SET_CACHE_MAX_SIZE, ssize_t max_storage_bytes)\n\n > Set the maximum total data size that will be cached in memory > across all repositories before libgit2 starts evicting objects > from the cache. This is a soft limit, in that the library might > briefly exceed it, but will start aggressively evicting objects > from cache when that happens. The default cache size is 256MB.\n\n* opts(GIT_OPT_ENABLE_CACHING, int enabled)\n\n > Enable or disable caching completely. > > Because caches are repository-specific, disabling the cache > cannot immediately clear all cached objects, but each cache will > be cleared on the next attempt to update anything in it.\n\n* opts(GIT_OPT_GET_CACHED_MEMORY, ssize_t *current, ssize_t *allowed)\n\n > Get the current bytes in cache and the maximum that would be > allowed in the cache.\n\n* opts(GIT_OPT_GET_TEMPLATE_PATH, git_buf *out)\n\n > Get the default template path. > The path is written to the `out` buffer.\n\n* opts(GIT_OPT_SET_TEMPLATE_PATH, const char *path)\n\n > Set the default template path. > > - `path` directory of template.\n
\n","group":"libgit2"},"git_config_find_global":{"type":"function","file":"git2/config.h","line":97,"lineto":97,"args":[{"name":"out","type":"git_buf *","comment":"Pointer to a user-allocated git_buf in which to store the path"}],"argline":"git_buf *out","sig":"git_buf *","return":{"type":"int","comment":" 0 if a global configuration file has been found. Its path will be stored in `out`."},"description":"Locate the path to the global configuration file
\n","comments":"The user or global configuration file is usually located in $HOME/.gitconfig
.
This method will try to guess the full path to that file, if the file exists. The returned path may be used on any git_config
call to load the global configuration file.
This method will not guess the path to the xdg compatible config file (.config/git/config).
\n","group":"config"},"git_config_find_xdg":{"type":"function","file":"git2/config.h","line":114,"lineto":114,"args":[{"name":"out","type":"git_buf *","comment":"Pointer to a user-allocated git_buf in which to store the path"}],"argline":"git_buf *out","sig":"git_buf *","return":{"type":"int","comment":" 0 if a xdg compatible configuration file has been\n\tfound. Its path will be stored in `out`."},"description":"Locate the path to the global xdg compatible configuration file
\n","comments":"The xdg compatible configuration file is usually located in $HOME/.config/git/config
.
This method will try to guess the full path to that file, if the file exists. The returned path may be used on any git_config
call to load the xdg compatible configuration file.
Locate the path to the system configuration file
\n","comments":"If /etc/gitconfig doesn't exist, it will look for %PROGRAMFILES%.
\n","group":"config"},"git_config_open_default":{"type":"function","file":"git2/config.h","line":138,"lineto":138,"args":[{"name":"out","type":"git_config **","comment":"Pointer to store the config instance"}],"argline":"git_config **out","sig":"git_config **","return":{"type":"int","comment":" 0 or an error code"},"description":"Open the global, XDG and system configuration files
\n","comments":"Utility wrapper that finds the global, XDG and system configuration files and opens them into a single prioritized config object that can be used when accessing default config data outside a repository.
\n","group":"config"},"git_config_new":{"type":"function","file":"git2/config.h","line":149,"lineto":149,"args":[{"name":"out","type":"git_config **","comment":"pointer to the new configuration"}],"argline":"git_config **out","sig":"git_config **","return":{"type":"int","comment":" 0 or an error code"},"description":"Allocate a new configuration object
\n","comments":"This object is empty, so you have to add a file to it before you can do anything with it.
\n","group":"config"},"git_config_add_file_ondisk":{"type":"function","file":"git2/config.h","line":173,"lineto":177,"args":[{"name":"cfg","type":"git_config *","comment":"the configuration to add the file to"},{"name":"path","type":"const char *","comment":"path to the configuration file to add"},{"name":"level","type":"git_config_level_t","comment":"the priority level of the backend"},{"name":"force","type":"int","comment":"replace config file at the given priority level"}],"argline":"git_config *cfg, const char *path, git_config_level_t level, int force","sig":"git_config *::const char *::git_config_level_t::int","return":{"type":"int","comment":" 0 on success, GIT_EEXISTS when adding more than one file\n for a given priority level (and force_replace set to 0),\n GIT_ENOTFOUND when the file doesn't exist or error code"},"description":"Add an on-disk config file instance to an existing config
\n","comments":"The on-disk file pointed at by path
will be opened and parsed; it's expected to be a native Git config file following the default Git config syntax (see man git-config).
Note that the configuration object will free the file automatically.
\n\nFurther queries on this config object will access each of the config file instances in order (instances with a higher priority level will be accessed first).
\n","group":"config"},"git_config_open_ondisk":{"type":"function","file":"git2/config.h","line":192,"lineto":192,"args":[{"name":"out","type":"git_config **","comment":"The configuration instance to create"},{"name":"path","type":"const char *","comment":"Path to the on-disk file to open"}],"argline":"git_config **out, const char *path","sig":"git_config **::const char *","return":{"type":"int","comment":" 0 on success, GIT_ENOTFOUND when the file doesn't exist\n or an error code"},"description":"Create a new config instance containing a single on-disk file
\n","comments":"This method is a simple utility wrapper for the following sequence of calls: - git_config_new - git_config_add_file_ondisk
\n","group":"config","examples":{"general.c":["ex/v0.21.3/general.html#git_config_open_ondisk-23"]}},"git_config_open_level":{"type":"function","file":"git2/config.h","line":210,"lineto":213,"args":[{"name":"out","type":"git_config **","comment":"The configuration instance to create"},{"name":"parent","type":"const git_config *","comment":"Multi-level config to search for the given level"},{"name":"level","type":"git_config_level_t","comment":"Configuration level to search for"}],"argline":"git_config **out, const git_config *parent, git_config_level_t level","sig":"git_config **::const git_config *::git_config_level_t","return":{"type":"int","comment":" 0, GIT_ENOTFOUND if the passed level cannot be found in the\n multi-level parent config, or an error code"},"description":"Build a single-level focused config object from a multi-level one.
\n","comments":"The returned config object can be used to perform get/set/delete operations on a single specific level.
\n\nGetting several times the same level from the same parent multi-level config will return different config instances, but containing the same config_file instance.
\n","group":"config"},"git_config_open_global":{"type":"function","file":"git2/config.h","line":227,"lineto":227,"args":[{"name":"out","type":"git_config **","comment":"pointer in which to store the config object"},{"name":"config","type":"git_config *","comment":"the config object in which to look"}],"argline":"git_config **out, git_config *config","sig":"git_config **::git_config *","return":{"type":"int","comment":null},"description":"Open the global/XDG configuration file according to git's rules
\n","comments":"Git allows you to store your global configuration at $HOME/.config
or $XDG_CONFIG_HOME/git/config
. For backwards compatability, the XDG file shouldn't be used unless the use has created it explicitly. With this function you'll open the correct one to write to.
Create a snapshot of the configuration
\n","comments":"Create a snapshot of the current state of a configuration, which allows you to look into a consistent view of the configuration for looking up complex values (e.g. a remote, submodule).
\n\nThe string returned when querying such a config object is valid until it is freed.
\n","group":"config"},"git_config_refresh":{"type":"function","file":"git2/config.h","line":257,"lineto":257,"args":[{"name":"cfg","type":"git_config *","comment":"The configuration to refresh"}],"argline":"git_config *cfg","sig":"git_config *","return":{"type":"int","comment":" 0 or an error code"},"description":"Reload changed config files
\n","comments":"A config file may be changed on disk out from under the in-memory config object. This function causes us to look for files that have been modified since we last loaded them and refresh the config with the latest information.
\n","group":"config"},"git_config_free":{"type":"function","file":"git2/config.h","line":264,"lineto":264,"args":[{"name":"cfg","type":"git_config *","comment":"the configuration to free"}],"argline":"git_config *cfg","sig":"git_config *","return":{"type":"void","comment":null},"description":"Free the configuration and its associated memory and files
\n","comments":"","group":"config"},"git_config_get_entry":{"type":"function","file":"git2/config.h","line":277,"lineto":280,"args":[{"name":"out","type":"const git_config_entry **","comment":"pointer to the variable git_config_entry"},{"name":"cfg","type":"const git_config *","comment":"where to look for the variable"},{"name":"name","type":"const char *","comment":"the variable's name"}],"argline":"const git_config_entry **out, const git_config *cfg, const char *name","sig":"const git_config_entry **::const git_config *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Get the git_config_entry of a config variable.
\n","comments":"The git_config_entry is owned by the config and should not be freed by the user.
\n","group":"config"},"git_config_get_int32":{"type":"function","file":"git2/config.h","line":294,"lineto":294,"args":[{"name":"out","type":"int32_t *","comment":"pointer to the variable where the value should be stored"},{"name":"cfg","type":"const git_config *","comment":"where to look for the variable"},{"name":"name","type":"const char *","comment":"the variable's name"}],"argline":"int32_t *out, const git_config *cfg, const char *name","sig":"int32_t *::const git_config *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Get the value of an integer config variable.
\n","comments":"All config files will be looked into, in the order of their defined level. A higher level means a higher priority. The first occurence of the variable will be returned here.
\n","group":"config","examples":{"general.c":["ex/v0.21.3/general.html#git_config_get_int32-24"]}},"git_config_get_int64":{"type":"function","file":"git2/config.h","line":308,"lineto":308,"args":[{"name":"out","type":"int64_t *","comment":"pointer to the variable where the value should be stored"},{"name":"cfg","type":"const git_config *","comment":"where to look for the variable"},{"name":"name","type":"const char *","comment":"the variable's name"}],"argline":"int64_t *out, const git_config *cfg, const char *name","sig":"int64_t *::const git_config *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Get the value of a long integer config variable.
\n","comments":"All config files will be looked into, in the order of their defined level. A higher level means a higher priority. The first occurrence of the variable will be returned here.
\n","group":"config"},"git_config_get_bool":{"type":"function","file":"git2/config.h","line":325,"lineto":325,"args":[{"name":"out","type":"int *","comment":"pointer to the variable where the value should be stored"},{"name":"cfg","type":"const git_config *","comment":"where to look for the variable"},{"name":"name","type":"const char *","comment":"the variable's name"}],"argline":"int *out, const git_config *cfg, const char *name","sig":"int *::const git_config *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Get the value of a boolean config variable.
\n","comments":"This function uses the usual C convention of 0 being false and anything else true.
\n\nAll config files will be looked into, in the order of their defined level. A higher level means a higher priority. The first occurrence of the variable will be returned here.
\n","group":"config"},"git_config_get_string":{"type":"function","file":"git2/config.h","line":343,"lineto":343,"args":[{"name":"out","type":"const char **","comment":"pointer to the variable's value"},{"name":"cfg","type":"const git_config *","comment":"where to look for the variable"},{"name":"name","type":"const char *","comment":"the variable's name"}],"argline":"const char **out, const git_config *cfg, const char *name","sig":"const char **::const git_config *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Get the value of a string config variable.
\n","comments":"The string is owned by the variable and should not be freed by the user. The pointer will be valid until the next operation on this config object.
\n\nAll config files will be looked into, in the order of their defined level. A higher level means a higher priority. The first occurrence of the variable will be returned here.
\n","group":"config","examples":{"general.c":["ex/v0.21.3/general.html#git_config_get_string-25"]}},"git_config_get_multivar_foreach":{"type":"function","file":"git2/config.h","line":357,"lineto":357,"args":[{"name":"cfg","type":"const git_config *","comment":"where to look for the variable"},{"name":"name","type":"const char *","comment":"the variable's name"},{"name":"regexp","type":"const char *","comment":"regular expression to filter which variables we're\n interested in. Use NULL to indicate all"},{"name":"callback","type":"git_config_foreach_cb","comment":"the function to be called on each value of the variable"},{"name":"payload","type":"void *","comment":"opaque pointer to pass to the callback"}],"argline":"const git_config *cfg, const char *name, const char *regexp, git_config_foreach_cb callback, void *payload","sig":"const git_config *::const char *::const char *::git_config_foreach_cb::void *","return":{"type":"int","comment":null},"description":"Get each value of a multivar in a foreach callback
\n","comments":"The callback will be called on each variable found
\n","group":"config"},"git_config_multivar_iterator_new":{"type":"function","file":"git2/config.h","line":368,"lineto":368,"args":[{"name":"out","type":"git_config_iterator **","comment":"pointer to store the iterator"},{"name":"cfg","type":"const git_config *","comment":"where to look for the variable"},{"name":"name","type":"const char *","comment":"the variable's name"},{"name":"regexp","type":"const char *","comment":"regular expression to filter which variables we're\n interested in. Use NULL to indicate all"}],"argline":"git_config_iterator **out, const git_config *cfg, const char *name, const char *regexp","sig":"git_config_iterator **::const git_config *::const char *::const char *","return":{"type":"int","comment":null},"description":"Get each value of a multivar
\n","comments":"","group":"config"},"git_config_next":{"type":"function","file":"git2/config.h","line":380,"lineto":380,"args":[{"name":"entry","type":"git_config_entry **","comment":"pointer to store the entry"},{"name":"iter","type":"git_config_iterator *","comment":"the iterator"}],"argline":"git_config_entry **entry, git_config_iterator *iter","sig":"git_config_entry **::git_config_iterator *","return":{"type":"int","comment":" 0 or an error code. GIT_ITEROVER if the iteration has completed"},"description":"Return the current entry and advance the iterator
\n","comments":"The pointers returned by this function are valid until the iterator is freed.
\n","group":"config"},"git_config_iterator_free":{"type":"function","file":"git2/config.h","line":387,"lineto":387,"args":[{"name":"iter","type":"git_config_iterator *","comment":"the iterator to free"}],"argline":"git_config_iterator *iter","sig":"git_config_iterator *","return":{"type":"void","comment":null},"description":"Free a config iterator
\n","comments":"","group":"config"},"git_config_set_int32":{"type":"function","file":"git2/config.h","line":398,"lineto":398,"args":[{"name":"cfg","type":"git_config *","comment":"where to look for the variable"},{"name":"name","type":"const char *","comment":"the variable's name"},{"name":"value","type":"int32_t","comment":"Integer value for the variable"}],"argline":"git_config *cfg, const char *name, int32_t value","sig":"git_config *::const char *::int32_t","return":{"type":"int","comment":" 0 or an error code"},"description":"Set the value of an integer config variable in the config file\n with the highest level (usually the local one).
\n","comments":"","group":"config"},"git_config_set_int64":{"type":"function","file":"git2/config.h","line":409,"lineto":409,"args":[{"name":"cfg","type":"git_config *","comment":"where to look for the variable"},{"name":"name","type":"const char *","comment":"the variable's name"},{"name":"value","type":"int64_t","comment":"Long integer value for the variable"}],"argline":"git_config *cfg, const char *name, int64_t value","sig":"git_config *::const char *::int64_t","return":{"type":"int","comment":" 0 or an error code"},"description":"Set the value of a long integer config variable in the config file\n with the highest level (usually the local one).
\n","comments":"","group":"config"},"git_config_set_bool":{"type":"function","file":"git2/config.h","line":420,"lineto":420,"args":[{"name":"cfg","type":"git_config *","comment":"where to look for the variable"},{"name":"name","type":"const char *","comment":"the variable's name"},{"name":"value","type":"int","comment":"the value to store"}],"argline":"git_config *cfg, const char *name, int value","sig":"git_config *::const char *::int","return":{"type":"int","comment":" 0 or an error code"},"description":"Set the value of a boolean config variable in the config file\n with the highest level (usually the local one).
\n","comments":"","group":"config"},"git_config_set_string":{"type":"function","file":"git2/config.h","line":434,"lineto":434,"args":[{"name":"cfg","type":"git_config *","comment":"where to look for the variable"},{"name":"name","type":"const char *","comment":"the variable's name"},{"name":"value","type":"const char *","comment":"the string to store."}],"argline":"git_config *cfg, const char *name, const char *value","sig":"git_config *::const char *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Set the value of a string config variable in the config file\n with the highest level (usually the local one).
\n","comments":"A copy of the string is made and the user is free to use it afterwards.
\n","group":"config"},"git_config_set_multivar":{"type":"function","file":"git2/config.h","line":444,"lineto":444,"args":[{"name":"cfg","type":"git_config *","comment":"where to look for the variable"},{"name":"name","type":"const char *","comment":"the variable's name"},{"name":"regexp","type":"const char *","comment":"a regular expression to indicate which values to replace"},{"name":"value","type":"const char *","comment":"the new value."}],"argline":"git_config *cfg, const char *name, const char *regexp, const char *value","sig":"git_config *::const char *::const char *::const char *","return":{"type":"int","comment":null},"description":"Set a multivar in the local config file.
\n","comments":"","group":"config"},"git_config_delete_entry":{"type":"function","file":"git2/config.h","line":453,"lineto":453,"args":[{"name":"cfg","type":"git_config *","comment":"the configuration"},{"name":"name","type":"const char *","comment":"the variable to delete"}],"argline":"git_config *cfg, const char *name","sig":"git_config *::const char *","return":{"type":"int","comment":null},"description":"Delete a config variable from the config file\n with the highest level (usually the local one).
\n","comments":"","group":"config"},"git_config_delete_multivar":{"type":"function","file":"git2/config.h","line":464,"lineto":464,"args":[{"name":"cfg","type":"git_config *","comment":"where to look for the variables"},{"name":"name","type":"const char *","comment":"the variable's name"},{"name":"regexp","type":"const char *","comment":"a regular expression to indicate which values to delete"}],"argline":"git_config *cfg, const char *name, const char *regexp","sig":"git_config *::const char *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Deletes one or several entries from a multivar in the local config file.
\n","comments":"","group":"config"},"git_config_foreach":{"type":"function","file":"git2/config.h","line":482,"lineto":485,"args":[{"name":"cfg","type":"const git_config *","comment":"where to get the variables from"},{"name":"callback","type":"git_config_foreach_cb","comment":"the function to call on each variable"},{"name":"payload","type":"void *","comment":"the data to pass to the callback"}],"argline":"const git_config *cfg, git_config_foreach_cb callback, void *payload","sig":"const git_config *::git_config_foreach_cb::void *","return":{"type":"int","comment":" 0 on success, non-zero callback return value, or error code"},"description":"Perform an operation on each config variable.
\n","comments":"The callback receives the normalized name and value of each variable in the config backend, and the data pointer passed to this function. If the callback returns a non-zero value, the function stops iterating and returns that value to the caller.
\n\nThe pointers passed to the callback are only valid as long as the iteration is ongoing.
\n","group":"config"},"git_config_iterator_new":{"type":"function","file":"git2/config.h","line":496,"lineto":496,"args":[{"name":"out","type":"git_config_iterator **","comment":"pointer to store the iterator"},{"name":"cfg","type":"const git_config *","comment":"where to ge the variables from"}],"argline":"git_config_iterator **out, const git_config *cfg","sig":"git_config_iterator **::const git_config *","return":{"type":"int","comment":null},"description":"Iterate over all the config variables
\n","comments":"Use git_config_next
to advance the iteration and git_config_iterator_free
when done.
Iterate over all the config variables whose name matches a pattern
\n","comments":"Use git_config_next
to advance the iteration and git_config_iterator_free
when done.
Perform an operation on each config variable matching a regular expression.
\n","comments":"This behaviors like git_config_foreach
with an additional filter of a regular expression that filters which config keys are passed to the callback.
The pointers passed to the callback are only valid as long as the iteration is ongoing.
\n","group":"config"},"git_config_parse_bool":{"type":"function","file":"git2/config.h","line":597,"lineto":597,"args":[{"name":"out","type":"int *","comment":"place to store the result of the parsing"},{"name":"value","type":"const char *","comment":"value to parse"}],"argline":"int *out, const char *value","sig":"int *::const char *","return":{"type":"int","comment":null},"description":"Parse a string value as a bool.
\n","comments":"Valid values for true are: 'true', 'yes', 'on', 1 or any number different from 0 Valid values for false are: 'false', 'no', 'off', 0
\n","group":"config"},"git_config_parse_int32":{"type":"function","file":"git2/config.h","line":609,"lineto":609,"args":[{"name":"out","type":"int32_t *","comment":"place to store the result of the parsing"},{"name":"value","type":"const char *","comment":"value to parse"}],"argline":"int32_t *out, const char *value","sig":"int32_t *::const char *","return":{"type":"int","comment":null},"description":"Parse a string value as an int32.
\n","comments":"An optional value suffix of 'k', 'm', or 'g' will cause the value to be multiplied by 1024, 1048576, or 1073741824 prior to output.
\n","group":"config"},"git_config_parse_int64":{"type":"function","file":"git2/config.h","line":621,"lineto":621,"args":[{"name":"out","type":"int64_t *","comment":"place to store the result of the parsing"},{"name":"value","type":"const char *","comment":"value to parse"}],"argline":"int64_t *out, const char *value","sig":"int64_t *::const char *","return":{"type":"int","comment":null},"description":"Parse a string value as an int64.
\n","comments":"An optional value suffix of 'k', 'm', or 'g' will cause the value to be multiplied by 1024, 1048576, or 1073741824 prior to output.
\n","group":"config"},"git_config_backend_foreach_match":{"type":"function","file":"git2/config.h","line":636,"lineto":640,"args":[{"name":"backend","type":"git_config_backend *","comment":"where to get the variables from"},{"name":"regexp","type":"const char *","comment":"regular expression to match against config names (can be NULL)"},{"name":"callback","type":"git_config_foreach_cb","comment":"the function to call on each variable"},{"name":"payload","type":"void *","comment":"the data to pass to the callback"}],"argline":"git_config_backend *backend, const char *regexp, git_config_foreach_cb callback, void *payload","sig":"git_config_backend *::const char *::git_config_foreach_cb::void *","return":{"type":"int","comment":null},"description":"Perform an operation on each config variable in given config backend\n matching a regular expression.
\n","comments":"This behaviors like git_config_foreach_match
except instead of all config entries it just enumerates through the given backend entry.
Stock callback usable as a git_cred_acquire_cb. This calls\n git_cred_userpass_plaintext_new unless the protocol has not specified\n GIT_CREDTYPE_USERPASS_PLAINTEXT
as an allowed type.
Initializes a git_diff_options
with default values. Equivalent to\n creating an instance with GIT_DIFF_OPTIONS_INIT.
Initializes a git_diff_find_options
with default values. Equivalent to\n creating an instance with GIT_DIFF_FIND_OPTIONS_INIT.
Deallocate a diff.
\n","comments":"","group":"diff","examples":{"diff.c":["ex/v0.21.3/diff.html#git_diff_free-2"],"log.c":["ex/v0.21.3/log.html#git_diff_free-24","ex/v0.21.3/log.html#git_diff_free-25"]}},"git_diff_tree_to_tree":{"type":"function","file":"git2/diff.h","line":672,"lineto":677,"args":[{"name":"diff","type":"git_diff **","comment":"Output pointer to a git_diff pointer to be allocated."},{"name":"repo","type":"git_repository *","comment":"The repository containing the trees."},{"name":"old_tree","type":"git_tree *","comment":"A git_tree object to diff from, or NULL for empty tree."},{"name":"new_tree","type":"git_tree *","comment":"A git_tree object to diff to, or NULL for empty tree."},{"name":"opts","type":"const git_diff_options *","comment":"Structure with options to influence diff or NULL for defaults."}],"argline":"git_diff **diff, git_repository *repo, git_tree *old_tree, git_tree *new_tree, const git_diff_options *opts","sig":"git_diff **::git_repository *::git_tree *::git_tree *::const git_diff_options *","return":{"type":"int","comment":null},"description":"Create a diff with the difference between two tree objects.
\n","comments":"This is equivalent to git diff <old-tree> <new-tree>
The first tree will be used for the "old_file" side of the delta and the second tree will be used for the "new_file" side of the delta. You can pass NULL to indicate an empty tree, although it is an error to pass NULL for both the old_tree
and new_tree
.
Create a diff between a tree and repository index.
\n","comments":"This is equivalent to git diff --cached <treeish>
or if you pass the HEAD tree, then like git diff --cached
.
The tree you pass will be used for the "old_file" side of the delta, and the index will be used for the "new_file" side of the delta.
\n\nIf you pass NULL for the index, then the existing index of the repo
will be used. In this case, the index will be refreshed from disk (if it has changed) before the diff is generated.
Create a diff between the repository index and the workdir directory.
\n","comments":"This matches the git diff
command. See the note below on git_diff_tree_to_workdir
for a discussion of the difference between git diff
and git diff HEAD
and how to emulate a git diff <treeish>
using libgit2.
The index will be used for the "old_file" side of the delta, and the working directory will be used for the "new_file" side of the delta.
\n\nIf you pass NULL for the index, then the existing index of the repo
will be used. In this case, the index will be refreshed from disk (if it has changed) before the diff is generated.
Create a diff between a tree and the working directory.
\n","comments":"The tree you provide will be used for the "old_file" side of the delta, and the working directory will be used for the "new_file" side.
\n\nThis is not the same as git diff <treeish>
or git diff-index <treeish>
. Those commands use information from the index, whereas this function strictly returns the differences between the tree and the files in the working directory, regardless of the state of the index. Use git_diff_tree_to_workdir_with_index
to emulate those commands.
To see difference between this and git_diff_tree_to_workdir_with_index
, consider the example of a staged file deletion where the file has then been put back into the working dir and further modified. The tree-to-workdir diff for that file is 'modified', but git diff
would show status 'deleted' since there is a staged delete.
Create a diff between a tree and the working directory using index data\n to account for staged deletes, tracked files, etc.
\n","comments":"This emulates git diff <tree>
by diffing the tree to the index and the index to the working directory and blending the results into a single diff that includes staged deleted, etc.
Merge one diff into another.
\n","comments":"This merges items from the "from" list into the "onto" list. The resulting diff will have all items that appear in either list. If an item appears in both lists, then it will be "merged" to appear as if the old version was from the "onto" list and the new version is from the "from" list (with the exception that if the item has a pending DELETE in the middle, then it will show as deleted).
\n","group":"diff"},"git_diff_find_similar":{"type":"function","file":"git2/diff.h","line":808,"lineto":810,"args":[{"name":"diff","type":"git_diff *","comment":"diff to run detection algorithms on"},{"name":"options","type":"const git_diff_find_options *","comment":"Control how detection should be run, NULL for defaults"}],"argline":"git_diff *diff, const git_diff_find_options *options","sig":"git_diff *::const git_diff_find_options *","return":{"type":"int","comment":" 0 on success, -1 on failure"},"description":"Transform a diff marking file renames, copies, etc.
\n","comments":"This modifies a diff in place, replacing old entries that look like renames or copies with new entries reflecting those changes. This also will, if requested, break modified files into add/remove pairs if the amount of change is above a threshold.
\n","group":"diff","examples":{"diff.c":["ex/v0.21.3/diff.html#git_diff_find_similar-8"]}},"git_diff_is_sorted_icase":{"type":"function","file":"git2/diff.h","line":870,"lineto":870,"args":[{"name":"diff","type":"const git_diff *","comment":"diff to check"}],"argline":"const git_diff *diff","sig":"const git_diff *","return":{"type":"int","comment":" 0 if case sensitive, 1 if case is ignored"},"description":"Check if deltas are sorted case sensitively or insensitively.
\n","comments":"","group":"diff"},"git_diff_foreach":{"type":"function","file":"git2/diff.h","line":897,"lineto":902,"args":[{"name":"diff","type":"git_diff *","comment":"A git_diff generated by one of the above functions."},{"name":"file_cb","type":"git_diff_file_cb","comment":"Callback function to make per file in the diff."},{"name":"hunk_cb","type":"git_diff_hunk_cb","comment":"Optional callback to make per hunk of text diff. This\n callback is called to describe a range of lines in the\n diff. It will not be issued for binary files."},{"name":"line_cb","type":"git_diff_line_cb","comment":"Optional callback to make per line of diff text. This\n same callback will be made for context lines, added, and\n removed lines, and even for a deleted trailing newline."},{"name":"payload","type":"void *","comment":"Reference pointer that will be passed to your callbacks."}],"argline":"git_diff *diff, git_diff_file_cb file_cb, git_diff_hunk_cb hunk_cb, git_diff_line_cb line_cb, void *payload","sig":"git_diff *::git_diff_file_cb::git_diff_hunk_cb::git_diff_line_cb::void *","return":{"type":"int","comment":" 0 on success, non-zero callback return value, or error code"},"description":"Loop over all deltas in a diff issuing callbacks.
\n","comments":"This will iterate through all of the files described in a diff. You should provide a file callback to learn about each file.
\n\nThe "hunk" and "line" callbacks are optional, and the text diff of the files will only be calculated if they are not NULL. Of course, these callbacks will not be invoked for binary files on the diff or for files whose only changed is a file mode change.
\n\nReturning a non-zero value from any of the callbacks will terminate the iteration and return the value to the user.
\n","group":"diff"},"git_diff_status_char":{"type":"function","file":"git2/diff.h","line":915,"lineto":915,"args":[{"name":"status","type":"git_delta_t","comment":"The git_delta_t value to look up"}],"argline":"git_delta_t status","sig":"git_delta_t","return":{"type":"char","comment":" The single character label for that code"},"description":"Look up the single character abbreviation for a delta status code.
\n","comments":"When you run git diff --name-status
it uses single letter codes in the output such as 'A' for added, 'D' for deleted, 'M' for modified, etc. This function converts a git_delta_t value into these letters for your own purposes. GIT_DELTA_UNTRACKED will return a space (i.e. ' ').
Iterate over a diff generating formatted text output.
\n","comments":"Returning a non-zero value from the callbacks will terminate the iteration and return the non-zero value to the caller.
\n","group":"diff","examples":{"diff.c":["ex/v0.21.3/diff.html#git_diff_print-9"],"log.c":["ex/v0.21.3/log.html#git_diff_print-28"]}},"git_diff_blobs":{"type":"function","file":"git2/diff.h","line":980,"lineto":989,"args":[{"name":"old_blob","type":"const git_blob *","comment":"Blob for old side of diff, or NULL for empty blob"},{"name":"old_as_path","type":"const char *","comment":"Treat old blob as if it had this filename; can be NULL"},{"name":"new_blob","type":"const git_blob *","comment":"Blob for new side of diff, or NULL for empty blob"},{"name":"new_as_path","type":"const char *","comment":"Treat new blob as if it had this filename; can be NULL"},{"name":"options","type":"const git_diff_options *","comment":"Options for diff, or NULL for default options"},{"name":"file_cb","type":"git_diff_file_cb","comment":"Callback for \"file\"; made once if there is a diff; can be NULL"},{"name":"hunk_cb","type":"git_diff_hunk_cb","comment":"Callback for each hunk in diff; can be NULL"},{"name":"line_cb","type":"git_diff_line_cb","comment":"Callback for each line in diff; can be NULL"},{"name":"payload","type":"void *","comment":"Payload passed to each callback function"}],"argline":"const git_blob *old_blob, const char *old_as_path, const git_blob *new_blob, const char *new_as_path, const git_diff_options *options, git_diff_file_cb file_cb, git_diff_hunk_cb hunk_cb, git_diff_line_cb line_cb, void *payload","sig":"const git_blob *::const char *::const git_blob *::const char *::const git_diff_options *::git_diff_file_cb::git_diff_hunk_cb::git_diff_line_cb::void *","return":{"type":"int","comment":" 0 on success, non-zero callback return value, or error code"},"description":"Directly run a diff on two blobs.
\n","comments":"Compared to a file, a blob lacks some contextual information. As such, the git_diff_file
given to the callback will have some fake data; i.e. mode
will be 0 and path
will be NULL.
NULL is allowed for either old_blob
or new_blob
and will be treated as an empty blob, with the oid
set to NULL in the git_diff_file
data. Passing NULL for both blobs is a noop; no callbacks will be made at all.
We do run a binary content check on the blob content and if either blob looks like binary data, the git_diff_delta
binary attribute will be set to 1 and no call to the hunk_cb nor line_cb will be made (unless you pass GIT_DIFF_FORCE_TEXT
of course).
Accumlate diff statistics for all patches.
\n","comments":"","group":"diff","examples":{"diff.c":["ex/v0.21.3/diff.html#git_diff_get_stats-10"]}},"git_diff_stats_free":{"type":"function","file":"git2/diff.h","line":1146,"lineto":1146,"args":[{"name":"stats","type":"git_diff_stats *","comment":"The previously created statistics object;\n cannot be used after free."}],"argline":"git_diff_stats *stats","sig":"git_diff_stats *","return":{"type":"void","comment":null},"description":"Deallocate a git_diff_stats
.
Create an e-mail ready patch from a diff.
\n","comments":"","group":"diff"},"git_diff_format_email_init_options":{"type":"function","file":"git2/diff.h","line":1232,"lineto":1234,"args":[{"name":"opts","type":"git_diff_format_email_options *","comment":"The `git_diff_format_email_options` struct to initialize"},{"name":"version","type":"unsigned int","comment":"Version of struct; pass `GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION`"}],"argline":"git_diff_format_email_options *opts, unsigned int version","sig":"git_diff_format_email_options *::unsigned int","return":{"type":"int","comment":" Zero on success; -1 on failure."},"description":"Initializes a git_diff_format_email_options
with default values.
Equivalent to creating an instance with GIT_DIFF_FORMAT_EMAIL_OPTIONS_INIT.
\n","group":"diff"},"giterr_last":{"type":"function","file":"git2/errors.h","line":98,"lineto":98,"args":[],"argline":"","sig":"","return":{"type":"const git_error *","comment":" A git_error object."},"description":"Return the last git_error
object that was generated for the\n current thread or NULL if no error has occurred.
Clear the last library error that occurred for this thread.
\n","comments":"","group":"giterr"},"giterr_detach":{"type":"function","file":"git2/errors.h","line":115,"lineto":115,"args":[{"name":"cpy","type":"git_error *","comment":null}],"argline":"git_error *cpy","sig":"git_error *","return":{"type":"int","comment":null},"description":"Get the last error data and clear it.
\n","comments":"This copies the last error into the given git_error
struct and returns 0 if the copy was successful, leaving the error cleared as if giterr_clear
had been called.
If there was no existing error in the library, -1 will be returned and the contents of cpy
will be left unmodified.
Set the error message string for this thread.
\n","comments":"This function is public so that custom ODB backends and the like can relay an error message through libgit2. Most regular users of libgit2 will never need to call this function -- actually, calling it in most circumstances (for example, calling from within a callback function) will just end up having the value overwritten by libgit2 internals.
\n\nThis error message is stored in thread-local storage and only applies to the particular thread that this libgit2 call is made from.
\n\nNOTE: Passing the error_class
as GITERR_OS has a special behavior: we attempt to append the system default error message for the last OS error that occurred and then clear the last error. The specific implementation of looking up and clearing this last OS error will vary by platform.
Set the error message to a special value for memory allocation failure.
\n","comments":"The normal giterr_set_str()
function attempts to strdup()
the string that is passed in. This is not a good idea when the error in question is a memory allocation failure. That circumstance has a special setter function that sets the error string to a known and statically allocated internal value.
Load the filter list for a given path.
\n","comments":"This will return 0 (success) but set the output git_filter_list to NULL if no filters are requested for the given file.
\n","group":"filter"},"git_filter_list_apply_to_data":{"type":"function","file":"git2/filter.h","line":115,"lineto":118,"args":[{"name":"out","type":"git_buf *","comment":"Buffer to store the result of the filtering"},{"name":"filters","type":"git_filter_list *","comment":"A loaded git_filter_list (or NULL)"},{"name":"in","type":"git_buf *","comment":"Buffer containing the data to filter"}],"argline":"git_buf *out, git_filter_list *filters, git_buf *in","sig":"git_buf *::git_filter_list *::git_buf *","return":{"type":"int","comment":" 0 on success, an error code otherwise"},"description":"Apply filter list to a data buffer.
\n","comments":"See git2/buffer.h
for background on git_buf
objects.
If the in
buffer holds data allocated by libgit2 (i.e. in->asize
is not zero), then it will be overwritten when applying the filters. If not, then it will be left untouched.
If there are no filters to apply (or filters
is NULL), then the out
buffer will reference the in
buffer data (with asize
set to zero) instead of allocating data. This keeps allocations to a minimum, but it means you have to be careful about freeing the in
data since out
may be pointing to it!
Apply filter list to the contents of a file on disk
\n","comments":"","group":"filter"},"git_filter_list_apply_to_blob":{"type":"function","file":"git2/filter.h","line":132,"lineto":135,"args":[{"name":"out","type":"git_buf *","comment":null},{"name":"filters","type":"git_filter_list *","comment":null},{"name":"blob","type":"git_blob *","comment":null}],"argline":"git_buf *out, git_filter_list *filters, git_blob *blob","sig":"git_buf *::git_filter_list *::git_blob *","return":{"type":"int","comment":null},"description":"Apply filter list to the contents of a blob
\n","comments":"","group":"filter"},"git_filter_list_free":{"type":"function","file":"git2/filter.h","line":142,"lineto":142,"args":[{"name":"filters","type":"git_filter_list *","comment":"A git_filter_list created by `git_filter_list_load`"}],"argline":"git_filter_list *filters","sig":"git_filter_list *","return":{"type":"void","comment":null},"description":"Free a git_filter_list
\n","comments":"","group":"filter"},"git_graph_descendant_of":{"type":"function","file":"git2/graph.h","line":48,"lineto":51,"args":[{"name":"repo","type":"git_repository *","comment":null},{"name":"commit","type":"const git_oid *","comment":"a previously loaded commit."},{"name":"ancestor","type":"const git_oid *","comment":"a potential ancestor commit."}],"argline":"git_repository *repo, const git_oid *commit, const git_oid *ancestor","sig":"git_repository *::const git_oid *::const git_oid *","return":{"type":"int","comment":" 1 if the given commit is a descendant of the potential ancestor,\n 0 if not, error code otherwise."},"description":"Determine if a commit is the descendant of another commit.
\n","comments":"","group":"graph"},"git_ignore_add_rule":{"type":"function","file":"git2/ignore.h","line":37,"lineto":39,"args":[{"name":"repo","type":"git_repository *","comment":"The repository to add ignore rules to."},{"name":"rules","type":"const char *","comment":"Text of rules, a la the contents of a .gitignore file.\n It is okay to have multiple rules in the text; if so,\n each rule should be terminated with a newline."}],"argline":"git_repository *repo, const char *rules","sig":"git_repository *::const char *","return":{"type":"int","comment":" 0 on success"},"description":"Add ignore rules for a repository.
\n","comments":"Excludesfile rules (i.e. .gitignore rules) are generally read from .gitignore files in the repository tree or from a shared system file only if a "core.excludesfile" config value is set. The library also keeps a set of per-repository internal ignores that can be configured in-memory and will not persist. This function allows you to add to that internal rules list.
\n\nExample usage:
\n\n error = git_ignore_add_rule(myrepo, "*.c/ with space");\n
\n\nThis would add three rules to the ignores.
\n","group":"ignore"},"git_ignore_clear_internal_rules":{"type":"function","file":"git2/ignore.h","line":52,"lineto":53,"args":[{"name":"repo","type":"git_repository *","comment":"The repository to remove ignore rules from."}],"argline":"git_repository *repo","sig":"git_repository *","return":{"type":"int","comment":" 0 on success"},"description":"Clear ignore rules that were explicitly added.
\n","comments":"Resets to the default internal ignore rules. This will not turn off rules in .gitignore files that actually exist in the filesystem.
\n\nThe default internal ignores ignore ".", ".." and ".git" entries.
\n","group":"ignore"},"git_ignore_path_is_ignored":{"type":"function","file":"git2/ignore.h","line":71,"lineto":74,"args":[{"name":"ignored","type":"int *","comment":"boolean returning 0 if the file is not ignored, 1 if it is"},{"name":"repo","type":"git_repository *","comment":"a repository object"},{"name":"path","type":"const char *","comment":"the file to check ignores for, relative to the repo's workdir."}],"argline":"int *ignored, git_repository *repo, const char *path","sig":"int *::git_repository *::const char *","return":{"type":"int","comment":" 0 if ignore rules could be processed for the file (regardless\n of whether it exists or not), or an error \n<\n 0 if they could not."},"description":"Test if the ignore rules apply to a given path.
\n","comments":"This function checks the ignore rules to see if they would apply to the given file. This indicates if the file would be ignored regardless of whether the file is already in the index or committed to the repository.
\n\nOne way to think of this is if you were to do "git add ." on the directory containing the file, would it be added or not?
\n","group":"ignore"},"git_index_open":{"type":"function","file":"git2/index.h","line":181,"lineto":181,"args":[{"name":"out","type":"git_index **","comment":"the pointer for the new index"},{"name":"index_path","type":"const char *","comment":"the path to the index file in disk"}],"argline":"git_index **out, const char *index_path","sig":"git_index **::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Create a new bare Git index object as a memory representation\n of the Git index file in 'index_path', without a repository\n to back it.
\n","comments":"Since there is no ODB or working directory behind this index, any Index methods which rely on these (e.g. index_add_bypath) will fail with the GIT_ERROR error code.
\n\nIf you need to access the index of an actual repository, use the git_repository_index
wrapper.
The index must be freed once it's no longer in use.
\n","group":"index"},"git_index_new":{"type":"function","file":"git2/index.h","line":194,"lineto":194,"args":[{"name":"out","type":"git_index **","comment":"the pointer for the new index"}],"argline":"git_index **out","sig":"git_index **","return":{"type":"int","comment":" 0 or an error code"},"description":"Create an in-memory index object.
\n","comments":"This index object cannot be read/written to the filesystem, but may be used to perform in-memory index operations.
\n\nThe index must be freed once it's no longer in use.
\n","group":"index"},"git_index_free":{"type":"function","file":"git2/index.h","line":201,"lineto":201,"args":[{"name":"index","type":"git_index *","comment":"an existing index object"}],"argline":"git_index *index","sig":"git_index *","return":{"type":"void","comment":null},"description":"Free an existing index object.
\n","comments":"","group":"index","examples":{"general.c":["ex/v0.21.3/general.html#git_index_free-27"],"init.c":["ex/v0.21.3/init.html#git_index_free-1"]}},"git_index_owner":{"type":"function","file":"git2/index.h","line":209,"lineto":209,"args":[{"name":"index","type":"const git_index *","comment":"The index"}],"argline":"const git_index *index","sig":"const git_index *","return":{"type":"git_repository *","comment":" A pointer to the repository"},"description":"Get the repository this index relates to
\n","comments":"","group":"index"},"git_index_caps":{"type":"function","file":"git2/index.h","line":217,"lineto":217,"args":[{"name":"index","type":"const git_index *","comment":"An existing index object"}],"argline":"const git_index *index","sig":"const git_index *","return":{"type":"int","comment":" A combination of GIT_INDEXCAP values"},"description":"Read index capabilities flags.
\n","comments":"","group":"index"},"git_index_set_caps":{"type":"function","file":"git2/index.h","line":230,"lineto":230,"args":[{"name":"index","type":"git_index *","comment":"An existing index object"},{"name":"caps","type":"int","comment":"A combination of GIT_INDEXCAP values"}],"argline":"git_index *index, int caps","sig":"git_index *::int","return":{"type":"int","comment":" 0 on success, -1 on failure"},"description":"Set index capabilities flags.
\n","comments":"If you pass GIT_INDEXCAP_FROM_OWNER
for the caps, then the capabilities will be read from the config of the owner object, looking at core.ignorecase
, core.filemode
, core.symlinks
.
Update the contents of an existing index object in memory by reading\n from the hard disk.
\n","comments":"If force
is true, this performs a "hard" read that discards in-memory changes and always reloads the on-disk index data. If there is no on-disk version, the index will be cleared.
If force
is false, this does a "soft" read that reloads the index data from disk only if it has changed since the last time it was loaded. Purely in-memory index data will be untouched. Be aware: if there are changes on disk, unwritten in-memory changes are discarded.
Write an existing index object from memory back to disk\n using an atomic file lock.
\n","comments":"","group":"index"},"git_index_path":{"type":"function","file":"git2/index.h","line":266,"lineto":266,"args":[{"name":"index","type":"const git_index *","comment":"an existing index object"}],"argline":"const git_index *index","sig":"const git_index *","return":{"type":"const char *","comment":" path to index file or NULL for in-memory index"},"description":"Get the full path to the index file on disk.
\n","comments":"","group":"index"},"git_index_read_tree":{"type":"function","file":"git2/index.h","line":277,"lineto":277,"args":[{"name":"index","type":"git_index *","comment":"an existing index object"},{"name":"tree","type":"const git_tree *","comment":"tree to read"}],"argline":"git_index *index, const git_tree *tree","sig":"git_index *::const git_tree *","return":{"type":"int","comment":" 0 or an error code"},"description":"Read a tree into the index file with stats
\n","comments":"The current index contents will be replaced by the specified tree.
\n","group":"index"},"git_index_write_tree":{"type":"function","file":"git2/index.h","line":298,"lineto":298,"args":[{"name":"out","type":"git_oid *","comment":"Pointer where to store the OID of the written tree"},{"name":"index","type":"git_index *","comment":"Index to write"}],"argline":"git_oid *out, git_index *index","sig":"git_oid *::git_index *","return":{"type":"int","comment":" 0 on success, GIT_EUNMERGED when the index is not clean\n or an error code"},"description":"Write the index as a tree
\n","comments":"This method will scan the index and write a representation of its current state back to disk; it recursively creates tree objects for each of the subtrees stored in the index, but only returns the OID of the root tree. This is the OID that can be used e.g. to create a commit.
\n\nThe index instance cannot be bare, and needs to be associated to an existing repository.
\n\nThe index must not contain any file in conflict.
\n","group":"index","examples":{"init.c":["ex/v0.21.3/init.html#git_index_write_tree-2"]}},"git_index_write_tree_to":{"type":"function","file":"git2/index.h","line":315,"lineto":315,"args":[{"name":"out","type":"git_oid *","comment":"Pointer where to store OID of the the written tree"},{"name":"index","type":"git_index *","comment":"Index to write"},{"name":"repo","type":"git_repository *","comment":"Repository where to write the tree"}],"argline":"git_oid *out, git_index *index, git_repository *repo","sig":"git_oid *::git_index *::git_repository *","return":{"type":"int","comment":" 0 on success, GIT_EUNMERGED when the index is not clean\n or an error code"},"description":"Write the index as a tree to the given repository
\n","comments":"This method will do the same as git_index_write_tree
, but letting the user choose the repository where the tree will be written.
The index must not contain any file in conflict.
\n","group":"index"},"git_index_clear":{"type":"function","file":"git2/index.h","line":345,"lineto":345,"args":[{"name":"index","type":"git_index *","comment":"an existing index object"}],"argline":"git_index *index","sig":"git_index *","return":{"type":"int","comment":" 0 on success, error code \n<\n 0 on failure"},"description":"Clear the contents (all the entries) of an index object.
\n","comments":"This clears the index object in memory; changes must be explicitly written to disk for them to take effect persistently.
\n","group":"index"},"git_index_get_bypath":{"type":"function","file":"git2/index.h","line":373,"lineto":374,"args":[{"name":"index","type":"git_index *","comment":"an existing index object"},{"name":"path","type":"const char *","comment":"path to search"},{"name":"stage","type":"int","comment":"stage to search"}],"argline":"git_index *index, const char *path, int stage","sig":"git_index *::const char *::int","return":{"type":"const git_index_entry *","comment":" a pointer to the entry; NULL if it was not found"},"description":"Get a pointer to one of the entries in the index
\n","comments":"The entry is not modifiable and should not be freed. Because the git_index_entry
struct is a publicly defined struct, you should be able to make your own permanent copy of the data if necessary.
Remove an entry from the index
\n","comments":"","group":"index"},"git_index_remove_directory":{"type":"function","file":"git2/index.h","line":394,"lineto":395,"args":[{"name":"index","type":"git_index *","comment":"an existing index object"},{"name":"dir","type":"const char *","comment":"container directory path"},{"name":"stage","type":"int","comment":"stage to search"}],"argline":"git_index *index, const char *dir, int stage","sig":"git_index *::const char *::int","return":{"type":"int","comment":" 0 or an error code"},"description":"Remove all entries from the index under a given directory
\n","comments":"","group":"index"},"git_index_add":{"type":"function","file":"git2/index.h","line":411,"lineto":411,"args":[{"name":"index","type":"git_index *","comment":"an existing index object"},{"name":"source_entry","type":"const git_index_entry *","comment":"new entry object"}],"argline":"git_index *index, const git_index_entry *source_entry","sig":"git_index *::const git_index_entry *","return":{"type":"int","comment":" 0 or an error code"},"description":"Add or update an index entry from an in-memory struct
\n","comments":"If a previous index entry exists that has the same path and stage as the given 'source_entry', it will be replaced. Otherwise, the 'source_entry' will be added.
\n\nA full copy (including the 'path' string) of the given 'source_entry' will be inserted on the index.
\n","group":"index"},"git_index_entry_stage":{"type":"function","file":"git2/index.h","line":423,"lineto":423,"args":[{"name":"entry","type":"const git_index_entry *","comment":"The entry"}],"argline":"const git_index_entry *entry","sig":"const git_index_entry *","return":{"type":"int","comment":" the stage number"},"description":"Return the stage number from a git index entry
\n","comments":"This entry is calculated from the entry's flag attribute like this:
\n\n(entry->flags & GIT_IDXENTRY_STAGEMASK) >> GIT_IDXENTRY_STAGESHIFT\n
\n","group":"index"},"git_index_add_bypath":{"type":"function","file":"git2/index.h","line":454,"lineto":454,"args":[{"name":"index","type":"git_index *","comment":"an existing index object"},{"name":"path","type":"const char *","comment":"filename to add"}],"argline":"git_index *index, const char *path","sig":"git_index *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Add or update an index entry from a file on disk
\n","comments":"The file path
must be relative to the repository's working folder and must be readable.
This method will fail in bare index instances.
\n\nThis forces the file to be added to the index, not looking at gitignore rules. Those rules can be evaluated through the git_status APIs (in status.h) before calling this.
\n\nIf this file currently is the result of a merge conflict, this file will no longer be marked as conflicting. The data about the conflict will be moved to the "resolve undo" (REUC) section.
\n","group":"index"},"git_index_remove_bypath":{"type":"function","file":"git2/index.h","line":470,"lineto":470,"args":[{"name":"index","type":"git_index *","comment":"an existing index object"},{"name":"path","type":"const char *","comment":"filename to remove"}],"argline":"git_index *index, const char *path","sig":"git_index *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Remove an index entry corresponding to a file on disk
\n","comments":"The file path
must be relative to the repository's working folder. It may exist.
If this file currently is the result of a merge conflict, this file will no longer be marked as conflicting. The data about the conflict will be moved to the "resolve undo" (REUC) section.
\n","group":"index"},"git_index_add_all":{"type":"function","file":"git2/index.h","line":517,"lineto":522,"args":[{"name":"index","type":"git_index *","comment":"an existing index object"},{"name":"pathspec","type":"const git_strarray *","comment":"array of path patterns"},{"name":"flags","type":"unsigned int","comment":"combination of git_index_add_option_t flags"},{"name":"callback","type":"git_index_matched_path_cb","comment":"notification callback for each added/updated path (also\n gets index of matching pathspec entry); can be NULL;\n return 0 to add, >0 to skip, \n<\n0 to abort scan."},{"name":"payload","type":"void *","comment":"payload passed through to callback function"}],"argline":"git_index *index, const git_strarray *pathspec, unsigned int flags, git_index_matched_path_cb callback, void *payload","sig":"git_index *::const git_strarray *::unsigned int::git_index_matched_path_cb::void *","return":{"type":"int","comment":" 0 on success, negative callback return value, or error code"},"description":"Add or update index entries matching files in the working directory.
\n","comments":"This method will fail in bare index instances.
\n\nThe pathspec
is a list of file names or shell glob patterns that will matched against files in the repository's working directory. Each file that matches will be added to the index (either updating an existing entry or adding a new entry). You can disable glob expansion and force exact matching with the GIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH
flag.
Files that are ignored will be skipped (unlike git_index_add_bypath
). If a file is already tracked in the index, then it will be updated even if it is ignored. Pass the GIT_INDEX_ADD_FORCE
flag to skip the checking of ignore rules.
To emulate git add -A
and generate an error if the pathspec contains the exact path of an ignored file (when not using FORCE), add the GIT_INDEX_ADD_CHECK_PATHSPEC
flag. This checks that each entry in the pathspec
that is an exact match to a filename on disk is either not ignored or already in the index. If this check fails, the function will return GIT_EINVALIDSPEC.
To emulate git add -A
with the "dry-run" option, just use a callback function that always returns a positive value. See below for details.
If any files are currently the result of a merge conflict, those files will no longer be marked as conflicting. The data about the conflicts will be moved to the "resolve undo" (REUC) section.
\n\nIf you provide a callback function, it will be invoked on each matching item in the working directory immediately before it is added to / updated in the index. Returning zero will add the item to the index, greater than zero will skip the item, and less than zero will abort the scan and return that value to the caller.
\n","group":"index"},"git_index_remove_all":{"type":"function","file":"git2/index.h","line":539,"lineto":543,"args":[{"name":"index","type":"git_index *","comment":"An existing index object"},{"name":"pathspec","type":"const git_strarray *","comment":"array of path patterns"},{"name":"callback","type":"git_index_matched_path_cb","comment":"notification callback for each removed path (also\n gets index of matching pathspec entry); can be NULL;\n return 0 to add, >0 to skip, \n<\n0 to abort scan."},{"name":"payload","type":"void *","comment":"payload passed through to callback function"}],"argline":"git_index *index, const git_strarray *pathspec, git_index_matched_path_cb callback, void *payload","sig":"git_index *::const git_strarray *::git_index_matched_path_cb::void *","return":{"type":"int","comment":" 0 on success, negative callback return value, or error code"},"description":"Remove all matching index entries.
\n","comments":"If you provide a callback function, it will be invoked on each matching item in the index immediately before it is removed. Return 0 to remove the item, > 0 to skip the item, and < 0 to abort the scan.
\n","group":"index"},"git_index_update_all":{"type":"function","file":"git2/index.h","line":568,"lineto":572,"args":[{"name":"index","type":"git_index *","comment":"An existing index object"},{"name":"pathspec","type":"const git_strarray *","comment":"array of path patterns"},{"name":"callback","type":"git_index_matched_path_cb","comment":"notification callback for each updated path (also\n gets index of matching pathspec entry); can be NULL;\n return 0 to add, >0 to skip, \n<\n0 to abort scan."},{"name":"payload","type":"void *","comment":"payload passed through to callback function"}],"argline":"git_index *index, const git_strarray *pathspec, git_index_matched_path_cb callback, void *payload","sig":"git_index *::const git_strarray *::git_index_matched_path_cb::void *","return":{"type":"int","comment":" 0 on success, negative callback return value, or error code"},"description":"Update all index entries to match the working directory
\n","comments":"This method will fail in bare index instances.
\n\nThis scans the existing index entries and synchronizes them with the working directory, deleting them if the corresponding working directory file no longer exists otherwise updating the information (including adding the latest version of file to the ODB if needed).
\n\nIf you provide a callback function, it will be invoked on each matching item in the index immediately before it is updated (either refreshed or removed depending on working directory state). Return 0 to proceed with updating the item, > 0 to skip the item, and < 0 to abort the scan.
\n","group":"index"},"git_index_conflict_add":{"type":"function","file":"git2/index.h","line":607,"lineto":611,"args":[{"name":"index","type":"git_index *","comment":"an existing index object"},{"name":"ancestor_entry","type":"const git_index_entry *","comment":"the entry data for the ancestor of the conflict"},{"name":"our_entry","type":"const git_index_entry *","comment":"the entry data for our side of the merge conflict"},{"name":"their_entry","type":"const git_index_entry *","comment":"the entry data for their side of the merge conflict"}],"argline":"git_index *index, const git_index_entry *ancestor_entry, const git_index_entry *our_entry, const git_index_entry *their_entry","sig":"git_index *::const git_index_entry *::const git_index_entry *::const git_index_entry *","return":{"type":"int","comment":" 0 or an error code"},"description":"Add or update index entries to represent a conflict
\n","comments":"The entries are the entries from the tree included in the merge. Any entry may be null to indicate that that file was not present in the trees during the merge. For example, ancestor_entry may be NULL to indicate that a file was added in both branches and must be resolved.
\n","group":"index"},"git_index_conflict_get":{"type":"function","file":"git2/index.h","line":627,"lineto":632,"args":[{"name":"ancestor_out","type":"const git_index_entry **","comment":"Pointer to store the ancestor entry"},{"name":"our_out","type":"const git_index_entry **","comment":"Pointer to store the our entry"},{"name":"their_out","type":"const git_index_entry **","comment":"Pointer to store the their entry"},{"name":"index","type":"git_index *","comment":"an existing index object"},{"name":"path","type":"const char *","comment":"path to search"}],"argline":"const git_index_entry **ancestor_out, const git_index_entry **our_out, const git_index_entry **their_out, git_index *index, const char *path","sig":"const git_index_entry **::const git_index_entry **::const git_index_entry **::git_index *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Get the index entries that represent a conflict of a single file.
\n","comments":"The entries are not modifiable and should not be freed. Because the git_index_entry
struct is a publicly defined struct, you should be able to make your own permanent copy of the data if necessary.
Removes the index entries that represent a conflict of a single file.
\n","comments":"","group":"index"},"git_index_conflict_cleanup":{"type":"function","file":"git2/index.h","line":649,"lineto":649,"args":[{"name":"index","type":"git_index *","comment":"an existing index object"}],"argline":"git_index *index","sig":"git_index *","return":{"type":"int","comment":" 0 or an error code"},"description":"Remove all conflicts in the index (entries with a stage greater than 0).
\n","comments":"","group":"index"},"git_index_has_conflicts":{"type":"function","file":"git2/index.h","line":656,"lineto":656,"args":[{"name":"index","type":"const git_index *","comment":null}],"argline":"const git_index *index","sig":"const git_index *","return":{"type":"int","comment":" 1 if at least one conflict is found, 0 otherwise."},"description":"Determine if the index contains entries representing file conflicts.
\n","comments":"","group":"index"},"git_index_conflict_iterator_new":{"type":"function","file":"git2/index.h","line":667,"lineto":669,"args":[{"name":"iterator_out","type":"git_index_conflict_iterator **","comment":"The newly created conflict iterator"},{"name":"index","type":"git_index *","comment":"The index to scan"}],"argline":"git_index_conflict_iterator **iterator_out, git_index *index","sig":"git_index_conflict_iterator **::git_index *","return":{"type":"int","comment":" 0 or an error code"},"description":"Create an iterator for the conflicts in the index.
\n","comments":"The index must not be modified while iterating; the results are undefined.
\n","group":"index"},"git_index_conflict_next":{"type":"function","file":"git2/index.h","line":681,"lineto":685,"args":[{"name":"ancestor_out","type":"const git_index_entry **","comment":"Pointer to store the ancestor side of the conflict"},{"name":"our_out","type":"const git_index_entry **","comment":"Pointer to store our side of the conflict"},{"name":"their_out","type":"const git_index_entry **","comment":"Pointer to store their side of the conflict"},{"name":"iterator","type":"git_index_conflict_iterator *","comment":null}],"argline":"const git_index_entry **ancestor_out, const git_index_entry **our_out, const git_index_entry **their_out, git_index_conflict_iterator *iterator","sig":"const git_index_entry **::const git_index_entry **::const git_index_entry **::git_index_conflict_iterator *","return":{"type":"int","comment":" 0 (no error), GIT_ITEROVER (iteration is done) or an error code\n (negative value)"},"description":"Returns the current conflict (ancestor, ours and theirs entry) and\n advance the iterator internally to the next value.
\n","comments":"","group":"index"},"git_index_conflict_iterator_free":{"type":"function","file":"git2/index.h","line":692,"lineto":693,"args":[{"name":"iterator","type":"git_index_conflict_iterator *","comment":"pointer to the iterator"}],"argline":"git_index_conflict_iterator *iterator","sig":"git_index_conflict_iterator *","return":{"type":"void","comment":null},"description":"Frees a git_index_conflict_iterator
.
Create a new indexer instance
\n","comments":"","group":"indexer","examples":{"network/index-pack.c":["ex/v0.21.3/network/index-pack.html#git_indexer_new-1"]}},"git_indexer_commit":{"type":"function","file":"git2/indexer.h","line":55,"lineto":55,"args":[{"name":"idx","type":"git_indexer *","comment":"the indexer"},{"name":"stats","type":"git_transfer_progress *","comment":null}],"argline":"git_indexer *idx, git_transfer_progress *stats","sig":"git_indexer *::git_transfer_progress *","return":{"type":"int","comment":null},"description":"Finalize the pack and index
\n","comments":"Resolve any pending deltas and write out the index file
\n","group":"indexer","examples":{"network/index-pack.c":["ex/v0.21.3/network/index-pack.html#git_indexer_commit-2"]}},"git_indexer_hash":{"type":"function","file":"git2/indexer.h","line":65,"lineto":65,"args":[{"name":"idx","type":"const git_indexer *","comment":"the indexer instance"}],"argline":"const git_indexer *idx","sig":"const git_indexer *","return":{"type":"const git_oid *","comment":null},"description":"Get the packfile's hash
\n","comments":"A packfile's name is derived from the sorted hashing of all object names. This is only correct after the index has been finalized.
\n","group":"indexer","examples":{"network/index-pack.c":["ex/v0.21.3/network/index-pack.html#git_indexer_hash-3"]}},"git_indexer_free":{"type":"function","file":"git2/indexer.h","line":72,"lineto":72,"args":[{"name":"idx","type":"git_indexer *","comment":"the indexer to free"}],"argline":"git_indexer *idx","sig":"git_indexer *","return":{"type":"void","comment":null},"description":"Free the indexer and its resources
\n","comments":"","group":"indexer","examples":{"network/index-pack.c":["ex/v0.21.3/network/index-pack.html#git_indexer_free-4"]}},"git_merge_file_init_input":{"type":"function","file":"git2/merge.h","line":58,"lineto":60,"args":[{"name":"opts","type":"git_merge_file_input *","comment":"the `git_merge_file_input` instance to initialize."},{"name":"version","type":"unsigned int","comment":"the version of the struct; you should pass\n `GIT_MERGE_FILE_INPUT_VERSION` here."}],"argline":"git_merge_file_input *opts, unsigned int version","sig":"git_merge_file_input *::unsigned int","return":{"type":"int","comment":" Zero on success; -1 on failure."},"description":"Initializes a git_merge_file_input
with default values. Equivalent to\n creating an instance with GIT_MERGE_FILE_INPUT_INIT.
Initializes a git_merge_file_options
with default values. Equivalent to\n creating an instance with GIT_MERGE_FILE_OPTIONS_INIT.
Initializes a git_merge_options
with default values. Equivalent to\n creating an instance with GIT_MERGE_OPTIONS_INIT.
Find a merge base between two commits
\n","comments":"","group":"merge","examples":{"log.c":["ex/v0.21.3/log.html#git_merge_base-29"],"rev-parse.c":["ex/v0.21.3/rev-parse.html#git_merge_base-1"]}},"git_merge_head_from_ref":{"type":"function","file":"git2/merge.h","line":362,"lineto":365,"args":[{"name":"out","type":"git_merge_head **","comment":"pointer to store the git_merge_head result in"},{"name":"repo","type":"git_repository *","comment":"repository that contains the given reference"},{"name":"ref","type":"const git_reference *","comment":"reference to use as a merge input"}],"argline":"git_merge_head **out, git_repository *repo, const git_reference *ref","sig":"git_merge_head **::git_repository *::const git_reference *","return":{"type":"int","comment":" 0 on success or error code"},"description":"Creates a git_merge_head
from the given reference. The resulting\n git_merge_head must be freed with git_merge_head_free
.
Creates a git_merge_head
from the given fetch head data. The resulting\n git_merge_head must be freed with git_merge_head_free
.
Creates a git_merge_head
from the given commit id. The resulting\n git_merge_head must be freed with git_merge_head_free
.
Gets the commit ID that the given git_merge_head
refers to.
Frees a git_merge_head
.
Merge two files as they exist in the in-memory data structures, using\n the given common ancestor as the baseline, producing a\n git_merge_file_result
that reflects the merge result. The\n git_merge_file_result
must be freed with git_merge_file_result_free
.
Note that this function does not reference a repository and any configuration must be passed as git_merge_file_options
.
Merge two files as they exist in the index, using the given common\n ancestor as the baseline, producing a git_merge_file_result
that\n reflects the merge result. The git_merge_file_result
must be freed with\n git_merge_file_result_free
.
Frees a git_merge_file_result
.
Merge two trees, producing a git_index
that reflects the result of\n the merge. The index may be written as-is to the working directory\n or checked out. If the index is to be converted to a tree, the caller\n should resolve any conflicts that arose as part of the merge.
The returned index must be freed explicitly with git_index_free
.
Merge two commits, producing a git_index
that reflects the result of\n the merge. The index may be written as-is to the working directory\n or checked out. If the index is to be converted to a tree, the caller\n should resolve any conflicts that arose as part of the merge.
The returned index must be freed explicitly with git_index_free
.
Clean up message from excess whitespace and make sure that the last line\n ends with a '
\n\n'.
\n","comments":"Optionally, can remove lines starting with a "#".
\n","group":"message"},"git_note_iterator_new":{"type":"function","file":"git2/notes.h","line":49,"lineto":52,"args":[{"name":"out","type":"git_note_iterator **","comment":"pointer to the iterator"},{"name":"repo","type":"git_repository *","comment":"repository where to look up the note"},{"name":"notes_ref","type":"const char *","comment":"canonical name of the reference to use (optional); defaults to\n \"refs/notes/commits\""}],"argline":"git_note_iterator **out, git_repository *repo, const char *notes_ref","sig":"git_note_iterator **::git_repository *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Creates a new iterator for notes
\n","comments":"The iterator must be freed manually by the user.
\n","group":"note"},"git_note_iterator_free":{"type":"function","file":"git2/notes.h","line":59,"lineto":59,"args":[{"name":"it","type":"git_note_iterator *","comment":"pointer to the iterator"}],"argline":"git_note_iterator *it","sig":"git_note_iterator *","return":{"type":"void","comment":null},"description":"Frees an git_note_iterator
\n","comments":"","group":"note"},"git_note_next":{"type":"function","file":"git2/notes.h","line":74,"lineto":77,"args":[{"name":"note_id","type":"git_oid *","comment":"id of blob containing the message"},{"name":"annotated_id","type":"git_oid *","comment":"id of the git object being annotated"},{"name":"it","type":"git_note_iterator *","comment":"pointer to the iterator"}],"argline":"git_oid *note_id, git_oid *annotated_id, git_note_iterator *it","sig":"git_oid *::git_oid *::git_note_iterator *","return":{"type":"int","comment":" 0 (no error), GIT_ITEROVER (iteration is done) or an error code\n (negative value)"},"description":"Returns the current item (note_id and annotated_id) and advance the iterator\n internally to the next value
\n","comments":"The notes must not be freed manually by the user.
\n","group":"note"},"git_note_read":{"type":"function","file":"git2/notes.h","line":93,"lineto":97,"args":[{"name":"out","type":"git_note **","comment":"pointer to the read note; NULL in case of error"},{"name":"repo","type":"git_repository *","comment":"repository where to look up the note"},{"name":"notes_ref","type":"const char *","comment":"canonical name of the reference to use (optional); defaults to\n \"refs/notes/commits\""},{"name":"oid","type":"const git_oid *","comment":"OID of the git object to read the note from"}],"argline":"git_note **out, git_repository *repo, const char *notes_ref, const git_oid *oid","sig":"git_note **::git_repository *::const char *::const git_oid *","return":{"type":"int","comment":" 0 or an error code"},"description":"Read the note for an object
\n","comments":"The note must be freed manually by the user.
\n","group":"note"},"git_note_message":{"type":"function","file":"git2/notes.h","line":105,"lineto":105,"args":[{"name":"note","type":"const git_note *","comment":"the note"}],"argline":"const git_note *note","sig":"const git_note *","return":{"type":"const char *","comment":" the note message"},"description":"Get the note message
\n","comments":"","group":"note"},"git_note_id":{"type":"function","file":"git2/notes.h","line":114,"lineto":114,"args":[{"name":"note","type":"const git_note *","comment":"the note"}],"argline":"const git_note *note","sig":"const git_note *","return":{"type":"const git_oid *","comment":" the note object's id"},"description":"Get the note object's id
\n","comments":"","group":"note"},"git_note_create":{"type":"function","file":"git2/notes.h","line":131,"lineto":139,"args":[{"name":"out","type":"git_oid *","comment":"pointer to store the OID (optional); NULL in case of error"},{"name":"repo","type":"git_repository *","comment":"repository where to store the note"},{"name":"author","type":"const git_signature *","comment":"signature of the notes commit author"},{"name":"committer","type":"const git_signature *","comment":"signature of the notes commit committer"},{"name":"notes_ref","type":"const char *","comment":"canonical name of the reference to use (optional);\n\t\t\t\t\tdefaults to \"refs/notes/commits\""},{"name":"oid","type":"const git_oid *","comment":"OID of the git object to decorate"},{"name":"note","type":"const char *","comment":"Content of the note to add for object oid"},{"name":"force","type":"int","comment":"Overwrite existing note"}],"argline":"git_oid *out, git_repository *repo, const git_signature *author, const git_signature *committer, const char *notes_ref, const git_oid *oid, const char *note, int force","sig":"git_oid *::git_repository *::const git_signature *::const git_signature *::const char *::const git_oid *::const char *::int","return":{"type":"int","comment":" 0 or an error code"},"description":"Add a note for an object
\n","comments":"","group":"note"},"git_note_remove":{"type":"function","file":"git2/notes.h","line":154,"lineto":159,"args":[{"name":"repo","type":"git_repository *","comment":"repository where the note lives"},{"name":"notes_ref","type":"const char *","comment":"canonical name of the reference to use (optional);\n\t\t\t\t\tdefaults to \"refs/notes/commits\""},{"name":"author","type":"const git_signature *","comment":"signature of the notes commit author"},{"name":"committer","type":"const git_signature *","comment":"signature of the notes commit committer"},{"name":"oid","type":"const git_oid *","comment":"OID of the git object to remove the note from"}],"argline":"git_repository *repo, const char *notes_ref, const git_signature *author, const git_signature *committer, const git_oid *oid","sig":"git_repository *::const char *::const git_signature *::const git_signature *::const git_oid *","return":{"type":"int","comment":" 0 or an error code"},"description":"Remove the note for an object
\n","comments":"","group":"note"},"git_note_free":{"type":"function","file":"git2/notes.h","line":166,"lineto":166,"args":[{"name":"note","type":"git_note *","comment":"git_note object"}],"argline":"git_note *note","sig":"git_note *","return":{"type":"void","comment":null},"description":"Free a git_note object
\n","comments":"","group":"note"},"git_note_default_ref":{"type":"function","file":"git2/notes.h","line":176,"lineto":176,"args":[{"name":"out","type":"const char **","comment":"Pointer to the default notes reference"},{"name":"repo","type":"git_repository *","comment":"The Git repository"}],"argline":"const char **out, git_repository *repo","sig":"const char **::git_repository *","return":{"type":"int","comment":" 0 or an error code"},"description":"Get the default notes reference for a repository
\n","comments":"","group":"note"},"git_note_foreach":{"type":"function","file":"git2/notes.h","line":194,"lineto":198,"args":[{"name":"repo","type":"git_repository *","comment":"Repository where to find the notes."},{"name":"notes_ref","type":"const char *","comment":"Reference to read from (optional); defaults to\n \"refs/notes/commits\"."},{"name":"note_cb","type":"git_note_foreach_cb","comment":"Callback to invoke per found annotation. Return non-zero\n to stop looping."},{"name":"payload","type":"void *","comment":"Extra parameter to callback function."}],"argline":"git_repository *repo, const char *notes_ref, git_note_foreach_cb note_cb, void *payload","sig":"git_repository *::const char *::git_note_foreach_cb::void *","return":{"type":"int","comment":" 0 on success, non-zero callback return value, or error code"},"description":"Loop over all the notes within a specified namespace\n and issue a callback for each one.
\n","comments":"","group":"note"},"git_object_lookup":{"type":"function","file":"git2/object.h","line":42,"lineto":46,"args":[{"name":"object","type":"git_object **","comment":"pointer to the looked-up object"},{"name":"repo","type":"git_repository *","comment":"the repository to look up the object"},{"name":"id","type":"const git_oid *","comment":"the unique identifier for the object"},{"name":"type","type":"git_otype","comment":"the type of the object"}],"argline":"git_object **object, git_repository *repo, const git_oid *id, git_otype type","sig":"git_object **::git_repository *::const git_oid *::git_otype","return":{"type":"int","comment":" 0 or an error code"},"description":"Lookup a reference to one of the objects in a repository.
\n","comments":"The generated reference is owned by the repository and should be closed with the git_object_free
method instead of free'd manually.
The 'type' parameter must match the type of the object in the odb; the method will fail otherwise. The special value 'GIT_OBJ_ANY' may be passed to let the method guess the object's type.
\n","group":"object","examples":{"log.c":["ex/v0.21.3/log.html#git_object_lookup-30"]}},"git_object_lookup_bypath":{"type":"function","file":"git2/object.h","line":93,"lineto":97,"args":[{"name":"out","type":"git_object **","comment":"buffer that receives a pointer to the object (which must be freed\n by the caller)"},{"name":"treeish","type":"const git_object *","comment":"root object that can be peeled to a tree"},{"name":"path","type":"const char *","comment":"relative path from the root object to the desired object"},{"name":"type","type":"git_otype","comment":"type of object desired"}],"argline":"git_object **out, const git_object *treeish, const char *path, git_otype type","sig":"git_object **::const git_object *::const char *::git_otype","return":{"type":"int","comment":" 0 on success, or an error code"},"description":"Lookup an object that represents a tree entry.
\n","comments":"","group":"object"},"git_object_id":{"type":"function","file":"git2/object.h","line":105,"lineto":105,"args":[{"name":"obj","type":"const git_object *","comment":"the repository object"}],"argline":"const git_object *obj","sig":"const git_object *","return":{"type":"const git_oid *","comment":" the SHA1 id"},"description":"Get the id (SHA1) of a repository object
\n","comments":"","group":"object","examples":{"blame.c":["ex/v0.21.3/blame.html#git_object_id-8","ex/v0.21.3/blame.html#git_object_id-9","ex/v0.21.3/blame.html#git_object_id-10","ex/v0.21.3/blame.html#git_object_id-11"],"cat-file.c":["ex/v0.21.3/cat-file.html#git_object_id-10","ex/v0.21.3/cat-file.html#git_object_id-11"],"log.c":["ex/v0.21.3/log.html#git_object_id-31","ex/v0.21.3/log.html#git_object_id-32","ex/v0.21.3/log.html#git_object_id-33","ex/v0.21.3/log.html#git_object_id-34"],"rev-parse.c":["ex/v0.21.3/rev-parse.html#git_object_id-2","ex/v0.21.3/rev-parse.html#git_object_id-3","ex/v0.21.3/rev-parse.html#git_object_id-4","ex/v0.21.3/rev-parse.html#git_object_id-5","ex/v0.21.3/rev-parse.html#git_object_id-6"]}},"git_object_short_id":{"type":"function","file":"git2/object.h","line":119,"lineto":119,"args":[{"name":"out","type":"git_buf *","comment":"Buffer to write string into"},{"name":"obj","type":"const git_object *","comment":"The object to get an ID for"}],"argline":"git_buf *out, const git_object *obj","sig":"git_buf *::const git_object *","return":{"type":"int","comment":" 0 on success, \n<\n0 for error"},"description":"Get a short abbreviated OID string for the object
\n","comments":"This starts at the "core.abbrev" length (default 7 characters) and iteratively extends to a longer string if that length is ambiguous. The result will be unambiguous (at least until new objects are added to the repository).
\n","group":"object","examples":{"tag.c":["ex/v0.21.3/tag.html#git_object_short_id-3"]}},"git_object_type":{"type":"function","file":"git2/object.h","line":127,"lineto":127,"args":[{"name":"obj","type":"const git_object *","comment":"the repository object"}],"argline":"const git_object *obj","sig":"const git_object *","return":{"type":"git_otype","comment":" the object's type"},"description":"Get the object type of an object
\n","comments":"","group":"object","examples":{"cat-file.c":["ex/v0.21.3/cat-file.html#git_object_type-12","ex/v0.21.3/cat-file.html#git_object_type-13","ex/v0.21.3/cat-file.html#git_object_type-14"],"tag.c":["ex/v0.21.3/tag.html#git_object_type-4"]}},"git_object_owner":{"type":"function","file":"git2/object.h","line":141,"lineto":141,"args":[{"name":"obj","type":"const git_object *","comment":"the object"}],"argline":"const git_object *obj","sig":"const git_object *","return":{"type":"git_repository *","comment":" the repository who owns this object"},"description":"Get the repository that owns this object
\n","comments":"Freeing or calling git_repository_close
on the returned pointer will invalidate the actual object.
Any other operation may be run on the repository without affecting the object.
\n","group":"object"},"git_object_free":{"type":"function","file":"git2/object.h","line":158,"lineto":158,"args":[{"name":"object","type":"git_object *","comment":"the object to close"}],"argline":"git_object *object","sig":"git_object *","return":{"type":"void","comment":null},"description":"Close an open object
\n","comments":"This method instructs the library to close an existing object; note that git_objects are owned and cached by the repository so the object may or may not be freed after this library call, depending on how aggressive is the caching mechanism used by the repository.
\n\nIMPORTANT: It is necessary to call this method when you stop using an object. Failure to do so will cause a memory leak.
\n","group":"object","examples":{"blame.c":["ex/v0.21.3/blame.html#git_object_free-12","ex/v0.21.3/blame.html#git_object_free-13","ex/v0.21.3/blame.html#git_object_free-14","ex/v0.21.3/blame.html#git_object_free-15"],"cat-file.c":["ex/v0.21.3/cat-file.html#git_object_free-15"],"general.c":["ex/v0.21.3/general.html#git_object_free-28"],"log.c":["ex/v0.21.3/log.html#git_object_free-35"],"rev-parse.c":["ex/v0.21.3/rev-parse.html#git_object_free-7","ex/v0.21.3/rev-parse.html#git_object_free-8","ex/v0.21.3/rev-parse.html#git_object_free-9"],"tag.c":["ex/v0.21.3/tag.html#git_object_free-5","ex/v0.21.3/tag.html#git_object_free-6","ex/v0.21.3/tag.html#git_object_free-7","ex/v0.21.3/tag.html#git_object_free-8"]}},"git_object_type2string":{"type":"function","file":"git2/object.h","line":169,"lineto":169,"args":[{"name":"type","type":"git_otype","comment":"object type to convert."}],"argline":"git_otype type","sig":"git_otype","return":{"type":"const char *","comment":" the corresponding string representation."},"description":"Convert an object type to its string representation.
\n","comments":"The result is a pointer to a string in static memory and should not be free()'ed.
\n","group":"object","examples":{"cat-file.c":["ex/v0.21.3/cat-file.html#git_object_type2string-16","ex/v0.21.3/cat-file.html#git_object_type2string-17","ex/v0.21.3/cat-file.html#git_object_type2string-18","ex/v0.21.3/cat-file.html#git_object_type2string-19"],"general.c":["ex/v0.21.3/general.html#git_object_type2string-29"]}},"git_object_string2type":{"type":"function","file":"git2/object.h","line":177,"lineto":177,"args":[{"name":"str","type":"const char *","comment":"the string to convert."}],"argline":"const char *str","sig":"const char *","return":{"type":"git_otype","comment":" the corresponding git_otype."},"description":"Convert a string object type representation to it's git_otype.
\n","comments":"","group":"object"},"git_object_typeisloose":{"type":"function","file":"git2/object.h","line":186,"lineto":186,"args":[{"name":"type","type":"git_otype","comment":"object type to test."}],"argline":"git_otype type","sig":"git_otype","return":{"type":"int","comment":" true if the type represents a valid loose object type,\n false otherwise."},"description":"Determine if the given git_otype is a valid loose object type.
\n","comments":"","group":"object"},"git_object_peel":{"type":"function","file":"git2/object.h","line":218,"lineto":221,"args":[{"name":"peeled","type":"git_object **","comment":"Pointer to the peeled git_object"},{"name":"object","type":"const git_object *","comment":"The object to be processed"},{"name":"target_type","type":"git_otype","comment":"The type of the requested object (GIT_OBJ_COMMIT,\n GIT_OBJ_TAG, GIT_OBJ_TREE, GIT_OBJ_BLOB or GIT_OBJ_ANY)."}],"argline":"git_object **peeled, const git_object *object, git_otype target_type","sig":"git_object **::const git_object *::git_otype","return":{"type":"int","comment":" 0 on success, GIT_EAMBIGUOUS, GIT_ENOTFOUND or an error code"},"description":"Recursively peel an object until an object of the specified type is met.
\n","comments":"The retrieved peeled
object is owned by the repository and should be closed with the git_object_free
method.
If you pass GIT_OBJ_ANY
as the target type, then the object will be peeled until the type changes (e.g. a tag will be chased until the referenced object is no longer a tag).
Create an in-memory copy of a Git object. The copy must be\n explicitly free'd or it will leak.
\n","comments":"","group":"object"},"git_odb_new":{"type":"function","file":"git2/odb.h","line":38,"lineto":38,"args":[{"name":"out","type":"git_odb **","comment":"location to store the database pointer, if opened.\n\t\t\tSet to NULL if the open failed."}],"argline":"git_odb **out","sig":"git_odb **","return":{"type":"int","comment":" 0 or an error code"},"description":"Create a new object database with no backends.
\n","comments":"Before the ODB can be used for read/writing, a custom database backend must be manually added using git_odb_add_backend()
Create a new object database and automatically add\n the two default backends:
\n","comments":"- git_odb_backend_loose: read and write loose object files from disk, assuming `objects_dir` as the Objects folder\n\n- git_odb_backend_pack: read objects from packfiles, assuming `objects_dir` as the Objects folder which contains a 'pack/' folder with the corresponding data\n
\n","group":"odb"},"git_odb_add_disk_alternate":{"type":"function","file":"git2/odb.h","line":73,"lineto":73,"args":[{"name":"odb","type":"git_odb *","comment":"database to add the backend to"},{"name":"path","type":"const char *","comment":"path to the objects folder for the alternate"}],"argline":"git_odb *odb, const char *path","sig":"git_odb *::const char *","return":{"type":"int","comment":" 0 on success; error code otherwise"},"description":"Add an on-disk alternate to an existing Object DB.
\n","comments":"Note that the added path must point to an objects
, not to a full repository, to use it as an alternate store.
Alternate backends are always checked for objects after all the main backends have been exhausted.
\n\nWriting is disabled on alternate backends.
\n","group":"odb"},"git_odb_free":{"type":"function","file":"git2/odb.h","line":80,"lineto":80,"args":[{"name":"db","type":"git_odb *","comment":"database pointer to close. If NULL no action is taken."}],"argline":"git_odb *db","sig":"git_odb *","return":{"type":"void","comment":null},"description":"Close an open object database.
\n","comments":"","group":"odb","examples":{"cat-file.c":["ex/v0.21.3/cat-file.html#git_odb_free-20"]}},"git_odb_read":{"type":"function","file":"git2/odb.h","line":99,"lineto":99,"args":[{"name":"out","type":"git_odb_object **","comment":"pointer where to store the read object"},{"name":"db","type":"git_odb *","comment":"database to search for the object in."},{"name":"id","type":"const git_oid *","comment":"identity of the object to read."}],"argline":"git_odb_object **out, git_odb *db, const git_oid *id","sig":"git_odb_object **::git_odb *::const git_oid *","return":{"type":"int","comment":" - 0 if the object was read;\n - GIT_ENOTFOUND if the object is not in the database."},"description":"Read an object from the database.
\n","comments":"This method queries all available ODB backends trying to read the given OID.
\n\nThe returned object is reference counted and internally cached, so it should be closed by the user once it's no longer in use.
\n","group":"odb","examples":{"cat-file.c":["ex/v0.21.3/cat-file.html#git_odb_read-21"],"general.c":["ex/v0.21.3/general.html#git_odb_read-30"]}},"git_odb_exists":{"type":"function","file":"git2/odb.h","line":159,"lineto":159,"args":[{"name":"db","type":"git_odb *","comment":"database to be searched for the given object."},{"name":"id","type":"const git_oid *","comment":"the object to search for."}],"argline":"git_odb *db, const git_oid *id","sig":"git_odb *::const git_oid *","return":{"type":"int","comment":" - 1, if the object was found\n - 0, otherwise"},"description":"Determine if the given object can be found in the object database.
\n","comments":"","group":"odb"},"git_odb_refresh":{"type":"function","file":"git2/odb.h","line":192,"lineto":192,"args":[{"name":"db","type":"struct git_odb *","comment":"database to refresh"}],"argline":"struct git_odb *db","sig":"struct git_odb *","return":{"type":"int","comment":" 0 on success, error code otherwise"},"description":"Refresh the object database to load newly added files.
\n","comments":"If the object databases have changed on disk while the library is running, this function will force a reload of the underlying indexes.
\n\nUse this function when you're confident that an external application has tampered with the ODB.
\n\nNOTE that it is not necessary to call this function at all. The library will automatically attempt to refresh the ODB when a lookup fails, to see if the looked up object exists on disk but hasn't been loaded yet.
\n","group":"odb"},"git_odb_foreach":{"type":"function","file":"git2/odb.h","line":207,"lineto":207,"args":[{"name":"db","type":"git_odb *","comment":"database to use"},{"name":"cb","type":"git_odb_foreach_cb","comment":"the callback to call for each object"},{"name":"payload","type":"void *","comment":"data to pass to the callback"}],"argline":"git_odb *db, git_odb_foreach_cb cb, void *payload","sig":"git_odb *::git_odb_foreach_cb::void *","return":{"type":"int","comment":" 0 on success, non-zero callback return value, or error code"},"description":"List all objects available in the database
\n","comments":"The callback will be called for each object available in the database. Note that the objects are likely to be returned in the index order, which would make accessing the objects in that order inefficient. Return a non-zero value from the callback to stop looping.
\n","group":"odb"},"git_odb_stream_finalize_write":{"type":"function","file":"git2/odb.h","line":278,"lineto":278,"args":[{"name":"out","type":"git_oid *","comment":"pointer to store the resulting object's id"},{"name":"stream","type":"git_odb_stream *","comment":"the stream"}],"argline":"git_oid *out, git_odb_stream *stream","sig":"git_oid *::git_odb_stream *","return":{"type":"int","comment":" 0 on success; an error code otherwise"},"description":"Finish writing to an odb stream
\n","comments":"The object will take its final name and will be available to the odb.
\n\nThis method will fail if the total number of received bytes differs from the size declared with git_odb_open_wstream()
Free an odb stream
\n","comments":"","group":"odb"},"git_odb_open_rstream":{"type":"function","file":"git2/odb.h","line":318,"lineto":318,"args":[{"name":"out","type":"git_odb_stream **","comment":"pointer where to store the stream"},{"name":"db","type":"git_odb *","comment":"object database where the stream will read from"},{"name":"oid","type":"const git_oid *","comment":"oid of the object the stream will read from"}],"argline":"git_odb_stream **out, git_odb *db, const git_oid *oid","sig":"git_odb_stream **::git_odb *::const git_oid *","return":{"type":"int","comment":" 0 if the stream was created; error code otherwise"},"description":"Open a stream to read an object from the ODB
\n","comments":"Note that most backends do not support streaming reads because they store their objects as compressed/delta'ed blobs.
\n\nIt's recommended to use git_odb_read
instead, which is assured to work on all backends.
The returned stream will be of type GIT_STREAM_RDONLY
and will have the following methods:
- stream->read: read `n` bytes from the stream - stream->free: free the stream\n
\n\nThe stream must always be free'd or will leak memory.
\n","group":"odb"},"git_odb_write_pack":{"type":"function","file":"git2/odb.h","line":338,"lineto":342,"args":[{"name":"out","type":"git_odb_writepack **","comment":"pointer to the writepack functions"},{"name":"db","type":"git_odb *","comment":"object database where the stream will read from"},{"name":"progress_cb","type":"git_transfer_progress_cb","comment":"function to call with progress information.\n Be aware that this is called inline with network and indexing operations,\n so performance may be affected."},{"name":"progress_payload","type":"void *","comment":"payload for the progress callback"}],"argline":"git_odb_writepack **out, git_odb *db, git_transfer_progress_cb progress_cb, void *progress_payload","sig":"git_odb_writepack **::git_odb *::git_transfer_progress_cb::void *","return":{"type":"int","comment":null},"description":"Open a stream for writing a pack file to the ODB.
\n","comments":"If the ODB layer understands pack files, then the given packfile will likely be streamed directly to disk (and a corresponding index created). If the ODB layer does not understand pack files, the objects will be stored in whatever format the ODB layer uses.
\n","group":"odb"},"git_odb_hashfile":{"type":"function","file":"git2/odb.h","line":371,"lineto":371,"args":[{"name":"out","type":"git_oid *","comment":"oid structure the result is written into."},{"name":"path","type":"const char *","comment":"file to read and determine object id for"},{"name":"type","type":"git_otype","comment":"the type of the object that will be hashed"}],"argline":"git_oid *out, const char *path, git_otype type","sig":"git_oid *::const char *::git_otype","return":{"type":"int","comment":" 0 or an error code"},"description":"Read a file from disk and fill a git_oid with the object id\n that the file would have if it were written to the Object\n Database as an object of the given type (w/o applying filters).\n Similar functionality to git.git's git hash-object
without\n the -w
flag, however, with the --no-filters flag.\n If you need filters, see git_repository_hashfile.
Create a copy of an odb_object
\n","comments":"The returned copy must be manually freed with git_odb_object_free
. Note that because of an implementation detail, the returned copy will be the same pointer as source
: the object is internally refcounted, so the copy still needs to be freed twice.
Close an ODB object
\n","comments":"This method must always be called once a git_odb_object
is no longer needed, otherwise memory will leak.
Return the OID of an ODB object
\n","comments":"This is the OID from which the object was read from
\n","group":"odb"},"git_odb_object_data":{"type":"function","file":"git2/odb.h","line":418,"lineto":418,"args":[{"name":"object","type":"git_odb_object *","comment":"the object"}],"argline":"git_odb_object *object","sig":"git_odb_object *","return":{"type":"const void *","comment":" a pointer to the data"},"description":"Return the data of an ODB object
\n","comments":"This is the uncompressed, raw data as read from the ODB, without the leading header.
\n\nThis pointer is owned by the object and shall not be free'd.
\n","group":"odb","examples":{"general.c":["ex/v0.21.3/general.html#git_odb_object_data-32"]}},"git_odb_object_type":{"type":"function","file":"git2/odb.h","line":437,"lineto":437,"args":[{"name":"object","type":"git_odb_object *","comment":"the object"}],"argline":"git_odb_object *object","sig":"git_odb_object *","return":{"type":"git_otype","comment":" the type"},"description":"Return the type of an ODB object
\n","comments":"","group":"odb","examples":{"general.c":["ex/v0.21.3/general.html#git_odb_object_type-33"]}},"git_odb_add_backend":{"type":"function","file":"git2/odb.h","line":452,"lineto":452,"args":[{"name":"odb","type":"git_odb *","comment":"database to add the backend to"},{"name":"backend","type":"git_odb_backend *","comment":"pointer to a git_odb_backend instance"},{"name":"priority","type":"int","comment":"Value for ordering the backends queue"}],"argline":"git_odb *odb, git_odb_backend *backend, int priority","sig":"git_odb *::git_odb_backend *::int","return":{"type":"int","comment":" 0 on success; error code otherwise"},"description":"Add a custom backend to an existing Object DB
\n","comments":"The backends are checked in relative ordering, based on the value of the priority
parameter.
Read
Add a custom backend to an existing Object DB; this\n backend will work as an alternate.
\n","comments":"Alternate backends are always checked for objects after all the main backends have been exhausted.
\n\nThe backends are checked in relative ordering, based on the value of the priority
parameter.
Writing is disabled on alternate backends.
\n\nRead
Create a backend for the packfiles.
\n","comments":"","group":"odb"},"git_odb_backend_loose":{"type":"function","file":"git2/odb_backend.h","line":48,"lineto":54,"args":[{"name":"out","type":"git_odb_backend **","comment":"location to store the odb backend pointer"},{"name":"objects_dir","type":"const char *","comment":"the Git repository's objects directory"},{"name":"compression_level","type":"int","comment":"zlib compression level to use"},{"name":"do_fsync","type":"int","comment":"whether to do an fsync() after writing (currently ignored)"},{"name":"dir_mode","type":"unsigned int","comment":"permissions to use creating a directory or 0 for defaults"},{"name":"file_mode","type":"unsigned int","comment":"permissions to use creating a file or 0 for defaults"}],"argline":"git_odb_backend **out, const char *objects_dir, int compression_level, int do_fsync, unsigned int dir_mode, unsigned int file_mode","sig":"git_odb_backend **::const char *::int::int::unsigned int::unsigned int","return":{"type":"int","comment":" 0 or an error code"},"description":"Create a backend for loose objects
\n","comments":"","group":"odb"},"git_odb_backend_one_pack":{"type":"function","file":"git2/odb_backend.h","line":67,"lineto":67,"args":[{"name":"out","type":"git_odb_backend **","comment":"location to store the odb backend pointer"},{"name":"index_file","type":"const char *","comment":"path to the packfile's .idx file"}],"argline":"git_odb_backend **out, const char *index_file","sig":"git_odb_backend **::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Create a backend out of a single packfile
\n","comments":"This can be useful for inspecting the contents of a single packfile.
\n","group":"odb"},"git_oid_fromstr":{"type":"function","file":"git2/oid.h","line":47,"lineto":47,"args":[{"name":"out","type":"git_oid *","comment":"oid structure the result is written into."},{"name":"str","type":"const char *","comment":"input hex string; must be pointing at the start of\n\t\tthe hex sequence and have at least the number of bytes\n\t\tneeded for an oid encoded in hex (40 bytes)."}],"argline":"git_oid *out, const char *str","sig":"git_oid *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Parse a hex formatted object id into a git_oid.
\n","comments":"","group":"oid","examples":{"general.c":["ex/v0.21.3/general.html#git_oid_fromstr-34","ex/v0.21.3/general.html#git_oid_fromstr-35","ex/v0.21.3/general.html#git_oid_fromstr-36","ex/v0.21.3/general.html#git_oid_fromstr-37","ex/v0.21.3/general.html#git_oid_fromstr-38","ex/v0.21.3/general.html#git_oid_fromstr-39","ex/v0.21.3/general.html#git_oid_fromstr-40","ex/v0.21.3/general.html#git_oid_fromstr-41"]}},"git_oid_fromstrp":{"type":"function","file":"git2/oid.h","line":57,"lineto":57,"args":[{"name":"out","type":"git_oid *","comment":"oid structure the result is written into."},{"name":"str","type":"const char *","comment":"input hex string; must be at least 4 characters\n long and null-terminated."}],"argline":"git_oid *out, const char *str","sig":"git_oid *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Parse a hex formatted null-terminated string into a git_oid.
\n","comments":"","group":"oid"},"git_oid_fromraw":{"type":"function","file":"git2/oid.h","line":78,"lineto":78,"args":[{"name":"out","type":"git_oid *","comment":"oid structure the result is written into."},{"name":"raw","type":"const unsigned char *","comment":"the raw input bytes to be copied."}],"argline":"git_oid *out, const unsigned char *raw","sig":"git_oid *::const unsigned char *","return":{"type":"void","comment":null},"description":"Copy an already raw oid into a git_oid structure.
\n","comments":"","group":"oid"},"git_oid_fmt":{"type":"function","file":"git2/oid.h","line":90,"lineto":90,"args":[{"name":"out","type":"char *","comment":"output hex string; must be pointing at the start of\n\t\tthe hex sequence and have at least the number of bytes\n\t\tneeded for an oid encoded in hex (40 bytes). Only the\n\t\toid digits are written; a '\n\\\n0' terminator must be added\n\t\tby the caller if it is required."},{"name":"id","type":"const git_oid *","comment":"oid structure to format."}],"argline":"char *out, const git_oid *id","sig":"char *::const git_oid *","return":{"type":"void","comment":null},"description":"Format a git_oid into a hex string.
\n","comments":"","group":"oid","examples":{"general.c":["ex/v0.21.3/general.html#git_oid_fmt-42","ex/v0.21.3/general.html#git_oid_fmt-43","ex/v0.21.3/general.html#git_oid_fmt-44","ex/v0.21.3/general.html#git_oid_fmt-45","ex/v0.21.3/general.html#git_oid_fmt-46"],"network/fetch.c":["ex/v0.21.3/network/fetch.html#git_oid_fmt-1","ex/v0.21.3/network/fetch.html#git_oid_fmt-2"],"network/index-pack.c":["ex/v0.21.3/network/index-pack.html#git_oid_fmt-5"],"network/ls-remote.c":["ex/v0.21.3/network/ls-remote.html#git_oid_fmt-1"]}},"git_oid_pathfmt":{"type":"function","file":"git2/oid.h","line":116,"lineto":116,"args":[{"name":"out","type":"char *","comment":"output hex string; must be pointing at the start of\n\t\tthe hex sequence and have at least the number of bytes\n\t\tneeded for an oid encoded in hex (41 bytes). Only the\n\t\toid digits are written; a '\n\\\n0' terminator must be added\n\t\tby the caller if it is required."},{"name":"id","type":"const git_oid *","comment":"oid structure to format."}],"argline":"char *out, const git_oid *id","sig":"char *::const git_oid *","return":{"type":"void","comment":null},"description":"Format a git_oid into a loose-object path string.
\n","comments":"The resulting string is "aa/...", where "aa" is the first two hex digits of the oid and "..." is the remaining 38 digits.
\n","group":"oid"},"git_oid_allocfmt":{"type":"function","file":"git2/oid.h","line":125,"lineto":125,"args":[{"name":"id","type":"const git_oid *","comment":"the oid structure to format"}],"argline":"const git_oid *id","sig":"const git_oid *","return":{"type":"char *","comment":" the c-string; NULL if memory is exhausted. Caller must\n\t\t\tdeallocate the string with git__free()."},"description":"Format a git_oid into a newly allocated c-string.
\n","comments":"","group":"oid"},"git_oid_cpy":{"type":"function","file":"git2/oid.h","line":152,"lineto":152,"args":[{"name":"out","type":"git_oid *","comment":"oid structure the result is written into."},{"name":"src","type":"const git_oid *","comment":"oid structure to copy from."}],"argline":"git_oid *out, const git_oid *src","sig":"git_oid *::const git_oid *","return":{"type":"void","comment":null},"description":"Copy an oid from one structure to another.
\n","comments":"","group":"oid","examples":{"blame.c":["ex/v0.21.3/blame.html#git_oid_cpy-16","ex/v0.21.3/blame.html#git_oid_cpy-17","ex/v0.21.3/blame.html#git_oid_cpy-18"]}},"git_oid_cmp":{"type":"function","file":"git2/oid.h","line":161,"lineto":161,"args":[{"name":"a","type":"const git_oid *","comment":"first oid structure."},{"name":"b","type":"const git_oid *","comment":"second oid structure."}],"argline":"const git_oid *a, const git_oid *b","sig":"const git_oid *::const git_oid *","return":{"type":"int","comment":" \n<\n0, 0, >0 if a \n<\n b, a == b, a > b."},"description":"Compare two oid structures.
\n","comments":"","group":"oid"},"git_oid_equal":{"type":"function","file":"git2/oid.h","line":170,"lineto":170,"args":[{"name":"a","type":"const git_oid *","comment":"first oid structure."},{"name":"b","type":"const git_oid *","comment":"second oid structure."}],"argline":"const git_oid *a, const git_oid *b","sig":"const git_oid *::const git_oid *","return":{"type":"int","comment":" true if equal, false otherwise"},"description":"Compare two oid structures for equality
\n","comments":"","group":"oid"},"git_oid_streq":{"type":"function","file":"git2/oid.h","line":190,"lineto":190,"args":[{"name":"id","type":"const git_oid *","comment":"oid structure."},{"name":"str","type":"const char *","comment":"input hex string of an object id."}],"argline":"const git_oid *id, const char *str","sig":"const git_oid *::const char *","return":{"type":"int","comment":" 0 in case of a match, -1 otherwise."},"description":"Check if an oid equals an hex formatted object id.
\n","comments":"","group":"oid"},"git_oid_strcmp":{"type":"function","file":"git2/oid.h","line":200,"lineto":200,"args":[{"name":"id","type":"const git_oid *","comment":"oid structure."},{"name":"str","type":"const char *","comment":"input hex string of an object id."}],"argline":"const git_oid *id, const char *str","sig":"const git_oid *::const char *","return":{"type":"int","comment":" -1 if str is not valid, \n<\n0 if id sorts before str,\n 0 if id matches str, >0 if id sorts after str."},"description":"Compare an oid to an hex formatted object id.
\n","comments":"","group":"oid"},"git_oid_iszero":{"type":"function","file":"git2/oid.h","line":207,"lineto":207,"args":[{"name":"id","type":"const git_oid *","comment":null}],"argline":"const git_oid *id","sig":"const git_oid *","return":{"type":"int","comment":" 1 if all zeros, 0 otherwise."},"description":"Check is an oid is all zeros.
\n","comments":"","group":"oid","examples":{"blame.c":["ex/v0.21.3/blame.html#git_oid_iszero-19"],"network/fetch.c":["ex/v0.21.3/network/fetch.html#git_oid_iszero-3"]}},"git_oid_shorten_add":{"type":"function","file":"git2/oid.h","line":254,"lineto":254,"args":[{"name":"os","type":"git_oid_shorten *","comment":"a `git_oid_shorten` instance"},{"name":"text_id","type":"const char *","comment":"an OID in text form"}],"argline":"git_oid_shorten *os, const char *text_id","sig":"git_oid_shorten *::const char *","return":{"type":"int","comment":" the minimal length to uniquely identify all OIDs\n\t\tadded so far to the set; or an error code (\n<\n0) if an\n\t\terror occurs."},"description":"Add a new OID to set of shortened OIDs and calculate\n the minimal length to uniquely identify all the OIDs in\n the set.
\n","comments":"The OID is expected to be a 40-char hexadecimal string. The OID is owned by the user and will not be modified or freed.
\n\nFor performance reasons, there is a hard-limit of how many OIDs can be added to a single set (around ~32000, assuming a mostly randomized distribution), which should be enough for any kind of program, and keeps the algorithm fast and memory-efficient.
\n\nAttempting to add more than those OIDs will result in a GITERR_INVALID error
\n","group":"oid"},"git_oid_shorten_free":{"type":"function","file":"git2/oid.h","line":261,"lineto":261,"args":[{"name":"os","type":"git_oid_shorten *","comment":"a `git_oid_shorten` instance"}],"argline":"git_oid_shorten *os","sig":"git_oid_shorten *","return":{"type":"void","comment":null},"description":"Free an OID shortener instance
\n","comments":"","group":"oid"},"git_packbuilder_new":{"type":"function","file":"git2/pack.h","line":64,"lineto":64,"args":[{"name":"out","type":"git_packbuilder **","comment":"The new packbuilder object"},{"name":"repo","type":"git_repository *","comment":"The repository"}],"argline":"git_packbuilder **out, git_repository *repo","sig":"git_packbuilder **::git_repository *","return":{"type":"int","comment":" 0 or an error code"},"description":"Initialize a new packbuilder
\n","comments":"","group":"packbuilder"},"git_packbuilder_set_threads":{"type":"function","file":"git2/pack.h","line":77,"lineto":77,"args":[{"name":"pb","type":"git_packbuilder *","comment":"The packbuilder"},{"name":"n","type":"unsigned int","comment":"Number of threads to spawn"}],"argline":"git_packbuilder *pb, unsigned int n","sig":"git_packbuilder *::unsigned int","return":{"type":"unsigned int","comment":" number of actual threads to be used"},"description":"Set number of threads to spawn
\n","comments":"By default, libgit2 won't spawn any threads at all; when set to 0, libgit2 will autodetect the number of CPUs.
\n","group":"packbuilder"},"git_packbuilder_insert":{"type":"function","file":"git2/pack.h","line":91,"lineto":91,"args":[{"name":"pb","type":"git_packbuilder *","comment":"The packbuilder"},{"name":"id","type":"const git_oid *","comment":"The oid of the commit"},{"name":"name","type":"const char *","comment":"The name; might be NULL"}],"argline":"git_packbuilder *pb, const git_oid *id, const char *name","sig":"git_packbuilder *::const git_oid *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Insert a single object
\n","comments":"For an optimal pack it's mandatory to insert objects in recency order, commits followed by trees and blobs.
\n","group":"packbuilder"},"git_packbuilder_insert_tree":{"type":"function","file":"git2/pack.h","line":103,"lineto":103,"args":[{"name":"pb","type":"git_packbuilder *","comment":"The packbuilder"},{"name":"id","type":"const git_oid *","comment":"The oid of the root tree"}],"argline":"git_packbuilder *pb, const git_oid *id","sig":"git_packbuilder *::const git_oid *","return":{"type":"int","comment":" 0 or an error code"},"description":"Insert a root tree object
\n","comments":"This will add the tree as well as all referenced trees and blobs.
\n","group":"packbuilder"},"git_packbuilder_insert_commit":{"type":"function","file":"git2/pack.h","line":115,"lineto":115,"args":[{"name":"pb","type":"git_packbuilder *","comment":"The packbuilder"},{"name":"id","type":"const git_oid *","comment":"The oid of the commit"}],"argline":"git_packbuilder *pb, const git_oid *id","sig":"git_packbuilder *::const git_oid *","return":{"type":"int","comment":" 0 or an error code"},"description":"Insert a commit object
\n","comments":"This will add a commit as well as the completed referenced tree.
\n","group":"packbuilder"},"git_packbuilder_write":{"type":"function","file":"git2/pack.h","line":139,"lineto":144,"args":[{"name":"pb","type":"git_packbuilder *","comment":"The packbuilder"},{"name":"path","type":"const char *","comment":"to the directory where the packfile and index should be stored"},{"name":"mode","type":"unsigned int","comment":"permissions to use creating a packfile or 0 for defaults"},{"name":"progress_cb","type":"git_transfer_progress_cb","comment":"function to call with progress information from the indexer (optional)"},{"name":"progress_cb_payload","type":"void *","comment":"payload for the progress callback (optional)"}],"argline":"git_packbuilder *pb, const char *path, unsigned int mode, git_transfer_progress_cb progress_cb, void *progress_cb_payload","sig":"git_packbuilder *::const char *::unsigned int::git_transfer_progress_cb::void *","return":{"type":"int","comment":" 0 or an error code"},"description":"Write the new pack and corresponding index file to path.
\n","comments":"","group":"packbuilder"},"git_packbuilder_hash":{"type":"function","file":"git2/pack.h","line":154,"lineto":154,"args":[{"name":"pb","type":"git_packbuilder *","comment":"The packbuilder object"}],"argline":"git_packbuilder *pb","sig":"git_packbuilder *","return":{"type":"const git_oid *","comment":null},"description":"Get the packfile's hash
\n","comments":"A packfile's name is derived from the sorted hashing of all object names. This is only correct after the packfile has been written.
\n","group":"packbuilder"},"git_packbuilder_foreach":{"type":"function","file":"git2/pack.h","line":166,"lineto":166,"args":[{"name":"pb","type":"git_packbuilder *","comment":"the packbuilder"},{"name":"cb","type":"git_packbuilder_foreach_cb","comment":"the callback to call with each packed object's buffer"},{"name":"payload","type":"void *","comment":"the callback's data"}],"argline":"git_packbuilder *pb, git_packbuilder_foreach_cb cb, void *payload","sig":"git_packbuilder *::git_packbuilder_foreach_cb::void *","return":{"type":"int","comment":" 0 or an error code"},"description":"Create the new pack and pass each object to the callback
\n","comments":"","group":"packbuilder"},"git_packbuilder_object_count":{"type":"function","file":"git2/pack.h","line":174,"lineto":174,"args":[{"name":"pb","type":"git_packbuilder *","comment":"the packbuilder"}],"argline":"git_packbuilder *pb","sig":"git_packbuilder *","return":{"type":"uint32_t","comment":" the number of objects in the packfile"},"description":"Get the total number of objects the packbuilder will write out
\n","comments":"","group":"packbuilder"},"git_packbuilder_written":{"type":"function","file":"git2/pack.h","line":182,"lineto":182,"args":[{"name":"pb","type":"git_packbuilder *","comment":"the packbuilder"}],"argline":"git_packbuilder *pb","sig":"git_packbuilder *","return":{"type":"uint32_t","comment":" the number of objects which have already been written"},"description":"Get the number of objects the packbuilder has already written out
\n","comments":"","group":"packbuilder"},"git_packbuilder_set_callbacks":{"type":"function","file":"git2/pack.h","line":201,"lineto":204,"args":[{"name":"pb","type":"git_packbuilder *","comment":"The packbuilder object"},{"name":"progress_cb","type":"git_packbuilder_progress","comment":"Function to call with progress information during\n pack building. Be aware that this is called inline with pack building\n operations, so performance may be affected."},{"name":"progress_cb_payload","type":"void *","comment":"Payload for progress callback."}],"argline":"git_packbuilder *pb, git_packbuilder_progress progress_cb, void *progress_cb_payload","sig":"git_packbuilder *::git_packbuilder_progress::void *","return":{"type":"int","comment":" 0 or an error code"},"description":"Set the callbacks for a packbuilder
\n","comments":"","group":"packbuilder"},"git_packbuilder_free":{"type":"function","file":"git2/pack.h","line":211,"lineto":211,"args":[{"name":"pb","type":"git_packbuilder *","comment":"The packbuilder"}],"argline":"git_packbuilder *pb","sig":"git_packbuilder *","return":{"type":"void","comment":null},"description":"Free the packbuilder and all associated data
\n","comments":"","group":"packbuilder"},"git_patch_from_blobs":{"type":"function","file":"git2/patch.h","line":74,"lineto":80,"args":[{"name":"out","type":"git_patch **","comment":"The generated patch; NULL on error"},{"name":"old_blob","type":"const git_blob *","comment":"Blob for old side of diff, or NULL for empty blob"},{"name":"old_as_path","type":"const char *","comment":"Treat old blob as if it had this filename; can be NULL"},{"name":"new_blob","type":"const git_blob *","comment":"Blob for new side of diff, or NULL for empty blob"},{"name":"new_as_path","type":"const char *","comment":"Treat new blob as if it had this filename; can be NULL"},{"name":"opts","type":"const git_diff_options *","comment":"Options for diff, or NULL for default options"}],"argline":"git_patch **out, const git_blob *old_blob, const char *old_as_path, const git_blob *new_blob, const char *new_as_path, const git_diff_options *opts","sig":"git_patch **::const git_blob *::const char *::const git_blob *::const char *::const git_diff_options *","return":{"type":"int","comment":" 0 on success or error code \n<\n 0"},"description":"Directly generate a patch from the difference between two blobs.
\n","comments":"This is just like git_diff_blobs()
except it generates a patch object for the difference instead of directly making callbacks. You can use the standard git_patch
accessor functions to read the patch data, and you must call git_patch_free()
on the patch when done.
Free a git_patch object.
\n","comments":"","group":"patch"},"git_patch_get_delta":{"type":"function","file":"git2/patch.h","line":144,"lineto":144,"args":[{"name":"patch","type":"const git_patch *","comment":null}],"argline":"const git_patch *patch","sig":"const git_patch *","return":{"type":"const git_diff_delta *","comment":null},"description":"Get the delta associated with a patch
\n","comments":"","group":"patch"},"git_patch_print":{"type":"function","file":"git2/patch.h","line":257,"lineto":260,"args":[{"name":"patch","type":"git_patch *","comment":"A git_patch representing changes to one file"},{"name":"print_cb","type":"git_diff_line_cb","comment":"Callback function to output lines of the patch. Will be\n called for file headers, hunk headers, and diff lines."},{"name":"payload","type":"void *","comment":"Reference pointer that will be passed to your callbacks."}],"argline":"git_patch *patch, git_diff_line_cb print_cb, void *payload","sig":"git_patch *::git_diff_line_cb::void *","return":{"type":"int","comment":" 0 on success, non-zero callback return value, or error code"},"description":"Serialize the patch to text via callback.
\n","comments":"Returning a non-zero value from the callback will terminate the iteration and return that value to the caller.
\n","group":"patch"},"git_patch_to_buf":{"type":"function","file":"git2/patch.h","line":269,"lineto":271,"args":[{"name":"out","type":"git_buf *","comment":"The git_buf to be filled in"},{"name":"patch","type":"git_patch *","comment":"A git_patch representing changes to one file"}],"argline":"git_buf *out, git_patch *patch","sig":"git_buf *::git_patch *","return":{"type":"int","comment":" 0 on success, \n<\n0 on failure."},"description":"Get the content of a patch as a single diff text.
\n","comments":"","group":"patch"},"git_pathspec_new":{"type":"function","file":"git2/pathspec.h","line":65,"lineto":66,"args":[{"name":"out","type":"git_pathspec **","comment":"Output of the compiled pathspec"},{"name":"pathspec","type":"const git_strarray *","comment":"A git_strarray of the paths to match"}],"argline":"git_pathspec **out, const git_strarray *pathspec","sig":"git_pathspec **::const git_strarray *","return":{"type":"int","comment":" 0 on success, \n<\n0 on failure"},"description":"Compile a pathspec
\n","comments":"","group":"pathspec","examples":{"log.c":["ex/v0.21.3/log.html#git_pathspec_new-36"]}},"git_pathspec_free":{"type":"function","file":"git2/pathspec.h","line":73,"lineto":73,"args":[{"name":"ps","type":"git_pathspec *","comment":"The compiled pathspec"}],"argline":"git_pathspec *ps","sig":"git_pathspec *","return":{"type":"void","comment":null},"description":"Free a pathspec
\n","comments":"","group":"pathspec","examples":{"log.c":["ex/v0.21.3/log.html#git_pathspec_free-37"]}},"git_pathspec_matches_path":{"type":"function","file":"git2/pathspec.h","line":88,"lineto":89,"args":[{"name":"ps","type":"const git_pathspec *","comment":"The compiled pathspec"},{"name":"flags","type":"uint32_t","comment":"Combination of git_pathspec_flag_t options to control match"},{"name":"path","type":"const char *","comment":"The pathname to attempt to match"}],"argline":"const git_pathspec *ps, uint32_t flags, const char *path","sig":"const git_pathspec *::uint32_t::const char *","return":{"type":"int","comment":" 1 is path matches spec, 0 if it does not"},"description":"Try to match a path against a pathspec
\n","comments":"Unlike most of the other pathspec matching functions, this will not fall back on the native case-sensitivity for your platform. You must explicitly pass flags to control case sensitivity or else this will fall back on being case sensitive.
\n","group":"pathspec"},"git_pathspec_match_workdir":{"type":"function","file":"git2/pathspec.h","line":113,"lineto":117,"args":[{"name":"out","type":"git_pathspec_match_list **","comment":"Output list of matches; pass NULL to just get return value"},{"name":"repo","type":"git_repository *","comment":"The repository in which to match; bare repo is an error"},{"name":"flags","type":"uint32_t","comment":"Combination of git_pathspec_flag_t options to control match"},{"name":"ps","type":"git_pathspec *","comment":"Pathspec to be matched"}],"argline":"git_pathspec_match_list **out, git_repository *repo, uint32_t flags, git_pathspec *ps","sig":"git_pathspec_match_list **::git_repository *::uint32_t::git_pathspec *","return":{"type":"int","comment":" 0 on success, -1 on error, GIT_ENOTFOUND if no matches and\n the GIT_PATHSPEC_NO_MATCH_ERROR flag was given"},"description":"Match a pathspec against the working directory of a repository.
\n","comments":"This matches the pathspec against the current files in the working directory of the repository. It is an error to invoke this on a bare repo. This handles git ignores (i.e. ignored files will not be considered to match the pathspec
unless the file is tracked in the index).
If out
is not NULL, this returns a git_patchspec_match_list
. That contains the list of all matched filenames (unless you pass the GIT_PATHSPEC_FAILURES_ONLY
flag) and may also contain the list of pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES
flag). You must call git_pathspec_match_list_free()
on this object.
Match a pathspec against entries in an index.
\n","comments":"This matches the pathspec against the files in the repository index.
\n\nNOTE: At the moment, the case sensitivity of this match is controlled by the current case-sensitivity of the index object itself and the USE_CASE and IGNORE_CASE flags will have no effect. This behavior will be corrected in a future release.
\n\nIf out
is not NULL, this returns a git_patchspec_match_list
. That contains the list of all matched filenames (unless you pass the GIT_PATHSPEC_FAILURES_ONLY
flag) and may also contain the list of pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES
flag). You must call git_pathspec_match_list_free()
on this object.
Match a pathspec against files in a tree.
\n","comments":"This matches the pathspec against the files in the given tree.
\n\nIf out
is not NULL, this returns a git_patchspec_match_list
. That contains the list of all matched filenames (unless you pass the GIT_PATHSPEC_FAILURES_ONLY
flag) and may also contain the list of pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES
flag). You must call git_pathspec_match_list_free()
on this object.
Match a pathspec against files in a diff list.
\n","comments":"This matches the pathspec against the files in the given diff list.
\n\nIf out
is not NULL, this returns a git_patchspec_match_list
. That contains the list of all matched filenames (unless you pass the GIT_PATHSPEC_FAILURES_ONLY
flag) and may also contain the list of pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES
flag). You must call git_pathspec_match_list_free()
on this object.
Free memory associates with a git_pathspec_match_list
\n","comments":"","group":"pathspec"},"git_push_init_options":{"type":"function","file":"git2/push.h","line":51,"lineto":53,"args":[{"name":"opts","type":"git_push_options *","comment":"the `git_push_options` instance to initialize."},{"name":"version","type":"unsigned int","comment":"the version of the struct; you should pass\n `GIT_PUSH_OPTIONS_VERSION` here."}],"argline":"git_push_options *opts, unsigned int version","sig":"git_push_options *::unsigned int","return":{"type":"int","comment":" Zero on success; -1 on failure."},"description":"Initializes a git_push_options
with default values. Equivalent to\n creating an instance with GIT_PUSH_OPTIONS_INIT.
Create a new push object
\n","comments":"","group":"push"},"git_push_set_options":{"type":"function","file":"git2/push.h","line":80,"lineto":82,"args":[{"name":"push","type":"git_push *","comment":"The push object"},{"name":"opts","type":"const git_push_options *","comment":"The options to set on the push object"}],"argline":"git_push *push, const git_push_options *opts","sig":"git_push *::const git_push_options *","return":{"type":"int","comment":" 0 or an error code"},"description":"Set options on a push object
\n","comments":"","group":"push"},"git_push_set_callbacks":{"type":"function","file":"git2/push.h","line":98,"lineto":103,"args":[{"name":"push","type":"git_push *","comment":"The push object"},{"name":"pack_progress_cb","type":"git_packbuilder_progress","comment":"Function to call with progress information during\n pack building. Be aware that this is called inline with pack building\n operations, so performance may be affected."},{"name":"pack_progress_cb_payload","type":"void *","comment":"Payload for the pack progress callback."},{"name":"transfer_progress_cb","type":"git_push_transfer_progress","comment":"Function to call with progress information during\n the upload portion of a push. Be aware that this is called inline with\n pack building operations, so performance may be affected."},{"name":"transfer_progress_cb_payload","type":"void *","comment":"Payload for the network progress callback."}],"argline":"git_push *push, git_packbuilder_progress pack_progress_cb, void *pack_progress_cb_payload, git_push_transfer_progress transfer_progress_cb, void *transfer_progress_cb_payload","sig":"git_push *::git_packbuilder_progress::void *::git_push_transfer_progress::void *","return":{"type":"int","comment":" 0 or an error code"},"description":"Set the callbacks for a push
\n","comments":"","group":"push"},"git_push_add_refspec":{"type":"function","file":"git2/push.h","line":113,"lineto":113,"args":[{"name":"push","type":"git_push *","comment":"The push object"},{"name":"refspec","type":"const char *","comment":"Refspec string"}],"argline":"git_push *push, const char *refspec","sig":"git_push *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Add a refspec to be pushed
\n","comments":"","group":"push"},"git_push_update_tips":{"type":"function","file":"git2/push.h","line":125,"lineto":128,"args":[{"name":"push","type":"git_push *","comment":"The push object"},{"name":"signature","type":"const git_signature *","comment":"The identity to use when updating reflogs"},{"name":"reflog_message","type":"const char *","comment":"The message to insert into the reflogs. If NULL, the\n default is \"update by push\"."}],"argline":"git_push *push, const git_signature *signature, const char *reflog_message","sig":"git_push *::const git_signature *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Update remote tips after a push
\n","comments":"","group":"push"},"git_push_finish":{"type":"function","file":"git2/push.h","line":142,"lineto":142,"args":[{"name":"push","type":"git_push *","comment":"The push object"}],"argline":"git_push *push","sig":"git_push *","return":{"type":"int","comment":" 0 or an error code"},"description":"Actually push all given refspecs
\n","comments":"Note: To check if the push was successful (i.e. all remote references have been updated as requested), you need to call both git_push_unpack_ok
and git_push_status_foreach
. The remote repository might have refused to update some or all of the references.
Check if remote side successfully unpacked
\n","comments":"","group":"push"},"git_push_status_foreach":{"type":"function","file":"git2/push.h","line":168,"lineto":170,"args":[{"name":"push","type":"git_push *","comment":"The push object"},{"name":"cb","type":"int (*)(const char *, const char *, void *)","comment":"The callback to call on each object"},{"name":"data","type":"void *","comment":null}],"argline":"git_push *push, int (*)(const char *, const char *, void *) cb, void *data","sig":"git_push *::int (*)(const char *, const char *, void *)::void *","return":{"type":"int","comment":" 0 on success, non-zero callback return value, or error code"},"description":"Invoke callback `cb' on each status entry
\n","comments":"For each of the updated references, we receive a status report in the form of ok refs/heads/master
or ng refs/heads/master <msg>
. msg != NULL
means the reference has not been updated for the given reason.
Return a non-zero value from the callback to stop the loop.
\n","group":"push"},"git_push_free":{"type":"function","file":"git2/push.h","line":177,"lineto":177,"args":[{"name":"push","type":"git_push *","comment":"The push object"}],"argline":"git_push *push","sig":"git_push *","return":{"type":"void","comment":null},"description":"Free the given push object
\n","comments":"","group":"push"},"git_refdb_new":{"type":"function","file":"git2/refdb.h","line":35,"lineto":35,"args":[{"name":"out","type":"git_refdb **","comment":"location to store the database pointer, if opened.\n\t\t\tSet to NULL if the open failed."},{"name":"repo","type":"git_repository *","comment":"the repository"}],"argline":"git_refdb **out, git_repository *repo","sig":"git_refdb **::git_repository *","return":{"type":"int","comment":" 0 or an error code"},"description":"Create a new reference database with no backends.
\n","comments":"Before the Ref DB can be used for read/writing, a custom database backend must be manually set using git_refdb_set_backend()
Create a new reference database and automatically add\n the default backends:
\n","comments":"Suggests that the given refdb compress or optimize its references.\n This mechanism is implementation specific. For on-disk reference\n databases, for example, this may pack all loose references.
\n","comments":"","group":"refdb"},"git_refdb_free":{"type":"function","file":"git2/refdb.h","line":63,"lineto":63,"args":[{"name":"refdb","type":"git_refdb *","comment":"reference database pointer or NULL"}],"argline":"git_refdb *refdb","sig":"git_refdb *","return":{"type":"void","comment":null},"description":"Close an open reference database.
\n","comments":"","group":"refdb"},"git_reflog_read":{"type":"function","file":"git2/reflog.h","line":38,"lineto":38,"args":[{"name":"out","type":"git_reflog **","comment":"pointer to reflog"},{"name":"repo","type":"git_repository *","comment":"the repostiory"},{"name":"name","type":"const char *","comment":"reference to look up"}],"argline":"git_reflog **out, git_repository *repo, const char *name","sig":"git_reflog **::git_repository *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Read the reflog for the given reference
\n","comments":"If there is no reflog file for the given reference yet, an empty reflog object will be returned.
\n\nThe reflog must be freed manually by using git_reflog_free().
\n","group":"reflog"},"git_reflog_write":{"type":"function","file":"git2/reflog.h","line":47,"lineto":47,"args":[{"name":"reflog","type":"git_reflog *","comment":"an existing reflog object"}],"argline":"git_reflog *reflog","sig":"git_reflog *","return":{"type":"int","comment":" 0 or an error code"},"description":"Write an existing in-memory reflog object back to disk\n using an atomic file lock.
\n","comments":"","group":"reflog"},"git_reflog_append":{"type":"function","file":"git2/reflog.h","line":60,"lineto":60,"args":[{"name":"reflog","type":"git_reflog *","comment":"an existing reflog object"},{"name":"id","type":"const git_oid *","comment":"the OID the reference is now pointing to"},{"name":"committer","type":"const git_signature *","comment":"the signature of the committer"},{"name":"msg","type":"const char *","comment":"the reflog message"}],"argline":"git_reflog *reflog, const git_oid *id, const git_signature *committer, const char *msg","sig":"git_reflog *::const git_oid *::const git_signature *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Add a new entry to the in-memory reflog.
\n","comments":"msg
is optional and can be NULL.
Rename a reflog
\n","comments":"The reflog to be renamed is expected to already exist
\n\nThe new name will be checked for validity. See git_reference_create_symbolic()
for rules about valid names.
Delete the reflog for the given reference
\n","comments":"","group":"reflog"},"git_reflog_entry_id_old":{"type":"function","file":"git2/reflog.h","line":135,"lineto":135,"args":[{"name":"entry","type":"const git_reflog_entry *","comment":"a reflog entry"}],"argline":"const git_reflog_entry *entry","sig":"const git_reflog_entry *","return":{"type":"const git_oid *","comment":" the old oid"},"description":"Get the old oid
\n","comments":"","group":"reflog"},"git_reflog_entry_id_new":{"type":"function","file":"git2/reflog.h","line":143,"lineto":143,"args":[{"name":"entry","type":"const git_reflog_entry *","comment":"a reflog entry"}],"argline":"const git_reflog_entry *entry","sig":"const git_reflog_entry *","return":{"type":"const git_oid *","comment":" the new oid at this time"},"description":"Get the new oid
\n","comments":"","group":"reflog"},"git_reflog_entry_committer":{"type":"function","file":"git2/reflog.h","line":151,"lineto":151,"args":[{"name":"entry","type":"const git_reflog_entry *","comment":"a reflog entry"}],"argline":"const git_reflog_entry *entry","sig":"const git_reflog_entry *","return":{"type":"const git_signature *","comment":" the committer"},"description":"Get the committer of this entry
\n","comments":"","group":"reflog"},"git_reflog_entry_message":{"type":"function","file":"git2/reflog.h","line":159,"lineto":159,"args":[{"name":"entry","type":"const git_reflog_entry *","comment":"a reflog entry"}],"argline":"const git_reflog_entry *entry","sig":"const git_reflog_entry *","return":{"type":"const char *","comment":" the log msg"},"description":"Get the log message
\n","comments":"","group":"reflog"},"git_reflog_free":{"type":"function","file":"git2/reflog.h","line":166,"lineto":166,"args":[{"name":"reflog","type":"git_reflog *","comment":"reflog to free"}],"argline":"git_reflog *reflog","sig":"git_reflog *","return":{"type":"void","comment":null},"description":"Free the reflog
\n","comments":"","group":"reflog"},"git_reference_lookup":{"type":"function","file":"git2/refs.h","line":37,"lineto":37,"args":[{"name":"out","type":"git_reference **","comment":"pointer to the looked-up reference"},{"name":"repo","type":"git_repository *","comment":"the repository to look up the reference"},{"name":"name","type":"const char *","comment":"the long name for the reference (e.g. HEAD, refs/heads/master, refs/tags/v0.1.0, ...)"}],"argline":"git_reference **out, git_repository *repo, const char *name","sig":"git_reference **::git_repository *::const char *","return":{"type":"int","comment":" 0 on success, GIT_ENOTFOUND, GIT_EINVALIDSPEC or an error code."},"description":"Lookup a reference by name in a repository.
\n","comments":"The returned reference must be freed by the user.
\n\nThe name will be checked for validity. See git_reference_symbolic_create()
for rules about valid names.
Lookup a reference by name and resolve immediately to OID.
\n","comments":"This function provides a quick way to resolve a reference name straight through to the object id that it refers to. This avoids having to allocate or free any git_reference
objects for simple situations.
The name will be checked for validity. See git_reference_symbolic_create()
for rules about valid names.
Lookup a reference by DWIMing its short name
\n","comments":"Apply the git precendence rules to the given shorthand to determine which reference the user is refering to.
\n","group":"reference"},"git_reference_symbolic_create_matching":{"type":"function","file":"git2/refs.h","line":110,"lineto":110,"args":[{"name":"out","type":"git_reference **","comment":"Pointer to the newly created reference"},{"name":"repo","type":"git_repository *","comment":"Repository where that reference will live"},{"name":"name","type":"const char *","comment":"The name of the reference"},{"name":"target","type":"const char *","comment":"The target of the reference"},{"name":"force","type":"int","comment":"Overwrite existing references"},{"name":"current_value","type":"const char *","comment":"The expected value of the reference when updating"},{"name":"signature","type":"const git_signature *","comment":"The identity that will used to populate the reflog entry"},{"name":"log_message","type":"const char *","comment":"The one line long message to be appended to the reflog"}],"argline":"git_reference **out, git_repository *repo, const char *name, const char *target, int force, const char *current_value, const git_signature *signature, const char *log_message","sig":"git_reference **::git_repository *::const char *::const char *::int::const char *::const git_signature *::const char *","return":{"type":"int","comment":" 0 on success, GIT_EEXISTS, GIT_EINVALIDSPEC, GIT_EMODIFIED or an error code"},"description":"Conditionally create a new symbolic reference.
\n","comments":"A symbolic reference is a reference name that refers to another reference name. If the other name moves, the symbolic name will move, too. As a simple example, the "HEAD" reference might refer to "refs/heads/master" while on the "master" branch of a repository.
\n\nThe symbolic reference will be created in the repository and written to the disk. The generated reference object must be freed by the user.
\n\nValid reference names must follow one of two patterns:
\n\nThis function will return an error if a reference already exists with the given name unless force
is true, in which case it will be overwritten.
The signature and message for the reflog will be ignored if the reference does not belong in the standard set (HEAD, branches and remote-tracking branches) and it does not have a reflog.
\n\nIt will return GIT_EMODIFIED if the reference's value at the time of updating does not match the one passed through current_value
(i.e. if the ref has changed since the user read it).
Create a new symbolic reference.
\n","comments":"A symbolic reference is a reference name that refers to another reference name. If the other name moves, the symbolic name will move, too. As a simple example, the "HEAD" reference might refer to "refs/heads/master" while on the "master" branch of a repository.
\n\nThe symbolic reference will be created in the repository and written to the disk. The generated reference object must be freed by the user.
\n\nValid reference names must follow one of two patterns:
\n\nThis function will return an error if a reference already exists with the given name unless force
is true, in which case it will be overwritten.
The signature and message for the reflog will be ignored if the reference does not belong in the standard set (HEAD, branches and remote-tracking branches) and it does not have a reflog.
\n","group":"reference"},"git_reference_create":{"type":"function","file":"git2/refs.h","line":185,"lineto":185,"args":[{"name":"out","type":"git_reference **","comment":"Pointer to the newly created reference"},{"name":"repo","type":"git_repository *","comment":"Repository where that reference will live"},{"name":"name","type":"const char *","comment":"The name of the reference"},{"name":"id","type":"const git_oid *","comment":"The object id pointed to by the reference."},{"name":"force","type":"int","comment":"Overwrite existing references"},{"name":"signature","type":"const git_signature *","comment":"The identity that will used to populate the reflog entry"},{"name":"log_message","type":"const char *","comment":"The one line long message to be appended to the reflog"}],"argline":"git_reference **out, git_repository *repo, const char *name, const git_oid *id, int force, const git_signature *signature, const char *log_message","sig":"git_reference **::git_repository *::const char *::const git_oid *::int::const git_signature *::const char *","return":{"type":"int","comment":" 0 on success, GIT_EEXISTS, GIT_EINVALIDSPEC or an error code"},"description":"Create a new direct reference.
\n","comments":"A direct reference (also called an object id reference) refers directly to a specific object id (a.k.a. OID or SHA) in the repository. The id permanently refers to the object (although the reference itself can be moved). For example, in libgit2 the direct ref "refs/tags/v0.17.0" refers to OID 5b9fac39d8a76b9139667c26a63e6b3f204b3977.
\n\nThe direct reference will be created in the repository and written to the disk. The generated reference object must be freed by the user.
\n\nValid reference names must follow one of two patterns:
\n\nThis function will return an error if a reference already exists with the given name unless force
is true, in which case it will be overwritten.
The signature and message for the reflog will be ignored if the reference does not belong in the standard set (HEAD, branches and remote-tracking branches) and and it does not have a reflog.
\n","group":"reference"},"git_reference_create_matching":{"type":"function","file":"git2/refs.h","line":229,"lineto":229,"args":[{"name":"out","type":"git_reference **","comment":"Pointer to the newly created reference"},{"name":"repo","type":"git_repository *","comment":"Repository where that reference will live"},{"name":"name","type":"const char *","comment":"The name of the reference"},{"name":"id","type":"const git_oid *","comment":"The object id pointed to by the reference."},{"name":"force","type":"int","comment":"Overwrite existing references"},{"name":"current_id","type":"const git_oid *","comment":"The expected value of the reference at the time of update"},{"name":"signature","type":"const git_signature *","comment":"The identity that will used to populate the reflog entry"},{"name":"log_message","type":"const char *","comment":"The one line long message to be appended to the reflog"}],"argline":"git_reference **out, git_repository *repo, const char *name, const git_oid *id, int force, const git_oid *current_id, const git_signature *signature, const char *log_message","sig":"git_reference **::git_repository *::const char *::const git_oid *::int::const git_oid *::const git_signature *::const char *","return":{"type":"int","comment":" 0 on success, GIT_EMODIFIED if the value of the reference\n has changed, GIT_EEXISTS, GIT_EINVALIDSPEC or an error code"},"description":"Conditionally create new direct reference
\n","comments":"A direct reference (also called an object id reference) refers directly to a specific object id (a.k.a. OID or SHA) in the repository. The id permanently refers to the object (although the reference itself can be moved). For example, in libgit2 the direct ref "refs/tags/v0.17.0" refers to OID 5b9fac39d8a76b9139667c26a63e6b3f204b3977.
\n\nThe direct reference will be created in the repository and written to the disk. The generated reference object must be freed by the user.
\n\nValid reference names must follow one of two patterns:
\n\nThis function will return an error if a reference already exists with the given name unless force
is true, in which case it will be overwritten.
The signature and message for the reflog will be ignored if the reference does not belong in the standard set (HEAD, branches and remote-tracking branches) and and it does not have a reflog.
\n\nIt will return GIT_EMODIFIED if the reference's value at the time of updating does not match the one passed through current_id
(i.e. if the ref has changed since the user read it).
Get the OID pointed to by a direct reference.
\n","comments":"Only available if the reference is direct (i.e. an object id reference, not a symbolic one).
\n\nTo find the OID of a symbolic ref, call git_reference_resolve()
and then this function (or maybe use git_reference_name_to_id()
to directly resolve a reference name all the way through to an OID).
Return the peeled OID target of this reference.
\n","comments":"This peeled OID only applies to direct references that point to a hard Tag object: it is the result of peeling such Tag.
\n","group":"reference"},"git_reference_symbolic_target":{"type":"function","file":"git2/refs.h","line":265,"lineto":265,"args":[{"name":"ref","type":"const git_reference *","comment":"The reference"}],"argline":"const git_reference *ref","sig":"const git_reference *","return":{"type":"const char *","comment":" a pointer to the name if available, NULL otherwise"},"description":"Get full name to the reference pointed to by a symbolic reference.
\n","comments":"Only available if the reference is symbolic.
\n","group":"reference","examples":{"general.c":["ex/v0.21.3/general.html#git_reference_symbolic_target-49"]}},"git_reference_type":{"type":"function","file":"git2/refs.h","line":275,"lineto":275,"args":[{"name":"ref","type":"const git_reference *","comment":"The reference"}],"argline":"const git_reference *ref","sig":"const git_reference *","return":{"type":"git_ref_t","comment":" the type"},"description":"Get the type of a reference.
\n","comments":"Either direct (GIT_REF_OID) or symbolic (GIT_REF_SYMBOLIC)
\n","group":"reference","examples":{"general.c":["ex/v0.21.3/general.html#git_reference_type-50"]}},"git_reference_name":{"type":"function","file":"git2/refs.h","line":285,"lineto":285,"args":[{"name":"ref","type":"const git_reference *","comment":"The reference"}],"argline":"const git_reference *ref","sig":"const git_reference *","return":{"type":"const char *","comment":" the full name for the ref"},"description":"Get the full name of a reference.
\n","comments":"See git_reference_symbolic_create()
for rules about valid names.
Resolve a symbolic reference to a direct reference.
\n","comments":"This method iteratively peels a symbolic reference until it resolves to a direct reference to an OID.
\n\nThe peeled reference is returned in the resolved_ref
argument, and must be freed manually once it's no longer needed.
If a direct reference is passed as an argument, a copy of that reference is returned. This copy must be manually freed too.
\n","group":"reference"},"git_reference_owner":{"type":"function","file":"git2/refs.h","line":311,"lineto":311,"args":[{"name":"ref","type":"const git_reference *","comment":"The reference"}],"argline":"const git_reference *ref","sig":"const git_reference *","return":{"type":"git_repository *","comment":" a pointer to the repo"},"description":"Get the repository where a reference resides.
\n","comments":"","group":"reference"},"git_reference_symbolic_set_target":{"type":"function","file":"git2/refs.h","line":334,"lineto":339,"args":[{"name":"out","type":"git_reference **","comment":"Pointer to the newly created reference"},{"name":"ref","type":"git_reference *","comment":"The reference"},{"name":"target","type":"const char *","comment":"The new target for the reference"},{"name":"signature","type":"const git_signature *","comment":"The identity that will used to populate the reflog entry"},{"name":"log_message","type":"const char *","comment":"The one line long message to be appended to the reflog"}],"argline":"git_reference **out, git_reference *ref, const char *target, const git_signature *signature, const char *log_message","sig":"git_reference **::git_reference *::const char *::const git_signature *::const char *","return":{"type":"int","comment":" 0 on success, GIT_EINVALIDSPEC or an error code"},"description":"Create a new reference with the same name as the given reference but a\n different symbolic target. The reference must be a symbolic reference,\n otherwise this will fail.
\n","comments":"The new reference will be written to disk, overwriting the given reference.
\n\nThe target name will be checked for validity. See git_reference_symbolic_create()
for rules about valid names.
The signature and message for the reflog will be ignored if the reference does not belong in the standard set (HEAD, branches and remote-tracking branches) and and it does not have a reflog.
\n","group":"reference"},"git_reference_set_target":{"type":"function","file":"git2/refs.h","line":356,"lineto":361,"args":[{"name":"out","type":"git_reference **","comment":"Pointer to the newly created reference"},{"name":"ref","type":"git_reference *","comment":"The reference"},{"name":"id","type":"const git_oid *","comment":"The new target OID for the reference"},{"name":"signature","type":"const git_signature *","comment":"The identity that will used to populate the reflog entry"},{"name":"log_message","type":"const char *","comment":"The one line long message to be appended to the reflog"}],"argline":"git_reference **out, git_reference *ref, const git_oid *id, const git_signature *signature, const char *log_message","sig":"git_reference **::git_reference *::const git_oid *::const git_signature *::const char *","return":{"type":"int","comment":" 0 on success, GIT_EMODIFIED if the value of the reference\n has changed since it was read, or an error code"},"description":"Conditionally create a new reference with the same name as the given reference but a\n different OID target. The reference must be a direct reference, otherwise\n this will fail.
\n","comments":"The new reference will be written to disk, overwriting the given reference.
\n","group":"reference"},"git_reference_rename":{"type":"function","file":"git2/refs.h","line":387,"lineto":393,"args":[{"name":"new_ref","type":"git_reference **","comment":null},{"name":"ref","type":"git_reference *","comment":"The reference to rename"},{"name":"new_name","type":"const char *","comment":"The new name for the reference"},{"name":"force","type":"int","comment":"Overwrite an existing reference"},{"name":"signature","type":"const git_signature *","comment":"The identity that will used to populate the reflog entry"},{"name":"log_message","type":"const char *","comment":"The one line long message to be appended to the reflog"}],"argline":"git_reference **new_ref, git_reference *ref, const char *new_name, int force, const git_signature *signature, const char *log_message","sig":"git_reference **::git_reference *::const char *::int::const git_signature *::const char *","return":{"type":"int","comment":" 0 on success, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code"},"description":"Rename an existing reference.
\n","comments":"This method works for both direct and symbolic references.
\n\nThe new name will be checked for validity. See git_reference_symbolic_create()
for rules about valid names.
If the force
flag is not enabled, and there's already a reference with the given name, the renaming will fail.
IMPORTANT: The user needs to write a proper reflog entry if the reflog is enabled for the repository. We only rename the reflog if it exists.
\n","group":"reference"},"git_reference_delete":{"type":"function","file":"git2/refs.h","line":408,"lineto":408,"args":[{"name":"ref","type":"git_reference *","comment":"The reference to remove"}],"argline":"git_reference *ref","sig":"git_reference *","return":{"type":"int","comment":" 0, GIT_EMODIFIED or an error code"},"description":"Delete an existing reference.
\n","comments":"This method works for both direct and symbolic references. The reference will be immediately removed on disk but the memory will not be freed. Callers must call git_reference_free
.
This function will return an error if the reference has changed from the time it was looked up.
\n","group":"reference"},"git_reference_remove":{"type":"function","file":"git2/refs.h","line":419,"lineto":419,"args":[{"name":"repo","type":"git_repository *","comment":null},{"name":"name","type":"const char *","comment":"The reference to remove"}],"argline":"git_repository *repo, const char *name","sig":"git_repository *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Delete an existing reference by name
\n","comments":"This method removes the named reference from the repository without looking at its old value.
\n","group":"reference"},"git_reference_list":{"type":"function","file":"git2/refs.h","line":433,"lineto":433,"args":[{"name":"array","type":"git_strarray *","comment":"Pointer to a git_strarray structure where\n\t\tthe reference names will be stored"},{"name":"repo","type":"git_repository *","comment":"Repository where to find the refs"}],"argline":"git_strarray *array, git_repository *repo","sig":"git_strarray *::git_repository *","return":{"type":"int","comment":" 0 or an error code"},"description":"Fill a list with all the references that can be found in a repository.
\n","comments":"The string array will be filled with the names of all references; these values are owned by the user and should be free'd manually when no longer needed, using git_strarray_free()
.
Perform a callback on each reference in the repository.
\n","comments":"The callback
function will be called for each reference in the repository, receiving the reference object and the payload
value passed to this method. Returning a non-zero value from the callback will terminate the iteration.
Perform a callback on the fully-qualified name of each reference.
\n","comments":"The callback
function will be called for each reference in the repository, receiving the name of the reference and the payload
value passed to this method. Returning a non-zero value from the callback will terminate the iteration.
Free the given reference.
\n","comments":"","group":"reference","examples":{"status.c":["ex/v0.21.3/status.html#git_reference_free-1"]}},"git_reference_cmp":{"type":"function","file":"git2/refs.h","line":488,"lineto":490,"args":[{"name":"ref1","type":"const git_reference *","comment":"The first git_reference"},{"name":"ref2","type":"const git_reference *","comment":"The second git_reference"}],"argline":"const git_reference *ref1, const git_reference *ref2","sig":"const git_reference *::const git_reference *","return":{"type":"int","comment":" 0 if the same, else a stable but meaningless ordering."},"description":"Compare two references.
\n","comments":"","group":"reference"},"git_reference_iterator_new":{"type":"function","file":"git2/refs.h","line":499,"lineto":501,"args":[{"name":"out","type":"git_reference_iterator **","comment":"pointer in which to store the iterator"},{"name":"repo","type":"git_repository *","comment":"the repository"}],"argline":"git_reference_iterator **out, git_repository *repo","sig":"git_reference_iterator **::git_repository *","return":{"type":"int","comment":" 0 or an error code"},"description":"Create an iterator for the repo's references
\n","comments":"","group":"reference"},"git_reference_iterator_glob_new":{"type":"function","file":"git2/refs.h","line":512,"lineto":515,"args":[{"name":"out","type":"git_reference_iterator **","comment":"pointer in which to store the iterator"},{"name":"repo","type":"git_repository *","comment":"the repository"},{"name":"glob","type":"const char *","comment":"the glob to match against the reference names"}],"argline":"git_reference_iterator **out, git_repository *repo, const char *glob","sig":"git_reference_iterator **::git_repository *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Create an iterator for the repo's references that match the\n specified glob
\n","comments":"","group":"reference"},"git_reference_next":{"type":"function","file":"git2/refs.h","line":524,"lineto":524,"args":[{"name":"out","type":"git_reference **","comment":"pointer in which to store the reference"},{"name":"iter","type":"git_reference_iterator *","comment":"the iterator"}],"argline":"git_reference **out, git_reference_iterator *iter","sig":"git_reference **::git_reference_iterator *","return":{"type":"int","comment":" 0, GIT_ITEROVER if there are no more; or an error code"},"description":"Get the next reference
\n","comments":"","group":"reference"},"git_reference_next_name":{"type":"function","file":"git2/refs.h","line":537,"lineto":537,"args":[{"name":"out","type":"const char **","comment":"pointer in which to store the string"},{"name":"iter","type":"git_reference_iterator *","comment":"the iterator"}],"argline":"const char **out, git_reference_iterator *iter","sig":"const char **::git_reference_iterator *","return":{"type":"int","comment":" 0, GIT_ITEROVER if there are no more; or an error code"},"description":"Get the next reference's name
\n","comments":"This function is provided for convenience in case only the names are interesting as it avoids the allocation of the git_reference
object which git_reference_next()
needs.
Free the iterator and its associated resources
\n","comments":"","group":"reference"},"git_reference_foreach_glob":{"type":"function","file":"git2/refs.h","line":564,"lineto":568,"args":[{"name":"repo","type":"git_repository *","comment":"Repository where to find the refs"},{"name":"glob","type":"const char *","comment":"Pattern to match (fnmatch-style) against reference name."},{"name":"callback","type":"git_reference_foreach_name_cb","comment":"Function which will be called for every listed ref"},{"name":"payload","type":"void *","comment":"Additional data to pass to the callback"}],"argline":"git_repository *repo, const char *glob, git_reference_foreach_name_cb callback, void *payload","sig":"git_repository *::const char *::git_reference_foreach_name_cb::void *","return":{"type":"int","comment":" 0 on success, GIT_EUSER on non-zero callback, or error code"},"description":"Perform a callback on each reference in the repository whose name\n matches the given pattern.
\n","comments":"This function acts like git_reference_foreach()
with an additional pattern match being applied to the reference name before issuing the callback function. See that function for more information.
The pattern is matched using fnmatch or "glob" style where a '*' matches any sequence of letters, a '?' matches any letter, and square brackets can be used to define character ranges (such as "[0-9]" for digits).
\n","group":"reference"},"git_reference_has_log":{"type":"function","file":"git2/refs.h","line":578,"lineto":578,"args":[{"name":"repo","type":"git_repository *","comment":"the repository"},{"name":"refname","type":"const char *","comment":"the reference's name"}],"argline":"git_repository *repo, const char *refname","sig":"git_repository *::const char *","return":{"type":"int","comment":" 0 when no reflog can be found, 1 when it exists;\n otherwise an error code."},"description":"Check if a reflog exists for the specified reference.
\n","comments":"","group":"reference"},"git_reference_ensure_log":{"type":"function","file":"git2/refs.h","line":590,"lineto":590,"args":[{"name":"repo","type":"git_repository *","comment":"the repository"},{"name":"refname","type":"const char *","comment":"the reference's name"}],"argline":"git_repository *repo, const char *refname","sig":"git_repository *::const char *","return":{"type":"int","comment":" 0 or an error code."},"description":"Ensure there is a reflog for a particular reference.
\n","comments":"Make sure that successive updates to the reference will append to its log.
\n","group":"reference"},"git_reference_is_branch":{"type":"function","file":"git2/refs.h","line":600,"lineto":600,"args":[{"name":"ref","type":"const git_reference *","comment":"A git reference"}],"argline":"const git_reference *ref","sig":"const git_reference *","return":{"type":"int","comment":" 1 when the reference lives in the refs/heads\n namespace; 0 otherwise."},"description":"Check if a reference is a local branch.
\n","comments":"","group":"reference"},"git_reference_is_remote":{"type":"function","file":"git2/refs.h","line":610,"lineto":610,"args":[{"name":"ref","type":"const git_reference *","comment":"A git reference"}],"argline":"const git_reference *ref","sig":"const git_reference *","return":{"type":"int","comment":" 1 when the reference lives in the refs/remotes\n namespace; 0 otherwise."},"description":"Check if a reference is a remote tracking branch
\n","comments":"","group":"reference"},"git_reference_is_tag":{"type":"function","file":"git2/refs.h","line":620,"lineto":620,"args":[{"name":"ref","type":"const git_reference *","comment":"A git reference"}],"argline":"const git_reference *ref","sig":"const git_reference *","return":{"type":"int","comment":" 1 when the reference lives in the refs/tags\n namespace; 0 otherwise."},"description":"Check if a reference is a tag
\n","comments":"","group":"reference"},"git_reference_is_note":{"type":"function","file":"git2/refs.h","line":630,"lineto":630,"args":[{"name":"ref","type":"const git_reference *","comment":"A git reference"}],"argline":"const git_reference *ref","sig":"const git_reference *","return":{"type":"int","comment":" 1 when the reference lives in the refs/notes\n namespace; 0 otherwise."},"description":"Check if a reference is a note
\n","comments":"","group":"reference"},"git_reference_peel":{"type":"function","file":"git2/refs.h","line":701,"lineto":704,"args":[{"name":"out","type":"git_object **","comment":"Pointer to the peeled git_object"},{"name":"ref","type":"git_reference *","comment":"The reference to be processed"},{"name":"type","type":"git_otype","comment":"The type of the requested object (GIT_OBJ_COMMIT,\n GIT_OBJ_TAG, GIT_OBJ_TREE, GIT_OBJ_BLOB or GIT_OBJ_ANY)."}],"argline":"git_object **out, git_reference *ref, git_otype type","sig":"git_object **::git_reference *::git_otype","return":{"type":"int","comment":" 0 on success, GIT_EAMBIGUOUS, GIT_ENOTFOUND or an error code"},"description":"Recursively peel reference until object of the specified type is found.
\n","comments":"The retrieved peeled
object is owned by the repository and should be closed with the git_object_free
method.
If you pass GIT_OBJ_ANY
as the target type, then the object will be peeled until a non-tag object is met.
Ensure the reference name is well-formed.
\n","comments":"Valid reference names must follow one of two patterns:
\n\nGet the reference's short name
\n","comments":"This will transform the reference name into a name "human-readable" version. If no shortname is appropriate, it will return the full name.
\n\nThe memory is owned by the reference and must not be freed.
\n","group":"reference","examples":{"status.c":["ex/v0.21.3/status.html#git_reference_shorthand-2"]}},"git_refspec_src":{"type":"function","file":"git2/refspec.h","line":30,"lineto":30,"args":[{"name":"refspec","type":"const git_refspec *","comment":"the refspec"}],"argline":"const git_refspec *refspec","sig":"const git_refspec *","return":{"type":"const char *","comment":" the refspec's source specifier"},"description":"Get the source specifier
\n","comments":"","group":"refspec"},"git_refspec_dst":{"type":"function","file":"git2/refspec.h","line":38,"lineto":38,"args":[{"name":"refspec","type":"const git_refspec *","comment":"the refspec"}],"argline":"const git_refspec *refspec","sig":"const git_refspec *","return":{"type":"const char *","comment":" the refspec's destination specifier"},"description":"Get the destination specifier
\n","comments":"","group":"refspec"},"git_refspec_string":{"type":"function","file":"git2/refspec.h","line":46,"lineto":46,"args":[{"name":"refspec","type":"const git_refspec *","comment":"the refspec"}],"argline":"const git_refspec *refspec","sig":"const git_refspec *","return":{"type":"const char *","comment":null},"description":"Get the refspec's string
\n","comments":"","group":"refspec"},"git_refspec_force":{"type":"function","file":"git2/refspec.h","line":54,"lineto":54,"args":[{"name":"refspec","type":"const git_refspec *","comment":"the refspec"}],"argline":"const git_refspec *refspec","sig":"const git_refspec *","return":{"type":"int","comment":" 1 if force update has been set, 0 otherwise"},"description":"Get the force update setting
\n","comments":"","group":"refspec"},"git_refspec_direction":{"type":"function","file":"git2/refspec.h","line":62,"lineto":62,"args":[{"name":"spec","type":"const git_refspec *","comment":"refspec"}],"argline":"const git_refspec *spec","sig":"const git_refspec *","return":{"type":"git_direction","comment":" GIT_DIRECTION_FETCH or GIT_DIRECTION_PUSH"},"description":"Get the refspec's direction.
\n","comments":"","group":"refspec"},"git_refspec_src_matches":{"type":"function","file":"git2/refspec.h","line":71,"lineto":71,"args":[{"name":"refspec","type":"const git_refspec *","comment":"the refspec"},{"name":"refname","type":"const char *","comment":"the name of the reference to check"}],"argline":"const git_refspec *refspec, const char *refname","sig":"const git_refspec *::const char *","return":{"type":"int","comment":" 1 if the refspec matches, 0 otherwise"},"description":"Check if a refspec's source descriptor matches a reference
\n","comments":"","group":"refspec"},"git_refspec_dst_matches":{"type":"function","file":"git2/refspec.h","line":80,"lineto":80,"args":[{"name":"refspec","type":"const git_refspec *","comment":"the refspec"},{"name":"refname","type":"const char *","comment":"the name of the reference to check"}],"argline":"const git_refspec *refspec, const char *refname","sig":"const git_refspec *::const char *","return":{"type":"int","comment":" 1 if the refspec matches, 0 otherwise"},"description":"Check if a refspec's destination descriptor matches a reference
\n","comments":"","group":"refspec"},"git_refspec_transform":{"type":"function","file":"git2/refspec.h","line":90,"lineto":90,"args":[{"name":"out","type":"git_buf *","comment":"where to store the target name"},{"name":"spec","type":"const git_refspec *","comment":"the refspec"},{"name":"name","type":"const char *","comment":"the name of the reference to transform"}],"argline":"git_buf *out, const git_refspec *spec, const char *name","sig":"git_buf *::const git_refspec *::const char *","return":{"type":"int","comment":" 0, GIT_EBUFS or another error"},"description":"Transform a reference to its target following the refspec's rules
\n","comments":"","group":"refspec"},"git_refspec_rtransform":{"type":"function","file":"git2/refspec.h","line":100,"lineto":100,"args":[{"name":"out","type":"git_buf *","comment":"where to store the source reference name"},{"name":"spec","type":"const git_refspec *","comment":"the refspec"},{"name":"name","type":"const char *","comment":"the name of the reference to transform"}],"argline":"git_buf *out, const git_refspec *spec, const char *name","sig":"git_buf *::const git_refspec *::const char *","return":{"type":"int","comment":" 0, GIT_EBUFS or another error"},"description":"Transform a target reference to its source reference following the refspec's rules
\n","comments":"","group":"refspec"},"git_remote_create":{"type":"function","file":"git2/remote.h","line":39,"lineto":43,"args":[{"name":"out","type":"git_remote **","comment":"the resulting remote"},{"name":"repo","type":"git_repository *","comment":"the repository in which to create the remote"},{"name":"name","type":"const char *","comment":"the remote's name"},{"name":"url","type":"const char *","comment":"the remote's url"}],"argline":"git_remote **out, git_repository *repo, const char *name, const char *url","sig":"git_remote **::git_repository *::const char *::const char *","return":{"type":"int","comment":" 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code"},"description":"Add a remote with the default fetch refspec to the repository's configuration. This\n calls git_remote_save before returning.
\n","comments":"","group":"remote"},"git_remote_create_with_fetchspec":{"type":"function","file":"git2/remote.h","line":57,"lineto":62,"args":[{"name":"out","type":"git_remote **","comment":"the resulting remote"},{"name":"repo","type":"git_repository *","comment":"the repository in which to create the remote"},{"name":"name","type":"const char *","comment":"the remote's name"},{"name":"url","type":"const char *","comment":"the remote's url"},{"name":"fetch","type":"const char *","comment":"the remote fetch value"}],"argline":"git_remote **out, git_repository *repo, const char *name, const char *url, const char *fetch","sig":"git_remote **::git_repository *::const char *::const char *::const char *","return":{"type":"int","comment":" 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code"},"description":"Add a remote with the provided fetch refspec (or default if NULL) to the repository's\n configuration. This\n calls git_remote_save before returning.
\n","comments":"","group":"remote"},"git_remote_create_anonymous":{"type":"function","file":"git2/remote.h","line":80,"lineto":84,"args":[{"name":"out","type":"git_remote **","comment":"pointer to the new remote object"},{"name":"repo","type":"git_repository *","comment":"the associated repository"},{"name":"url","type":"const char *","comment":"the remote repository's URL"},{"name":"fetch","type":"const char *","comment":"the fetch refspec to use for this remote."}],"argline":"git_remote **out, git_repository *repo, const char *url, const char *fetch","sig":"git_remote **::git_repository *::const char *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Create an anonymous remote
\n","comments":"Create a remote with the given url and refspec in memory. You can use this when you have a URL instead of a remote's name. Note that anonymous remotes cannot be converted to persisted remotes.
\n\nThe name, when provided, will be checked for validity. See git_tag_create()
for rules about valid names.
Get the information for a particular remote
\n","comments":"The name will be checked for validity. See git_tag_create()
for rules about valid names.
Save a remote to its repository's configuration
\n","comments":"One can't save a in-memory remote. Doing so will result in a GIT_EINVALIDSPEC being returned.
\n","group":"remote"},"git_remote_dup":{"type":"function","file":"git2/remote.h","line":120,"lineto":120,"args":[{"name":"dest","type":"git_remote **","comment":"pointer where to store the copy"},{"name":"source","type":"git_remote *","comment":"object to copy"}],"argline":"git_remote **dest, git_remote *source","sig":"git_remote **::git_remote *","return":{"type":"int","comment":" 0 or an error code"},"description":"Create a copy of an existing remote. All internal strings are also\n duplicated. Callbacks are not duplicated.
\n","comments":"Call git_remote_free
to free the data.
Get the remote's repository
\n","comments":"","group":"remote"},"git_remote_name":{"type":"function","file":"git2/remote.h","line":136,"lineto":136,"args":[{"name":"remote","type":"const git_remote *","comment":"the remote"}],"argline":"const git_remote *remote","sig":"const git_remote *","return":{"type":"const char *","comment":" a pointer to the name or NULL for in-memory remotes"},"description":"Get the remote's name
\n","comments":"","group":"remote"},"git_remote_url":{"type":"function","file":"git2/remote.h","line":144,"lineto":144,"args":[{"name":"remote","type":"const git_remote *","comment":"the remote"}],"argline":"const git_remote *remote","sig":"const git_remote *","return":{"type":"const char *","comment":" a pointer to the url"},"description":"Get the remote's url
\n","comments":"","group":"remote"},"git_remote_pushurl":{"type":"function","file":"git2/remote.h","line":152,"lineto":152,"args":[{"name":"remote","type":"const git_remote *","comment":"the remote"}],"argline":"const git_remote *remote","sig":"const git_remote *","return":{"type":"const char *","comment":" a pointer to the url or NULL if no special url for pushing is set"},"description":"Get the remote's url for pushing
\n","comments":"","group":"remote"},"git_remote_set_url":{"type":"function","file":"git2/remote.h","line":163,"lineto":163,"args":[{"name":"remote","type":"git_remote *","comment":"the remote"},{"name":"url","type":"const char *","comment":"the url to set"}],"argline":"git_remote *remote, const char *url","sig":"git_remote *::const char *","return":{"type":"int","comment":" 0 or an error value"},"description":"Set the remote's url
\n","comments":"Existing connections will not be updated.
\n","group":"remote"},"git_remote_set_pushurl":{"type":"function","file":"git2/remote.h","line":174,"lineto":174,"args":[{"name":"remote","type":"git_remote *","comment":"the remote"},{"name":"url","type":"const char *","comment":"the url to set or NULL to clear the pushurl"}],"argline":"git_remote *remote, const char *url","sig":"git_remote *::const char *","return":{"type":"int","comment":" 0 or an error value"},"description":"Set the remote's url for pushing
\n","comments":"Existing connections will not be updated.
\n","group":"remote"},"git_remote_add_fetch":{"type":"function","file":"git2/remote.h","line":186,"lineto":186,"args":[{"name":"remote","type":"git_remote *","comment":"the remote"},{"name":"refspec","type":"const char *","comment":"the new fetch refspec"}],"argline":"git_remote *remote, const char *refspec","sig":"git_remote *::const char *","return":{"type":"int","comment":" 0 or an error value"},"description":"Add a fetch refspec to the remote
\n","comments":"Convenience function for adding a single fetch refspec to the current list in the remote.
\n","group":"remote"},"git_remote_get_fetch_refspecs":{"type":"function","file":"git2/remote.h","line":197,"lineto":197,"args":[{"name":"array","type":"git_strarray *","comment":"pointer to the array in which to store the strings"},{"name":"remote","type":"const git_remote *","comment":"the remote to query"}],"argline":"git_strarray *array, const git_remote *remote","sig":"git_strarray *::const git_remote *","return":{"type":"int","comment":null},"description":"Get the remote's list of fetch refspecs
\n","comments":"The memory is owned by the user and should be freed with git_strarray_free
.
Set the remote's list of fetch refspecs
\n","comments":"The contents of the string array are copied.
\n","group":"remote"},"git_remote_add_push":{"type":"function","file":"git2/remote.h","line":219,"lineto":219,"args":[{"name":"remote","type":"git_remote *","comment":"the remote"},{"name":"refspec","type":"const char *","comment":"the new push refspec"}],"argline":"git_remote *remote, const char *refspec","sig":"git_remote *::const char *","return":{"type":"int","comment":" 0 or an error value"},"description":"Add a push refspec to the remote
\n","comments":"Convenience function for adding a single push refspec to the current list in the remote.
\n","group":"remote"},"git_remote_get_push_refspecs":{"type":"function","file":"git2/remote.h","line":230,"lineto":230,"args":[{"name":"array","type":"git_strarray *","comment":"pointer to the array in which to store the strings"},{"name":"remote","type":"const git_remote *","comment":"the remote to query"}],"argline":"git_strarray *array, const git_remote *remote","sig":"git_strarray *::const git_remote *","return":{"type":"int","comment":null},"description":"Get the remote's list of push refspecs
\n","comments":"The memory is owned by the user and should be freed with git_strarray_free
.
Set the remote's list of push refspecs
\n","comments":"The contents of the string array are copied.
\n","group":"remote"},"git_remote_clear_refspecs":{"type":"function","file":"git2/remote.h","line":249,"lineto":249,"args":[{"name":"remote","type":"git_remote *","comment":"the remote"}],"argline":"git_remote *remote","sig":"git_remote *","return":{"type":"void","comment":null},"description":"Clear the refspecs
\n","comments":"Remove all configured fetch and push refspecs from the remote.
\n","group":"remote"},"git_remote_connect":{"type":"function","file":"git2/remote.h","line":280,"lineto":280,"args":[{"name":"remote","type":"git_remote *","comment":"the remote to connect to"},{"name":"direction","type":"git_direction","comment":"GIT_DIRECTION_FETCH if you want to fetch or\n GIT_DIRECTION_PUSH if you want to push"}],"argline":"git_remote *remote, git_direction direction","sig":"git_remote *::git_direction","return":{"type":"int","comment":" 0 or an error code"},"description":"Open a connection to a remote
\n","comments":"The transport is selected based on the URL. The direction argument is due to a limitation of the git protocol (over TCP or SSH) which starts up a specific binary which can only do the one or the other.
\n","group":"remote","examples":{"network/fetch.c":["ex/v0.21.3/network/fetch.html#git_remote_connect-6"],"network/ls-remote.c":["ex/v0.21.3/network/ls-remote.html#git_remote_connect-4"]}},"git_remote_download":{"type":"function","file":"git2/remote.h","line":311,"lineto":311,"args":[{"name":"remote","type":"git_remote *","comment":null}],"argline":"git_remote *remote","sig":"git_remote *","return":{"type":"int","comment":" 0 or an error code"},"description":"Download and index the packfile
\n","comments":"Connect to the remote if it hasn't been done yet, negotiate with the remote git which objects are missing, download and index the packfile.
\n\nThe .idx file will be created and both it and the packfile with be renamed to their final name.
\n","group":"remote","examples":{"network/fetch.c":["ex/v0.21.3/network/fetch.html#git_remote_download-7"]}},"git_remote_connected":{"type":"function","file":"git2/remote.h","line":322,"lineto":322,"args":[{"name":"remote","type":"const git_remote *","comment":"the remote"}],"argline":"const git_remote *remote","sig":"const git_remote *","return":{"type":"int","comment":" 1 if it's connected, 0 otherwise."},"description":"Check whether the remote is connected
\n","comments":"Check whether the remote's underlying transport is connected to the remote host.
\n","group":"remote"},"git_remote_stop":{"type":"function","file":"git2/remote.h","line":332,"lineto":332,"args":[{"name":"remote","type":"git_remote *","comment":"the remote"}],"argline":"git_remote *remote","sig":"git_remote *","return":{"type":"void","comment":null},"description":"Cancel the operation
\n","comments":"At certain points in its operation, the network code checks whether the operation has been cancelled and if so stops the operation.
\n","group":"remote"},"git_remote_disconnect":{"type":"function","file":"git2/remote.h","line":342,"lineto":342,"args":[{"name":"remote","type":"git_remote *","comment":"the remote to disconnect from"}],"argline":"git_remote *remote","sig":"git_remote *","return":{"type":"void","comment":null},"description":"Disconnect from the remote
\n","comments":"Close the connection to the remote and free the underlying transport.
\n","group":"remote","examples":{"network/fetch.c":["ex/v0.21.3/network/fetch.html#git_remote_disconnect-8"]}},"git_remote_free":{"type":"function","file":"git2/remote.h","line":352,"lineto":352,"args":[{"name":"remote","type":"git_remote *","comment":"the remote to free"}],"argline":"git_remote *remote","sig":"git_remote *","return":{"type":"void","comment":null},"description":"Free the memory associated with a remote
\n","comments":"This also disconnects from the remote, if the connection has not been closed yet (using git_remote_disconnect).
\n","group":"remote","examples":{"network/fetch.c":["ex/v0.21.3/network/fetch.html#git_remote_free-9","ex/v0.21.3/network/fetch.html#git_remote_free-10"],"network/ls-remote.c":["ex/v0.21.3/network/ls-remote.html#git_remote_free-5"]}},"git_remote_update_tips":{"type":"function","file":"git2/remote.h","line":364,"lineto":367,"args":[{"name":"remote","type":"git_remote *","comment":"the remote to update"},{"name":"signature","type":"const git_signature *","comment":"The identity to use when updating reflogs"},{"name":"reflog_message","type":"const char *","comment":"The message to insert into the reflogs. If NULL, the\n default is \"fetch \nUpdate the tips to the new state
\n","comments":"","group":"remote","examples":{"network/fetch.c":["ex/v0.21.3/network/fetch.html#git_remote_update_tips-11"]}},"git_remote_fetch":{"type":"function","file":"git2/remote.h","line":381,"lineto":384,"args":[{"name":"remote","type":"git_remote *","comment":"the remote to fetch from"},{"name":"signature","type":"const git_signature *","comment":"The identity to use when updating reflogs"},{"name":"reflog_message","type":"const char *","comment":"The message to insert into the reflogs. If NULL, the\n\t\t\t\t\t\t\t\t default is \"fetch\""}],"argline":"git_remote *remote, const git_signature *signature, const char *reflog_message","sig":"git_remote *::const git_signature *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Download new data and update tips
\n","comments":"Convenience function to connect to a remote, download the data, disconnect and update the remote-tracking branches.
\n","group":"remote"},"git_remote_valid_url":{"type":"function","file":"git2/remote.h","line":392,"lineto":392,"args":[{"name":"url","type":"const char *","comment":"the url to check"}],"argline":"const char *url","sig":"const char *","return":{"type":"int","comment":" 1 if the url is valid, 0 otherwise"},"description":"Return whether a string is a valid remote URL
\n","comments":"","group":"remote"},"git_remote_supported_url":{"type":"function","file":"git2/remote.h","line":400,"lineto":400,"args":[{"name":"url","type":"const char *","comment":"the url to check"}],"argline":"const char *url","sig":"const char *","return":{"type":"int","comment":" 1 if the url is supported, 0 otherwise"},"description":"Return whether the passed URL is supported by this version of the library.
\n","comments":"","group":"remote"},"git_remote_list":{"type":"function","file":"git2/remote.h","line":411,"lineto":411,"args":[{"name":"out","type":"git_strarray *","comment":"a string array which receives the names of the remotes"},{"name":"repo","type":"git_repository *","comment":"the repository to query"}],"argline":"git_strarray *out, git_repository *repo","sig":"git_strarray *::git_repository *","return":{"type":"int","comment":" 0 or an error code"},"description":"Get a list of the configured remotes for a repo
\n","comments":"The string array must be freed by the user.
\n","group":"remote"},"git_remote_check_cert":{"type":"function","file":"git2/remote.h","line":419,"lineto":419,"args":[{"name":"remote","type":"git_remote *","comment":"the remote to configure"},{"name":"check","type":"int","comment":"whether to check the server's certificate (defaults to yes)"}],"argline":"git_remote *remote, int check","sig":"git_remote *::int","return":{"type":"void","comment":null},"description":"Choose whether to check the server's certificate (applies to HTTPS only)
\n","comments":"","group":"remote"},"git_remote_set_transport":{"type":"function","file":"git2/remote.h","line":433,"lineto":435,"args":[{"name":"remote","type":"git_remote *","comment":"the remote to configure"},{"name":"transport","type":"git_transport *","comment":"the transport object for the remote to use"}],"argline":"git_remote *remote, git_transport *transport","sig":"git_remote *::git_transport *","return":{"type":"int","comment":" 0 or an error code"},"description":"Sets a custom transport for the remote. The caller can use this function\n to bypass the automatic discovery of a transport by URL scheme (i.e.\n http://, https://, git://) and supply their own transport to be used\n instead. After providing the transport to a remote using this function,\n the transport object belongs exclusively to that remote, and the remote will\n free it when it is freed with git_remote_free.
\n","comments":"","group":"remote"},"git_remote_init_callbacks":{"type":"function","file":"git2/remote.h","line":508,"lineto":510,"args":[{"name":"opts","type":"git_remote_callbacks *","comment":"the `git_remote_callbacks` struct to initialize"},{"name":"version","type":"unsigned int","comment":"Version of struct; pass `GIT_REMOTE_CALLBACKS_VERSION`"}],"argline":"git_remote_callbacks *opts, unsigned int version","sig":"git_remote_callbacks *::unsigned int","return":{"type":"int","comment":" Zero on success; -1 on failure."},"description":"Initializes a git_remote_callbacks
with default values. Equivalent to\n creating an instance with GIT_REMOTE_CALLBACKS_INIT.
Set the callbacks for a remote
\n","comments":"Note that the remote keeps its own copy of the data and you need to call this function again if you want to change the callbacks.
\n","group":"remote","examples":{"network/fetch.c":["ex/v0.21.3/network/fetch.html#git_remote_set_callbacks-12"],"network/ls-remote.c":["ex/v0.21.3/network/ls-remote.html#git_remote_set_callbacks-6"]}},"git_remote_get_callbacks":{"type":"function","file":"git2/remote.h","line":533,"lineto":533,"args":[{"name":"remote","type":"git_remote *","comment":"the remote to query"}],"argline":"git_remote *remote","sig":"git_remote *","return":{"type":"const git_remote_callbacks *","comment":" a pointer to the callbacks structure"},"description":"Retrieve the current callback structure
\n","comments":"This provides read access to the callbacks structure as the remote sees it.
\n","group":"remote"},"git_remote_stats":{"type":"function","file":"git2/remote.h","line":538,"lineto":538,"args":[{"name":"remote","type":"git_remote *","comment":null}],"argline":"git_remote *remote","sig":"git_remote *","return":{"type":"const git_transfer_progress *","comment":null},"description":"Get the statistics structure that is filled in by the fetch operation.
\n","comments":"","group":"remote","examples":{"network/fetch.c":["ex/v0.21.3/network/fetch.html#git_remote_stats-13"]}},"git_remote_autotag":{"type":"function","file":"git2/remote.h","line":552,"lineto":552,"args":[{"name":"remote","type":"const git_remote *","comment":"the remote to query"}],"argline":"const git_remote *remote","sig":"const git_remote *","return":{"type":"git_remote_autotag_option_t","comment":" the auto-follow setting"},"description":"Retrieve the tag auto-follow setting
\n","comments":"","group":"remote"},"git_remote_set_autotag":{"type":"function","file":"git2/remote.h","line":560,"lineto":562,"args":[{"name":"remote","type":"git_remote *","comment":"the remote to configure"},{"name":"value","type":"git_remote_autotag_option_t","comment":"a GIT_REMOTE_DOWNLOAD_TAGS value"}],"argline":"git_remote *remote, git_remote_autotag_option_t value","sig":"git_remote *::git_remote_autotag_option_t","return":{"type":"void","comment":null},"description":"Set the tag auto-follow setting
\n","comments":"","group":"remote"},"git_remote_rename":{"type":"function","file":"git2/remote.h","line":582,"lineto":585,"args":[{"name":"problems","type":"git_strarray *","comment":"non-default refspecs cannot be renamed and will be\n stored here for further processing by the caller. Always free this\n strarray on succesful return."},{"name":"remote","type":"git_remote *","comment":"the remote to rename"},{"name":"new_name","type":"const char *","comment":"the new name the remote should bear"}],"argline":"git_strarray *problems, git_remote *remote, const char *new_name","sig":"git_strarray *::git_remote *::const char *","return":{"type":"int","comment":" 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code"},"description":"Give the remote a new name
\n","comments":"All remote-tracking branches and configuration settings for the remote are updated.
\n\nThe new name will be checked for validity. See git_tag_create()
for rules about valid names.
A temporary in-memory remote cannot be given a name with this method.
\n","group":"remote"},"git_remote_update_fetchhead":{"type":"function","file":"git2/remote.h","line":593,"lineto":593,"args":[{"name":"remote","type":"git_remote *","comment":"the remote to query"}],"argline":"git_remote *remote","sig":"git_remote *","return":{"type":"int","comment":" the update FETCH_HEAD setting"},"description":"Retrieve the update FETCH_HEAD setting.
\n","comments":"","group":"remote"},"git_remote_set_update_fetchhead":{"type":"function","file":"git2/remote.h","line":602,"lineto":602,"args":[{"name":"remote","type":"git_remote *","comment":"the remote to configure"},{"name":"value","type":"int","comment":"0 to disable updating FETCH_HEAD"}],"argline":"git_remote *remote, int value","sig":"git_remote *::int","return":{"type":"void","comment":null},"description":"Sets the update FETCH_HEAD setting. By default, FETCH_HEAD will be\n updated on every fetch. Set to 0 to disable.
\n","comments":"","group":"remote"},"git_remote_is_valid_name":{"type":"function","file":"git2/remote.h","line":610,"lineto":610,"args":[{"name":"remote_name","type":"const char *","comment":"name to be checked."}],"argline":"const char *remote_name","sig":"const char *","return":{"type":"int","comment":" 1 if the reference name is acceptable; 0 if it isn't"},"description":"Ensure the remote name is well-formed.
\n","comments":"","group":"remote"},"git_remote_delete":{"type":"function","file":"git2/remote.h","line":621,"lineto":621,"args":[{"name":"remote","type":"git_remote *","comment":"A valid remote"}],"argline":"git_remote *remote","sig":"git_remote *","return":{"type":"int","comment":" 0 on success, or an error code."},"description":"Delete an existing persisted remote.
\n","comments":"All remote-tracking branches and configuration settings for the remote will be removed.
\n","group":"remote"},"git_remote_default_branch":{"type":"function","file":"git2/remote.h","line":639,"lineto":639,"args":[{"name":"out","type":"git_buf *","comment":"the buffern in which to store the reference name"},{"name":"remote","type":"git_remote *","comment":"the remote"}],"argline":"git_buf *out, git_remote *remote","sig":"git_buf *::git_remote *","return":{"type":"int","comment":" 0, GIT_ENOTFOUND if the remote does not have any references\n or none of them point to HEAD's commit, or an error message."},"description":"Retrieve the name of the remote's default branch
\n","comments":"The default branch of a repository is the branch which HEAD points to. If the remote does not support reporting this information directly, it performs the guess as git does; that is, if there are multiple branches which point to the same commit, the first one is chosen. If the master branch is a candidate, it wins.
\n\nThis function must only be called after connecting.
\n","group":"remote"},"git_repository_open":{"type":"function","file":"git2/repository.h","line":37,"lineto":37,"args":[{"name":"out","type":"git_repository **","comment":"pointer to the repo which will be opened"},{"name":"path","type":"const char *","comment":"the path to the repository"}],"argline":"git_repository **out, const char *path","sig":"git_repository **::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Open a git repository.
\n","comments":"The 'path' argument must point to either a git repository folder, or an existing work dir.
\n\nThe method will automatically detect if 'path' is a normal or bare repository or fail is 'path' is neither.
\n","group":"repository","examples":{"general.c":["ex/v0.21.3/general.html#git_repository_open-52"],"network/git2.c":["ex/v0.21.3/network/git2.html#git_repository_open-3"]}},"git_repository_wrap_odb":{"type":"function","file":"git2/repository.h","line":50,"lineto":50,"args":[{"name":"out","type":"git_repository **","comment":"pointer to the repo"},{"name":"odb","type":"git_odb *","comment":"the object database to wrap"}],"argline":"git_repository **out, git_odb *odb","sig":"git_repository **::git_odb *","return":{"type":"int","comment":" 0 or an error code"},"description":"Create a "fake" repository to wrap an object database
\n","comments":"Create a repository object to wrap an object database to be used with the API when all you have is an object database. This doesn't have any paths associated with it, so use with care.
\n","group":"repository"},"git_repository_discover":{"type":"function","file":"git2/repository.h","line":78,"lineto":82,"args":[{"name":"out","type":"git_buf *","comment":"A pointer to a user-allocated git_buf which will contain\n the found path."},{"name":"start_path","type":"const char *","comment":"The base path where the lookup starts."},{"name":"across_fs","type":"int","comment":"If true, then the lookup will not stop when a\n filesystem device change is detected while exploring parent directories."},{"name":"ceiling_dirs","type":"const char *","comment":"A GIT_PATH_LIST_SEPARATOR separated list of\n absolute symbolic link free paths. The lookup will stop when any\n of this paths is reached. Note that the lookup always performs on\n start_path no matter start_path appears in ceiling_dirs ceiling_dirs\n might be NULL (which is equivalent to an empty string)"}],"argline":"git_buf *out, const char *start_path, int across_fs, const char *ceiling_dirs","sig":"git_buf *::const char *::int::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Look for a git repository and copy its path in the given buffer.\n The lookup start from base_path and walk across parent directories\n if nothing has been found. The lookup ends when the first repository\n is found, or when reaching a directory referenced in ceiling_dirs\n or when the filesystem changes (in case across_fs is true).
\n","comments":"The method will automatically detect if the repository is bare (if there is a repository).
\n","group":"repository"},"git_repository_open_ext":{"type":"function","file":"git2/repository.h","line":122,"lineto":126,"args":[{"name":"out","type":"git_repository **","comment":"Pointer to the repo which will be opened. This can\n actually be NULL if you only want to use the error code to\n see if a repo at this path could be opened."},{"name":"path","type":"const char *","comment":"Path to open as git repository. If the flags\n permit \"searching\", then this can be a path to a subdirectory\n inside the working directory of the repository."},{"name":"flags","type":"unsigned int","comment":"A combination of the GIT_REPOSITORY_OPEN flags above."},{"name":"ceiling_dirs","type":"const char *","comment":"A GIT_PATH_LIST_SEPARATOR delimited list of path\n prefixes at which the search for a containing repository should\n terminate."}],"argline":"git_repository **out, const char *path, unsigned int flags, const char *ceiling_dirs","sig":"git_repository **::const char *::unsigned int::const char *","return":{"type":"int","comment":" 0 on success, GIT_ENOTFOUND if no repository could be found,\n or -1 if there was a repository but open failed for some reason\n (such as repo corruption or system errors)."},"description":"Find and open a repository with extended controls.
\n","comments":"","group":"repository","examples":{"blame.c":["ex/v0.21.3/blame.html#git_repository_open_ext-20"],"cat-file.c":["ex/v0.21.3/cat-file.html#git_repository_open_ext-23"],"diff.c":["ex/v0.21.3/diff.html#git_repository_open_ext-12"],"log.c":["ex/v0.21.3/log.html#git_repository_open_ext-39","ex/v0.21.3/log.html#git_repository_open_ext-40"],"rev-parse.c":["ex/v0.21.3/rev-parse.html#git_repository_open_ext-10"],"status.c":["ex/v0.21.3/status.html#git_repository_open_ext-3"],"tag.c":["ex/v0.21.3/tag.html#git_repository_open_ext-9"]}},"git_repository_open_bare":{"type":"function","file":"git2/repository.h","line":139,"lineto":139,"args":[{"name":"out","type":"git_repository **","comment":"Pointer to the repo which will be opened."},{"name":"bare_path","type":"const char *","comment":"Direct path to the bare repository"}],"argline":"git_repository **out, const char *bare_path","sig":"git_repository **::const char *","return":{"type":"int","comment":" 0 on success, or an error code"},"description":"Open a bare repository on the serverside.
\n","comments":"This is a fast open for bare repositories that will come in handy if you're e.g. hosting git repositories and need to access them efficiently
\n","group":"repository"},"git_repository_free":{"type":"function","file":"git2/repository.h","line":152,"lineto":152,"args":[{"name":"repo","type":"git_repository *","comment":"repository handle to close. If NULL nothing occurs."}],"argline":"git_repository *repo","sig":"git_repository *","return":{"type":"void","comment":null},"description":"Free a previously allocated repository
\n","comments":"Note that after a repository is free'd, all the objects it has spawned will still exist until they are manually closed by the user with git_object_free
, but accessing any of the attributes of an object without a backing repository will result in undefined behavior
Creates a new Git repository in the given folder.
\n","comments":"TODO: - Reinit the repository
\n","group":"repository","examples":{"init.c":["ex/v0.21.3/init.html#git_repository_init-4"]}},"git_repository_init_init_options":{"type":"function","file":"git2/repository.h","line":278,"lineto":280,"args":[{"name":"opts","type":"git_repository_init_options *","comment":"the `git_repository_init_options` struct to initialize"},{"name":"version","type":"unsigned int","comment":"Version of struct; pass `GIT_REPOSITORY_INIT_OPTIONS_VERSION`"}],"argline":"git_repository_init_options *opts, unsigned int version","sig":"git_repository_init_options *::unsigned int","return":{"type":"int","comment":" Zero on success; -1 on failure."},"description":"Initializes a git_repository_init_options
with default values. Equivalent\n to creating an instance with GIT_REPOSITORY_INIT_OPTIONS_INIT.
Create a new Git repository in the given folder with extended controls.
\n","comments":"This will initialize a new git repository (creating the repo_path if requested by flags) and working directory as needed. It will auto-detect the case sensitivity of the file system and if the file system supports file mode bits correctly.
\n","group":"repository","examples":{"init.c":["ex/v0.21.3/init.html#git_repository_init_ext-5"]}},"git_repository_head":{"type":"function","file":"git2/repository.h","line":313,"lineto":313,"args":[{"name":"out","type":"git_reference **","comment":"pointer to the reference which will be retrieved"},{"name":"repo","type":"git_repository *","comment":"a repository object"}],"argline":"git_reference **out, git_repository *repo","sig":"git_reference **::git_repository *","return":{"type":"int","comment":" 0 on success, GIT_EUNBORNBRANCH when HEAD points to a non existing\n branch, GIT_ENOTFOUND when HEAD is missing; an error code otherwise"},"description":"Retrieve and resolve the reference pointed at by HEAD.
\n","comments":"The returned git_reference
will be owned by caller and git_reference_free()
must be called when done with it to release the allocated memory and prevent a leak.
Check if a repository's HEAD is detached
\n","comments":"A repository's HEAD is detached when it points directly to a commit instead of a branch.
\n","group":"repository"},"git_repository_head_unborn":{"type":"function","file":"git2/repository.h","line":337,"lineto":337,"args":[{"name":"repo","type":"git_repository *","comment":"Repo to test"}],"argline":"git_repository *repo","sig":"git_repository *","return":{"type":"int","comment":" 1 if the current branch is unborn, 0 if it's not; error\n code if there was an error"},"description":"Check if the current branch is unborn
\n","comments":"An unborn branch is one named from HEAD but which doesn't exist in the refs namespace, because it doesn't have any commit to point to.
\n","group":"repository"},"git_repository_is_empty":{"type":"function","file":"git2/repository.h","line":349,"lineto":349,"args":[{"name":"repo","type":"git_repository *","comment":"Repo to test"}],"argline":"git_repository *repo","sig":"git_repository *","return":{"type":"int","comment":" 1 if the repository is empty, 0 if it isn't, error code\n if the repository is corrupted"},"description":"Check if a repository is empty
\n","comments":"An empty repository has just been initialized and contains no references.
\n","group":"repository"},"git_repository_path":{"type":"function","file":"git2/repository.h","line":360,"lineto":360,"args":[{"name":"repo","type":"git_repository *","comment":"A repository object"}],"argline":"git_repository *repo","sig":"git_repository *","return":{"type":"const char *","comment":" the path to the repository"},"description":"Get the path of this repository
\n","comments":"This is the path of the .git
folder for normal repositories, or of the repository itself for bare repositories.
Get the path of the working directory for this repository
\n","comments":"If the repository is bare, this function will always return NULL.
\n","group":"repository","examples":{"init.c":["ex/v0.21.3/init.html#git_repository_workdir-7"]}},"git_repository_set_workdir":{"type":"function","file":"git2/repository.h","line":390,"lineto":391,"args":[{"name":"repo","type":"git_repository *","comment":"A repository object"},{"name":"workdir","type":"const char *","comment":"The path to a working directory"},{"name":"update_gitlink","type":"int","comment":"Create/update gitlink in workdir and set config\n \"core.worktree\" (if workdir is not the parent of the .git directory)"}],"argline":"git_repository *repo, const char *workdir, int update_gitlink","sig":"git_repository *::const char *::int","return":{"type":"int","comment":" 0, or an error code"},"description":"Set the path to the working directory for this repository
\n","comments":"The working directory doesn't need to be the same one that contains the .git
folder for this repository.
If this repository is bare, setting its working directory will turn it into a normal repository, capable of performing all the common workdir operations (checkout, status, index manipulation, etc).
\n","group":"repository"},"git_repository_is_bare":{"type":"function","file":"git2/repository.h","line":399,"lineto":399,"args":[{"name":"repo","type":"git_repository *","comment":"Repo to test"}],"argline":"git_repository *repo","sig":"git_repository *","return":{"type":"int","comment":" 1 if the repository is bare, 0 otherwise."},"description":"Check if a repository is bare
\n","comments":"","group":"repository","examples":{"status.c":["ex/v0.21.3/status.html#git_repository_is_bare-7"]}},"git_repository_config":{"type":"function","file":"git2/repository.h","line":415,"lineto":415,"args":[{"name":"out","type":"git_config **","comment":"Pointer to store the loaded configuration"},{"name":"repo","type":"git_repository *","comment":"A repository object"}],"argline":"git_config **out, git_repository *repo","sig":"git_config **::git_repository *","return":{"type":"int","comment":" 0, or an error code"},"description":"Get the configuration file for this repository.
\n","comments":"If a configuration file has not been set, the default config set for the repository will be returned, including global and system configurations (if they are available).
\n\nThe configuration file must be freed once it's no longer being used by the user.
\n","group":"repository"},"git_repository_config_snapshot":{"type":"function","file":"git2/repository.h","line":431,"lineto":431,"args":[{"name":"out","type":"git_config **","comment":"Pointer to store the loaded configuration"},{"name":"repo","type":"git_repository *","comment":"the repository"}],"argline":"git_config **out, git_repository *repo","sig":"git_config **::git_repository *","return":{"type":"int","comment":" 0, or an error code"},"description":"Get a snapshot of the repository's configuration
\n","comments":"Convenience function to take a snapshot from the repository's configuration. The contents of this snapshot will not change, even if the underlying config files are modified.
\n\nThe configuration file must be freed once it's no longer being used by the user.
\n","group":"repository"},"git_repository_odb":{"type":"function","file":"git2/repository.h","line":447,"lineto":447,"args":[{"name":"out","type":"git_odb **","comment":"Pointer to store the loaded ODB"},{"name":"repo","type":"git_repository *","comment":"A repository object"}],"argline":"git_odb **out, git_repository *repo","sig":"git_odb **::git_repository *","return":{"type":"int","comment":" 0, or an error code"},"description":"Get the Object Database for this repository.
\n","comments":"If a custom ODB has not been set, the default database for the repository will be returned (the one located in .git/objects
).
The ODB must be freed once it's no longer being used by the user.
\n","group":"repository","examples":{"cat-file.c":["ex/v0.21.3/cat-file.html#git_repository_odb-25"],"general.c":["ex/v0.21.3/general.html#git_repository_odb-54"]}},"git_repository_refdb":{"type":"function","file":"git2/repository.h","line":463,"lineto":463,"args":[{"name":"out","type":"git_refdb **","comment":"Pointer to store the loaded refdb"},{"name":"repo","type":"git_repository *","comment":"A repository object"}],"argline":"git_refdb **out, git_repository *repo","sig":"git_refdb **::git_repository *","return":{"type":"int","comment":" 0, or an error code"},"description":"Get the Reference Database Backend for this repository.
\n","comments":"If a custom refsdb has not been set, the default database for the repository will be returned (the one that manipulates loose and packed references in the .git
directory).
The refdb must be freed once it's no longer being used by the user.
\n","group":"repository"},"git_repository_index":{"type":"function","file":"git2/repository.h","line":479,"lineto":479,"args":[{"name":"out","type":"git_index **","comment":"Pointer to store the loaded index"},{"name":"repo","type":"git_repository *","comment":"A repository object"}],"argline":"git_index **out, git_repository *repo","sig":"git_index **::git_repository *","return":{"type":"int","comment":" 0, or an error code"},"description":"Get the Index file for this repository.
\n","comments":"If a custom index has not been set, the default index for the repository will be returned (the one located in .git/index
).
The index must be freed once it's no longer being used by the user.
\n","group":"repository","examples":{"general.c":["ex/v0.21.3/general.html#git_repository_index-55"],"init.c":["ex/v0.21.3/init.html#git_repository_index-8"]}},"git_repository_message":{"type":"function","file":"git2/repository.h","line":497,"lineto":497,"args":[{"name":"out","type":"git_buf *","comment":"git_buf to write data into"},{"name":"repo","type":"git_repository *","comment":"Repository to read prepared message from"}],"argline":"git_buf *out, git_repository *repo","sig":"git_buf *::git_repository *","return":{"type":"int","comment":" 0, GIT_ENOTFOUND if no message exists or an error code"},"description":"Retrieve git's prepared message
\n","comments":"Operations such as git revert/cherry-pick/merge with the -n option stop just short of creating a commit with the changes and save their prepared message in .git/MERGE_MSG so the next git-commit execution can present it to the user for them to amend if they wish.
\n\nUse this function to get the contents of this file. Don't forget to remove the file after you create the commit.
\n","group":"repository"},"git_repository_message_remove":{"type":"function","file":"git2/repository.h","line":504,"lineto":504,"args":[{"name":"repo","type":"git_repository *","comment":null}],"argline":"git_repository *repo","sig":"git_repository *","return":{"type":"int","comment":null},"description":"Remove git's prepared message.
\n","comments":"Remove the message that git_repository_message
retrieves.
Remove all the metadata associated with an ongoing command like merge,\n revert, cherry-pick, etc. For example: MERGE_HEAD, MERGE_MSG, etc.
\n","comments":"","group":"repository"},"git_repository_fetchhead_foreach":{"type":"function","file":"git2/repository.h","line":532,"lineto":535,"args":[{"name":"repo","type":"git_repository *","comment":"A repository object"},{"name":"callback","type":"git_repository_fetchhead_foreach_cb","comment":"Callback function"},{"name":"payload","type":"void *","comment":"Pointer to callback data (optional)"}],"argline":"git_repository *repo, git_repository_fetchhead_foreach_cb callback, void *payload","sig":"git_repository *::git_repository_fetchhead_foreach_cb::void *","return":{"type":"int","comment":" 0 on success, non-zero callback return value, GIT_ENOTFOUND if\n there is no FETCH_HEAD file, or other error code."},"description":"Invoke 'callback' for each entry in the given FETCH_HEAD file.
\n","comments":"Return a non-zero value from the callback to stop the loop.
\n","group":"repository"},"git_repository_mergehead_foreach":{"type":"function","file":"git2/repository.h","line":552,"lineto":555,"args":[{"name":"repo","type":"git_repository *","comment":"A repository object"},{"name":"callback","type":"git_repository_mergehead_foreach_cb","comment":"Callback function"},{"name":"payload","type":"void *","comment":"Pointer to callback data (optional)"}],"argline":"git_repository *repo, git_repository_mergehead_foreach_cb callback, void *payload","sig":"git_repository *::git_repository_mergehead_foreach_cb::void *","return":{"type":"int","comment":" 0 on success, non-zero callback return value, GIT_ENOTFOUND if\n there is no MERGE_HEAD file, or other error code."},"description":"If a merge is in progress, invoke 'callback' for each commit ID in the\n MERGE_HEAD file.
\n","comments":"Return a non-zero value from the callback to stop the loop.
\n","group":"repository"},"git_repository_hashfile":{"type":"function","file":"git2/repository.h","line":580,"lineto":585,"args":[{"name":"out","type":"git_oid *","comment":"Output value of calculated SHA"},{"name":"repo","type":"git_repository *","comment":"Repository pointer"},{"name":"path","type":"const char *","comment":"Path to file on disk whose contents should be hashed. If the\n repository is not NULL, this can be a relative path."},{"name":"type","type":"git_otype","comment":"The object type to hash as (e.g. GIT_OBJ_BLOB)"},{"name":"as_path","type":"const char *","comment":"The path to use to look up filtering rules. If this is\n NULL, then the `path` parameter will be used instead. If\n this is passed as the empty string, then no filters will be\n applied when calculating the hash."}],"argline":"git_oid *out, git_repository *repo, const char *path, git_otype type, const char *as_path","sig":"git_oid *::git_repository *::const char *::git_otype::const char *","return":{"type":"int","comment":" 0 on success, or an error code"},"description":"Calculate hash of file using repository filtering rules.
\n","comments":"If you simply want to calculate the hash of a file on disk with no filters, you can just use the git_odb_hashfile()
API. However, if you want to hash a file in the repository and you want to apply filtering rules (e.g. crlf filters) before generating the SHA, then use this function.
Note: if the repository has core.safecrlf
set to fail and the filtering triggers that failure, then this function will return an error and not calculate the hash of the file.
Make the repository HEAD point to the specified reference.
\n","comments":"If the provided reference points to a Tree or a Blob, the HEAD is unaltered and -1 is returned.
\n\nIf the provided reference points to a branch, the HEAD will point to that branch, staying attached, or become attached if it isn't yet. If the branch doesn't exist yet, no error will be return. The HEAD will then be attached to an unborn branch.
\n\nOtherwise, the HEAD will be detached and will directly point to the Commit.
\n","group":"repository"},"git_repository_set_head_detached":{"type":"function","file":"git2/repository.h","line":631,"lineto":635,"args":[{"name":"repo","type":"git_repository *","comment":"Repository pointer"},{"name":"commitish","type":"const git_oid *","comment":"Object id of the Commit the HEAD should point to"},{"name":"signature","type":"const git_signature *","comment":"The identity that will used to populate the reflog entry"},{"name":"log_message","type":"const char *","comment":"The one line long message to be appended to the reflog"}],"argline":"git_repository *repo, const git_oid *commitish, const git_signature *signature, const char *log_message","sig":"git_repository *::const git_oid *::const git_signature *::const char *","return":{"type":"int","comment":" 0 on success, or an error code"},"description":"Make the repository HEAD directly point to the Commit.
\n","comments":"If the provided committish cannot be found in the repository, the HEAD is unaltered and GIT_ENOTFOUND is returned.
\n\nIf the provided commitish cannot be peeled into a commit, the HEAD is unaltered and -1 is returned.
\n\nOtherwise, the HEAD will eventually be detached and will directly point to the peeled Commit.
\n","group":"repository"},"git_repository_detach_head":{"type":"function","file":"git2/repository.h","line":656,"lineto":659,"args":[{"name":"repo","type":"git_repository *","comment":"Repository pointer"},{"name":"signature","type":"const git_signature *","comment":"The identity that will used to populate the reflog entry"},{"name":"reflog_message","type":"const char *","comment":"The one line long message to be appended to the reflog"}],"argline":"git_repository *repo, const git_signature *signature, const char *reflog_message","sig":"git_repository *::const git_signature *::const char *","return":{"type":"int","comment":" 0 on success, GIT_EUNBORNBRANCH when HEAD points to a non existing\n branch or an error code"},"description":"Detach the HEAD.
\n","comments":"If the HEAD is already detached and points to a Commit, 0 is returned.
\n\nIf the HEAD is already detached and points to a Tag, the HEAD is updated into making it point to the peeled Commit, and 0 is returned.
\n\nIf the HEAD is already detached and points to a non commitish, the HEAD is unaltered, and -1 is returned.
\n\nOtherwise, the HEAD will be detached and point to the peeled Commit.
\n","group":"repository"},"git_repository_state":{"type":"function","file":"git2/repository.h","line":681,"lineto":681,"args":[{"name":"repo","type":"git_repository *","comment":"Repository pointer"}],"argline":"git_repository *repo","sig":"git_repository *","return":{"type":"int","comment":" The state of the repository"},"description":"Determines the status of a git repository - ie, whether an operation\n (merge, cherry-pick, etc) is in progress.
\n","comments":"","group":"repository"},"git_repository_set_namespace":{"type":"function","file":"git2/repository.h","line":695,"lineto":695,"args":[{"name":"repo","type":"git_repository *","comment":"The repo"},{"name":"nmspace","type":"const char *","comment":"The namespace. This should not include the refs\n\tfolder, e.g. to namespace all references under `refs/namespaces/foo/`,\n\tuse `foo` as the namespace."}],"argline":"git_repository *repo, const char *nmspace","sig":"git_repository *::const char *","return":{"type":"int","comment":" 0 on success, -1 on error"},"description":"Sets the active namespace for this Git Repository
\n","comments":"This namespace affects all reference operations for the repo. See man gitnamespaces
Get the currently active namespace for this repository
\n","comments":"","group":"repository"},"git_repository_is_shallow":{"type":"function","file":"git2/repository.h","line":712,"lineto":712,"args":[{"name":"repo","type":"git_repository *","comment":"The repository"}],"argline":"git_repository *repo","sig":"git_repository *","return":{"type":"int","comment":" 1 if shallow, zero if not"},"description":"Determine if the repository was a shallow clone
\n","comments":"","group":"repository"},"git_revert_init_options":{"type":"function","file":"git2/revert.h","line":44,"lineto":46,"args":[{"name":"opts","type":"git_revert_options *","comment":"the `git_revert_options` struct to initialize"},{"name":"version","type":"unsigned int","comment":"Version of struct; pass `GIT_REVERT_OPTIONS_VERSION`"}],"argline":"git_revert_options *opts, unsigned int version","sig":"git_revert_options *::unsigned int","return":{"type":"int","comment":" Zero on success; -1 on failure."},"description":"Initializes a git_revert_options
with default values. Equivalent to\n creating an instance with GIT_REVERT_OPTIONS_INIT.
Reverts the given commit against the given "our" commit, producing an\n index that reflects the result of the revert.
\n","comments":"The returned index must be freed explicitly with git_index_free
.
Reverts the given commit, producing changes in the working directory.
\n","comments":"","group":"revert"},"git_revparse_single":{"type":"function","file":"git2/revparse.h","line":37,"lineto":38,"args":[{"name":"out","type":"git_object **","comment":"pointer to output object"},{"name":"repo","type":"git_repository *","comment":"the repository to search in"},{"name":"spec","type":"const char *","comment":"the textual specification for an object"}],"argline":"git_object **out, git_repository *repo, const char *spec","sig":"git_object **::git_repository *::const char *","return":{"type":"int","comment":" 0 on success, GIT_ENOTFOUND, GIT_EAMBIGUOUS, GIT_EINVALIDSPEC or an error code"},"description":"Find a single object, as specified by a revision string.
\n","comments":"See man gitrevisions
, or http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for information on the syntax accepted.
The returned object should be released with git_object_free
when no longer needed.
Find a single object and intermediate reference by a revision string.
\n","comments":"See man gitrevisions
, or http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for information on the syntax accepted.
In some cases (@{<-n>}
or <branchname>@{upstream}
), the expression may point to an intermediate reference. When such expressions are being passed in, reference_out
will be valued as well.
The returned object should be released with git_object_free
and the returned reference with git_reference_free
when no longer needed.
Parse a revision string for from
, to
, and intent.
See man gitrevisions
or http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for information on the syntax accepted.
Allocate a new revision walker to iterate through a repo.
\n","comments":"This revision walker uses a custom memory pool and an internal commit cache, so it is relatively expensive to allocate.
\n\nFor maximum performance, this revision walker should be reused for different walks.
\n\nThis revision walker is not thread safe: it may only be used to walk a repository on a single thread; however, it is possible to have several revision walkers in several different threads walking the same repository.
\n","group":"revwalk","examples":{"general.c":["ex/v0.21.3/general.html#git_revwalk_new-56"],"log.c":["ex/v0.21.3/log.html#git_revwalk_new-44","ex/v0.21.3/log.html#git_revwalk_new-45"]}},"git_revwalk_reset":{"type":"function","file":"git2/revwalk.h","line":85,"lineto":85,"args":[{"name":"walker","type":"git_revwalk *","comment":"handle to reset."}],"argline":"git_revwalk *walker","sig":"git_revwalk *","return":{"type":"void","comment":null},"description":"Reset the revision walker for reuse.
\n","comments":"This will clear all the pushed and hidden commits, and leave the walker in a blank state (just like at creation) ready to receive new commit pushes and start a new walk.
\n\nThe revision walk is automatically reset when a walk is over.
\n","group":"revwalk"},"git_revwalk_push":{"type":"function","file":"git2/revwalk.h","line":102,"lineto":102,"args":[{"name":"walk","type":"git_revwalk *","comment":"the walker being used for the traversal."},{"name":"id","type":"const git_oid *","comment":"the oid of the commit to start from."}],"argline":"git_revwalk *walk, const git_oid *id","sig":"git_revwalk *::const git_oid *","return":{"type":"int","comment":" 0 or an error code"},"description":"Mark a commit to start traversal from.
\n","comments":"The given OID must belong to a committish on the walked repository.
\n\nThe given commit will be used as one of the roots when starting the revision walk. At least one commit must be pushed onto the walker before a walk can be started.
\n","group":"revwalk","examples":{"general.c":["ex/v0.21.3/general.html#git_revwalk_push-57"],"log.c":["ex/v0.21.3/log.html#git_revwalk_push-46"]}},"git_revwalk_push_glob":{"type":"function","file":"git2/revwalk.h","line":120,"lineto":120,"args":[{"name":"walk","type":"git_revwalk *","comment":"the walker being used for the traversal"},{"name":"glob","type":"const char *","comment":"the glob pattern references should match"}],"argline":"git_revwalk *walk, const char *glob","sig":"git_revwalk *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Push matching references
\n","comments":"The OIDs pointed to by the references that match the given glob pattern will be pushed to the revision walker.
\n\nA leading 'refs/' is implied if not present as well as a trailing '/*' if the glob lacks '?', '*' or '['.
\n\nAny references matching this glob which do not point to a committish will be ignored.
\n","group":"revwalk"},"git_revwalk_push_head":{"type":"function","file":"git2/revwalk.h","line":128,"lineto":128,"args":[{"name":"walk","type":"git_revwalk *","comment":"the walker being used for the traversal"}],"argline":"git_revwalk *walk","sig":"git_revwalk *","return":{"type":"int","comment":" 0 or an error code"},"description":"Push the repository's HEAD
\n","comments":"","group":"revwalk","examples":{"log.c":["ex/v0.21.3/log.html#git_revwalk_push_head-47"]}},"git_revwalk_hide":{"type":"function","file":"git2/revwalk.h","line":143,"lineto":143,"args":[{"name":"walk","type":"git_revwalk *","comment":"the walker being used for the traversal."},{"name":"commit_id","type":"const git_oid *","comment":"the oid of commit that will be ignored during the traversal"}],"argline":"git_revwalk *walk, const git_oid *commit_id","sig":"git_revwalk *::const git_oid *","return":{"type":"int","comment":" 0 or an error code"},"description":"Mark a commit (and its ancestors) uninteresting for the output.
\n","comments":"The given OID must belong to a committish on the walked repository.
\n\nThe resolved commit and all its parents will be hidden from the output on the revision walk.
\n","group":"revwalk","examples":{"log.c":["ex/v0.21.3/log.html#git_revwalk_hide-48"]}},"git_revwalk_hide_glob":{"type":"function","file":"git2/revwalk.h","line":162,"lineto":162,"args":[{"name":"walk","type":"git_revwalk *","comment":"the walker being used for the traversal"},{"name":"glob","type":"const char *","comment":"the glob pattern references should match"}],"argline":"git_revwalk *walk, const char *glob","sig":"git_revwalk *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Hide matching references.
\n","comments":"The OIDs pointed to by the references that match the given glob pattern and their ancestors will be hidden from the output on the revision walk.
\n\nA leading 'refs/' is implied if not present as well as a trailing '/*' if the glob lacks '?', '*' or '['.
\n\nAny references matching this glob which do not point to a committish will be ignored.
\n","group":"revwalk"},"git_revwalk_hide_head":{"type":"function","file":"git2/revwalk.h","line":170,"lineto":170,"args":[{"name":"walk","type":"git_revwalk *","comment":"the walker being used for the traversal"}],"argline":"git_revwalk *walk","sig":"git_revwalk *","return":{"type":"int","comment":" 0 or an error code"},"description":"Hide the repository's HEAD
\n","comments":"","group":"revwalk"},"git_revwalk_push_ref":{"type":"function","file":"git2/revwalk.h","line":181,"lineto":181,"args":[{"name":"walk","type":"git_revwalk *","comment":"the walker being used for the traversal"},{"name":"refname","type":"const char *","comment":"the reference to push"}],"argline":"git_revwalk *walk, const char *refname","sig":"git_revwalk *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Push the OID pointed to by a reference
\n","comments":"The reference must point to a committish.
\n","group":"revwalk"},"git_revwalk_hide_ref":{"type":"function","file":"git2/revwalk.h","line":192,"lineto":192,"args":[{"name":"walk","type":"git_revwalk *","comment":"the walker being used for the traversal"},{"name":"refname","type":"const char *","comment":"the reference to hide"}],"argline":"git_revwalk *walk, const char *refname","sig":"git_revwalk *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Hide the OID pointed to by a reference
\n","comments":"The reference must point to a committish.
\n","group":"revwalk"},"git_revwalk_next":{"type":"function","file":"git2/revwalk.h","line":212,"lineto":212,"args":[{"name":"out","type":"git_oid *","comment":"Pointer where to store the oid of the next commit"},{"name":"walk","type":"git_revwalk *","comment":"the walker to pop the commit from."}],"argline":"git_oid *out, git_revwalk *walk","sig":"git_oid *::git_revwalk *","return":{"type":"int","comment":" 0 if the next commit was found;\n\tGIT_ITEROVER if there are no commits left to iterate"},"description":"Get the next commit from the revision walk.
\n","comments":"The initial call to this method is not blocking when iterating through a repo with a time-sorting mode.
\n\nIterating with Topological or inverted modes makes the initial call blocking to preprocess the commit list, but this block should be mostly unnoticeable on most repositories (topological preprocessing times at 0.3s on the git.git repo).
\n\nThe revision walker is reset when the walk is over.
\n","group":"revwalk","examples":{"general.c":["ex/v0.21.3/general.html#git_revwalk_next-58"],"log.c":["ex/v0.21.3/log.html#git_revwalk_next-49"]}},"git_revwalk_sorting":{"type":"function","file":"git2/revwalk.h","line":223,"lineto":223,"args":[{"name":"walk","type":"git_revwalk *","comment":"the walker being used for the traversal."},{"name":"sort_mode","type":"unsigned int","comment":"combination of GIT_SORT_XXX flags"}],"argline":"git_revwalk *walk, unsigned int sort_mode","sig":"git_revwalk *::unsigned int","return":{"type":"void","comment":null},"description":"Change the sorting mode when iterating through the\n repository's contents.
\n","comments":"Changing the sorting mode resets the walker.
\n","group":"revwalk","examples":{"general.c":["ex/v0.21.3/general.html#git_revwalk_sorting-59"],"log.c":["ex/v0.21.3/log.html#git_revwalk_sorting-50","ex/v0.21.3/log.html#git_revwalk_sorting-51"]}},"git_revwalk_push_range":{"type":"function","file":"git2/revwalk.h","line":238,"lineto":238,"args":[{"name":"walk","type":"git_revwalk *","comment":"the walker being used for the traversal"},{"name":"range","type":"const char *","comment":"the range"}],"argline":"git_revwalk *walk, const char *range","sig":"git_revwalk *::const char *","return":{"type":"int","comment":" 0 or an error code"},"description":"Push and hide the respective endpoints of the given range.
\n","comments":"The range should be of the form
Simplify the history by first-parent
\n","comments":"No parents other than the first for each commit will be enqueued.
\n","group":"revwalk"},"git_revwalk_free":{"type":"function","file":"git2/revwalk.h","line":253,"lineto":253,"args":[{"name":"walk","type":"git_revwalk *","comment":"traversal handle to close. If NULL nothing occurs."}],"argline":"git_revwalk *walk","sig":"git_revwalk *","return":{"type":"void","comment":null},"description":"Free a revision walker previously allocated.
\n","comments":"","group":"revwalk","examples":{"general.c":["ex/v0.21.3/general.html#git_revwalk_free-60"],"log.c":["ex/v0.21.3/log.html#git_revwalk_free-52"]}},"git_revwalk_repository":{"type":"function","file":"git2/revwalk.h","line":262,"lineto":262,"args":[{"name":"walk","type":"git_revwalk *","comment":"the revision walker"}],"argline":"git_revwalk *walk","sig":"git_revwalk *","return":{"type":"git_repository *","comment":" the repository being walked"},"description":"Return the repository on which this walker\n is operating.
\n","comments":"","group":"revwalk"},"git_revwalk_add_hide_cb":{"type":"function","file":"git2/revwalk.h","line":283,"lineto":286,"args":[{"name":"walk","type":"git_revwalk *","comment":"the revision walker"},{"name":"hide_cb","type":"git_revwalk_hide_cb","comment":"callback function to hide a commit and its parents"},{"name":"payload","type":"void *","comment":"data payload to be passed to callback function"}],"argline":"git_revwalk *walk, git_revwalk_hide_cb hide_cb, void *payload","sig":"git_revwalk *::git_revwalk_hide_cb::void *","return":{"type":"int","comment":null},"description":"Adds a callback function to hide a commit and its parents
\n","comments":"","group":"revwalk"},"git_signature_new":{"type":"function","file":"git2/signature.h","line":37,"lineto":37,"args":[{"name":"out","type":"git_signature **","comment":"new signature, in case of error NULL"},{"name":"name","type":"const char *","comment":"name of the person"},{"name":"email","type":"const char *","comment":"email of the person"},{"name":"time","type":"git_time_t","comment":"time when the action happened"},{"name":"offset","type":"int","comment":"timezone offset in minutes for the time"}],"argline":"git_signature **out, const char *name, const char *email, git_time_t time, int offset","sig":"git_signature **::const char *::const char *::git_time_t::int","return":{"type":"int","comment":" 0 or an error code"},"description":"Create a new action signature.
\n","comments":"Call git_signature_free()
to free the data.
Note: angle brackets ('<' and '>') characters are not allowed to be used in either the name
or the email
parameter.
Create a new action signature with a timestamp of 'now'.
\n","comments":"Call git_signature_free()
to free the data.
Create a new action signature with default user and now timestamp.
\n","comments":"This looks up the user.name and user.email from the configuration and uses the current time as the timestamp, and creates a new signature based on that information. It will return GIT_ENOTFOUND if either the user.name or user.email are not set.
\n","group":"signature","examples":{"init.c":["ex/v0.21.3/init.html#git_signature_default-9"],"tag.c":["ex/v0.21.3/tag.html#git_signature_default-15"]}},"git_signature_dup":{"type":"function","file":"git2/signature.h","line":75,"lineto":75,"args":[{"name":"dest","type":"git_signature **","comment":"pointer where to store the copy"},{"name":"sig","type":"const git_signature *","comment":"signature to duplicate"}],"argline":"git_signature **dest, const git_signature *sig","sig":"git_signature **::const git_signature *","return":{"type":"int","comment":" 0 or an error code"},"description":"Create a copy of an existing signature. All internal strings are also\n duplicated.
\n","comments":"Call git_signature_free()
to free the data.
Free an existing signature.
\n","comments":"Because the signature is not an opaque structure, it is legal to free it manually, but be sure to free the "name" and "email" strings in addition to the structure itself.
\n","group":"signature","examples":{"init.c":["ex/v0.21.3/init.html#git_signature_free-10"],"tag.c":["ex/v0.21.3/tag.html#git_signature_free-16"]}},"git_stash_foreach":{"type":"function","file":"git2/stash.h","line":95,"lineto":98,"args":[{"name":"repo","type":"git_repository *","comment":"Repository where to find the stash."},{"name":"callback","type":"git_stash_cb","comment":"Callback to invoke per found stashed state. The most\n recent stash state will be enumerated first."},{"name":"payload","type":"void *","comment":"Extra parameter to callback function."}],"argline":"git_repository *repo, git_stash_cb callback, void *payload","sig":"git_repository *::git_stash_cb::void *","return":{"type":"int","comment":" 0 on success, non-zero callback return value, or error code"},"description":"Loop over all the stashed states and issue a callback for each one.
\n","comments":"If the callback returns a non-zero value, this will stop looping.
\n","group":"stash"},"git_status_init_options":{"type":"function","file":"git2/status.h","line":191,"lineto":193,"args":[{"name":"opts","type":"git_status_options *","comment":"The `git_status_options` instance to initialize."},{"name":"version","type":"unsigned int","comment":"Version of struct; pass `GIT_STATUS_OPTIONS_VERSION`"}],"argline":"git_status_options *opts, unsigned int version","sig":"git_status_options *::unsigned int","return":{"type":"int","comment":" Zero on success; -1 on failure."},"description":"Initializes a git_status_options
with default values. Equivalent to\n creating an instance with GIT_STATUS_OPTIONS_INIT.
Gather file statuses and run a callback for each one.
\n","comments":"The callback is passed the path of the file, the status (a combination of the git_status_t
values above) and the payload
data pointer passed into this function.
If the callback returns a non-zero value, this function will stop looping and return that value to caller.
\n","group":"status","examples":{"status.c":["ex/v0.21.3/status.html#git_status_foreach-8"]}},"git_status_foreach_ext":{"type":"function","file":"git2/status.h","line":255,"lineto":259,"args":[{"name":"repo","type":"git_repository *","comment":"Repository object"},{"name":"opts","type":"const git_status_options *","comment":"Status options structure"},{"name":"callback","type":"git_status_cb","comment":"The function to call on each file"},{"name":"payload","type":"void *","comment":"Pointer to pass through to callback function"}],"argline":"git_repository *repo, const git_status_options *opts, git_status_cb callback, void *payload","sig":"git_repository *::const git_status_options *::git_status_cb::void *","return":{"type":"int","comment":" 0 on success, non-zero callback return value, or error code"},"description":"Gather file status information and run callbacks as requested.
\n","comments":"This is an extended version of the git_status_foreach()
API that allows for more granular control over which paths will be processed and in what order. See the git_status_options
structure for details about the additional controls that this makes available.
Note that if a pathspec
is given in the git_status_options
to filter the status, then the results from rename detection (if you enable it) may not be accurate. To do rename detection properly, this must be called with no pathspec
so that all files can be considered.
Get file status for a single file.
\n","comments":"This tries to get status for the filename that you give. If no files match that name (in either the HEAD, index, or working directory), this returns GIT_ENOTFOUND.
\n\nIf the name matches multiple files (for example, if the path
names a directory or if running on a case- insensitive filesystem and yet the HEAD has two entries that both match the path), then this returns GIT_EAMBIGUOUS because it cannot give correct results.
This does not do any sort of rename detection. Renames require a set of targets and because of the path filtering, there is not enough information to check renames correctly. To check file status with rename detection, there is no choice but to do a full git_status_list_new
and scan through looking for the path that you are interested in.
Gather file status information and populate the git_status_list
.
Note that if a pathspec
is given in the git_status_options
to filter the status, then the results from rename detection (if you enable it) may not be accurate. To do rename detection properly, this must be called with no pathspec
so that all files can be considered.
Free an existing status list
\n","comments":"","group":"status","examples":{"status.c":["ex/v0.21.3/status.html#git_status_list_free-12"]}},"git_status_should_ignore":{"type":"function","file":"git2/status.h","line":358,"lineto":361,"args":[{"name":"ignored","type":"int *","comment":"Boolean returning 0 if the file is not ignored, 1 if it is"},{"name":"repo","type":"git_repository *","comment":"A repository object"},{"name":"path","type":"const char *","comment":"The file to check ignores for, rooted at the repo's workdir."}],"argline":"int *ignored, git_repository *repo, const char *path","sig":"int *::git_repository *::const char *","return":{"type":"int","comment":" 0 if ignore rules could be processed for the file (regardless\n of whether it exists or not), or an error \n<\n 0 if they could not."},"description":"Test if the ignore rules apply to a given file.
\n","comments":"This function checks the ignore rules to see if they would apply to the given file. This indicates if the file would be ignored regardless of whether the file is already in the index or committed to the repository.
\n\nOne way to think of this is if you were to do "git add ." on the directory containing the file, would it be added or not?
\n","group":"status"},"git_strarray_free":{"type":"function","file":"git2/strarray.h","line":41,"lineto":41,"args":[{"name":"array","type":"git_strarray *","comment":"git_strarray from which to free string data"}],"argline":"git_strarray *array","sig":"git_strarray *","return":{"type":"void","comment":null},"description":"Close a string array object
\n","comments":"This method should be called on git_strarray
objects where the strings array is allocated and contains allocated strings, such as what you would get from git_strarray_copy()
. Not doing so, will result in a memory leak.
This does not free the git_strarray
itself, since the library will never allocate that object directly itself (it is more commonly embedded inside another struct or created on the stack).
Copy a string array object from source to target.
\n","comments":"Note: target is overwritten and hence should be empty, otherwise its contents are leaked. Call git_strarray_free() if necessary.
\n","group":"strarray"},"git_submodule_lookup":{"type":"function","file":"git2/submodule.h","line":135,"lineto":138,"args":[{"name":"out","type":"git_submodule **","comment":"Output ptr to submodule; pass NULL to just get return code"},{"name":"repo","type":"git_repository *","comment":"The parent repository"},{"name":"name","type":"const char *","comment":"The name of or path to the submodule; trailing slashes okay"}],"argline":"git_submodule **out, git_repository *repo, const char *name","sig":"git_submodule **::git_repository *::const char *","return":{"type":"int","comment":" 0 on success, GIT_ENOTFOUND if submodule does not exist,\n GIT_EEXISTS if a repository is found in working directory only,\n -1 on other errors."},"description":"Lookup submodule information by name or path.
\n","comments":"Given either the submodule name or path (they are usually the same), this returns a structure describing the submodule.
\n\nThere are two expected error scenarios:
\n\nYou must call git_submodule_free
when done with the submodule.
Release a submodule
\n","comments":"","group":"submodule","examples":{"status.c":["ex/v0.21.3/status.html#git_submodule_free-14"]}},"git_submodule_foreach":{"type":"function","file":"git2/submodule.h","line":165,"lineto":168,"args":[{"name":"repo","type":"git_repository *","comment":"The repository"},{"name":"callback","type":"int (*)(git_submodule *, const char *, void *)","comment":"Function to be called with the name of each submodule.\n Return a non-zero value to terminate the iteration."},{"name":"payload","type":"void *","comment":"Extra data to pass to callback"}],"argline":"git_repository *repo, int (*)(git_submodule *, const char *, void *) callback, void *payload","sig":"git_repository *::int (*)(git_submodule *, const char *, void *)::void *","return":{"type":"int","comment":" 0 on success, -1 on error, or non-zero return value of callback"},"description":"Iterate over all tracked submodules of a repository.
\n","comments":"See the note on git_submodule
above. This iterates over the tracked submodules as decribed therein.
If you are concerned about items in the working directory that look like submodules but are not tracked, the diff API will generate a diff record for workdir items that look like submodules but are not tracked, showing them as added in the workdir. Also, the status API will treat the entire subdirectory of a contained git repo as a single GIT_STATUS_WT_NEW item.
\n","group":"submodule","examples":{"status.c":["ex/v0.21.3/status.html#git_submodule_foreach-15"]}},"git_submodule_add_setup":{"type":"function","file":"git2/submodule.h","line":195,"lineto":200,"args":[{"name":"out","type":"git_submodule **","comment":"The newly created submodule ready to open for clone"},{"name":"repo","type":"git_repository *","comment":"The repository in which you want to create the submodule"},{"name":"url","type":"const char *","comment":"URL for the submodule's remote"},{"name":"path","type":"const char *","comment":"Path at which the submodule should be created"},{"name":"use_gitlink","type":"int","comment":"Should workdir contain a gitlink to the repo in\n .git/modules vs. repo directly in workdir."}],"argline":"git_submodule **out, git_repository *repo, const char *url, const char *path, int use_gitlink","sig":"git_submodule **::git_repository *::const char *::const char *::int","return":{"type":"int","comment":" 0 on success, GIT_EEXISTS if submodule already exists,\n -1 on other errors."},"description":"Set up a new git submodule for checkout.
\n","comments":"This does "git submodule add" up to the fetch and checkout of the submodule contents. It preps a new submodule, creates an entry in .gitmodules and creates an empty initialized repository either at the given path in the working directory or in .git/modules with a gitlink from the working directory to the new repo.
\n\nTo fully emulate "git submodule add" call this function, then open the submodule repo and perform the clone step as needed. Lastly, call git_submodule_add_finalize()
to wrap up adding the new submodule and .gitmodules to the index to be ready to commit.
You must call git_submodule_free
on the submodule object when done.
Resolve the setup of a new git submodule.
\n","comments":"This should be called on a submodule once you have called add setup and done the clone of the submodule. This adds the .gitmodules file and the newly cloned submodule to the index to be ready to be committed (but doesn't actually do the commit).
\n","group":"submodule"},"git_submodule_add_to_index":{"type":"function","file":"git2/submodule.h","line":224,"lineto":226,"args":[{"name":"submodule","type":"git_submodule *","comment":"The submodule to add to the index"},{"name":"write_index","type":"int","comment":"Boolean if this should immediately write the index\n file. If you pass this as false, you will have to get the\n git_index and explicitly call `git_index_write()` on it to\n save the change."}],"argline":"git_submodule *submodule, int write_index","sig":"git_submodule *::int","return":{"type":"int","comment":" 0 on success, \n<\n0 on failure"},"description":"Add current submodule HEAD commit to index of superproject.
\n","comments":"","group":"submodule"},"git_submodule_save":{"type":"function","file":"git2/submodule.h","line":240,"lineto":240,"args":[{"name":"submodule","type":"git_submodule *","comment":"The submodule to write."}],"argline":"git_submodule *submodule","sig":"git_submodule *","return":{"type":"int","comment":" 0 on success, \n<\n0 on failure."},"description":"Write submodule settings to .gitmodules file.
\n","comments":"This commits any in-memory changes to the submodule to the gitmodules file on disk. You may also be interested in git_submodule_init()
which writes submodule info to ".git/config" (which is better for local changes to submodule settings) and/or git_submodule_sync()
which writes settings about remotes to the actual submodule repository.
Get the containing repository for a submodule.
\n","comments":"This returns a pointer to the repository that contains the submodule. This is a just a reference to the repository that was passed to the original git_submodule_lookup()
call, so if that repository has been freed, then this may be a dangling reference.
Get the name of submodule.
\n","comments":"","group":"submodule","examples":{"status.c":["ex/v0.21.3/status.html#git_submodule_name-16"]}},"git_submodule_path":{"type":"function","file":"git2/submodule.h","line":272,"lineto":272,"args":[{"name":"submodule","type":"git_submodule *","comment":"Pointer to submodule object"}],"argline":"git_submodule *submodule","sig":"git_submodule *","return":{"type":"const char *","comment":" Pointer to the submodule path"},"description":"Get the path to the submodule.
\n","comments":"The path is almost always the same as the submodule name, but the two are actually not required to match.
\n","group":"submodule","examples":{"status.c":["ex/v0.21.3/status.html#git_submodule_path-17"]}},"git_submodule_url":{"type":"function","file":"git2/submodule.h","line":280,"lineto":280,"args":[{"name":"submodule","type":"git_submodule *","comment":"Pointer to submodule object"}],"argline":"git_submodule *submodule","sig":"git_submodule *","return":{"type":"const char *","comment":" Pointer to the submodule url"},"description":"Get the URL for the submodule.
\n","comments":"","group":"submodule"},"git_submodule_branch":{"type":"function","file":"git2/submodule.h","line":298,"lineto":298,"args":[{"name":"submodule","type":"git_submodule *","comment":"Pointer to submodule object"}],"argline":"git_submodule *submodule","sig":"git_submodule *","return":{"type":"const char *","comment":" Pointer to the submodule branch"},"description":"Get the branch for the submodule.
\n","comments":"","group":"submodule"},"git_submodule_set_url":{"type":"function","file":"git2/submodule.h","line":314,"lineto":314,"args":[{"name":"submodule","type":"git_submodule *","comment":"Pointer to the submodule object"},{"name":"url","type":"const char *","comment":"URL that should be used for the submodule"}],"argline":"git_submodule *submodule, const char *url","sig":"git_submodule *::const char *","return":{"type":"int","comment":" 0 on success, \n<\n0 on failure"},"description":"Set the URL for the submodule.
\n","comments":"This sets the URL in memory for the submodule. This will be used for any following submodule actions while this submodule data is in memory.
\n\nAfter calling this, you may wish to call git_submodule_save()
to write the changes back to the ".gitmodules" file and git_submodule_sync()
to write the changes to the checked out submodule repository.
Get the OID for the submodule in the index.
\n","comments":"","group":"submodule"},"git_submodule_head_id":{"type":"function","file":"git2/submodule.h","line":330,"lineto":330,"args":[{"name":"submodule","type":"git_submodule *","comment":"Pointer to submodule object"}],"argline":"git_submodule *submodule","sig":"git_submodule *","return":{"type":"const git_oid *","comment":" Pointer to git_oid or NULL if submodule is not in the HEAD."},"description":"Get the OID for the submodule in the current HEAD tree.
\n","comments":"","group":"submodule"},"git_submodule_wd_id":{"type":"function","file":"git2/submodule.h","line":343,"lineto":343,"args":[{"name":"submodule","type":"git_submodule *","comment":"Pointer to submodule object"}],"argline":"git_submodule *submodule","sig":"git_submodule *","return":{"type":"const git_oid *","comment":" Pointer to git_oid or NULL if submodule is not checked out."},"description":"Get the OID for the submodule in the current working directory.
\n","comments":"This returns the OID that corresponds to looking up 'HEAD' in the checked out submodule. If there are pending changes in the index or anything else, this won't notice that. You should call git_submodule_status()
for a more complete picture about the state of the working directory.
Get the ignore rule that will be used for the submodule.
\n","comments":"These values control the behavior of git_submodule_status()
for this submodule. There are four ignore values:
git_status_foreach()
on the submodule) but UNTRACKED files will not count as making the submodule dirty. - GIT_SUBMODULE_IGNORE_DIRTY means to only check if the HEAD of the submodule has moved for status. This is fast since it does not need to scan the working tree of the submodule at all. - GIT_SUBMODULE_IGNORE_ALL means not to open the submodule repo. The working directory will be consider clean so long as there is a checked out version present.plus the special GIT_SUBMODULE_IGNORE_RESET which can be used with git_submodule_set_ignore()
to revert to the on-disk setting.
Set the ignore rule for the submodule.
\n","comments":"This sets the in-memory ignore rule for the submodule which will control the behavior of git_submodule_status()
.
To make changes persistent, call git_submodule_save()
to write the value to disk (in the ".gitmodules" and ".git/config" files).
Call with GIT_SUBMODULE_IGNORE_RESET
or call git_submodule_reload()
to revert the in-memory rule to the value that is on disk.
Get the update rule that will be used for the submodule.
\n","comments":"This value controls the behavior of the git submodule update
command. There are four useful values documented with git_submodule_update_t
plus the GIT_SUBMODULE_UPDATE_RESET
which can be used to revert to the on-disk setting.
Set the update rule for the submodule.
\n","comments":"The initial value comes from the ".git/config" setting of submodule.$name.update
for this submodule (which is initialized from the ".gitmodules" file). Using this function sets the update rule in memory for the submodule. Call git_submodule_save()
to write out the new update rule.
Calling this again with GIT_SUBMODULE_UPDATE_RESET or calling git_submodule_reload()
will revert the rule to the on disk value.
Read the fetchRecurseSubmodules rule for a submodule.
\n","comments":"This accesses the submodule.
Note that at this time, libgit2 does not honor this setting and the fetch functionality current ignores submodules.
\n","group":"submodule"},"git_submodule_set_fetch_recurse_submodules":{"type":"function","file":"git2/submodule.h","line":454,"lineto":456,"args":[{"name":"submodule","type":"git_submodule *","comment":"The submodule to modify"},{"name":"fetch_recurse_submodules","type":"git_submodule_recurse_t","comment":"Boolean value"}],"argline":"git_submodule *submodule, git_submodule_recurse_t fetch_recurse_submodules","sig":"git_submodule *::git_submodule_recurse_t","return":{"type":"git_submodule_recurse_t","comment":" old value for fetchRecurseSubmodules"},"description":"Set the fetchRecurseSubmodules rule for a submodule.
\n","comments":"This sets the submodule.git_submodule_save()
if you want to persist the new value.
Copy submodule info into ".git/config" file.
\n","comments":"Just like "git submodule init", this copies information about the submodule into ".git/config". You can use the accessor functions above to alter the in-memory git_submodule object and control what is written to the config, overriding what is in .gitmodules.
\n","group":"submodule"},"git_submodule_sync":{"type":"function","file":"git2/submodule.h","line":481,"lineto":481,"args":[{"name":"submodule","type":"git_submodule *","comment":null}],"argline":"git_submodule *submodule","sig":"git_submodule *","return":{"type":"int","comment":null},"description":"Copy submodule remote info into submodule repo.
\n","comments":"This copies the information about the submodules URL into the checked out submodule config, acting like "git submodule sync". This is useful if you have altered the URL for the submodule (or it has been altered by a fetch of upstream changes) and you need to update your local repo.
\n","group":"submodule"},"git_submodule_open":{"type":"function","file":"git2/submodule.h","line":495,"lineto":497,"args":[{"name":"repo","type":"git_repository **","comment":"Pointer to the submodule repo which was opened"},{"name":"submodule","type":"git_submodule *","comment":"Submodule to be opened"}],"argline":"git_repository **repo, git_submodule *submodule","sig":"git_repository **::git_submodule *","return":{"type":"int","comment":" 0 on success, \n<\n0 if submodule repo could not be opened."},"description":"Open the repository for a submodule.
\n","comments":"This is a newly opened repository object. The caller is responsible for calling git_repository_free()
on it when done. Multiple calls to this function will return distinct git_repository
objects. This will only work if the submodule is checked out into the working directory.
Reread submodule info from config, index, and HEAD.
\n","comments":"Call this to reread cached submodule information for this submodule if you have reason to believe that it has changed.
\n","group":"submodule"},"git_submodule_reload_all":{"type":"function","file":"git2/submodule.h","line":520,"lineto":520,"args":[{"name":"repo","type":"git_repository *","comment":"The repository to reload submodule data for"},{"name":"force","type":"int","comment":"Force full reload even if the data doesn't seem out of date"}],"argline":"git_repository *repo, int force","sig":"git_repository *::int","return":{"type":"int","comment":" 0 on success, \n<\n0 on error"},"description":"Reread all submodule info.
\n","comments":"Call this to reload all cached submodule information for the repo.
\n","group":"submodule"},"git_submodule_status":{"type":"function","file":"git2/submodule.h","line":535,"lineto":537,"args":[{"name":"status","type":"unsigned int *","comment":"Combination of `GIT_SUBMODULE_STATUS` flags"},{"name":"submodule","type":"git_submodule *","comment":"Submodule for which to get status"}],"argline":"unsigned int *status, git_submodule *submodule","sig":"unsigned int *::git_submodule *","return":{"type":"int","comment":" 0 on success, \n<\n0 on error"},"description":"Get the status for a submodule.
\n","comments":"This looks at a submodule and tries to determine the status. It will return a combination of the GIT_SUBMODULE_STATUS
values above. How deeply it examines the working directory to do this will depend on the git_submodule_ignore_t
value for the submodule - which can be set either temporarily or permanently with git_submodule_set_ignore()
.
Get the locations of submodule information.
\n","comments":"This is a bit like a very lightweight version of git_submodule_status
. It just returns a made of the first four submodule status values (i.e. the ones like GIT_SUBMODULE_STATUS_IN_HEAD, etc) that tell you where the submodule data comes from (i.e. the HEAD commit, gitmodules file, etc.). This can be useful if you want to know if the submodule is present in the working directory at this point in time, etc.
Lookup a tag object from the repository.
\n","comments":"","group":"tag","examples":{"general.c":["ex/v0.21.3/general.html#git_tag_lookup-64"]}},"git_tag_free":{"type":"function","file":"git2/tag.h","line":61,"lineto":61,"args":[{"name":"tag","type":"git_tag *","comment":"the tag to close"}],"argline":"git_tag *tag","sig":"git_tag *","return":{"type":"void","comment":null},"description":"Close an open tag
\n","comments":"You can no longer use the git_tag pointer after this call.
\n\nIMPORTANT: You MUST call this method when you are through with a tag to release memory. Failure to do so will cause a memory leak.
\n","group":"tag"},"git_tag_id":{"type":"function","file":"git2/tag.h","line":69,"lineto":69,"args":[{"name":"tag","type":"const git_tag *","comment":"a previously loaded tag."}],"argline":"const git_tag *tag","sig":"const git_tag *","return":{"type":"const git_oid *","comment":" object identity for the tag."},"description":"Get the id of a tag.
\n","comments":"","group":"tag"},"git_tag_owner":{"type":"function","file":"git2/tag.h","line":77,"lineto":77,"args":[{"name":"tag","type":"const git_tag *","comment":"A previously loaded tag."}],"argline":"const git_tag *tag","sig":"const git_tag *","return":{"type":"git_repository *","comment":" Repository that contains this tag."},"description":"Get the repository that contains the tag.
\n","comments":"","group":"tag"},"git_tag_target":{"type":"function","file":"git2/tag.h","line":89,"lineto":89,"args":[{"name":"target_out","type":"git_object **","comment":"pointer where to store the target"},{"name":"tag","type":"const git_tag *","comment":"a previously loaded tag."}],"argline":"git_object **target_out, const git_tag *tag","sig":"git_object **::const git_tag *","return":{"type":"int","comment":" 0 or an error code"},"description":"Get the tagged object of a tag
\n","comments":"This method performs a repository lookup for the given object and returns it
\n","group":"tag","examples":{"general.c":["ex/v0.21.3/general.html#git_tag_target-65"]}},"git_tag_target_id":{"type":"function","file":"git2/tag.h","line":97,"lineto":97,"args":[{"name":"tag","type":"const git_tag *","comment":"a previously loaded tag."}],"argline":"const git_tag *tag","sig":"const git_tag *","return":{"type":"const git_oid *","comment":" pointer to the OID"},"description":"Get the OID of the tagged object of a tag
\n","comments":"","group":"tag","examples":{"cat-file.c":["ex/v0.21.3/cat-file.html#git_tag_target_id-27"]}},"git_tag_target_type":{"type":"function","file":"git2/tag.h","line":105,"lineto":105,"args":[{"name":"tag","type":"const git_tag *","comment":"a previously loaded tag."}],"argline":"const git_tag *tag","sig":"const git_tag *","return":{"type":"git_otype","comment":" type of the tagged object"},"description":"Get the type of a tag's tagged object
\n","comments":"","group":"tag","examples":{"cat-file.c":["ex/v0.21.3/cat-file.html#git_tag_target_type-28"],"general.c":["ex/v0.21.3/general.html#git_tag_target_type-66"]}},"git_tag_name":{"type":"function","file":"git2/tag.h","line":113,"lineto":113,"args":[{"name":"tag","type":"const git_tag *","comment":"a previously loaded tag."}],"argline":"const git_tag *tag","sig":"const git_tag *","return":{"type":"const char *","comment":" name of the tag"},"description":"Get the name of a tag
\n","comments":"","group":"tag","examples":{"cat-file.c":["ex/v0.21.3/cat-file.html#git_tag_name-29"],"general.c":["ex/v0.21.3/general.html#git_tag_name-67"],"tag.c":["ex/v0.21.3/tag.html#git_tag_name-18"]}},"git_tag_tagger":{"type":"function","file":"git2/tag.h","line":121,"lineto":121,"args":[{"name":"tag","type":"const git_tag *","comment":"a previously loaded tag."}],"argline":"const git_tag *tag","sig":"const git_tag *","return":{"type":"const git_signature *","comment":" reference to the tag's author or NULL when unspecified"},"description":"Get the tagger (author) of a tag
\n","comments":"","group":"tag","examples":{"cat-file.c":["ex/v0.21.3/cat-file.html#git_tag_tagger-30"]}},"git_tag_message":{"type":"function","file":"git2/tag.h","line":129,"lineto":129,"args":[{"name":"tag","type":"const git_tag *","comment":"a previously loaded tag."}],"argline":"const git_tag *tag","sig":"const git_tag *","return":{"type":"const char *","comment":" message of the tag or NULL when unspecified"},"description":"Get the message of a tag
\n","comments":"","group":"tag","examples":{"cat-file.c":["ex/v0.21.3/cat-file.html#git_tag_message-31","ex/v0.21.3/cat-file.html#git_tag_message-32"],"general.c":["ex/v0.21.3/general.html#git_tag_message-68"],"tag.c":["ex/v0.21.3/tag.html#git_tag_message-19"]}},"git_tag_create":{"type":"function","file":"git2/tag.h","line":171,"lineto":178,"args":[{"name":"oid","type":"git_oid *","comment":"Pointer where to store the OID of the\n newly created tag. If the tag already exists, this parameter\n will be the oid of the existing tag, and the function will\n return a GIT_EEXISTS error code."},{"name":"repo","type":"git_repository *","comment":"Repository where to store the tag"},{"name":"tag_name","type":"const char *","comment":"Name for the tag; this name is validated\n for consistency. It should also not conflict with an\n already existing tag name"},{"name":"target","type":"const git_object *","comment":"Object to which this tag points. This object\n must belong to the given `repo`."},{"name":"tagger","type":"const git_signature *","comment":"Signature of the tagger for this tag, and\n of the tagging time"},{"name":"message","type":"const char *","comment":"Full message for this tag"},{"name":"force","type":"int","comment":"Overwrite existing references"}],"argline":"git_oid *oid, git_repository *repo, const char *tag_name, const git_object *target, const git_signature *tagger, const char *message, int force","sig":"git_oid *::git_repository *::const char *::const git_object *::const git_signature *::const char *::int","return":{"type":"int","comment":" 0 on success, GIT_EINVALIDSPEC or an error code\n\tA tag object is written to the ODB, and a proper reference\n\tis written in the /refs/tags folder, pointing to it"},"description":"Create a new tag in the repository from an object
\n","comments":"A new reference will also be created pointing to this tag object. If force
is true and a reference already exists with the given name, it'll be replaced.
The message will not be cleaned up. This can be achieved through git_message_prettify()
.
The tag name will be checked for validity. You must avoid the characters '~', '^', ':', '\\', '?', '[', and '*', and the sequences ".." and "@{" which have special meaning to revparse.
\n","group":"tag","examples":{"tag.c":["ex/v0.21.3/tag.html#git_tag_create-20"]}},"git_tag_annotation_create":{"type":"function","file":"git2/tag.h","line":203,"lineto":209,"args":[{"name":"oid","type":"git_oid *","comment":"Pointer where to store the OID of the\n newly created tag"},{"name":"repo","type":"git_repository *","comment":"Repository where to store the tag"},{"name":"tag_name","type":"const char *","comment":"Name for the tag"},{"name":"target","type":"const git_object *","comment":"Object to which this tag points. This object\n must belong to the given `repo`."},{"name":"tagger","type":"const git_signature *","comment":"Signature of the tagger for this tag, and\n of the tagging time"},{"name":"message","type":"const char *","comment":"Full message for this tag"}],"argline":"git_oid *oid, git_repository *repo, const char *tag_name, const git_object *target, const git_signature *tagger, const char *message","sig":"git_oid *::git_repository *::const char *::const git_object *::const git_signature *::const char *","return":{"type":"int","comment":" 0 on success or an error code"},"description":"Create a new tag in the object database pointing to a git_object
\n","comments":"The message will not be cleaned up. This can be achieved through git_message_prettify()
.
Create a new tag in the repository from a buffer
\n","comments":"","group":"tag"},"git_tag_create_lightweight":{"type":"function","file":"git2/tag.h","line":256,"lineto":261,"args":[{"name":"oid","type":"git_oid *","comment":"Pointer where to store the OID of the provided\n target object. If the tag already exists, this parameter\n will be filled with the oid of the existing pointed object\n and the function will return a GIT_EEXISTS error code."},{"name":"repo","type":"git_repository *","comment":"Repository where to store the lightweight tag"},{"name":"tag_name","type":"const char *","comment":"Name for the tag; this name is validated\n for consistency. It should also not conflict with an\n already existing tag name"},{"name":"target","type":"const git_object *","comment":"Object to which this tag points. This object\n must belong to the given `repo`."},{"name":"force","type":"int","comment":"Overwrite existing references"}],"argline":"git_oid *oid, git_repository *repo, const char *tag_name, const git_object *target, int force","sig":"git_oid *::git_repository *::const char *::const git_object *::int","return":{"type":"int","comment":" 0 on success, GIT_EINVALIDSPEC or an error code\n\tA proper reference is written in the /refs/tags folder,\n pointing to the provided target object"},"description":"Create a new lightweight tag pointing at a target object
\n","comments":"A new direct reference will be created pointing to this target object. If force
is true and a reference already exists with the given name, it'll be replaced.
The tag name will be checked for validity. See git_tag_create()
for rules about valid names.
Delete an existing tag reference.
\n","comments":"The tag name will be checked for validity. See git_tag_create()
for rules about valid names.
Fill a list with all the tags in the Repository
\n","comments":"The string array will be filled with the names of the matching tags; these values are owned by the user and should be free'd manually when no longer needed, using git_strarray_free
.
Fill a list with all the tags in the Repository\n which name match a defined pattern
\n","comments":"If an empty pattern is provided, all the tags will be returned.
\n\nThe string array will be filled with the names of the matching tags; these values are owned by the user and should be free'd manually when no longer needed, using git_strarray_free
.
Call callback `cb' for each tag in the repository
\n","comments":"","group":"tag"},"git_tag_peel":{"type":"function","file":"git2/tag.h","line":346,"lineto":348,"args":[{"name":"tag_target_out","type":"git_object **","comment":"Pointer to the peeled git_object"},{"name":"tag","type":"const git_tag *","comment":"The tag to be processed"}],"argline":"git_object **tag_target_out, const git_tag *tag","sig":"git_object **::const git_tag *","return":{"type":"int","comment":" 0 or an error code"},"description":"Recursively peel a tag until a non tag git_object is found
\n","comments":"The retrieved tag_target
object is owned by the repository and should be closed with the git_object_free
method.
Init the threading system.
\n","comments":"If libgit2 has been built with GIT_THREADS on, this function must be called once before any other library functions.
\n\nIf libgit2 has been built without GIT_THREADS support, this function is a no-op.
\n","group":"threads","examples":{"blame.c":["ex/v0.21.3/blame.html#git_threads_init-24"],"cat-file.c":["ex/v0.21.3/cat-file.html#git_threads_init-33"],"diff.c":["ex/v0.21.3/diff.html#git_threads_init-14"],"init.c":["ex/v0.21.3/init.html#git_threads_init-11"],"log.c":["ex/v0.21.3/log.html#git_threads_init-53"],"network/git2.c":["ex/v0.21.3/network/git2.html#git_threads_init-5"],"rev-parse.c":["ex/v0.21.3/rev-parse.html#git_threads_init-14"],"status.c":["ex/v0.21.3/status.html#git_threads_init-19"],"tag.c":["ex/v0.21.3/tag.html#git_threads_init-24"]}},"git_threads_shutdown":{"type":"function","file":"git2/threads.h","line":45,"lineto":45,"args":[],"argline":"","sig":"","return":{"type":"void","comment":null},"description":"Shutdown the threading system.
\n","comments":"If libgit2 has been built with GIT_THREADS on, this function must be called before shutting down the library.
\n\nIf libgit2 has been built without GIT_THREADS support, this function is a no-op.
\n","group":"threads","examples":{"blame.c":["ex/v0.21.3/blame.html#git_threads_shutdown-25"],"cat-file.c":["ex/v0.21.3/cat-file.html#git_threads_shutdown-34"],"diff.c":["ex/v0.21.3/diff.html#git_threads_shutdown-15"],"init.c":["ex/v0.21.3/init.html#git_threads_shutdown-12"],"log.c":["ex/v0.21.3/log.html#git_threads_shutdown-54"],"rev-parse.c":["ex/v0.21.3/rev-parse.html#git_threads_shutdown-15"],"status.c":["ex/v0.21.3/status.html#git_threads_shutdown-20"],"tag.c":["ex/v0.21.3/tag.html#git_threads_shutdown-25"]}},"git_trace_set":{"type":"function","file":"git2/trace.h","line":63,"lineto":63,"args":[{"name":"level","type":"git_trace_level_t","comment":"Level to set tracing to"},{"name":"cb","type":"git_trace_callback","comment":"Function to call with trace data"}],"argline":"git_trace_level_t level, git_trace_callback cb","sig":"git_trace_level_t::git_trace_callback","return":{"type":"int","comment":" 0 or an error code"},"description":"Sets the system tracing configuration to the specified level with the\n specified callback. When system events occur at a level equal to, or\n lower than, the given level they will be reported to the given callback.
\n","comments":"","group":"trace"},"git_cred_has_username":{"type":"function","file":"git2/transport.h","line":116,"lineto":116,"args":[{"name":"cred","type":"git_cred *","comment":"object to check"}],"argline":"git_cred *cred","sig":"git_cred *","return":{"type":"int","comment":" 1 if the credential object has non-NULL username, 0 otherwise"},"description":"Check whether a credential object contains username information.
\n","comments":"","group":"cred"},"git_cred_userpass_plaintext_new":{"type":"function","file":"git2/transport.h","line":127,"lineto":130,"args":[{"name":"out","type":"git_cred **","comment":"The newly created credential object."},{"name":"username","type":"const char *","comment":"The username of the credential."},{"name":"password","type":"const char *","comment":"The password of the credential."}],"argline":"git_cred **out, const char *username, const char *password","sig":"git_cred **::const char *::const char *","return":{"type":"int","comment":" 0 for success or an error code for failure"},"description":"Create a new plain-text username and password credential object.\n The supplied credential parameter will be internally duplicated.
\n","comments":"","group":"cred"},"git_cred_ssh_key_new":{"type":"function","file":"git2/transport.h","line":143,"lineto":148,"args":[{"name":"out","type":"git_cred **","comment":"The newly created credential object."},{"name":"username","type":"const char *","comment":"username to use to authenticate"},{"name":"publickey","type":"const char *","comment":"The path to the public key of the credential."},{"name":"privatekey","type":"const char *","comment":"The path to the private key of the credential."},{"name":"passphrase","type":"const char *","comment":"The passphrase of the credential."}],"argline":"git_cred **out, const char *username, const char *publickey, const char *privatekey, const char *passphrase","sig":"git_cred **::const char *::const char *::const char *::const char *","return":{"type":"int","comment":" 0 for success or an error code for failure"},"description":"Create a new passphrase-protected ssh key credential object.\n The supplied credential parameter will be internally duplicated.
\n","comments":"","group":"cred"},"git_cred_ssh_interactive_new":{"type":"function","file":"git2/transport.h","line":159,"lineto":163,"args":[{"name":"out","type":"git_cred **","comment":null},{"name":"username","type":"const char *","comment":"Username to use to authenticate."},{"name":"prompt_callback","type":"git_cred_ssh_interactive_callback","comment":"The callback method used for prompts."},{"name":"payload","type":"void *","comment":"Additional data to pass to the callback."}],"argline":"git_cred **out, const char *username, git_cred_ssh_interactive_callback prompt_callback, void *payload","sig":"git_cred **::const char *::git_cred_ssh_interactive_callback::void *","return":{"type":"int","comment":" 0 for success or an error code for failure."},"description":"Create a new ssh keyboard-interactive based credential object.\n The supplied credential parameter will be internally duplicated.
\n","comments":"","group":"cred"},"git_cred_ssh_key_from_agent":{"type":"function","file":"git2/transport.h","line":173,"lineto":175,"args":[{"name":"out","type":"git_cred **","comment":"The newly created credential object."},{"name":"username","type":"const char *","comment":"username to use to authenticate"}],"argline":"git_cred **out, const char *username","sig":"git_cred **::const char *","return":{"type":"int","comment":" 0 for success or an error code for failure"},"description":"Create a new ssh key credential object used for querying an ssh-agent.\n The supplied credential parameter will be internally duplicated.
\n","comments":"","group":"cred"},"git_cred_default_new":{"type":"function","file":"git2/transport.h","line":209,"lineto":209,"args":[{"name":"out","type":"git_cred **","comment":null}],"argline":"git_cred **out","sig":"git_cred **","return":{"type":"int","comment":" 0 for success or an error code for failure"},"description":"Create a "default" credential usable for Negotiate mechanisms like NTLM\n or Kerberos authentication.
\n","comments":"","group":"cred"},"git_transport_init":{"type":"function","file":"git2/transport.h","line":323,"lineto":325,"args":[{"name":"opts","type":"git_transport *","comment":"the `git_transport` struct to initialize"},{"name":"version","type":"unsigned int","comment":"Version of struct; pass `GIT_TRANSPORT_VERSION`"}],"argline":"git_transport *opts, unsigned int version","sig":"git_transport *::unsigned int","return":{"type":"int","comment":" Zero on success; -1 on failure."},"description":"Initializes a git_transport
with default values. Equivalent to\n creating an instance with GIT_TRANSPORT_INIT.
Function to use to create a transport from a URL. The transport database\n is scanned to find a transport that implements the scheme of the URI (i.e.\n git:// or http://) and a transport object is returned to the caller.
\n","comments":"","group":"transport"},"git_transport_register":{"type":"function","file":"git2/transport.h","line":357,"lineto":361,"args":[{"name":"prefix","type":"const char *","comment":"The scheme (ending in \"://\") to match, i.e. \"git://\""},{"name":"priority","type":"unsigned int","comment":"The priority of this transport relative to others with\n\t\tthe same prefix. Built-in transports have a priority of 1."},{"name":"cb","type":"git_transport_cb","comment":"The callback used to create an instance of the transport"},{"name":"param","type":"void *","comment":"A fixed parameter to pass to cb at creation time"}],"argline":"const char *prefix, unsigned int priority, git_transport_cb cb, void *param","sig":"const char *::unsigned int::git_transport_cb::void *","return":{"type":"int","comment":" 0 or an error code"},"description":"Add a custom transport definition, to be used in addition to the built-in\n set of transports that come with libgit2.
\n","comments":"The caller is responsible for synchronizing calls to git_transport_register and git_transport_unregister with other calls to the library that instantiate transports.
\n","group":"transport"},"git_transport_unregister":{"type":"function","file":"git2/transport.h","line":372,"lineto":374,"args":[{"name":"prefix","type":"const char *","comment":"From the previous call to git_transport_register"},{"name":"priority","type":"unsigned int","comment":"From the previous call to git_transport_register"}],"argline":"const char *prefix, unsigned int priority","sig":"const char *::unsigned int","return":{"type":"int","comment":" 0 or an error code"},"description":"Unregister a custom transport definition which was previously registered\n with git_transport_register.
\n","comments":"","group":"transport"},"git_transport_dummy":{"type":"function","file":"git2/transport.h","line":387,"lineto":390,"args":[{"name":"out","type":"git_transport **","comment":"The newly created transport (out)"},{"name":"owner","type":"git_remote *","comment":"The git_remote which will own this transport"},{"name":"payload","type":"void *","comment":"You must pass NULL for this parameter."}],"argline":"git_transport **out, git_remote *owner, void *payload","sig":"git_transport **::git_remote *::void *","return":{"type":"int","comment":" 0 or an error code"},"description":"Create an instance of the dummy transport.
\n","comments":"","group":"transport"},"git_transport_local":{"type":"function","file":"git2/transport.h","line":400,"lineto":403,"args":[{"name":"out","type":"git_transport **","comment":"The newly created transport (out)"},{"name":"owner","type":"git_remote *","comment":"The git_remote which will own this transport"},{"name":"payload","type":"void *","comment":"You must pass NULL for this parameter."}],"argline":"git_transport **out, git_remote *owner, void *payload","sig":"git_transport **::git_remote *::void *","return":{"type":"int","comment":" 0 or an error code"},"description":"Create an instance of the local transport.
\n","comments":"","group":"transport"},"git_transport_smart":{"type":"function","file":"git2/transport.h","line":413,"lineto":416,"args":[{"name":"out","type":"git_transport **","comment":"The newly created transport (out)"},{"name":"owner","type":"git_remote *","comment":"The git_remote which will own this transport"},{"name":"payload","type":"void *","comment":"A pointer to a git_smart_subtransport_definition"}],"argline":"git_transport **out, git_remote *owner, void *payload","sig":"git_transport **::git_remote *::void *","return":{"type":"int","comment":" 0 or an error code"},"description":"Create an instance of the smart transport.
\n","comments":"","group":"transport"},"git_smart_subtransport_http":{"type":"function","file":"git2/transport.h","line":513,"lineto":515,"args":[{"name":"out","type":"git_smart_subtransport **","comment":"The newly created subtransport"},{"name":"owner","type":"git_transport *","comment":"The smart transport to own this subtransport"}],"argline":"git_smart_subtransport **out, git_transport *owner","sig":"git_smart_subtransport **::git_transport *","return":{"type":"int","comment":" 0 or an error code"},"description":"Create an instance of the http subtransport. This subtransport\n also supports https. On Win32, this subtransport may be implemented\n using the WinHTTP library.
\n","comments":"","group":"smart"},"git_smart_subtransport_git":{"type":"function","file":"git2/transport.h","line":524,"lineto":526,"args":[{"name":"out","type":"git_smart_subtransport **","comment":"The newly created subtransport"},{"name":"owner","type":"git_transport *","comment":"The smart transport to own this subtransport"}],"argline":"git_smart_subtransport **out, git_transport *owner","sig":"git_smart_subtransport **::git_transport *","return":{"type":"int","comment":" 0 or an error code"},"description":"Create an instance of the git subtransport.
\n","comments":"","group":"smart"},"git_smart_subtransport_ssh":{"type":"function","file":"git2/transport.h","line":535,"lineto":537,"args":[{"name":"out","type":"git_smart_subtransport **","comment":"The newly created subtransport"},{"name":"owner","type":"git_transport *","comment":"The smart transport to own this subtransport"}],"argline":"git_smart_subtransport **out, git_transport *owner","sig":"git_smart_subtransport **::git_transport *","return":{"type":"int","comment":" 0 or an error code"},"description":"Create an instance of the ssh subtransport.
\n","comments":"","group":"smart"},"git_tree_lookup":{"type":"function","file":"git2/tree.h","line":32,"lineto":33,"args":[{"name":"out","type":"git_tree **","comment":"Pointer to the looked up tree"},{"name":"repo","type":"git_repository *","comment":"The repo to use when locating the tree."},{"name":"id","type":"const git_oid *","comment":"Identity of the tree to locate."}],"argline":"git_tree **out, git_repository *repo, const git_oid *id","sig":"git_tree **::git_repository *::const git_oid *","return":{"type":"int","comment":" 0 or an error code"},"description":"Lookup a tree object from the repository.
\n","comments":"","group":"tree","examples":{"general.c":["ex/v0.21.3/general.html#git_tree_lookup-69","ex/v0.21.3/general.html#git_tree_lookup-70"],"init.c":["ex/v0.21.3/init.html#git_tree_lookup-13"]}},"git_tree_free":{"type":"function","file":"git2/tree.h","line":63,"lineto":63,"args":[{"name":"tree","type":"git_tree *","comment":"The tree to close"}],"argline":"git_tree *tree","sig":"git_tree *","return":{"type":"void","comment":null},"description":"Close an open tree
\n","comments":"You can no longer use the git_tree pointer after this call.
\n\nIMPORTANT: You MUST call this method when you stop using a tree to release memory. Failure to do so will cause a memory leak.
\n","group":"tree","examples":{"diff.c":["ex/v0.21.3/diff.html#git_tree_free-16","ex/v0.21.3/diff.html#git_tree_free-17"],"init.c":["ex/v0.21.3/init.html#git_tree_free-14"],"log.c":["ex/v0.21.3/log.html#git_tree_free-55","ex/v0.21.3/log.html#git_tree_free-56","ex/v0.21.3/log.html#git_tree_free-57","ex/v0.21.3/log.html#git_tree_free-58","ex/v0.21.3/log.html#git_tree_free-59"]}},"git_tree_id":{"type":"function","file":"git2/tree.h","line":71,"lineto":71,"args":[{"name":"tree","type":"const git_tree *","comment":"a previously loaded tree."}],"argline":"const git_tree *tree","sig":"const git_tree *","return":{"type":"const git_oid *","comment":" object identity for the tree."},"description":"Get the id of a tree.
\n","comments":"","group":"tree"},"git_tree_owner":{"type":"function","file":"git2/tree.h","line":79,"lineto":79,"args":[{"name":"tree","type":"const git_tree *","comment":"A previously loaded tree."}],"argline":"const git_tree *tree","sig":"const git_tree *","return":{"type":"git_repository *","comment":" Repository that contains this tree."},"description":"Get the repository that contains the tree.
\n","comments":"","group":"tree"},"git_tree_entry_byname":{"type":"function","file":"git2/tree.h","line":99,"lineto":100,"args":[{"name":"tree","type":"const git_tree *","comment":"a previously loaded tree."},{"name":"filename","type":"const char *","comment":"the filename of the desired entry"}],"argline":"const git_tree *tree, const char *filename","sig":"const git_tree *::const char *","return":{"type":"const git_tree_entry *","comment":" the tree entry; NULL if not found"},"description":"Lookup a tree entry by its filename
\n","comments":"This returns a git_tree_entry that is owned by the git_tree. You don't have to free it, but you must not use it after the git_tree is released.
\n","group":"tree","examples":{"general.c":["ex/v0.21.3/general.html#git_tree_entry_byname-71"]}},"git_tree_entry_byid":{"type":"function","file":"git2/tree.h","line":127,"lineto":128,"args":[{"name":"tree","type":"const git_tree *","comment":"a previously loaded tree."},{"name":"id","type":"const git_oid *","comment":"the sha being looked for"}],"argline":"const git_tree *tree, const git_oid *id","sig":"const git_tree *::const git_oid *","return":{"type":"const git_tree_entry *","comment":" the tree entry; NULL if not found"},"description":"Lookup a tree entry by SHA value.
\n","comments":"This returns a git_tree_entry that is owned by the git_tree. You don't have to free it, but you must not use it after the git_tree is released.
\n\nWarning: this must examine every entry in the tree, so it is not fast.
\n","group":"tree"},"git_tree_entry_bypath":{"type":"function","file":"git2/tree.h","line":142,"lineto":145,"args":[{"name":"out","type":"git_tree_entry **","comment":"Pointer where to store the tree entry"},{"name":"root","type":"const git_tree *","comment":"Previously loaded tree which is the root of the relative path"},{"name":"path","type":"const char *","comment":"Path to the contained entry"}],"argline":"git_tree_entry **out, const git_tree *root, const char *path","sig":"git_tree_entry **::const git_tree *::const char *","return":{"type":"int","comment":" 0 on success; GIT_ENOTFOUND if the path does not exist"},"description":"Retrieve a tree entry contained in a tree or in any of its subtrees,\n given its relative path.
\n","comments":"Unlike the other lookup functions, the returned tree entry is owned by the user and must be freed explicitly with git_tree_entry_free()
.
Duplicate a tree entry
\n","comments":"Create a copy of a tree entry. The returned copy is owned by the user, and must be freed explicitly with git_tree_entry_free()
.
Free a user-owned tree entry
\n","comments":"IMPORTANT: This function is only needed for tree entries owned by the user, such as the ones returned by git_tree_entry_dup()
or git_tree_entry_bypath()
.
Get the filename of a tree entry
\n","comments":"","group":"tree","examples":{"cat-file.c":["ex/v0.21.3/cat-file.html#git_tree_entry_name-35"],"general.c":["ex/v0.21.3/general.html#git_tree_entry_name-72","ex/v0.21.3/general.html#git_tree_entry_name-73"]}},"git_tree_entry_id":{"type":"function","file":"git2/tree.h","line":184,"lineto":184,"args":[{"name":"entry","type":"const git_tree_entry *","comment":"a tree entry"}],"argline":"const git_tree_entry *entry","sig":"const git_tree_entry *","return":{"type":"const git_oid *","comment":" the oid of the object"},"description":"Get the id of the object pointed by the entry
\n","comments":"","group":"tree","examples":{"cat-file.c":["ex/v0.21.3/cat-file.html#git_tree_entry_id-36"]}},"git_tree_entry_type":{"type":"function","file":"git2/tree.h","line":192,"lineto":192,"args":[{"name":"entry","type":"const git_tree_entry *","comment":"a tree entry"}],"argline":"const git_tree_entry *entry","sig":"const git_tree_entry *","return":{"type":"git_otype","comment":" the type of the pointed object"},"description":"Get the type of the object pointed by the entry
\n","comments":"","group":"tree","examples":{"cat-file.c":["ex/v0.21.3/cat-file.html#git_tree_entry_type-37"]}},"git_tree_entry_filemode":{"type":"function","file":"git2/tree.h","line":200,"lineto":200,"args":[{"name":"entry","type":"const git_tree_entry *","comment":"a tree entry"}],"argline":"const git_tree_entry *entry","sig":"const git_tree_entry *","return":{"type":"git_filemode_t","comment":" filemode as an integer"},"description":"Get the UNIX file attributes of a tree entry
\n","comments":"","group":"tree","examples":{"cat-file.c":["ex/v0.21.3/cat-file.html#git_tree_entry_filemode-38"]}},"git_tree_entry_filemode_raw":{"type":"function","file":"git2/tree.h","line":212,"lineto":212,"args":[{"name":"entry","type":"const git_tree_entry *","comment":"a tree entry"}],"argline":"const git_tree_entry *entry","sig":"const git_tree_entry *","return":{"type":"git_filemode_t","comment":" filemode as an integer"},"description":"Get the raw UNIX file attributes of a tree entry
\n","comments":"This function does not perform any normalization and is only useful if you need to be able to recreate the original tree object.
\n","group":"tree"},"git_tree_entry_cmp":{"type":"function","file":"git2/tree.h","line":220,"lineto":220,"args":[{"name":"e1","type":"const git_tree_entry *","comment":"first tree entry"},{"name":"e2","type":"const git_tree_entry *","comment":"second tree entry"}],"argline":"const git_tree_entry *e1, const git_tree_entry *e2","sig":"const git_tree_entry *::const git_tree_entry *","return":{"type":"int","comment":" \n<\n0 if e1 is before e2, 0 if e1 == e2, >0 if e1 is after e2"},"description":"Compare two tree entries
\n","comments":"","group":"tree"},"git_tree_entry_to_object":{"type":"function","file":"git2/tree.h","line":232,"lineto":235,"args":[{"name":"object_out","type":"git_object **","comment":"pointer to the converted object"},{"name":"repo","type":"git_repository *","comment":"repository where to lookup the pointed object"},{"name":"entry","type":"const git_tree_entry *","comment":"a tree entry"}],"argline":"git_object **object_out, git_repository *repo, const git_tree_entry *entry","sig":"git_object **::git_repository *::const git_tree_entry *","return":{"type":"int","comment":" 0 or an error code"},"description":"Convert a tree entry to the git_object it points to.
\n","comments":"You must call git_object_free()
on the object when you are done with it.
Create a new tree builder.
\n","comments":"The tree builder can be used to create or modify trees in memory and write them as tree objects to the database.
\n\nIf the source
parameter is not NULL, the tree builder will be initialized with the entries of the given tree.
If the source
parameter is NULL, the tree builder will start with no entries and will have to be filled manually.
Clear all the entires in the builder
\n","comments":"","group":"treebuilder"},"git_treebuilder_entrycount":{"type":"function","file":"git2/tree.h","line":269,"lineto":269,"args":[{"name":"bld","type":"git_treebuilder *","comment":"a previously loaded treebuilder."}],"argline":"git_treebuilder *bld","sig":"git_treebuilder *","return":{"type":"unsigned int","comment":" the number of entries in the treebuilder"},"description":"Get the number of entries listed in a treebuilder
\n","comments":"","group":"treebuilder"},"git_treebuilder_free":{"type":"function","file":"git2/tree.h","line":280,"lineto":280,"args":[{"name":"bld","type":"git_treebuilder *","comment":"Builder to free"}],"argline":"git_treebuilder *bld","sig":"git_treebuilder *","return":{"type":"void","comment":null},"description":"Free a tree builder
\n","comments":"This will clear all the entries and free to builder. Failing to free the builder after you're done using it will result in a memory leak
\n","group":"treebuilder"},"git_treebuilder_get":{"type":"function","file":"git2/tree.h","line":292,"lineto":293,"args":[{"name":"bld","type":"git_treebuilder *","comment":"Tree builder"},{"name":"filename","type":"const char *","comment":"Name of the entry"}],"argline":"git_treebuilder *bld, const char *filename","sig":"git_treebuilder *::const char *","return":{"type":"const git_tree_entry *","comment":" pointer to the entry; NULL if not found"},"description":"Get an entry from the builder from its filename
\n","comments":"The returned entry is owned by the builder and should not be freed manually.
\n","group":"treebuilder"},"git_treebuilder_insert":{"type":"function","file":"git2/tree.h","line":320,"lineto":325,"args":[{"name":"out","type":"const git_tree_entry **","comment":"Pointer to store the entry (optional)"},{"name":"bld","type":"git_treebuilder *","comment":"Tree builder"},{"name":"filename","type":"const char *","comment":"Filename of the entry"},{"name":"id","type":"const git_oid *","comment":"SHA1 oid of the entry"},{"name":"filemode","type":"git_filemode_t","comment":"Folder attributes of the entry. This parameter must\n\t\t\tbe valued with one of the following entries: 0040000, 0100644,\n\t\t\t0100755, 0120000 or 0160000."}],"argline":"const git_tree_entry **out, git_treebuilder *bld, const char *filename, const git_oid *id, git_filemode_t filemode","sig":"const git_tree_entry **::git_treebuilder *::const char *::const git_oid *::git_filemode_t","return":{"type":"int","comment":" 0 or an error code"},"description":"Add or update an entry to the builder
\n","comments":"Insert a new entry for filename
in the builder with the given attributes.
If an entry named filename
already exists, its attributes will be updated with the given ones.
The optional pointer out
can be used to retrieve a pointer to the newly created/updated entry. Pass NULL if you do not need it.
No attempt is being made to ensure that the provided oid points to an existing git object in the object database, nor that the attributes make sense regarding the type of the pointed at object.
\n","group":"treebuilder"},"git_treebuilder_remove":{"type":"function","file":"git2/tree.h","line":333,"lineto":334,"args":[{"name":"bld","type":"git_treebuilder *","comment":"Tree builder"},{"name":"filename","type":"const char *","comment":"Filename of the entry to remove"}],"argline":"git_treebuilder *bld, const char *filename","sig":"git_treebuilder *::const char *","return":{"type":"int","comment":null},"description":"Remove an entry from the builder by its filename
\n","comments":"","group":"treebuilder"},"git_treebuilder_filter":{"type":"function","file":"git2/tree.h","line":357,"lineto":360,"args":[{"name":"bld","type":"git_treebuilder *","comment":"Tree builder"},{"name":"filter","type":"git_treebuilder_filter_cb","comment":"Callback to filter entries"},{"name":"payload","type":"void *","comment":"Extra data to pass to filter callback"}],"argline":"git_treebuilder *bld, git_treebuilder_filter_cb filter, void *payload","sig":"git_treebuilder *::git_treebuilder_filter_cb::void *","return":{"type":"void","comment":null},"description":"Selectively remove entries in the tree
\n","comments":"The filter
callback will be called for each entry in the tree with a pointer to the entry and the provided payload
; if the callback returns non-zero, the entry will be filtered (removed from the builder).
Write the contents of the tree builder as a tree object
\n","comments":"The tree builder will be written to the given repo
, and its identifying SHA1 hash will be stored in the id
pointer.
Traverse the entries in a tree and its subtrees in post or pre order.
\n","comments":"The entries will be traversed in the specified order, children subtrees will be automatically loaded as required, and the callback
will be called once per entry with the current (relative) root for the entry and the entry data itself.
If the callback returns a positive value, the passed entry will be skipped on the traversal (in pre mode). A negative value stops the walk.
\n","group":"tree"}},"callbacks":{"git_checkout_notify_cb":{"type":"callback","file":"git2/checkout.h","line":210,"lineto":216,"args":[{"name":"why","type":"git_checkout_notify_t","comment":null},{"name":"path","type":"const char *","comment":null},{"name":"baseline","type":"const git_diff_file *","comment":null},{"name":"target","type":"const git_diff_file *","comment":null},{"name":"workdir","type":"const git_diff_file *","comment":null},{"name":"payload","type":"void *","comment":null}],"argline":"git_checkout_notify_t why, const char *path, const git_diff_file *baseline, const git_diff_file *target, const git_diff_file *workdir, void *payload","sig":"git_checkout_notify_t::const char *::const git_diff_file *::const git_diff_file *::const git_diff_file *::void *","return":{"type":"int","comment":null},"description":"Checkout notification callback function
\n","comments":""},"git_checkout_progress_cb":{"type":"callback","file":"git2/checkout.h","line":219,"lineto":223,"args":[{"name":"path","type":"const char *","comment":null},{"name":"completed_steps","type":"int","comment":null},{"name":"total_steps","type":"int","comment":null},{"name":"payload","type":"void *","comment":null}],"argline":"const char *path, int completed_steps, int total_steps, void *payload","sig":"const char *::int::int::void *","return":{"type":"void","comment":null},"description":"Checkout progress notification function
\n","comments":""},"git_diff_notify_cb":{"type":"callback","file":"git2/diff.h","line":329,"lineto":333,"args":[{"name":"diff_so_far","type":"const git_diff *","comment":null},{"name":"delta_to_add","type":"const git_diff_delta *","comment":null},{"name":"matched_pathspec","type":"const char *","comment":null},{"name":"payload","type":"void *","comment":null}],"argline":"const git_diff *diff_so_far, const git_diff_delta *delta_to_add, const char *matched_pathspec, void *payload","sig":"const git_diff *::const git_diff_delta *::const char *::void *","return":{"type":"int","comment":null},"description":"Diff notification callback function.
\n","comments":"The callback will be called for each file, just before the git_delta_t
gets inserted into the diff.
When the callback: - returns < 0, the diff process will be aborted. - returns > 0, the delta will not be inserted into the diff, but the diff process continues. - returns 0, the delta is inserted into the diff, and the diff process continues.
\n"},"git_diff_file_cb":{"type":"callback","file":"git2/diff.h","line":409,"lineto":412,"args":[{"name":"delta","type":"const git_diff_delta *","comment":"A pointer to the delta data for the file"},{"name":"progress","type":"float","comment":"Goes from 0 to 1 over the diff"},{"name":"payload","type":"void *","comment":"User-specified pointer from foreach function"}],"argline":"const git_diff_delta *delta, float progress, void *payload","sig":"const git_diff_delta *::float::void *","return":{"type":"int","comment":null},"description":"When iterating over a diff, callback that will be made per file.
\n","comments":""},"git_diff_hunk_cb":{"type":"callback","file":"git2/diff.h","line":430,"lineto":433,"args":[{"name":"delta","type":"const git_diff_delta *","comment":null},{"name":"hunk","type":"const git_diff_hunk *","comment":null},{"name":"payload","type":"void *","comment":null}],"argline":"const git_diff_delta *delta, const git_diff_hunk *hunk, void *payload","sig":"const git_diff_delta *::const git_diff_hunk *::void *","return":{"type":"int","comment":null},"description":"When iterating over a diff, callback that will be made per hunk.
\n","comments":""},"git_diff_line_cb":{"type":"callback","file":"git2/diff.h","line":484,"lineto":488,"args":[{"name":"delta","type":"const git_diff_delta *","comment":null},{"name":"hunk","type":"const git_diff_hunk *","comment":null},{"name":"line","type":"const git_diff_line *","comment":null},{"name":"payload","type":"void *","comment":null}],"argline":"const git_diff_delta *delta, const git_diff_hunk *hunk, const git_diff_line *line, void *payload","sig":"const git_diff_delta *::const git_diff_hunk *::const git_diff_line *::void *","return":{"type":"int","comment":null},"description":"When iterating over a diff, callback that will be made per text diff\n line. In this context, the provided range will be NULL.
\n","comments":"When printing a diff, callback that will be made to output each line of text. This uses some extra GIT_DIFF_LINE_... constants for output of lines of file and hunk headers.
\n"},"git_index_matched_path_cb":{"type":"callback","file":"git2/index.h","line":138,"lineto":139,"args":[{"name":"path","type":"const char *","comment":null},{"name":"matched_pathspec","type":"const char *","comment":null},{"name":"payload","type":"void *","comment":null}],"argline":"const char *path, const char *matched_pathspec, void *payload","sig":"const char *::const char *::void *","return":{"type":"int","comment":null},"description":"Callback for APIs that add/remove/update files matching pathspec
\n","comments":""},"git_headlist_cb":{"type":"callback","file":"git2/net.h","line":54,"lineto":54,"args":[{"name":"rhead","type":"git_remote_head *","comment":null},{"name":"payload","type":"void *","comment":null}],"argline":"git_remote_head *rhead, void *payload","sig":"git_remote_head *::void *","return":{"type":"int","comment":null},"description":"Callback for listing the remote heads
\n","comments":""},"git_note_foreach_cb":{"type":"callback","file":"git2/notes.h","line":29,"lineto":30,"args":[{"name":"blob_id","type":"const git_oid *","comment":null},{"name":"annotated_object_id","type":"const git_oid *","comment":null},{"name":"payload","type":"void *","comment":null}],"argline":"const git_oid *blob_id, const git_oid *annotated_object_id, void *payload","sig":"const git_oid *::const git_oid *::void *","return":{"type":"int","comment":null},"description":"Callback for git_note_foreach.
\n","comments":"Receives: - blob_id: Oid of the blob containing the message - annotated_object_id: Oid of the git object being annotated - payload: Payload data passed to git_note_foreach
Function type for callbacks from git_odb_foreach.
\n","comments":""},"git_packbuilder_progress":{"type":"callback","file":"git2/pack.h","line":185,"lineto":189,"args":[{"name":"stage","type":"int","comment":null},{"name":"current","type":"unsigned int","comment":null},{"name":"total","type":"unsigned int","comment":null},{"name":"payload","type":"void *","comment":null}],"argline":"int stage, unsigned int current, unsigned int total, void *payload","sig":"int::unsigned int::unsigned int::void *","return":{"type":"int","comment":null},"description":"Packbuilder progress notification function
\n","comments":""},"git_push_transfer_progress":{"type":"callback","file":"git2/push.h","line":56,"lineto":60,"args":[{"name":"current","type":"unsigned int","comment":null},{"name":"total","type":"unsigned int","comment":null},{"name":"bytes","type":"int","comment":null},{"name":"payload","type":"void *","comment":null}],"argline":"unsigned int current, unsigned int total, int bytes, void *payload","sig":"unsigned int::unsigned int::int::void *","return":{"type":"int","comment":null},"description":"Push network progress notification function
\n","comments":""},"git_remote_rename_problem_cb":{"type":"callback","file":"git2/remote.h","line":27,"lineto":27,"args":[{"name":"problematic_refspec","type":"const char *","comment":null},{"name":"payload","type":"void *","comment":null}],"argline":"const char *problematic_refspec, void *payload","sig":"const char *::void *","return":{"type":"int","comment":null},"description":"git2/remote.h
\n","comments":"@{
\n"},"git_revwalk_hide_cb":{"type":"callback","file":"git2/revwalk.h","line":272,"lineto":274,"args":[{"name":"commit_id","type":"const git_oid *","comment":"oid of Commit"},{"name":"payload","type":"void *","comment":"User-specified pointer to data to be passed as data payload"}],"argline":"const git_oid *commit_id, void *payload","sig":"const git_oid *::void *","return":{"type":"int","comment":null},"description":"This is a callback function that user can provide to hide a\n commit and its parents. If the callback function returns non-zero value,\n then this commit and its parents will be hidden.
\n","comments":""},"git_stash_cb":{"type":"callback","file":"git2/stash.h","line":75,"lineto":79,"args":[{"name":"index","type":"int","comment":"The position within the stash list. 0 points to the\n most recent stashed state."},{"name":"message","type":"const char *","comment":"The stash message."},{"name":"stash_id","type":"const int *","comment":"The commit oid of the stashed state."},{"name":"payload","type":"void *","comment":"Extra parameter to callback function."}],"argline":"int index, const char *message, const int *stash_id, void *payload","sig":"int::const char *::const int *::void *","return":{"type":"int","comment":" 0 to continue iterating or non-zero to stop"},"description":"This is a callback function you can provide to iterate over all the\n stashed states that will be invoked per entry.
\n","comments":""},"git_status_cb":{"type":"callback","file":"git2/status.h","line":59,"lineto":60,"args":[{"name":"path","type":"const char *","comment":null},{"name":"status_flags","type":"unsigned int","comment":null},{"name":"payload","type":"void *","comment":null}],"argline":"const char *path, unsigned int status_flags, void *payload","sig":"const char *::unsigned int::void *","return":{"type":"int","comment":null},"description":"Function pointer to receive status on individual files
\n","comments":"path
is the relative path to the file from the root of the repository.
status_flags
is a combination of git_status_t
values that apply.
payload
is the value you passed to the foreach function as payload.
Initialize callback on filter
\n","comments":"Specified as filter.initialize
, this is an optional callback invoked before a filter is first used. It will be called once at most.
If non-NULL, the filter's initialize
callback will be invoked right before the first use of the filter, so you can defer expensive initialization operations (in case libgit2 is being used in a way that doesn't need the filter).
Shutdown callback on filter
\n","comments":"Specified as filter.shutdown
, this is an optional callback invoked when the filter is unregistered or when libgit2 is shutting down. It will be called once at most and should release resources as needed. This may be called even if the initialize
callback was not made.
Typically this function will free the git_filter
object itself.
Callback to decide if a given source needs this filter
\n","comments":"Specified as filter.check
, this is an optional callback that checks if filtering is needed for a given source.
It should return 0 if the filter should be applied (i.e. success), GIT_PASSTHROUGH if the filter should not be applied, or an error code to fail out of the filter processing pipeline and return to the caller.
\n\nThe attr_values
will be set to the values of any attributes given in the filter definition. See git_filter
below for more detail.
The payload
will be a pointer to a reference payload for the filter. This will start as NULL, but check
can assign to this pointer for later use by the apply
callback. Note that the value should be heap allocated (not stack), so that it doesn't go away before the apply
callback can use it. If a filter allocates and assigns a value to the payload
, it will need a cleanup
callback to free the payload.
Callback to actually perform the data filtering
\n","comments":"Specified as filter.apply
, this is the callback that actually filters data. If it successfully writes the output, it should return 0. Like check
, it can return GIT_PASSTHROUGH to indicate that the filter doesn't want to run. Other error codes will stop filter processing and return to the caller.
The payload
value will refer to any payload that was set by the check
callback. It may be read from or written to as needed.
Callback to clean up after filtering has been applied
\n","comments":"Specified as filter.cleanup
, this is an optional callback invoked after the filter has been applied. If the check
or apply
callbacks allocated a payload
to keep per-source filter state, use this callback to free that payload and release resources as required.
An instance for a tracing function
\n","comments":""},"git_cred_acquire_cb":{"type":"callback","file":"git2/transport.h","line":223,"lineto":228,"args":[{"name":"cred","type":"git_cred **","comment":null},{"name":"url","type":"const char *","comment":null},{"name":"username_from_url","type":"const char *","comment":null},{"name":"allowed_types","type":"unsigned int","comment":null},{"name":"payload","type":"void *","comment":null}],"argline":"git_cred **cred, const char *url, const char *username_from_url, unsigned int allowed_types, void *payload","sig":"git_cred **::const char *::const char *::unsigned int::void *","return":{"type":"int","comment":null},"description":"Signature of a function which acquires a credential object.
\n","comments":"Callback for git_treebuilder_filter
\n","comments":"The return value is treated as a boolean, with zero indicating that the entry should be left alone and any non-zero value meaning that the entry should be removed from the treebuilder list (i.e. filtered out).
\n"},"git_treewalk_cb":{"type":"callback","file":"git2/tree.h","line":378,"lineto":379,"args":[{"name":"root","type":"const char *","comment":null},{"name":"entry","type":"const git_tree_entry *","comment":null},{"name":"payload","type":"void *","comment":null}],"argline":"const char *root, const git_tree_entry *entry, void *payload","sig":"const char *::const git_tree_entry *::void *","return":{"type":"int","comment":null},"description":"Callback for the tree traversal method
\n","comments":""},"git_transfer_progress_cb":{"type":"callback","file":"git2/types.h","line":244,"lineto":244,"args":[{"name":"stats","type":"const git_transfer_progress *","comment":"Structure containing information about the state of the transfer"},{"name":"payload","type":"void *","comment":"Payload provided by caller"}],"argline":"const git_transfer_progress *stats, void *payload","sig":"const git_transfer_progress *::void *","return":{"type":"int","comment":null},"description":"Type for progress callbacks during indexing. Return a value less than zero\n to cancel the transfer.
\n","comments":""}},"globals":{},"types":[["git_blame_flag_t",{"decl":["GIT_BLAME_NORMAL","GIT_BLAME_TRACK_COPIES_SAME_FILE","GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES","GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES","GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES","GIT_BLAME_FIRST_PARENT"],"type":"enum","file":"git2/blame.h","line":26,"lineto":46,"block":"GIT_BLAME_NORMAL\nGIT_BLAME_TRACK_COPIES_SAME_FILE\nGIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES\nGIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES\nGIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES\nGIT_BLAME_FIRST_PARENT","tdef":"typedef","description":" Flags for indicating option behavior for git_blame APIs.","comments":"","fields":[{"type":"int","name":"GIT_BLAME_NORMAL","comments":"Normal blame, the default
\n","value":0},{"type":"int","name":"GIT_BLAME_TRACK_COPIES_SAME_FILE","comments":"Track lines that have moved within a file (like git blame -M
).\n NOT IMPLEMENTED.
Track lines that have moved across files in the same commit (like git blame -C
).\n NOT IMPLEMENTED.
Track lines that have been copied from another file that exists in the\n same commit (like git blame -CC
). Implies SAME_FILE.\n NOT IMPLEMENTED.
Track lines that have been copied from another file that exists in any\n commit (like git blame -CCC
). Implies SAME_COMMIT_COPIES.\n NOT IMPLEMENTED.
Restrict the search of commits to those reachable following only the\n first parents.
\n","value":16}],"used":{"returns":[],"needs":[]}}],["git_blame_hunk",{"decl":["uint16_t lines_in_hunk","git_oid final_commit_id","uint16_t final_start_line_number","git_signature * final_signature","git_oid orig_commit_id","const char * orig_path","uint16_t orig_start_line_number","git_signature * orig_signature","char boundary"],"type":"struct","value":"git_blame_hunk","file":"git2/blame.h","line":116,"lineto":129,"block":"uint16_t lines_in_hunk\ngit_oid final_commit_id\nuint16_t final_start_line_number\ngit_signature * final_signature\ngit_oid orig_commit_id\nconst char * orig_path\nuint16_t orig_start_line_number\ngit_signature * orig_signature\nchar boundary","tdef":"typedef","description":" Structure that represents a blame hunk.","comments":"lines_in_hunk
is the number of lines in this hunk - final_commit_id
is the OID of the commit where this line was last changed. - final_start_line_number
is the 1-based line number where this hunk begins, in the final version of the file - orig_commit_id
is the OID of the commit where this hunk was found. This will usually be the same as final_commit_id
, except when GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES
has been specified. - orig_path
is the path to the file where this hunk originated, as of the commit specified by orig_commit_id
. - orig_start_line_number
is the 1-based line number where this hunk begins in the file named by orig_path
in the commit specified by orig_commit_id
. - boundary
is 1 iff the hunk has been tracked to a boundary commit (the root, or the commit specified in git_blame_options.oldest_commit)Use zeros to indicate default settings. It's easiest to use the GIT_BLAME_OPTIONS_INIT
macro: git_blame_options opts = GIT_BLAME_OPTIONS_INIT;
flags
is a combination of the git_blame_flag_t
values above. - min_match_characters
is the lower bound on the number of alphanumeric characters that must be detected as moving/copying within a file for it to associate those lines with the parent commit. The default value is 20. This value only takes effect if any of the GIT_BLAME_TRACK_COPIES_*
flags are specified. - newest_commit
is the id of the newest commit to consider. The default is HEAD. - oldest_commit
is the id of the oldest commit to consider. The default is the first commit encountered with a NULL parent. - min_line
is the first line in the file to blame. The default is 1 (line numbers start with 1). - max_line
is the last line in the file to blame. The default is the last line of the file.Checkout will invoke an options notification callback (notify_cb
) for certain cases - you pick which ones via notify_flags
:
GIT_CHECKOUT_NOTIFY_CONFLICT invokes checkout on conflicting paths.
GIT_CHECKOUT_NOTIFY_DIRTY notifies about "dirty" files, i.e. those that do not need an update but no longer match the baseline. Core git displays these files when checkout runs, but won't stop the checkout.
GIT_CHECKOUT_NOTIFY_UPDATED sends notification for any file changed.
GIT_CHECKOUT_NOTIFY_UNTRACKED notifies about untracked files.
GIT_CHECKOUT_NOTIFY_IGNORED notifies about ignored files.
Returning a non-zero value from this callback will cancel the checkout. The non-zero return value will be propagated back and returned by the git_checkout_... call.
\n\nNotification callbacks are made prior to modifying any files on disk, so canceling on any notification will still happen prior to any files being modified.
\n","fields":[{"type":"int","name":"GIT_CHECKOUT_NOTIFY_NONE","comments":"","value":0},{"type":"int","name":"GIT_CHECKOUT_NOTIFY_CONFLICT","comments":"","value":1},{"type":"int","name":"GIT_CHECKOUT_NOTIFY_DIRTY","comments":"","value":2},{"type":"int","name":"GIT_CHECKOUT_NOTIFY_UPDATED","comments":"","value":4},{"type":"int","name":"GIT_CHECKOUT_NOTIFY_UNTRACKED","comments":"","value":8},{"type":"int","name":"GIT_CHECKOUT_NOTIFY_IGNORED","comments":"","value":16},{"type":"int","name":"GIT_CHECKOUT_NOTIFY_ALL","comments":"","value":65535}],"used":{"returns":[],"needs":["git_checkout_notify_cb"]}}],["git_checkout_strategy_t",{"decl":["GIT_CHECKOUT_NONE","GIT_CHECKOUT_SAFE","GIT_CHECKOUT_SAFE_CREATE","GIT_CHECKOUT_FORCE","GIT_CHECKOUT_ALLOW_CONFLICTS","GIT_CHECKOUT_REMOVE_UNTRACKED","GIT_CHECKOUT_REMOVE_IGNORED","GIT_CHECKOUT_UPDATE_ONLY","GIT_CHECKOUT_DONT_UPDATE_INDEX","GIT_CHECKOUT_NO_REFRESH","GIT_CHECKOUT_SKIP_UNMERGED","GIT_CHECKOUT_USE_OURS","GIT_CHECKOUT_USE_THEIRS","GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH","GIT_CHECKOUT_SKIP_LOCKED_DIRECTORIES","GIT_CHECKOUT_DONT_OVERWRITE_IGNORED","GIT_CHECKOUT_CONFLICT_STYLE_MERGE","GIT_CHECKOUT_CONFLICT_STYLE_DIFF3","GIT_CHECKOUT_UPDATE_SUBMODULES","GIT_CHECKOUT_UPDATE_SUBMODULES_IF_CHANGED"],"type":"enum","file":"git2/checkout.h","line":108,"lineto":170,"block":"GIT_CHECKOUT_NONE\nGIT_CHECKOUT_SAFE\nGIT_CHECKOUT_SAFE_CREATE\nGIT_CHECKOUT_FORCE\nGIT_CHECKOUT_ALLOW_CONFLICTS\nGIT_CHECKOUT_REMOVE_UNTRACKED\nGIT_CHECKOUT_REMOVE_IGNORED\nGIT_CHECKOUT_UPDATE_ONLY\nGIT_CHECKOUT_DONT_UPDATE_INDEX\nGIT_CHECKOUT_NO_REFRESH\nGIT_CHECKOUT_SKIP_UNMERGED\nGIT_CHECKOUT_USE_OURS\nGIT_CHECKOUT_USE_THEIRS\nGIT_CHECKOUT_DISABLE_PATHSPEC_MATCH\nGIT_CHECKOUT_SKIP_LOCKED_DIRECTORIES\nGIT_CHECKOUT_DONT_OVERWRITE_IGNORED\nGIT_CHECKOUT_CONFLICT_STYLE_MERGE\nGIT_CHECKOUT_CONFLICT_STYLE_DIFF3\nGIT_CHECKOUT_UPDATE_SUBMODULES\nGIT_CHECKOUT_UPDATE_SUBMODULES_IF_CHANGED","tdef":"typedef","description":" Checkout behavior flags","comments":"In libgit2, checkout is used to update the working directory and index to match a target tree. Unlike git checkout, it does not move the HEAD commit for you - use git_repository_set_head
or the like to do that.
Checkout looks at (up to) four things: the "target" tree you want to check out, the "baseline" tree of what was checked out previously, the working directory for actual files, and the index for staged changes.
\n\nYou give checkout one of four strategies for update:
\n\nGIT_CHECKOUT_NONE
is a dry-run strategy that checks for conflicts, etc., but doesn't make any actual changes.
GIT_CHECKOUT_FORCE
is at the opposite extreme, taking any action to make the working directory match the target (including potentially discarding modified files).
In between those are GIT_CHECKOUT_SAFE
and GIT_CHECKOUT_SAFE_CREATE
both of which only make modifications that will not lose changes.
| target == baseline | target != baseline | ---------------------|-----------------------|----------------------| workdir == baseline | no action | create, update, or | | | delete file | ---------------------|-----------------------|----------------------| workdir exists and | no action | conflict (notify | is != baseline | notify dirty MODIFIED | and cancel checkout) | ---------------------|-----------------------|----------------------| workdir missing, | create if SAFE_CREATE | create file | baseline present | notify dirty DELETED | | ---------------------|-----------------------|----------------------|\n
\n\nThe only difference between SAFE and SAFE_CREATE is that SAFE_CREATE will cause a file to be checked out if it is missing from the working directory even if it is not modified between the target and baseline.
\n\nTo emulate git checkout
, use GIT_CHECKOUT_SAFE
with a checkout notification callback (see below) that displays information about dirty files. The default behavior will cancel checkout on conflicts.
To emulate git checkout-index
, use GIT_CHECKOUT_SAFE_CREATE
with a notification callback that cancels the operation if a dirty-but-existing file is found in the working directory. This core git command isn't quite "force" but is sensitive about some types of changes.
To emulate git checkout -f
, use GIT_CHECKOUT_FORCE
.
To emulate git clone
use GIT_CHECKOUT_SAFE_CREATE
in the options.
There are some additional flags to modified the behavior of checkout:
\n\nGIT_CHECKOUT_ALLOW_CONFLICTS makes SAFE mode apply safe file updates even if there are conflicts (instead of cancelling the checkout).
GIT_CHECKOUT_REMOVE_UNTRACKED means remove untracked files (i.e. not in target, baseline, or index, and not ignored) from the working dir.
GIT_CHECKOUT_REMOVE_IGNORED means remove ignored files (that are also untracked) from the working directory as well.
GIT_CHECKOUT_UPDATE_ONLY means to only update the content of files that already exist. Files will not be created nor deleted. This just skips applying adds, deletes, and typechanges.
GIT_CHECKOUT_DONT_UPDATE_INDEX prevents checkout from writing the updated files' information to the index.
Normally, checkout will reload the index and git attributes from disk before any operations. GIT_CHECKOUT_NO_REFRESH prevents this reload.
Unmerged index entries are conflicts. GIT_CHECKOUT_SKIP_UNMERGED skips files with unmerged index entries instead. GIT_CHECKOUT_USE_OURS and GIT_CHECKOUT_USE_THEIRS to proceed with the checkout using either the stage 2 ("ours") or stage 3 ("theirs") version of files in the index.
GIT_CHECKOUT_DONT_OVERWRITE_IGNORED prevents ignored files from being overwritten. Normally, files that are ignored in the working directory are not considered "precious" and may be overwritten if the checkout target contains that file.
default is a dry run, no actual updates
\n","value":0},{"type":"int","name":"GIT_CHECKOUT_SAFE","comments":"Allow safe updates that cannot overwrite uncommitted data
\n","value":1},{"type":"int","name":"GIT_CHECKOUT_SAFE_CREATE","comments":"Allow safe updates plus creation of missing files
\n","value":2},{"type":"int","name":"GIT_CHECKOUT_FORCE","comments":"Allow all updates to force working directory to look like index
\n","value":4},{"type":"int","name":"GIT_CHECKOUT_ALLOW_CONFLICTS","comments":"Allow checkout to make safe updates even if conflicts are found
\n","value":16},{"type":"int","name":"GIT_CHECKOUT_REMOVE_UNTRACKED","comments":"Remove untracked files not in index (that are not ignored)
\n","value":32},{"type":"int","name":"GIT_CHECKOUT_REMOVE_IGNORED","comments":"Remove ignored files not in index
\n","value":64},{"type":"int","name":"GIT_CHECKOUT_UPDATE_ONLY","comments":"Only update existing files, don't create new ones
\n","value":128},{"type":"int","name":"GIT_CHECKOUT_DONT_UPDATE_INDEX","comments":"Normally checkout updates index entries as it goes; this stops that
\n","value":256},{"type":"int","name":"GIT_CHECKOUT_NO_REFRESH","comments":"Don't refresh index/config/etc before doing checkout
\n","value":512},{"type":"int","name":"GIT_CHECKOUT_SKIP_UNMERGED","comments":"Allow checkout to skip unmerged files
\n","value":1024},{"type":"int","name":"GIT_CHECKOUT_USE_OURS","comments":"For unmerged files, checkout stage 2 from index
\n","value":2048},{"type":"int","name":"GIT_CHECKOUT_USE_THEIRS","comments":"For unmerged files, checkout stage 3 from index
\n","value":4096},{"type":"int","name":"GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH","comments":"Treat pathspec as simple list of exact match file paths
\n","value":8192},{"type":"int","name":"GIT_CHECKOUT_SKIP_LOCKED_DIRECTORIES","comments":"Ignore directories in use, they will be left empty
\n","value":262144},{"type":"int","name":"GIT_CHECKOUT_DONT_OVERWRITE_IGNORED","comments":"Don't overwrite ignored files that exist in the checkout target
\n","value":524288},{"type":"int","name":"GIT_CHECKOUT_CONFLICT_STYLE_MERGE","comments":"Write normal merge files for conflicts
\n","value":1048576},{"type":"int","name":"GIT_CHECKOUT_CONFLICT_STYLE_DIFF3","comments":"Include common ancestor data in diff3 format files for conflicts
\n","value":2097152},{"type":"int","name":"GIT_CHECKOUT_UPDATE_SUBMODULES","comments":"Recursively checkout submodules with same options (NOT IMPLEMENTED)
\n","value":65536},{"type":"int","name":"GIT_CHECKOUT_UPDATE_SUBMODULES_IF_CHANGED","comments":"Recursively checkout submodules if HEAD moved in super repo (NOT IMPLEMENTED)
\n","value":131072}],"used":{"returns":[],"needs":[]}}],["git_clone_local_t",{"decl":["GIT_CLONE_LOCAL_AUTO","GIT_CLONE_LOCAL","GIT_CLONE_NO_LOCAL","GIT_CLONE_LOCAL_NO_LINKS"],"type":"enum","file":"git2/clone.h","line":32,"lineto":52,"block":"GIT_CLONE_LOCAL_AUTO\nGIT_CLONE_LOCAL\nGIT_CLONE_NO_LOCAL\nGIT_CLONE_LOCAL_NO_LINKS","tdef":"typedef","description":" Options for bypassing the git-aware transport on clone. Bypassing\n it means that instead of a fetch, libgit2 will copy the object\n database directory instead of figuring out what it needs, which is\n faster. If possible, it will hardlink the files to save space.","comments":"","fields":[{"type":"int","name":"GIT_CLONE_LOCAL_AUTO","comments":"Auto-detect (default), libgit2 will bypass the git-aware\n transport for local paths, but use a normal fetch for\n file://
urls.
Bypass the git-aware transport even for a file://
url.
Do no bypass the git-aware transport
\n","value":2},{"type":"int","name":"GIT_CLONE_LOCAL_NO_LINKS","comments":"Bypass the git-aware transport, but do not try to use\n hardlinks.
\n","value":3}],"used":{"returns":[],"needs":[]}}],["git_commit",{"decl":"git_commit","type":"struct","value":"git_commit","file":"git2/types.h","line":120,"lineto":120,"tdef":"typedef","description":" Parsed representation of a commit object. ","comments":"","used":{"returns":[],"needs":["git_branch_create","git_cherry_pick","git_cherry_pick_commit","git_commit_amend","git_commit_author","git_commit_committer","git_commit_free","git_commit_id","git_commit_lookup","git_commit_message","git_commit_message_encoding","git_commit_message_raw","git_commit_nth_gen_ancestor","git_commit_owner","git_commit_parent","git_commit_parent_id","git_commit_parentcount","git_commit_raw_header","git_commit_summary","git_commit_time","git_commit_time_offset","git_commit_tree","git_commit_tree_id","git_merge_commits","git_revert","git_revert_commit"]}}],["git_config",{"decl":"git_config","type":"struct","value":"git_config","file":"git2/types.h","line":138,"lineto":138,"tdef":"typedef","description":" Memory representation of a set of config files ","comments":"","used":{"returns":[],"needs":["git_config_add_file_ondisk","git_config_backend_foreach_match","git_config_delete_entry","git_config_delete_multivar","git_config_foreach","git_config_foreach_match","git_config_free","git_config_get_bool","git_config_get_entry","git_config_get_int32","git_config_get_int64","git_config_get_multivar_foreach","git_config_get_string","git_config_iterator_free","git_config_iterator_glob_new","git_config_iterator_new","git_config_multivar_iterator_new","git_config_new","git_config_next","git_config_open_default","git_config_open_global","git_config_open_level","git_config_open_ondisk","git_config_refresh","git_config_set_bool","git_config_set_int32","git_config_set_int64","git_config_set_multivar","git_config_set_string","git_config_snapshot","git_repository_config","git_repository_config_snapshot"]}}],["git_config_backend",{"decl":"git_config_backend","type":"struct","value":"git_config_backend","file":"git2/types.h","line":141,"lineto":141,"block":"unsigned int version\nstruct git_config git_config\nstruct git_config * cfg\nint (*)(struct git_config_backend *, int) open\nint (*)(struct git_config_backend *, const char *, const int **) get\nint (*)(struct git_config_backend *, const char *, const char *) set\nint (*)(struct git_config_backend *, const char *, const char *, const char *) set_multivar\nint (*)(struct git_config_backend *, const char *) del\nint (*)(struct git_config_backend *, const char *, const char *) del_multivar\nint (*)(int **, struct git_config_backend *) iterator\nint (*)(struct git_config_backend *) refresh\nint (*)(struct git_config_backend **, struct git_config_backend *) snapshot\nvoid (*)(struct git_config_backend *) free","tdef":"typedef","description":" Interface to access a configuration file ","comments":"","fields":[{"type":"unsigned int","name":"version","comments":""},{"type":"struct git_config","name":"git_config","comments":""},{"type":"struct git_config *","name":"cfg","comments":""},{"type":"int (*)(struct git_config_backend *, int)","name":"open","comments":""},{"type":"int (*)(struct git_config_backend *, const char *, const int **)","name":"get","comments":""},{"type":"int (*)(struct git_config_backend *, const char *, const char *)","name":"set","comments":""},{"type":"int (*)(struct git_config_backend *, const char *, const char *, const char *)","name":"set_multivar","comments":""},{"type":"int (*)(struct git_config_backend *, const char *)","name":"del","comments":""},{"type":"int (*)(struct git_config_backend *, const char *, const char *)","name":"del_multivar","comments":""},{"type":"int (*)(int **, struct git_config_backend *)","name":"iterator","comments":""},{"type":"int (*)(struct git_config_backend *)","name":"refresh","comments":""},{"type":"int (*)(struct git_config_backend **, struct git_config_backend *)","name":"snapshot","comments":" Produce a read-only version of this backend "},{"type":"void (*)(struct git_config_backend *)","name":"free","comments":""}],"used":{"returns":[],"needs":["git_config_backend_foreach_match"]}}],["git_config_level_t",{"decl":["GIT_CONFIG_LEVEL_SYSTEM","GIT_CONFIG_LEVEL_XDG","GIT_CONFIG_LEVEL_GLOBAL","GIT_CONFIG_LEVEL_LOCAL","GIT_CONFIG_LEVEL_APP","GIT_CONFIG_HIGHEST_LEVEL"],"type":"enum","file":"git2/config.h","line":31,"lineto":56,"block":"GIT_CONFIG_LEVEL_SYSTEM\nGIT_CONFIG_LEVEL_XDG\nGIT_CONFIG_LEVEL_GLOBAL\nGIT_CONFIG_LEVEL_LOCAL\nGIT_CONFIG_LEVEL_APP\nGIT_CONFIG_HIGHEST_LEVEL","tdef":"typedef","description":" Priority level of a config file.\n These priority levels correspond to the natural escalation logic\n (from higher to lower) when searching for config entries in git.git.","comments":"git_config_open_default() and git_repository_config() honor those priority levels as well.
\n","fields":[{"type":"int","name":"GIT_CONFIG_LEVEL_SYSTEM","comments":"System-wide configuration file; /etc/gitconfig on Linux systems
\n","value":1},{"type":"int","name":"GIT_CONFIG_LEVEL_XDG","comments":"XDG compatible configuration file; typically ~/.config/git/config
\n","value":2},{"type":"int","name":"GIT_CONFIG_LEVEL_GLOBAL","comments":"User-specific configuration file (also called Global configuration\n file); typically ~/.gitconfig
\n","value":3},{"type":"int","name":"GIT_CONFIG_LEVEL_LOCAL","comments":"Repository specific configuration file; $WORK_DIR/.git/config on\n non-bare repos
\n","value":4},{"type":"int","name":"GIT_CONFIG_LEVEL_APP","comments":"Application specific configuration file; freely defined by applications
\n","value":5},{"type":"int","name":"GIT_CONFIG_HIGHEST_LEVEL","comments":"Represents the highest level available config file (i.e. the most\n specific config file available that actually is loaded)
\n","value":-1}],"used":{"returns":[],"needs":["git_config_add_file_ondisk","git_config_open_level"]}}],["git_cred_default",{"decl":"git_cred_default","type":"struct","value":"git_cred_default","file":"git2/transport.h","line":108,"lineto":108,"tdef":"typedef","description":" A key for NTLM/Kerberos \"default\" credentials ","comments":"","used":{"returns":[],"needs":[]}}],["git_cred_ssh_interactive",{"decl":["git_cred parent","char * username","git_cred_ssh_interactive_callback prompt_callback","void * payload"],"type":"struct","value":"git_cred_ssh_interactive","file":"git2/transport.h","line":88,"lineto":93,"block":"git_cred parent\nchar * username\ngit_cred_ssh_interactive_callback prompt_callback\nvoid * payload","tdef":"typedef","description":" Keyboard-interactive based ssh authentication","comments":"","fields":[{"type":"git_cred","name":"parent","comments":""},{"type":"char *","name":"username","comments":""},{"type":"git_cred_ssh_interactive_callback","name":"prompt_callback","comments":""},{"type":"void *","name":"payload","comments":""}],"used":{"returns":[],"needs":["git_cred_ssh_interactive_new"]}}],["git_cred_ssh_key",{"decl":["git_cred parent","char * username","char * publickey","char * privatekey","char * passphrase"],"type":"struct","value":"git_cred_ssh_key","file":"git2/transport.h","line":77,"lineto":83,"block":"git_cred parent\nchar * username\nchar * publickey\nchar * privatekey\nchar * passphrase","tdef":"typedef","description":" A ssh key from disk","comments":"","fields":[{"type":"git_cred","name":"parent","comments":""},{"type":"char *","name":"username","comments":""},{"type":"char *","name":"publickey","comments":""},{"type":"char *","name":"privatekey","comments":""},{"type":"char *","name":"passphrase","comments":""}],"used":{"returns":[],"needs":[]}}],["git_cred_userpass_payload",{"decl":["char * username","char * password"],"type":"struct","value":"git_cred_userpass_payload","file":"git2/cred_helpers.h","line":24,"lineto":27,"block":"char * username\nchar * password","tdef":"typedef","description":" Payload for git_cred_stock_userpass_plaintext.","comments":"","fields":[{"type":"char *","name":"username","comments":""},{"type":"char *","name":"password","comments":""}],"used":{"returns":[],"needs":[]}}],["git_cred_userpass_plaintext",{"decl":["git_cred parent","char * username","char * password"],"type":"struct","value":"git_cred_userpass_plaintext","file":"git2/transport.h","line":54,"lineto":58,"block":"git_cred parent\nchar * username\nchar * password","tdef":"typedef","description":" A plaintext username and password ","comments":"","fields":[{"type":"git_cred","name":"parent","comments":""},{"type":"char *","name":"username","comments":""},{"type":"char *","name":"password","comments":""}],"used":{"returns":[],"needs":[]}}],["git_credtype_t",{"decl":["GIT_CREDTYPE_USERPASS_PLAINTEXT","GIT_CREDTYPE_SSH_KEY","GIT_CREDTYPE_SSH_CUSTOM","GIT_CREDTYPE_DEFAULT","GIT_CREDTYPE_SSH_INTERACTIVE"],"type":"enum","file":"git2/transport.h","line":28,"lineto":43,"block":"GIT_CREDTYPE_USERPASS_PLAINTEXT\nGIT_CREDTYPE_SSH_KEY\nGIT_CREDTYPE_SSH_CUSTOM\nGIT_CREDTYPE_DEFAULT\nGIT_CREDTYPE_SSH_INTERACTIVE","tdef":"typedef","description":" Authentication type requested ","comments":"","fields":[{"type":"int","name":"GIT_CREDTYPE_USERPASS_PLAINTEXT","comments":"","value":1},{"type":"int","name":"GIT_CREDTYPE_SSH_KEY","comments":"","value":2},{"type":"int","name":"GIT_CREDTYPE_SSH_CUSTOM","comments":"","value":4},{"type":"int","name":"GIT_CREDTYPE_DEFAULT","comments":"","value":8},{"type":"int","name":"GIT_CREDTYPE_SSH_INTERACTIVE","comments":"","value":16}],"used":{"returns":[],"needs":[]}}],["git_delta_t",{"decl":["GIT_DELTA_UNMODIFIED","GIT_DELTA_ADDED","GIT_DELTA_DELETED","GIT_DELTA_MODIFIED","GIT_DELTA_RENAMED","GIT_DELTA_COPIED","GIT_DELTA_IGNORED","GIT_DELTA_UNTRACKED","GIT_DELTA_TYPECHANGE"],"type":"enum","file":"git2/diff.h","line":230,"lineto":240,"block":"GIT_DELTA_UNMODIFIED\nGIT_DELTA_ADDED\nGIT_DELTA_DELETED\nGIT_DELTA_MODIFIED\nGIT_DELTA_RENAMED\nGIT_DELTA_COPIED\nGIT_DELTA_IGNORED\nGIT_DELTA_UNTRACKED\nGIT_DELTA_TYPECHANGE","tdef":"typedef","description":" What type of change is described by a git_diff_delta?","comments":"GIT_DELTA_RENAMED
and GIT_DELTA_COPIED
will only show up if you run git_diff_find_similar()
on the diff object.
GIT_DELTA_TYPECHANGE
only shows up given GIT_DIFF_INCLUDE_TYPECHANGE
in the option flags (otherwise type changes will be split into ADDED / DELETED pairs).
no changes
\n","value":0},{"type":"int","name":"GIT_DELTA_ADDED","comments":"entry does not exist in old version
\n","value":1},{"type":"int","name":"GIT_DELTA_DELETED","comments":"entry does not exist in new version
\n","value":2},{"type":"int","name":"GIT_DELTA_MODIFIED","comments":"entry content changed between old and new
\n","value":3},{"type":"int","name":"GIT_DELTA_RENAMED","comments":"entry was renamed between old and new
\n","value":4},{"type":"int","name":"GIT_DELTA_COPIED","comments":"entry was copied from another old entry
\n","value":5},{"type":"int","name":"GIT_DELTA_IGNORED","comments":"entry is ignored item in workdir
\n","value":6},{"type":"int","name":"GIT_DELTA_UNTRACKED","comments":"entry is untracked item in workdir
\n","value":7},{"type":"int","name":"GIT_DELTA_TYPECHANGE","comments":"type of entry changed between old and new
\n","value":8}],"used":{"returns":[],"needs":["git_diff_status_char"]}}],["git_diff",{"decl":"git_diff","type":"struct","value":"git_diff","file":"git2/diff.h","line":204,"lineto":204,"tdef":"typedef","description":" The diff object that contains all individual file deltas.","comments":"This is an opaque structure which will be allocated by one of the diff generator functions below (such as git_diff_tree_to_tree
). You are responsible for releasing the object memory when done, using the git_diff_free()
function.
When iterating over a diff, this will be passed to most callbacks and you can use the contents to understand exactly what has changed.
\n\nThe old_file
represents the "from" side of the diff and the new_file
represents to "to" side of the diff. What those means depend on the function that was used to generate the diff and will be documented below. You can also use the GIT_DIFF_REVERSE
flag to flip it around.
Although the two sides of the delta are named "old_file" and "new_file", they actually may correspond to entries that represent a file, a symbolic link, a submodule commit id, or even a tree (if you are tracking type changes or ignored/untracked directories).
\n\nUnder some circumstances, in the name of efficiency, not all fields will be filled in, but we generally try to fill in as much as possible. One example is that the "flags" field may not have either the BINARY
or the NOT_BINARY
flag set to avoid examining file contents if you do not pass in hunk and/or line callbacks to the diff foreach iteration function. It will just use the git attributes for those files.
The similarity score is zero unless you call git_diff_find_similar()
which does a similarity analysis of files in the diff. Use that function to do rename and copy detection, and to split heavily modified files in add/delete pairs. After that call, deltas with a status of GIT_DELTA_RENAMED or GIT_DELTA_COPIED will have a similarity score between 0 and 100 indicating how similar the old and new sides are.
If you ask git_diff_find_similar
to find heavily modified files to break, but to not actually break the records, then GIT_DELTA_MODIFIED records may have a non-zero similarity score if the self-similarity is below the split threshold. To display this value like core Git, invert the score (a la printf("M%03d", 100 - delta->similarity)
).
Although this is called a "file", it could represent a file, a symbolic link, a submodule commit id, or even a tree (although that only if you are tracking type changes or ignored/untracked directories).
\n\nThe oid
is the git_oid
of the item. If the entry represents an absent side of a diff (e.g. the old_file
of a GIT_DELTA_ADDED
delta), then the oid will be zeroes.
path
is the NUL-terminated path to the entry relative to the working directory of the repository.
size
is the size of the entry in bytes.
flags
is a combination of the git_diff_flag_t
types
mode
is, roughly, the stat() st_mode
value for the item. This will be restricted to one of the git_filemode_t
values.
Obey diff.renames
. Overridden by any other GIT_DIFF_FIND_... flag.
Look for renames? (--find-renames
)
Consider old side of MODIFIED for renames? (--break-rewrites=N
)
Look for copies? (a la --find-copies
).
Consider UNMODIFIED as copy sources? (--find-copies-harder
).
For this to work correctly, use GIT_DIFF_INCLUDE_UNMODIFIED when\n the initial git_diff
is being generated.
Mark significant rewrites for split (--break-rewrites=/M
)
Actually split large rewrites into delete/add pairs
\n","value":32},{"type":"int","name":"GIT_DIFF_FIND_AND_BREAK_REWRITES","comments":"Mark rewrites for split and break into delete/add pairs
\n","value":48},{"type":"int","name":"GIT_DIFF_FIND_FOR_UNTRACKED","comments":"Find renames/copies for UNTRACKED items in working directory.
\n\nFor this to work correctly, use GIT_DIFF_INCLUDE_UNTRACKED when the\n initial git_diff
is being generated (and obviously the diff must\n be against the working directory for this to make sense).
Turn on all finding features.
\n","value":255},{"type":"int","name":"GIT_DIFF_FIND_IGNORE_LEADING_WHITESPACE","comments":"Measure similarity ignoring leading whitespace (default)
\n","value":0},{"type":"int","name":"GIT_DIFF_FIND_IGNORE_WHITESPACE","comments":"Measure similarity ignoring all whitespace
\n","value":4096},{"type":"int","name":"GIT_DIFF_FIND_DONT_IGNORE_WHITESPACE","comments":"Measure similarity including all data
\n","value":8192},{"type":"int","name":"GIT_DIFF_FIND_EXACT_MATCH_ONLY","comments":"Measure similarity only by comparing SHAs (fast and cheap)
\n","value":16384},{"type":"int","name":"GIT_DIFF_BREAK_REWRITES_FOR_RENAMES_ONLY","comments":"Do not break rewrites unless they contribute to a rename.
\n\nNormally, GIT_DIFF_FIND_AND_BREAK_REWRITES will measure the self-\n similarity of modified files and split the ones that have changed a\n lot into a DELETE / ADD pair. Then the sides of that pair will be\n considered candidates for rename and copy detection.
\n\nIf you add this flag in and the split pair is not used for an\n actual rename or copy, then the modified record will be restored to\n a regular MODIFIED record instead of being split.
\n","value":32768},{"type":"int","name":"GIT_DIFF_FIND_REMOVE_UNMODIFIED","comments":"Remove any UNMODIFIED deltas after find_similar is done.
\n\nUsing GIT_DIFF_FIND_COPIES_FROM_UNMODIFIED to emulate the\n --find-copies-harder behavior requires building a diff with the\n GIT_DIFF_INCLUDE_UNMODIFIED flag. If you do not want UNMODIFIED\n records in the final result, pass this flag to have them removed.
\n","value":65536}],"used":{"returns":[],"needs":[]}}],["git_diff_flag_t",{"decl":["GIT_DIFF_FLAG_BINARY","GIT_DIFF_FLAG_NOT_BINARY","GIT_DIFF_FLAG_VALID_ID"],"type":"enum","file":"git2/diff.h","line":214,"lineto":218,"block":"GIT_DIFF_FLAG_BINARY\nGIT_DIFF_FLAG_NOT_BINARY\nGIT_DIFF_FLAG_VALID_ID","tdef":"typedef","description":" Flags for the delta object and the file objects on each side.","comments":"These flags are used for both the flags
value of the git_diff_delta
and the flags for the git_diff_file
objects representing the old and new sides of the delta. Values outside of this public range should be considered reserved for internal or future use.
file(s) treated as binary data
\n","value":1},{"type":"int","name":"GIT_DIFF_FLAG_NOT_BINARY","comments":"file(s) treated as text data
\n","value":2},{"type":"int","name":"GIT_DIFF_FLAG_VALID_ID","comments":"id
value is known correct
Normal patch, the default
\n","value":0},{"type":"int","name":"GIT_DIFF_FORMAT_EMAIL_EXCLUDE_SUBJECT_PATCH_MARKER","comments":"Don't insert "[PATCH]" in the subject header
\n","value":1}],"used":{"returns":[],"needs":[]}}],["git_diff_format_t",{"decl":["GIT_DIFF_FORMAT_PATCH","GIT_DIFF_FORMAT_PATCH_HEADER","GIT_DIFF_FORMAT_RAW","GIT_DIFF_FORMAT_NAME_ONLY","GIT_DIFF_FORMAT_NAME_STATUS"],"type":"enum","file":"git2/diff.h","line":920,"lineto":926,"block":"GIT_DIFF_FORMAT_PATCH\nGIT_DIFF_FORMAT_PATCH_HEADER\nGIT_DIFF_FORMAT_RAW\nGIT_DIFF_FORMAT_NAME_ONLY\nGIT_DIFF_FORMAT_NAME_STATUS","tdef":"typedef","description":" Possible output formats for diff data","comments":"","fields":[{"type":"int","name":"GIT_DIFF_FORMAT_PATCH","comments":"full git diff
\n","value":1},{"type":"int","name":"GIT_DIFF_FORMAT_PATCH_HEADER","comments":"just the file headers of patch
\n","value":2},{"type":"int","name":"GIT_DIFF_FORMAT_RAW","comments":"like git diff --raw
\n","value":3},{"type":"int","name":"GIT_DIFF_FORMAT_NAME_ONLY","comments":"like git diff --name-only
\n","value":4},{"type":"int","name":"GIT_DIFF_FORMAT_NAME_STATUS","comments":"like git diff --name-status
\n","value":5}],"used":{"returns":[],"needs":["git_diff_print"]}}],["git_diff_hunk",{"decl":"git_diff_hunk","type":"struct","value":"git_diff_hunk","file":"git2/diff.h","line":417,"lineto":417,"tdef":"typedef","description":" Structure describing a hunk of a diff.","comments":"","used":{"returns":[],"needs":["git_diff_blobs","git_diff_foreach","git_diff_hunk_cb","git_diff_line_cb"]}}],["git_diff_line",{"decl":"git_diff_line","type":"struct","value":"git_diff_line","file":"git2/diff.h","line":465,"lineto":465,"tdef":"typedef","description":" Structure describing a line (or data span) of a diff.","comments":"","used":{"returns":[],"needs":["git_diff_blobs","git_diff_foreach","git_diff_line_cb","git_diff_print","git_patch_print"]}}],["git_diff_line_t",{"decl":["GIT_DIFF_LINE_CONTEXT","GIT_DIFF_LINE_ADDITION","GIT_DIFF_LINE_DELETION","GIT_DIFF_LINE_CONTEXT_EOFNL","GIT_DIFF_LINE_ADD_EOFNL","GIT_DIFF_LINE_DEL_EOFNL","GIT_DIFF_LINE_FILE_HDR","GIT_DIFF_LINE_HUNK_HDR","GIT_DIFF_LINE_BINARY"],"type":"enum","file":"git2/diff.h","line":444,"lineto":460,"block":"GIT_DIFF_LINE_CONTEXT\nGIT_DIFF_LINE_ADDITION\nGIT_DIFF_LINE_DELETION\nGIT_DIFF_LINE_CONTEXT_EOFNL\nGIT_DIFF_LINE_ADD_EOFNL\nGIT_DIFF_LINE_DEL_EOFNL\nGIT_DIFF_LINE_FILE_HDR\nGIT_DIFF_LINE_HUNK_HDR\nGIT_DIFF_LINE_BINARY","tdef":"typedef","description":" Line origin constants.","comments":"These values describe where a line came from and will be passed to the git_diff_line_cb when iterating over a diff. There are some special origin constants at the end that are used for the text output callbacks to demarcate lines that are actually part of the file or hunk headers.
\n","fields":[{"type":"int","name":"GIT_DIFF_LINE_CONTEXT","comments":"","value":32},{"type":"int","name":"GIT_DIFF_LINE_ADDITION","comments":"","value":43},{"type":"int","name":"GIT_DIFF_LINE_DELETION","comments":"","value":45},{"type":"int","name":"GIT_DIFF_LINE_CONTEXT_EOFNL","comments":"Both files have no LF at end
\n","value":61},{"type":"int","name":"GIT_DIFF_LINE_ADD_EOFNL","comments":"Old has no LF at end, new does
\n","value":62},{"type":"int","name":"GIT_DIFF_LINE_DEL_EOFNL","comments":"Old has LF at end, new does not
\n","value":60},{"type":"int","name":"GIT_DIFF_LINE_FILE_HDR","comments":"","value":70},{"type":"int","name":"GIT_DIFF_LINE_HUNK_HDR","comments":"","value":72},{"type":"int","name":"GIT_DIFF_LINE_BINARY","comments":"For "Binary files x and y differ"
\n","value":66}],"used":{"returns":[],"needs":[]}}],["git_diff_option_t",{"decl":["GIT_DIFF_NORMAL","GIT_DIFF_REVERSE","GIT_DIFF_INCLUDE_IGNORED","GIT_DIFF_RECURSE_IGNORED_DIRS","GIT_DIFF_INCLUDE_UNTRACKED","GIT_DIFF_RECURSE_UNTRACKED_DIRS","GIT_DIFF_INCLUDE_UNMODIFIED","GIT_DIFF_INCLUDE_TYPECHANGE","GIT_DIFF_INCLUDE_TYPECHANGE_TREES","GIT_DIFF_IGNORE_FILEMODE","GIT_DIFF_IGNORE_SUBMODULES","GIT_DIFF_IGNORE_CASE","GIT_DIFF_DISABLE_PATHSPEC_MATCH","GIT_DIFF_SKIP_BINARY_CHECK","GIT_DIFF_ENABLE_FAST_UNTRACKED_DIRS","GIT_DIFF_UPDATE_INDEX","GIT_DIFF_FORCE_TEXT","GIT_DIFF_FORCE_BINARY","GIT_DIFF_IGNORE_WHITESPACE","GIT_DIFF_IGNORE_WHITESPACE_CHANGE","GIT_DIFF_IGNORE_WHITESPACE_EOL","GIT_DIFF_SHOW_UNTRACKED_CONTENT","GIT_DIFF_SHOW_UNMODIFIED","GIT_DIFF_PATIENCE","GIT_DIFF_MINIMAL","GIT_DIFF_SHOW_BINARY"],"type":"enum","file":"git2/diff.h","line":72,"lineto":194,"block":"GIT_DIFF_NORMAL\nGIT_DIFF_REVERSE\nGIT_DIFF_INCLUDE_IGNORED\nGIT_DIFF_RECURSE_IGNORED_DIRS\nGIT_DIFF_INCLUDE_UNTRACKED\nGIT_DIFF_RECURSE_UNTRACKED_DIRS\nGIT_DIFF_INCLUDE_UNMODIFIED\nGIT_DIFF_INCLUDE_TYPECHANGE\nGIT_DIFF_INCLUDE_TYPECHANGE_TREES\nGIT_DIFF_IGNORE_FILEMODE\nGIT_DIFF_IGNORE_SUBMODULES\nGIT_DIFF_IGNORE_CASE\nGIT_DIFF_DISABLE_PATHSPEC_MATCH\nGIT_DIFF_SKIP_BINARY_CHECK\nGIT_DIFF_ENABLE_FAST_UNTRACKED_DIRS\nGIT_DIFF_UPDATE_INDEX\nGIT_DIFF_FORCE_TEXT\nGIT_DIFF_FORCE_BINARY\nGIT_DIFF_IGNORE_WHITESPACE\nGIT_DIFF_IGNORE_WHITESPACE_CHANGE\nGIT_DIFF_IGNORE_WHITESPACE_EOL\nGIT_DIFF_SHOW_UNTRACKED_CONTENT\nGIT_DIFF_SHOW_UNMODIFIED\nGIT_DIFF_PATIENCE\nGIT_DIFF_MINIMAL\nGIT_DIFF_SHOW_BINARY","tdef":"typedef","description":" Flags for diff options. A combination of these flags can be passed\n in via the `flags` value in the `git_diff_options`.","comments":"","fields":[{"type":"int","name":"GIT_DIFF_NORMAL","comments":"Normal diff, the default
\n","value":0},{"type":"int","name":"GIT_DIFF_REVERSE","comments":"Reverse the sides of the diff
\n","value":1},{"type":"int","name":"GIT_DIFF_INCLUDE_IGNORED","comments":"Include ignored files in the diff
\n","value":2},{"type":"int","name":"GIT_DIFF_RECURSE_IGNORED_DIRS","comments":"Even with GIT_DIFF_INCLUDE_IGNORED, an entire ignored directory\n will be marked with only a single entry in the diff; this flag\n adds all files under the directory as IGNORED entries, too.
\n","value":4},{"type":"int","name":"GIT_DIFF_INCLUDE_UNTRACKED","comments":"Include untracked files in the diff
\n","value":8},{"type":"int","name":"GIT_DIFF_RECURSE_UNTRACKED_DIRS","comments":"Even with GIT_DIFF_INCLUDE_UNTRACKED, an entire untracked\n directory will be marked with only a single entry in the diff\n (a la what core Git does in git status
); this flag adds all\n files under untracked directories as UNTRACKED entries, too.
Include unmodified files in the diff
\n","value":32},{"type":"int","name":"GIT_DIFF_INCLUDE_TYPECHANGE","comments":"Normally, a type change between files will be converted into a\n DELETED record for the old and an ADDED record for the new; this\n options enabled the generation of TYPECHANGE delta records.
\n","value":64},{"type":"int","name":"GIT_DIFF_INCLUDE_TYPECHANGE_TREES","comments":"Even with GIT_DIFF_INCLUDE_TYPECHANGE, blob->tree changes still\n generally show as a DELETED blob. This flag tries to correctly\n label blob->tree transitions as TYPECHANGE records with new_file's\n mode set to tree. Note: the tree SHA will not be available.
\n","value":128},{"type":"int","name":"GIT_DIFF_IGNORE_FILEMODE","comments":"Ignore file mode changes
\n","value":256},{"type":"int","name":"GIT_DIFF_IGNORE_SUBMODULES","comments":"Treat all submodules as unmodified
\n","value":512},{"type":"int","name":"GIT_DIFF_IGNORE_CASE","comments":"Use case insensitive filename comparisons
\n","value":1024},{"type":"int","name":"GIT_DIFF_DISABLE_PATHSPEC_MATCH","comments":"If the pathspec is set in the diff options, this flags means to\n apply it as an exact match instead of as an fnmatch pattern.
\n","value":4096},{"type":"int","name":"GIT_DIFF_SKIP_BINARY_CHECK","comments":"Disable updating of the binary
flag in delta records. This is\n useful when iterating over a diff if you don't need hunk and data\n callbacks and want to avoid having to load file completely.
When diff finds an untracked directory, to match the behavior of\n core Git, it scans the contents for IGNORED and UNTRACKED files.\n If all contents are IGNORED, then the directory is IGNORED; if\n any contents are not IGNORED, then the directory is UNTRACKED.\n This is extra work that may not matter in many cases. This flag\n turns off that scan and immediately labels an untracked directory\n as UNTRACKED (changing the behavior to not match core Git).
\n","value":16384},{"type":"int","name":"GIT_DIFF_UPDATE_INDEX","comments":"When diff finds a file in the working directory with stat\n information different from the index, but the OID ends up being the\n same, write the correct stat information into the index. Note:\n without this flag, diff will always leave the index untouched.
\n","value":32768},{"type":"int","name":"GIT_DIFF_FORCE_TEXT","comments":"Treat all files as text, disabling binary attributes \n&\n detection
\n","value":1048576},{"type":"int","name":"GIT_DIFF_FORCE_BINARY","comments":"Treat all files as binary, disabling text diffs
\n","value":2097152},{"type":"int","name":"GIT_DIFF_IGNORE_WHITESPACE","comments":"Ignore all whitespace
\n","value":4194304},{"type":"int","name":"GIT_DIFF_IGNORE_WHITESPACE_CHANGE","comments":"Ignore changes in amount of whitespace
\n","value":8388608},{"type":"int","name":"GIT_DIFF_IGNORE_WHITESPACE_EOL","comments":"Ignore whitespace at end of line
\n","value":16777216},{"type":"int","name":"GIT_DIFF_SHOW_UNTRACKED_CONTENT","comments":"When generating patch text, include the content of untracked\n files. This automatically turns on GIT_DIFF_INCLUDE_UNTRACKED but\n it does not turn on GIT_DIFF_RECURSE_UNTRACKED_DIRS. Add that\n flag if you want the content of every single UNTRACKED file.
\n","value":33554432},{"type":"int","name":"GIT_DIFF_SHOW_UNMODIFIED","comments":"When generating output, include the names of unmodified files if\n they are included in the git_diff. Normally these are skipped in\n the formats that list files (e.g. name-only, name-status, raw).\n Even with this, these will not be included in patch format.
\n","value":67108864},{"type":"int","name":"GIT_DIFF_PATIENCE","comments":"Use the "patience diff" algorithm
\n","value":268435456},{"type":"int","name":"GIT_DIFF_MINIMAL","comments":"Take extra time to find minimal diff
\n","value":536870912},{"type":"int","name":"GIT_DIFF_SHOW_BINARY","comments":"Include the necessary deflate / delta information so that git-apply
\n can apply given diff information to binary files.
No stats
\n","value":0},{"type":"int","name":"GIT_DIFF_STATS_FULL","comments":"Full statistics, equivalent of --stat
Short statistics, equivalent of --shortstat
Number statistics, equivalent of --numstat
Extended header information such as creations, renames and mode changes, equivalent of --summary
This is kept on a per-thread basis if GIT_THREADS was defined when the library was build, otherwise one is kept globally for the library
\n","fields":[{"type":"char *","name":"message","comments":""},{"type":"int","name":"klass","comments":""}],"used":{"returns":["giterr_last"],"needs":["giterr_detach"]}}],["git_error_code",{"decl":["GIT_OK","GIT_ERROR","GIT_ENOTFOUND","GIT_EEXISTS","GIT_EAMBIGUOUS","GIT_EBUFS","GIT_EUSER","GIT_EBAREREPO","GIT_EUNBORNBRANCH","GIT_EUNMERGED","GIT_ENONFASTFORWARD","GIT_EINVALIDSPEC","GIT_EMERGECONFLICT","GIT_ELOCKED","GIT_EMODIFIED","GIT_PASSTHROUGH","GIT_ITEROVER"],"type":"enum","file":"git2/errors.h","line":21,"lineto":47,"block":"GIT_OK\nGIT_ERROR\nGIT_ENOTFOUND\nGIT_EEXISTS\nGIT_EAMBIGUOUS\nGIT_EBUFS\nGIT_EUSER\nGIT_EBAREREPO\nGIT_EUNBORNBRANCH\nGIT_EUNMERGED\nGIT_ENONFASTFORWARD\nGIT_EINVALIDSPEC\nGIT_EMERGECONFLICT\nGIT_ELOCKED\nGIT_EMODIFIED\nGIT_PASSTHROUGH\nGIT_ITEROVER","tdef":"typedef","description":" Generic return codes ","comments":"","fields":[{"type":"int","name":"GIT_OK","comments":"No error
\n","value":0},{"type":"int","name":"GIT_ERROR","comments":"Generic error
\n","value":-1},{"type":"int","name":"GIT_ENOTFOUND","comments":"Requested object could not be found
\n","value":-3},{"type":"int","name":"GIT_EEXISTS","comments":"Object exists preventing operation
\n","value":-4},{"type":"int","name":"GIT_EAMBIGUOUS","comments":"More than one object matches
\n","value":-5},{"type":"int","name":"GIT_EBUFS","comments":"Output buffer too short to hold data
\n","value":-6},{"type":"int","name":"GIT_EUSER","comments":"","value":-7},{"type":"int","name":"GIT_EBAREREPO","comments":"Operation not allowed on bare repository
\n","value":-8},{"type":"int","name":"GIT_EUNBORNBRANCH","comments":"HEAD refers to branch with no commits
\n","value":-9},{"type":"int","name":"GIT_EUNMERGED","comments":"Merge in progress prevented operation
\n","value":-10},{"type":"int","name":"GIT_ENONFASTFORWARD","comments":"Reference was not fast-forwardable
\n","value":-11},{"type":"int","name":"GIT_EINVALIDSPEC","comments":"Name/ref spec was not in a valid format
\n","value":-12},{"type":"int","name":"GIT_EMERGECONFLICT","comments":"Merge conflicts prevented operation
\n","value":-13},{"type":"int","name":"GIT_ELOCKED","comments":"Lock file prevented operation
\n","value":-14},{"type":"int","name":"GIT_EMODIFIED","comments":"Reference value does not match expected
\n","value":-15},{"type":"int","name":"GIT_PASSTHROUGH","comments":"Internal only
\n","value":-30},{"type":"int","name":"GIT_ITEROVER","comments":"Signals end of iteration with iterator
\n","value":-31}],"used":{"returns":[],"needs":[]}}],["git_error_t",{"decl":["GITERR_NONE","GITERR_NOMEMORY","GITERR_OS","GITERR_INVALID","GITERR_REFERENCE","GITERR_ZLIB","GITERR_REPOSITORY","GITERR_CONFIG","GITERR_REGEX","GITERR_ODB","GITERR_INDEX","GITERR_OBJECT","GITERR_NET","GITERR_TAG","GITERR_TREE","GITERR_INDEXER","GITERR_SSL","GITERR_SUBMODULE","GITERR_THREAD","GITERR_STASH","GITERR_CHECKOUT","GITERR_FETCHHEAD","GITERR_MERGE","GITERR_SSH","GITERR_FILTER","GITERR_REVERT","GITERR_CALLBACK","GITERR_CHERRYPICK"],"type":"enum","file":"git2/errors.h","line":61,"lineto":90,"block":"GITERR_NONE\nGITERR_NOMEMORY\nGITERR_OS\nGITERR_INVALID\nGITERR_REFERENCE\nGITERR_ZLIB\nGITERR_REPOSITORY\nGITERR_CONFIG\nGITERR_REGEX\nGITERR_ODB\nGITERR_INDEX\nGITERR_OBJECT\nGITERR_NET\nGITERR_TAG\nGITERR_TREE\nGITERR_INDEXER\nGITERR_SSL\nGITERR_SUBMODULE\nGITERR_THREAD\nGITERR_STASH\nGITERR_CHECKOUT\nGITERR_FETCHHEAD\nGITERR_MERGE\nGITERR_SSH\nGITERR_FILTER\nGITERR_REVERT\nGITERR_CALLBACK\nGITERR_CHERRYPICK","tdef":"typedef","description":" Error classes ","comments":"","fields":[{"type":"int","name":"GITERR_NONE","comments":"","value":0},{"type":"int","name":"GITERR_NOMEMORY","comments":"","value":1},{"type":"int","name":"GITERR_OS","comments":"","value":2},{"type":"int","name":"GITERR_INVALID","comments":"","value":3},{"type":"int","name":"GITERR_REFERENCE","comments":"","value":4},{"type":"int","name":"GITERR_ZLIB","comments":"","value":5},{"type":"int","name":"GITERR_REPOSITORY","comments":"","value":6},{"type":"int","name":"GITERR_CONFIG","comments":"","value":7},{"type":"int","name":"GITERR_REGEX","comments":"","value":8},{"type":"int","name":"GITERR_ODB","comments":"","value":9},{"type":"int","name":"GITERR_INDEX","comments":"","value":10},{"type":"int","name":"GITERR_OBJECT","comments":"","value":11},{"type":"int","name":"GITERR_NET","comments":"","value":12},{"type":"int","name":"GITERR_TAG","comments":"","value":13},{"type":"int","name":"GITERR_TREE","comments":"","value":14},{"type":"int","name":"GITERR_INDEXER","comments":"","value":15},{"type":"int","name":"GITERR_SSL","comments":"","value":16},{"type":"int","name":"GITERR_SUBMODULE","comments":"","value":17},{"type":"int","name":"GITERR_THREAD","comments":"","value":18},{"type":"int","name":"GITERR_STASH","comments":"","value":19},{"type":"int","name":"GITERR_CHECKOUT","comments":"","value":20},{"type":"int","name":"GITERR_FETCHHEAD","comments":"","value":21},{"type":"int","name":"GITERR_MERGE","comments":"","value":22},{"type":"int","name":"GITERR_SSH","comments":"","value":23},{"type":"int","name":"GITERR_FILTER","comments":"","value":24},{"type":"int","name":"GITERR_REVERT","comments":"","value":25},{"type":"int","name":"GITERR_CALLBACK","comments":"","value":26},{"type":"int","name":"GITERR_CHERRYPICK","comments":"","value":27}],"used":{"returns":[],"needs":[]}}],["git_feature_t",{"decl":["GIT_FEATURE_THREADS","GIT_FEATURE_HTTPS","GIT_FEATURE_SSH"],"type":"enum","file":"git2/common.h","line":100,"lineto":104,"block":"GIT_FEATURE_THREADS\nGIT_FEATURE_HTTPS\nGIT_FEATURE_SSH","tdef":"typedef","description":" Combinations of these values describe the features with which libgit2\n was compiled","comments":"","fields":[{"type":"int","name":"GIT_FEATURE_THREADS","comments":"","value":1},{"type":"int","name":"GIT_FEATURE_HTTPS","comments":"","value":2},{"type":"int","name":"GIT_FEATURE_SSH","comments":"","value":4}],"used":{"returns":[],"needs":[]}}],["git_filemode_t",{"decl":["GIT_FILEMODE_NEW","GIT_FILEMODE_TREE","GIT_FILEMODE_BLOB","GIT_FILEMODE_BLOB_EXECUTABLE","GIT_FILEMODE_LINK","GIT_FILEMODE_COMMIT"],"type":"enum","file":"git2/types.h","line":200,"lineto":207,"block":"GIT_FILEMODE_NEW\nGIT_FILEMODE_TREE\nGIT_FILEMODE_BLOB\nGIT_FILEMODE_BLOB_EXECUTABLE\nGIT_FILEMODE_LINK\nGIT_FILEMODE_COMMIT","tdef":"typedef","description":" Valid modes for index and tree entries. ","comments":"","fields":[{"type":"int","name":"GIT_FILEMODE_NEW","comments":"","value":0},{"type":"int","name":"GIT_FILEMODE_TREE","comments":"","value":16384},{"type":"int","name":"GIT_FILEMODE_BLOB","comments":"","value":33188},{"type":"int","name":"GIT_FILEMODE_BLOB_EXECUTABLE","comments":"","value":33261},{"type":"int","name":"GIT_FILEMODE_LINK","comments":"","value":40960},{"type":"int","name":"GIT_FILEMODE_COMMIT","comments":"","value":57344}],"used":{"returns":["git_tree_entry_filemode","git_tree_entry_filemode_raw"],"needs":["git_treebuilder_insert"]}}],["git_filter",{"decl":["unsigned int version","const char * attributes","git_filter_init_fn initialize","git_filter_shutdown_fn shutdown","git_filter_check_fn check","git_filter_apply_fn apply","git_filter_cleanup_fn cleanup"],"type":"struct","value":"git_filter","file":"git2/sys/filter.h","line":241,"lineto":251,"tdef":null,"description":" Filter structure used to register custom filters.","comments":"To associate extra data with a filter, allocate extra data and put the git_filter
struct at the start of your data buffer, then cast the self
pointer to your larger structure when your callback is invoked.
version
should be set to GIT_FILTER_VERSION
attributes
is a whitespace-separated list of attribute names to check for this filter (e.g. "eol crlf text"). If the attribute name is bare, it will be simply loaded and passed to the check
callback. If it has a value (i.e. "name=value"), the attribute must match that value for the filter to be applied.
The initialize
, shutdown
, check
, apply
, and cleanup
callbacks are all documented above with the respective function pointer typedefs.
This represents a list of filters to be applied to a file / blob. You can build the list with one call, apply it with another, and dispose it with a third. In typical usage, there are not many occasions where a git_filter_list is needed directly since the library will generally handle conversions for you, but it can be convenient to be able to build and apply the list sometimes.
\n","used":{"returns":[],"needs":["git_filter_list_apply_to_blob","git_filter_list_apply_to_data","git_filter_list_apply_to_file","git_filter_list_free","git_filter_list_load"]}}],["git_filter_mode_t",{"decl":["GIT_FILTER_TO_WORKTREE","GIT_FILTER_SMUDGE","GIT_FILTER_TO_ODB","GIT_FILTER_CLEAN"],"type":"enum","file":"git2/filter.h","line":31,"lineto":36,"block":"GIT_FILTER_TO_WORKTREE\nGIT_FILTER_SMUDGE\nGIT_FILTER_TO_ODB\nGIT_FILTER_CLEAN","tdef":"typedef","description":" Filters are applied in one of two directions: smudging - which is\n exporting a file from the Git object database to the working directory,\n and cleaning - which is importing a file from the working directory to\n the Git object database. These values control which direction of\n change is being applied.","comments":"","fields":[{"type":"int","name":"GIT_FILTER_TO_WORKTREE","comments":"","value":0},{"type":"int","name":"GIT_FILTER_SMUDGE","comments":"","value":0},{"type":"int","name":"GIT_FILTER_TO_ODB","comments":"","value":1},{"type":"int","name":"GIT_FILTER_CLEAN","comments":"","value":1}],"used":{"returns":[],"needs":["git_filter_list_load"]}}],["git_filter_source",{"decl":"git_filter_source","type":"struct","value":"git_filter_source","file":"git2/sys/filter.h","line":95,"lineto":95,"tdef":"typedef","description":" A filter source represents a file/blob to be processed","comments":"","used":{"returns":[],"needs":["git_filter_apply_fn","git_filter_check_fn"]}}],["git_idxentry_extended_flag_t",{"decl":["GIT_IDXENTRY_INTENT_TO_ADD","GIT_IDXENTRY_SKIP_WORKTREE","GIT_IDXENTRY_EXTENDED2","GIT_IDXENTRY_EXTENDED_FLAGS","GIT_IDXENTRY_UPDATE","GIT_IDXENTRY_REMOVE","GIT_IDXENTRY_UPTODATE","GIT_IDXENTRY_ADDED","GIT_IDXENTRY_HASHED","GIT_IDXENTRY_UNHASHED","GIT_IDXENTRY_WT_REMOVE","GIT_IDXENTRY_CONFLICTED","GIT_IDXENTRY_UNPACKED","GIT_IDXENTRY_NEW_SKIP_WORKTREE"],"type":"enum","file":"git2/index.h","line":107,"lineto":127,"block":"GIT_IDXENTRY_INTENT_TO_ADD\nGIT_IDXENTRY_SKIP_WORKTREE\nGIT_IDXENTRY_EXTENDED2\nGIT_IDXENTRY_EXTENDED_FLAGS\nGIT_IDXENTRY_UPDATE\nGIT_IDXENTRY_REMOVE\nGIT_IDXENTRY_UPTODATE\nGIT_IDXENTRY_ADDED\nGIT_IDXENTRY_HASHED\nGIT_IDXENTRY_UNHASHED\nGIT_IDXENTRY_WT_REMOVE\nGIT_IDXENTRY_CONFLICTED\nGIT_IDXENTRY_UNPACKED\nGIT_IDXENTRY_NEW_SKIP_WORKTREE","tdef":"typedef","description":" Bitmasks for on-disk fields of `git_index_entry`'s `flags_extended`","comments":"In memory, the flags_extended
fields are divided into two parts: the fields that are read from and written to disk, and other fields that in-memory only and used by libgit2. Only the flags in GIT_IDXENTRY_EXTENDED_FLAGS
will get saved on-disk.
Thee first three bitmasks match the three fields in the git_index_entry
flags_extended
value that belong on disk. You can use them to interpret the data in the flags_extended
.
The rest of the bitmasks match the other fields in the git_index_entry
flags_extended
value that are only used in-memory by libgit2. You can use them to interpret the data in the flags_extended
.
Reserved for future extension
\n","value":32768},{"type":"int","name":"GIT_IDXENTRY_EXTENDED_FLAGS","comments":"Reserved for future extension
\n","value":24576},{"type":"int","name":"GIT_IDXENTRY_UPDATE","comments":"Reserved for future extension
\n","value":1},{"type":"int","name":"GIT_IDXENTRY_REMOVE","comments":"Reserved for future extension
\n","value":2},{"type":"int","name":"GIT_IDXENTRY_UPTODATE","comments":"Reserved for future extension
\n","value":4},{"type":"int","name":"GIT_IDXENTRY_ADDED","comments":"Reserved for future extension
\n","value":8},{"type":"int","name":"GIT_IDXENTRY_HASHED","comments":"Reserved for future extension
\n","value":16},{"type":"int","name":"GIT_IDXENTRY_UNHASHED","comments":"Reserved for future extension
\n","value":32},{"type":"int","name":"GIT_IDXENTRY_WT_REMOVE","comments":"remove in work directory
\n","value":64},{"type":"int","name":"GIT_IDXENTRY_CONFLICTED","comments":"","value":128},{"type":"int","name":"GIT_IDXENTRY_UNPACKED","comments":"","value":256},{"type":"int","name":"GIT_IDXENTRY_NEW_SKIP_WORKTREE","comments":"","value":512}],"used":{"returns":[],"needs":[]}}],["git_index",{"decl":"git_index","type":"struct","value":"git_index","file":"git2/types.h","line":132,"lineto":132,"tdef":"typedef","description":" Memory representation of an index file. ","comments":"","used":{"returns":["git_index_get_bypath"],"needs":["git_checkout_index","git_cherry_pick_commit","git_diff_index_to_workdir","git_diff_tree_to_index","git_index_add","git_index_add_all","git_index_add_bypath","git_index_caps","git_index_clear","git_index_conflict_add","git_index_conflict_cleanup","git_index_conflict_get","git_index_conflict_iterator_free","git_index_conflict_iterator_new","git_index_conflict_next","git_index_conflict_remove","git_index_entry_stage","git_index_free","git_index_get_bypath","git_index_has_conflicts","git_index_new","git_index_open","git_index_owner","git_index_path","git_index_read","git_index_read_tree","git_index_remove","git_index_remove_all","git_index_remove_bypath","git_index_remove_directory","git_index_set_caps","git_index_update_all","git_index_write","git_index_write_tree","git_index_write_tree_to","git_indexer_commit","git_indexer_free","git_indexer_hash","git_indexer_new","git_merge_commits","git_merge_file_from_index","git_merge_trees","git_pathspec_match_index","git_repository_index","git_revert_commit"]}}],["git_index_add_option_t",{"decl":["GIT_INDEX_ADD_DEFAULT","GIT_INDEX_ADD_FORCE","GIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH","GIT_INDEX_ADD_CHECK_PATHSPEC"],"type":"enum","file":"git2/index.h","line":142,"lineto":147,"block":"GIT_INDEX_ADD_DEFAULT\nGIT_INDEX_ADD_FORCE\nGIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH\nGIT_INDEX_ADD_CHECK_PATHSPEC","tdef":"typedef","description":" Flags for APIs that add files matching pathspec ","comments":"","fields":[{"type":"int","name":"GIT_INDEX_ADD_DEFAULT","comments":"","value":0},{"type":"int","name":"GIT_INDEX_ADD_FORCE","comments":"","value":1},{"type":"int","name":"GIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH","comments":"","value":2},{"type":"int","name":"GIT_INDEX_ADD_CHECK_PATHSPEC","comments":"","value":4}],"used":{"returns":[],"needs":[]}}],["git_index_conflict_iterator",{"decl":"git_index_conflict_iterator","type":"struct","value":"git_index_conflict_iterator","file":"git2/types.h","line":135,"lineto":135,"tdef":"typedef","description":" An iterator for conflicts in the index. ","comments":"","used":{"returns":[],"needs":["git_index_conflict_iterator_free","git_index_conflict_iterator_new","git_index_conflict_next"]}}],["git_index_entry",{"decl":["git_index_time ctime","git_index_time mtime","unsigned int dev","unsigned int ino","unsigned int mode","unsigned int uid","unsigned int gid","git_off_t file_size","git_oid id","unsigned short flags","unsigned short flags_extended","const char * path"],"type":"struct","value":"git_index_entry","file":"git2/index.h","line":48,"lineto":65,"block":"git_index_time ctime\ngit_index_time mtime\nunsigned int dev\nunsigned int ino\nunsigned int mode\nunsigned int uid\nunsigned int gid\ngit_off_t file_size\ngit_oid id\nunsigned short flags\nunsigned short flags_extended\nconst char * path","tdef":"typedef","description":" In-memory representation of a file entry in the index.","comments":"This is a public structure that represents a file entry in the index. The meaning of the fields corresponds to core Git's documentation (in "Documentation/technical/index-format.txt").
\n\nThe flags
field consists of a number of bit fields which can be accessed via the first set of GIT_IDXENTRY_...
bitmasks below. These flags are all read from and persisted to disk.
The flags_extended
field also has a number of bit fields which can be accessed via the later GIT_IDXENTRY_...
bitmasks below. Some of these flags are read from and written to disk, but some are set aside for in-memory only reference.
No merge is possible. (Unused.)
\n","value":0},{"type":"int","name":"GIT_MERGE_ANALYSIS_NORMAL","comments":"A "normal" merge; both HEAD and the given merge input have diverged\n from their common ancestor. The divergent commits must be merged.
\n","value":1},{"type":"int","name":"GIT_MERGE_ANALYSIS_UP_TO_DATE","comments":"All given merge inputs are reachable from HEAD, meaning the\n repository is up-to-date and no merge needs to be performed.
\n","value":2},{"type":"int","name":"GIT_MERGE_ANALYSIS_FASTFORWARD","comments":"The given merge input is a fast-forward from HEAD and no merge\n needs to be performed. Instead, the client can check out the\n given merge input.
\n","value":4},{"type":"int","name":"GIT_MERGE_ANALYSIS_UNBORN","comments":"The HEAD of the current repository is "unborn" and does not point to\n a valid commit. No merge can be performed, but the caller may wish\n to simply set HEAD to the target commit(s).
\n","value":8}],"used":{"returns":[],"needs":[]}}],["git_merge_file_favor_t",{"decl":["GIT_MERGE_FILE_FAVOR_NORMAL","GIT_MERGE_FILE_FAVOR_OURS","GIT_MERGE_FILE_FAVOR_THEIRS","GIT_MERGE_FILE_FAVOR_UNION"],"type":"enum","file":"git2/merge.h","line":79,"lineto":109,"block":"GIT_MERGE_FILE_FAVOR_NORMAL\nGIT_MERGE_FILE_FAVOR_OURS\nGIT_MERGE_FILE_FAVOR_THEIRS\nGIT_MERGE_FILE_FAVOR_UNION","tdef":"typedef","description":" Merge file favor options for `git_merge_options` instruct the file-level\n merging functionality how to deal with conflicting regions of the files.","comments":"","fields":[{"type":"int","name":"GIT_MERGE_FILE_FAVOR_NORMAL","comments":"When a region of a file is changed in both branches, a conflict\n will be recorded in the index so that git_checkout
can produce\n a merge file with conflict markers in the working directory.\n This is the default.
When a region of a file is changed in both branches, the file\n created in the index will contain the "ours" side of any conflicting\n region. The index will not record a conflict.
\n","value":1},{"type":"int","name":"GIT_MERGE_FILE_FAVOR_THEIRS","comments":"When a region of a file is changed in both branches, the file\n created in the index will contain the "theirs" side of any conflicting\n region. The index will not record a conflict.
\n","value":2},{"type":"int","name":"GIT_MERGE_FILE_FAVOR_UNION","comments":"When a region of a file is changed in both branches, the file\n created in the index will contain each unique line from each side,\n which has the result of combining both files. The index will not\n record a conflict.
\n","value":3}],"used":{"returns":[],"needs":[]}}],["git_merge_head",{"decl":"git_merge_head","type":"struct","value":"git_merge_head","file":"git2/types.h","line":175,"lineto":175,"tdef":"typedef","description":" Merge heads, the input to merge ","comments":"","used":{"returns":[],"needs":["git_merge_head_free","git_merge_head_from_fetchhead","git_merge_head_from_id","git_merge_head_from_ref","git_merge_head_id"]}}],["git_merge_result",{"decl":"git_merge_result","type":"struct","value":"git_merge_result","file":"git2/types.h","line":178,"lineto":178,"tdef":"typedef","description":" Merge result ","comments":"","used":{"returns":[],"needs":[]}}],["git_merge_tree_flag_t",{"decl":["GIT_MERGE_TREE_FIND_RENAMES"],"type":"enum","file":"git2/merge.h","line":66,"lineto":73,"block":"GIT_MERGE_TREE_FIND_RENAMES","tdef":"typedef","description":" Flags for `git_merge_tree` options. A combination of these flags can be\n passed in via the `flags` value in the `git_merge_options`.","comments":"","fields":[{"type":"int","name":"GIT_MERGE_TREE_FIND_RENAMES","comments":"Detect renames that occur between the common ancestor and the "ours"\n side or the common ancestor and the "theirs" side. This will enable\n the ability to merge between a modified and renamed file.
\n","value":1}],"used":{"returns":[],"needs":[]}}],["git_note",{"decl":"git_note","type":"struct","value":"git_note","file":"git2/types.h","line":150,"lineto":150,"tdef":"typedef","description":" Representation of a git note ","comments":"","used":{"returns":[],"needs":["git_note_foreach","git_note_free","git_note_id","git_note_iterator_free","git_note_iterator_new","git_note_message","git_note_next","git_note_read"]}}],["git_note_iterator",{"decl":"git_note_iterator","type":"struct","value":"git_note_iterator","file":"git2/notes.h","line":35,"lineto":35,"tdef":"typedef","description":" note iterator","comments":"","used":{"returns":[],"needs":["git_note_iterator_free","git_note_iterator_new","git_note_next"]}}],["git_object",{"decl":"git_object","type":"struct","value":"git_object","file":"git2/types.h","line":108,"lineto":108,"tdef":"typedef","description":" Representation of a generic object in a repository ","comments":"","used":{"returns":[],"needs":["git_checkout_tree","git_object_dup","git_object_free","git_object_id","git_object_lookup","git_object_lookup_bypath","git_object_owner","git_object_peel","git_object_short_id","git_object_type","git_reference_peel","git_revparse_ext","git_revparse_single","git_tag_annotation_create","git_tag_create","git_tag_create_lightweight","git_tag_peel","git_tag_target","git_tree_entry_to_object"]}}],["git_odb",{"decl":"git_odb","type":"struct","value":"git_odb","file":"git2/types.h","line":81,"lineto":81,"tdef":"typedef","description":" An open object database handle. ","comments":"","used":{"returns":[],"needs":["git_indexer_new","git_odb_add_alternate","git_odb_add_backend","git_odb_add_disk_alternate","git_odb_backend_loose","git_odb_backend_one_pack","git_odb_backend_pack","git_odb_exists","git_odb_foreach","git_odb_free","git_odb_new","git_odb_object_data","git_odb_object_dup","git_odb_object_free","git_odb_object_id","git_odb_object_type","git_odb_open","git_odb_open_rstream","git_odb_read","git_odb_refresh","git_odb_stream_finalize_write","git_odb_stream_free","git_odb_write_pack","git_repository_odb","git_repository_wrap_odb"]}}],["git_odb_backend",{"decl":"git_odb_backend","type":"struct","value":"git_odb_backend","file":"git2/types.h","line":84,"lineto":84,"tdef":"typedef","description":" A custom backend in an ODB ","comments":"","used":{"returns":[],"needs":["git_odb_add_alternate","git_odb_add_backend","git_odb_backend_loose","git_odb_backend_one_pack","git_odb_backend_pack"]}}],["git_odb_object",{"decl":"git_odb_object","type":"struct","value":"git_odb_object","file":"git2/types.h","line":87,"lineto":87,"tdef":"typedef","description":" An object read from the ODB ","comments":"","used":{"returns":[],"needs":["git_odb_object_data","git_odb_object_dup","git_odb_object_free","git_odb_object_id","git_odb_object_type","git_odb_read"]}}],["git_odb_stream",{"decl":"git_odb_stream","type":"struct","value":"git_odb_stream","file":"git2/types.h","line":90,"lineto":90,"tdef":"typedef","description":" A stream to read/write from the ODB ","comments":"","used":{"returns":[],"needs":["git_odb_open_rstream","git_odb_stream_finalize_write","git_odb_stream_free"]}}],["git_odb_stream_t",{"decl":["GIT_STREAM_RDONLY","GIT_STREAM_WRONLY","GIT_STREAM_RW"],"type":"enum","file":"git2/odb_backend.h","line":70,"lineto":74,"block":"GIT_STREAM_RDONLY\nGIT_STREAM_WRONLY\nGIT_STREAM_RW","tdef":"typedef","description":" Streaming mode ","comments":"","fields":[{"type":"int","name":"GIT_STREAM_RDONLY","comments":"","value":2},{"type":"int","name":"GIT_STREAM_WRONLY","comments":"","value":4},{"type":"int","name":"GIT_STREAM_RW","comments":"","value":6}],"used":{"returns":[],"needs":[]}}],["git_odb_writepack",{"decl":"git_odb_writepack","type":"struct","value":"git_odb_writepack","file":"git2/types.h","line":93,"lineto":93,"block":"git_odb_backend * backend\nint (*)(git_odb_writepack *, const void *, int, git_transfer_progress *) append\nint (*)(git_odb_writepack *, git_transfer_progress *) commit\nvoid (*)(git_odb_writepack *) free","tdef":"typedef","description":" A stream to write a packfile to the ODB ","comments":"","fields":[{"type":"git_odb_backend *","name":"backend","comments":""},{"type":"int (*)(git_odb_writepack *, const void *, int, git_transfer_progress *)","name":"append","comments":""},{"type":"int (*)(git_odb_writepack *, git_transfer_progress *)","name":"commit","comments":""},{"type":"void (*)(git_odb_writepack *)","name":"free","comments":""}],"used":{"returns":[],"needs":["git_odb_write_pack"]}}],["git_oid",{"decl":["unsigned char [20] id"],"type":"struct","value":"git_oid","file":"git2/oid.h","line":33,"lineto":36,"block":"unsigned char [20] id","tdef":"typedef","description":" Unique identity of any object (commit, tree, blob, tag). ","comments":"","fields":[{"type":"unsigned char [20]","name":"id","comments":" raw binary formatted id "}],"used":{"returns":["git_blob_id","git_commit_id","git_commit_parent_id","git_commit_tree_id","git_indexer_hash","git_merge_head_id","git_note_id","git_object_id","git_odb_object_id","git_packbuilder_hash","git_reference_target","git_reference_target_peel","git_reflog_entry_id_new","git_reflog_entry_id_old","git_submodule_head_id","git_submodule_index_id","git_submodule_wd_id","git_tag_id","git_tag_target_id","git_tree_entry_id","git_tree_id"],"needs":["git_blob_create_fromchunks","git_blob_create_fromdisk","git_blob_create_fromworkdir","git_blob_lookup","git_commit_amend","git_commit_lookup","git_graph_descendant_of","git_index_write_tree","git_index_write_tree_to","git_merge_base","git_merge_head_from_fetchhead","git_merge_head_from_id","git_note_create","git_note_foreach_cb","git_note_next","git_note_read","git_note_remove","git_object_lookup","git_odb_exists","git_odb_foreach_cb","git_odb_hashfile","git_odb_open_rstream","git_odb_read","git_odb_stream_finalize_write","git_oid_allocfmt","git_oid_cmp","git_oid_cpy","git_oid_equal","git_oid_fmt","git_oid_fromraw","git_oid_fromstr","git_oid_fromstrp","git_oid_iszero","git_oid_pathfmt","git_oid_shorten_add","git_oid_shorten_free","git_oid_strcmp","git_oid_streq","git_packbuilder_insert","git_packbuilder_insert_commit","git_packbuilder_insert_tree","git_reference_create","git_reference_create_matching","git_reference_name_to_id","git_reference_set_target","git_reflog_append","git_repository_hashfile","git_repository_set_head_detached","git_revwalk_hide","git_revwalk_hide_cb","git_revwalk_next","git_revwalk_push","git_tag_annotation_create","git_tag_create","git_tag_create_frombuffer","git_tag_create_lightweight","git_tag_lookup","git_tree_entry_byid","git_tree_lookup","git_treebuilder_insert","git_treebuilder_write"]}}],["git_oid_shorten",{"decl":"git_oid_shorten","type":"struct","value":"git_oid_shorten","file":"git2/oid.h","line":212,"lineto":212,"tdef":"typedef","description":" OID Shortener object","comments":"","used":{"returns":[],"needs":["git_oid_shorten_add","git_oid_shorten_free"]}}],["git_otype",{"decl":["GIT_OBJ_ANY","GIT_OBJ_BAD","GIT_OBJ__EXT1","GIT_OBJ_COMMIT","GIT_OBJ_TREE","GIT_OBJ_BLOB","GIT_OBJ_TAG","GIT_OBJ__EXT2","GIT_OBJ_OFS_DELTA","GIT_OBJ_REF_DELTA"],"type":"enum","file":"git2/types.h","line":67,"lineto":78,"block":"GIT_OBJ_ANY\nGIT_OBJ_BAD\nGIT_OBJ__EXT1\nGIT_OBJ_COMMIT\nGIT_OBJ_TREE\nGIT_OBJ_BLOB\nGIT_OBJ_TAG\nGIT_OBJ__EXT2\nGIT_OBJ_OFS_DELTA\nGIT_OBJ_REF_DELTA","tdef":"typedef","description":" Basic type (loose or packed) of any Git object. ","comments":"","fields":[{"type":"int","name":"GIT_OBJ_ANY","comments":"Object can be any of the following
\n","value":-2},{"type":"int","name":"GIT_OBJ_BAD","comments":"Object is invalid.
\n","value":-1},{"type":"int","name":"GIT_OBJ__EXT1","comments":"Reserved for future use.
\n","value":0},{"type":"int","name":"GIT_OBJ_COMMIT","comments":"A commit object.
\n","value":1},{"type":"int","name":"GIT_OBJ_TREE","comments":"A tree (directory listing) object.
\n","value":2},{"type":"int","name":"GIT_OBJ_BLOB","comments":"A file revision object.
\n","value":3},{"type":"int","name":"GIT_OBJ_TAG","comments":"An annotated tag object.
\n","value":4},{"type":"int","name":"GIT_OBJ__EXT2","comments":"Reserved for future use.
\n","value":5},{"type":"int","name":"GIT_OBJ_OFS_DELTA","comments":"A delta, base is given by an offset.
\n","value":6},{"type":"int","name":"GIT_OBJ_REF_DELTA","comments":"A delta, base is given by object id.
\n","value":7}],"used":{"returns":["git_object_string2type","git_object_type","git_odb_object_type","git_tag_target_type","git_tree_entry_type"],"needs":["git_object_lookup","git_object_lookup_bypath","git_object_peel","git_object_type2string","git_object_typeisloose","git_odb_hashfile","git_reference_peel","git_repository_hashfile"]}}],["git_packbuilder",{"decl":"git_packbuilder","type":"struct","value":"git_packbuilder","file":"git2/types.h","line":153,"lineto":153,"tdef":"typedef","description":" Representation of a git packbuilder ","comments":"","used":{"returns":[],"needs":["git_packbuilder_foreach","git_packbuilder_free","git_packbuilder_hash","git_packbuilder_insert","git_packbuilder_insert_commit","git_packbuilder_insert_tree","git_packbuilder_new","git_packbuilder_object_count","git_packbuilder_set_callbacks","git_packbuilder_set_threads","git_packbuilder_write","git_packbuilder_written","git_push_set_callbacks"]}}],["git_packbuilder_stage_t",{"decl":["GIT_PACKBUILDER_ADDING_OBJECTS","GIT_PACKBUILDER_DELTAFICATION"],"type":"enum","file":"git2/pack.h","line":51,"lineto":54,"block":"GIT_PACKBUILDER_ADDING_OBJECTS\nGIT_PACKBUILDER_DELTAFICATION","tdef":"typedef","description":" Stages that are reported by the packbuilder progress callback.","comments":"","fields":[{"type":"int","name":"GIT_PACKBUILDER_ADDING_OBJECTS","comments":"","value":0},{"type":"int","name":"GIT_PACKBUILDER_DELTAFICATION","comments":"","value":1}],"used":{"returns":[],"needs":[]}}],["git_patch",{"decl":"git_patch","type":"struct","value":"git_patch","file":"git2/patch.h","line":29,"lineto":29,"tdef":"typedef","description":" The diff patch is used to store all the text diffs for a delta.","comments":"You can easily loop over the content of patches and get information about them.
\n","used":{"returns":[],"needs":["git_patch_free","git_patch_from_blobs","git_patch_get_delta","git_patch_print","git_patch_to_buf"]}}],["git_pathspec",{"decl":"git_pathspec","type":"struct","value":"git_pathspec","file":"git2/pathspec.h","line":20,"lineto":20,"tdef":"typedef","description":" Compiled pathspec","comments":"","used":{"returns":[],"needs":["git_pathspec_free","git_pathspec_match_diff","git_pathspec_match_index","git_pathspec_match_list_free","git_pathspec_match_tree","git_pathspec_match_workdir","git_pathspec_matches_path","git_pathspec_new"]}}],["git_pathspec_flag_t",{"decl":["GIT_PATHSPEC_DEFAULT","GIT_PATHSPEC_IGNORE_CASE","GIT_PATHSPEC_USE_CASE","GIT_PATHSPEC_NO_GLOB","GIT_PATHSPEC_NO_MATCH_ERROR","GIT_PATHSPEC_FIND_FAILURES","GIT_PATHSPEC_FAILURES_ONLY"],"type":"enum","file":"git2/pathspec.h","line":48,"lineto":56,"block":"GIT_PATHSPEC_DEFAULT\nGIT_PATHSPEC_IGNORE_CASE\nGIT_PATHSPEC_USE_CASE\nGIT_PATHSPEC_NO_GLOB\nGIT_PATHSPEC_NO_MATCH_ERROR\nGIT_PATHSPEC_FIND_FAILURES\nGIT_PATHSPEC_FAILURES_ONLY","tdef":"typedef","description":" Options controlling how pathspec match should be executed","comments":"git_pathspec_match_list_entrycount
will indicate 0 matches. - GIT_PATHSPEC_FIND_FAILURES means that the git_pathspec_match_list
should track which patterns matched which files so that at the end of the match we can identify patterns that did not match any files. - GIT_PATHSPEC_FAILURES_ONLY means that the git_pathspec_match_list
does not need to keep the actual matching filenames. Use this to just test if there were any matches at all or in combination with GIT_PATHSPEC_FIND_FAILURES to validate a pathspec.Invalid reference
\n","value":0},{"type":"int","name":"GIT_REF_OID","comments":"A reference which points at an object id
\n","value":1},{"type":"int","name":"GIT_REF_SYMBOLIC","comments":"A reference which points at another reference
\n","value":2},{"type":"int","name":"GIT_REF_LISTALL","comments":"","value":3}],"used":{"returns":["git_reference_type"],"needs":[]}}],["git_refdb",{"decl":"git_refdb","type":"struct","value":"git_refdb","file":"git2/types.h","line":96,"lineto":96,"tdef":"typedef","description":" An open refs database handle. ","comments":"","used":{"returns":[],"needs":["git_refdb_compress","git_refdb_free","git_refdb_new","git_refdb_open","git_repository_refdb"]}}],["git_refdb_backend",{"decl":"git_refdb_backend","type":"struct","value":"git_refdb_backend","file":"git2/types.h","line":99,"lineto":99,"block":"unsigned int version\nint (*)(int *, struct git_refdb_backend *, const char *) exists\nint (*)(int **, struct git_refdb_backend *, const char *) lookup\nint (*)(int **, struct git_refdb_backend *, const char *) iterator\nint (*)(struct git_refdb_backend *, const int *, int, const int *, const char *, const int *, const char *) write\nint (*)(int **, struct git_refdb_backend *, const char *, const char *, int, const int *, const char *) rename\nint (*)(struct git_refdb_backend *, const char *, const int *, const char *) del\nint (*)(struct git_refdb_backend *) compress\nint (*)(struct git_refdb_backend *, const char *) has_log\nint (*)(struct git_refdb_backend *, const char *) ensure_log\nvoid (*)(struct git_refdb_backend *) free\nint (*)(int **, struct git_refdb_backend *, const char *) reflog_read\nint (*)(struct git_refdb_backend *, int *) reflog_write\nint (*)(struct git_refdb_backend *, const char *, const char *) reflog_rename\nint (*)(struct git_refdb_backend *, const char *) reflog_delete","tdef":"typedef","description":" A custom backend for refs ","comments":"","fields":[{"type":"unsigned int","name":"version","comments":""},{"type":"int (*)(int *, struct git_refdb_backend *, const char *)","name":"exists","comments":" Queries the refdb backend to determine if the given ref_name\n exists. A refdb implementation must provide this function."},{"type":"int (*)(int **, struct git_refdb_backend *, const char *)","name":"lookup","comments":" Queries the refdb backend for a given reference. A refdb\n implementation must provide this function."},{"type":"int (*)(int **, struct git_refdb_backend *, const char *)","name":"iterator","comments":" Allocate an iterator object for the backend.\n\n A refdb implementation must provide this function."},{"type":"int (*)(struct git_refdb_backend *, const int *, int, const int *, const char *, const int *, const char *)","name":"write","comments":""},{"type":"int (*)(int **, struct git_refdb_backend *, const char *, const char *, int, const int *, const char *)","name":"rename","comments":""},{"type":"int (*)(struct git_refdb_backend *, const char *, const int *, const char *)","name":"del","comments":" Deletes the given reference from the refdb. A refdb implementation\n must provide this function."},{"type":"int (*)(struct git_refdb_backend *)","name":"compress","comments":" Suggests that the given refdb compress or optimize its references.\n This mechanism is implementation specific. (For on-disk reference\n databases, this may pack all loose references.) A refdb\n implementation may provide this function; if it is not provided,\n nothing will be done."},{"type":"int (*)(struct git_refdb_backend *, const char *)","name":"has_log","comments":" Query whether a particular reference has a log (may be empty)"},{"type":"int (*)(struct git_refdb_backend *, const char *)","name":"ensure_log","comments":" Make sure a particular reference will have a reflog which\n will be appended to on writes."},{"type":"void (*)(struct git_refdb_backend *)","name":"free","comments":" Frees any resources held by the refdb. A refdb implementation may\n provide this function; if it is not provided, nothing will be done."},{"type":"int (*)(int **, struct git_refdb_backend *, const char *)","name":"reflog_read","comments":" Read the reflog for the given reference name."},{"type":"int (*)(struct git_refdb_backend *, int *)","name":"reflog_write","comments":" Write a reflog to disk."},{"type":"int (*)(struct git_refdb_backend *, const char *, const char *)","name":"reflog_rename","comments":" Rename a reflog"},{"type":"int (*)(struct git_refdb_backend *, const char *)","name":"reflog_delete","comments":" Remove a reflog."}],"used":{"returns":[],"needs":[]}}],["git_reference",{"decl":"git_reference","type":"struct","value":"git_reference","file":"git2/types.h","line":169,"lineto":169,"tdef":"typedef","description":" In-memory representation of a reference. ","comments":"","used":{"returns":[],"needs":["git_branch_create","git_branch_delete","git_branch_is_head","git_branch_lookup","git_branch_move","git_branch_name","git_branch_next","git_branch_set_upstream","git_branch_upstream","git_merge_head_from_ref","git_reference_cmp","git_reference_create","git_reference_create_matching","git_reference_delete","git_reference_dwim","git_reference_foreach","git_reference_foreach_glob","git_reference_foreach_name","git_reference_free","git_reference_is_branch","git_reference_is_note","git_reference_is_remote","git_reference_is_tag","git_reference_iterator_free","git_reference_iterator_glob_new","git_reference_iterator_new","git_reference_lookup","git_reference_name","git_reference_next","git_reference_next_name","git_reference_owner","git_reference_peel","git_reference_rename","git_reference_resolve","git_reference_set_target","git_reference_shorthand","git_reference_symbolic_create","git_reference_symbolic_create_matching","git_reference_symbolic_set_target","git_reference_symbolic_target","git_reference_target","git_reference_target_peel","git_reference_type","git_repository_head","git_revparse_ext"]}}],["git_reference_iterator",{"decl":"git_reference_iterator","type":"struct","value":"git_reference_iterator","file":"git2/types.h","line":172,"lineto":172,"tdef":"typedef","description":" Iterator for references ","comments":"","used":{"returns":[],"needs":["git_reference_iterator_free","git_reference_iterator_glob_new","git_reference_iterator_new","git_reference_next","git_reference_next_name"]}}],["git_reflog",{"decl":"git_reflog","type":"struct","value":"git_reflog","file":"git2/types.h","line":147,"lineto":147,"tdef":"typedef","description":" Representation of a reference log ","comments":"","used":{"returns":[],"needs":["git_reflog_append","git_reflog_entry_committer","git_reflog_entry_id_new","git_reflog_entry_id_old","git_reflog_entry_message","git_reflog_free","git_reflog_read","git_reflog_write"]}}],["git_reflog_entry",{"decl":"git_reflog_entry","type":"struct","value":"git_reflog_entry","file":"git2/types.h","line":144,"lineto":144,"tdef":"typedef","description":" Representation of a reference log entry ","comments":"","used":{"returns":[],"needs":["git_reflog_entry_committer","git_reflog_entry_id_new","git_reflog_entry_id_old","git_reflog_entry_message"]}}],["git_remote_callbacks",{"decl":["unsigned int version","git_transport_message_cb sideband_progress","int (*)(git_remote_completion_type, void *) completion","git_cred_acquire_cb credentials","git_transfer_progress_cb transfer_progress","int (*)(const char *, const git_oid *, const git_oid *, void *) update_tips","void * payload"],"type":"struct","value":"git_remote_callbacks","file":"git2/remote.h","line":453,"lineto":495,"block":"unsigned int version\ngit_transport_message_cb sideband_progress\nint (*)(git_remote_completion_type, void *) completion\ngit_cred_acquire_cb credentials\ngit_transfer_progress_cb transfer_progress\nint (*)(const char *, const git_oid *, const git_oid *, void *) update_tips\nvoid * payload","tdef":null,"description":" The callback settings structure","comments":"Set the callbacks to be called by the remote when informing the user about the progress of the network operations.
\n","fields":[{"type":"unsigned int","name":"version","comments":""},{"type":"git_transport_message_cb","name":"sideband_progress","comments":" Textual progress from the remote. Text send over the\n progress side-band will be passed to this function (this is\n the 'counting objects' output."},{"type":"int (*)(git_remote_completion_type, void *)","name":"completion","comments":" Completion is called when different parts of the download\n process are done (currently unused)."},{"type":"git_cred_acquire_cb","name":"credentials","comments":" This will be called if the remote host requires\n authentication in order to connect to it.\n\n Returning GIT_PASSTHROUGH will make libgit2 behave as\n though this field isn't set."},{"type":"git_transfer_progress_cb","name":"transfer_progress","comments":" During the download of new data, this will be regularly\n called with the current count of progress done by the\n indexer."},{"type":"int (*)(const char *, const git_oid *, const git_oid *, void *)","name":"update_tips","comments":" Each time a reference is updated locally, this function\n will be called with information about it."},{"type":"void *","name":"payload","comments":" This will be passed to each of the callbacks in this struct\n as the last parameter."}],"used":{"returns":["git_remote_get_callbacks"],"needs":["git_remote_init_callbacks","git_remote_set_callbacks"]}}],["git_remote_completion_type",{"decl":["GIT_REMOTE_COMPLETION_DOWNLOAD","GIT_REMOTE_COMPLETION_INDEXING","GIT_REMOTE_COMPLETION_ERROR"],"type":"enum","file":"git2/remote.h","line":441,"lineto":445,"block":"GIT_REMOTE_COMPLETION_DOWNLOAD\nGIT_REMOTE_COMPLETION_INDEXING\nGIT_REMOTE_COMPLETION_ERROR\nGIT_REMOTE_COMPLETION_DOWNLOAD\nGIT_REMOTE_COMPLETION_INDEXING\nGIT_REMOTE_COMPLETION_ERROR","tdef":"typedef","description":" Argument to the completion callback which tells it which operation\n finished.","comments":"","fields":[{"type":"int","name":"GIT_REMOTE_COMPLETION_DOWNLOAD","comments":"","value":0},{"type":"int","name":"GIT_REMOTE_COMPLETION_INDEXING","comments":"","value":1},{"type":"int","name":"GIT_REMOTE_COMPLETION_ERROR","comments":"","value":2}],"used":{"returns":[],"needs":[]}}],["git_remote_head",{"decl":["int local","git_oid oid","git_oid loid","char * name","char * symref_target"],"type":"struct","value":"git_remote_head","file":"git2/net.h","line":39,"lineto":49,"block":"int local\ngit_oid oid\ngit_oid loid\nchar * name\nchar * symref_target","tdef":null,"description":" Remote head description, given out on `ls` calls.","comments":"","fields":[{"type":"int","name":"local","comments":""},{"type":"git_oid","name":"oid","comments":""},{"type":"git_oid","name":"loid","comments":""},{"type":"char *","name":"name","comments":""},{"type":"char *","name":"symref_target","comments":" If the server send a symref mapping for this ref, this will\n point to the target."}],"used":{"returns":[],"needs":["git_headlist_cb"]}}],["git_repository",{"decl":"git_repository","type":"struct","value":"git_repository","file":"git2/types.h","line":105,"lineto":105,"tdef":"typedef","description":" Representation of an existing git repository,\n including all its object contents","comments":"","used":{"returns":["git_blob_owner","git_commit_owner","git_index_owner","git_object_owner","git_reference_owner","git_remote_owner","git_revwalk_repository","git_submodule_owner","git_tag_owner","git_tree_owner"],"needs":["git_attr_add_macro","git_attr_cache_flush","git_attr_foreach","git_attr_get","git_blame_file","git_blob_create_fromchunks","git_blob_create_fromdisk","git_blob_create_fromworkdir","git_blob_lookup","git_branch_create","git_branch_iterator_new","git_branch_lookup","git_checkout_head","git_checkout_index","git_checkout_tree","git_cherry_pick","git_cherry_pick_commit","git_clone","git_clone_into","git_clone_local_into","git_commit_lookup","git_diff_index_to_workdir","git_diff_tree_to_index","git_diff_tree_to_tree","git_diff_tree_to_workdir","git_diff_tree_to_workdir_with_index","git_filter_list_apply_to_file","git_filter_list_load","git_graph_descendant_of","git_ignore_add_rule","git_ignore_clear_internal_rules","git_ignore_path_is_ignored","git_index_write_tree_to","git_merge_base","git_merge_commits","git_merge_file_from_index","git_merge_head_from_fetchhead","git_merge_head_from_id","git_merge_head_from_ref","git_merge_trees","git_note_create","git_note_default_ref","git_note_foreach","git_note_iterator_new","git_note_read","git_note_remove","git_object_lookup","git_packbuilder_new","git_pathspec_match_workdir","git_refdb_new","git_refdb_open","git_reference_create","git_reference_create_matching","git_reference_dwim","git_reference_ensure_log","git_reference_foreach","git_reference_foreach_glob","git_reference_foreach_name","git_reference_has_log","git_reference_iterator_glob_new","git_reference_iterator_new","git_reference_list","git_reference_lookup","git_reference_name_to_id","git_reference_remove","git_reference_symbolic_create","git_reference_symbolic_create_matching","git_reflog_delete","git_reflog_read","git_reflog_rename","git_remote_create","git_remote_create_anonymous","git_remote_create_with_fetchspec","git_remote_list","git_remote_load","git_repository_config","git_repository_config_snapshot","git_repository_detach_head","git_repository_fetchhead_foreach","git_repository_free","git_repository_get_namespace","git_repository_hashfile","git_repository_head","git_repository_head_detached","git_repository_head_unborn","git_repository_index","git_repository_init","git_repository_init_ext","git_repository_init_init_options","git_repository_is_bare","git_repository_is_empty","git_repository_is_shallow","git_repository_mergehead_foreach","git_repository_message","git_repository_message_remove","git_repository_odb","git_repository_open","git_repository_open_bare","git_repository_open_ext","git_repository_path","git_repository_refdb","git_repository_set_head","git_repository_set_head_detached","git_repository_set_namespace","git_repository_set_workdir","git_repository_state","git_repository_state_cleanup","git_repository_workdir","git_repository_wrap_odb","git_revert","git_revert_commit","git_revparse","git_revparse_ext","git_revparse_single","git_revwalk_new","git_signature_default","git_stash_foreach","git_status_file","git_status_foreach","git_status_foreach_ext","git_status_list_new","git_status_should_ignore","git_submodule_add_setup","git_submodule_foreach","git_submodule_lookup","git_submodule_open","git_submodule_reload_all","git_tag_annotation_create","git_tag_create","git_tag_create_frombuffer","git_tag_create_lightweight","git_tag_delete","git_tag_foreach","git_tag_list","git_tag_list_match","git_tag_lookup","git_tree_entry_to_object","git_tree_lookup","git_treebuilder_write"]}}],["git_repository_init_flag_t",{"decl":["GIT_REPOSITORY_INIT_BARE","GIT_REPOSITORY_INIT_NO_REINIT","GIT_REPOSITORY_INIT_NO_DOTGIT_DIR","GIT_REPOSITORY_INIT_MKDIR","GIT_REPOSITORY_INIT_MKPATH","GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE"],"type":"enum","file":"git2/repository.h","line":200,"lineto":207,"block":"GIT_REPOSITORY_INIT_BARE\nGIT_REPOSITORY_INIT_NO_REINIT\nGIT_REPOSITORY_INIT_NO_DOTGIT_DIR\nGIT_REPOSITORY_INIT_MKDIR\nGIT_REPOSITORY_INIT_MKPATH\nGIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE","tdef":"typedef","description":" Option flags for `git_repository_init_ext`.","comments":"These flags configure extra behaviors to git_repository_init_ext
. In every case, the default behavior is the zero value (i.e. flag is not set). Just OR the flag values together for the flags
parameter when initializing a new repo. Details of individual values are:
init.templatedir
global config if not, or falling back on "/usr/share/git-core/templates" if it exists.Set the mode field of the git_repository_init_options
structure either to the custom mode that you would like, or to one of the following modes:
This contains extra options for git_repository_init_ext
that enable additional initialization features. The fields are:
st_dev
changes from the stat
system call). (E.g. Searching in a user's home directory "/home/user/source/" will not return "/.git/" as the found repo if "/" is a different filesystem than "/home".) * GIT_REPOSITORY_OPEN_BARE - Open repository as a bare repo regardless of core.bare config, and defer loading config file for faster setup. Unlike git_repository_open_bare
, this can follow gitlinks.The spec targeted a single object.
\n","value":1},{"type":"int","name":"GIT_REVPARSE_RANGE","comments":"The spec targeted a range of commits.
\n","value":2},{"type":"int","name":"GIT_REVPARSE_MERGE_BASE","comments":"The spec used the '...' operator, which invokes special semantics.
\n","value":4}],"used":{"returns":[],"needs":[]}}],["git_revspec",{"decl":["git_object * from","git_object * to","unsigned int flags"],"type":"struct","value":"git_revspec","file":"git2/revparse.h","line":83,"lineto":90,"block":"git_object * from\ngit_object * to\nunsigned int flags","tdef":"typedef","description":" Git Revision Spec: output of a `git_revparse` operation","comments":"","fields":[{"type":"git_object *","name":"from","comments":" The left element of the revspec; must be freed by the user "},{"type":"git_object *","name":"to","comments":" The right element of the revspec; must be freed by the user "},{"type":"unsigned int","name":"flags","comments":" The intent of the revspec (i.e. `git_revparse_mode_t` flags) "}],"used":{"returns":[],"needs":["git_revparse"]}}],["git_revwalk",{"decl":"git_revwalk","type":"struct","value":"git_revwalk","file":"git2/types.h","line":111,"lineto":111,"tdef":"typedef","description":" Representation of an in-progress walk through the commits in a repo ","comments":"","used":{"returns":[],"needs":["git_revwalk_add_hide_cb","git_revwalk_free","git_revwalk_hide","git_revwalk_hide_glob","git_revwalk_hide_head","git_revwalk_hide_ref","git_revwalk_new","git_revwalk_next","git_revwalk_push","git_revwalk_push_glob","git_revwalk_push_head","git_revwalk_push_range","git_revwalk_push_ref","git_revwalk_repository","git_revwalk_reset","git_revwalk_simplify_first_parent","git_revwalk_sorting"]}}],["git_signature",{"decl":["char * name","char * email","git_time when"],"type":"struct","value":"git_signature","file":"git2/types.h","line":162,"lineto":166,"block":"char * name\nchar * email\ngit_time when","tdef":"typedef","description":" An action signature (e.g. for committers, taggers, etc) ","comments":"","fields":[{"type":"char *","name":"name","comments":" full name of the author "},{"type":"char *","name":"email","comments":" email of the author "},{"type":"git_time","name":"when","comments":" time when the action happened "}],"used":{"returns":["git_commit_author","git_commit_committer","git_reflog_entry_committer","git_tag_tagger"],"needs":["git_branch_create","git_branch_move","git_clone_into","git_clone_local_into","git_commit_amend","git_note_create","git_note_remove","git_push_update_tips","git_reference_create","git_reference_create_matching","git_reference_rename","git_reference_set_target","git_reference_symbolic_create","git_reference_symbolic_create_matching","git_reference_symbolic_set_target","git_reflog_append","git_remote_fetch","git_remote_update_tips","git_repository_detach_head","git_repository_set_head","git_repository_set_head_detached","git_signature_default","git_signature_dup","git_signature_free","git_signature_new","git_signature_now","git_tag_annotation_create","git_tag_create"]}}],["git_stash_flags",{"decl":["GIT_STASH_DEFAULT","GIT_STASH_KEEP_INDEX","GIT_STASH_INCLUDE_UNTRACKED","GIT_STASH_INCLUDE_IGNORED"],"type":"enum","file":"git2/stash.h","line":21,"lineto":38,"block":"GIT_STASH_DEFAULT\nGIT_STASH_KEEP_INDEX\nGIT_STASH_INCLUDE_UNTRACKED\nGIT_STASH_INCLUDE_IGNORED","tdef":"typedef","description":" \n\n git2/stash.h\n ","comments":"@{
\n","fields":[{"type":"int","name":"GIT_STASH_DEFAULT","comments":"","value":0},{"type":"int","name":"GIT_STASH_KEEP_INDEX","comments":"","value":1},{"type":"int","name":"GIT_STASH_INCLUDE_UNTRACKED","comments":"","value":2},{"type":"int","name":"GIT_STASH_INCLUDE_IGNORED","comments":"","value":4}],"used":{"returns":[],"needs":[]}}],["git_status_list",{"decl":"git_status_list","type":"struct","value":"git_status_list","file":"git2/types.h","line":181,"lineto":181,"tdef":"typedef","description":" Representation of a status collection ","comments":"","used":{"returns":[],"needs":["git_status_list_free","git_status_list_new"]}}],["git_status_opt_t",{"decl":["GIT_STATUS_OPT_INCLUDE_UNTRACKED","GIT_STATUS_OPT_INCLUDE_IGNORED","GIT_STATUS_OPT_INCLUDE_UNMODIFIED","GIT_STATUS_OPT_EXCLUDE_SUBMODULES","GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS","GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH","GIT_STATUS_OPT_RECURSE_IGNORED_DIRS","GIT_STATUS_OPT_RENAMES_HEAD_TO_INDEX","GIT_STATUS_OPT_RENAMES_INDEX_TO_WORKDIR","GIT_STATUS_OPT_SORT_CASE_SENSITIVELY","GIT_STATUS_OPT_SORT_CASE_INSENSITIVELY","GIT_STATUS_OPT_RENAMES_FROM_REWRITES","GIT_STATUS_OPT_NO_REFRESH","GIT_STATUS_OPT_UPDATE_INDEX"],"type":"enum","file":"git2/status.h","line":135,"lineto":150,"block":"GIT_STATUS_OPT_INCLUDE_UNTRACKED\nGIT_STATUS_OPT_INCLUDE_IGNORED\nGIT_STATUS_OPT_INCLUDE_UNMODIFIED\nGIT_STATUS_OPT_EXCLUDE_SUBMODULES\nGIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS\nGIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH\nGIT_STATUS_OPT_RECURSE_IGNORED_DIRS\nGIT_STATUS_OPT_RENAMES_HEAD_TO_INDEX\nGIT_STATUS_OPT_RENAMES_INDEX_TO_WORKDIR\nGIT_STATUS_OPT_SORT_CASE_SENSITIVELY\nGIT_STATUS_OPT_SORT_CASE_INSENSITIVELY\nGIT_STATUS_OPT_RENAMES_FROM_REWRITES\nGIT_STATUS_OPT_NO_REFRESH\nGIT_STATUS_OPT_UPDATE_INDEX","tdef":"typedef","description":" Flags to control status callbacks","comments":"git ls-files -o -i --exclude-standard
with core git. - GIT_STATUS_OPT_RENAMES_HEAD_TO_INDEX indicates that rename detection should be processed between the head and the index and enables the GIT_STATUS_INDEX_RENAMED as a possible status flag. - GIT_STATUS_OPT_RENAMES_INDEX_TO_WORKDIR indicates that rename detection should be run between the index and the working directory and enabled GIT_STATUS_WT_RENAMED as a possible status flag. - GIT_STATUS_OPT_SORT_CASE_SENSITIVELY overrides the native case sensitivity for the file system and forces the output to be in case-sensitive order - GIT_STATUS_OPT_SORT_CASE_INSENSITIVELY overrides the native case sensitivity for the file system and forces the output to be in case-insensitive order - GIT_STATUS_OPT_RENAMES_FROM_REWRITES indicates that rename detection should include rewritten files - GIT_STATUS_OPT_NO_REFRESH bypasses the default status behavior of doing a "soft" index reload (i.e. reloading the index data if the file on disk has been modified outside libgit2). - GIT_STATUS_OPT_UPDATE_INDEX tells libgit2 to refresh the stat cache in the index for files that are unchanged but have out of date stat information in the index. It will result in less work being done on subsequent calls to get status. This is mutually exclusive with the NO_REFRESH option.Calling git_status_foreach()
is like calling the extended version with: GIT_STATUS_OPT_INCLUDE_IGNORED, GIT_STATUS_OPT_INCLUDE_UNTRACKED, and GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS. Those options are bundled together as GIT_STATUS_OPT_DEFAULTS
if you want them as a baseline.
With git_status_foreach_ext
, this will control which changes get callbacks. With git_status_list_new
, these will control which changes are included in the list.
git status --porcelain
regarding which files are included and in what order. - GIT_STATUS_SHOW_INDEX_ONLY only gives status based on HEAD to index comparison, not looking at working directory changes. - GIT_STATUS_SHOW_WORKDIR_ONLY only gives status based on index to working directory comparison, not comparing the index to the HEAD.A combination of these values will be returned to indicate the status of a file. Status compares the working directory, the index, and the current HEAD of the repository. The GIT_STATUS_INDEX
set of flags represents the status of file in the index relative to the HEAD, and the GIT_STATUS_WT
set of flags represent the status of the file in the working directory relative to the index.
These values represent settings for the submodule.$name.ignore
configuration value which says how deeply to look at the working directory when getting submodule status.
You can override this value in memory on a per-submodule basis with git_submodule_set_ignore()
and can write the changed value to disk with git_submodule_save()
. If you have overwritten the value, you can revert to the on disk value by using GIT_SUBMODULE_IGNORE_RESET
.
The values are:
\n\nreset to on-disk value
\n","value":-1},{"type":"int","name":"GIT_SUBMODULE_IGNORE_NONE","comments":"any change or untracked == dirty
\n","value":1},{"type":"int","name":"GIT_SUBMODULE_IGNORE_UNTRACKED","comments":"dirty if tracked files change
\n","value":2},{"type":"int","name":"GIT_SUBMODULE_IGNORE_DIRTY","comments":"only dirty if HEAD moved
\n","value":3},{"type":"int","name":"GIT_SUBMODULE_IGNORE_ALL","comments":"never dirty
\n","value":4},{"type":"int","name":"GIT_SUBMODULE_IGNORE_DEFAULT","comments":"","value":0}],"used":{"returns":["git_submodule_ignore","git_submodule_set_ignore"],"needs":["git_submodule_set_ignore"]}}],["git_submodule_recurse_t",{"decl":["GIT_SUBMODULE_RECURSE_RESET","GIT_SUBMODULE_RECURSE_NO","GIT_SUBMODULE_RECURSE_YES","GIT_SUBMODULE_RECURSE_ONDEMAND"],"type":"enum","file":"git2/types.h","line":338,"lineto":344,"block":"GIT_SUBMODULE_RECURSE_RESET\nGIT_SUBMODULE_RECURSE_NO\nGIT_SUBMODULE_RECURSE_YES\nGIT_SUBMODULE_RECURSE_ONDEMAND","tdef":"typedef","description":" Options for submodule recurse.","comments":"Represent the value of submodule.$name.fetchRecurseSubmodules
A combination of these flags will be returned to describe the status of a submodule. Depending on the "ignore" property of the submodule, some of the flags may never be returned because they indicate changes that are supposed to be ignored.
\n\nSubmodule info is contained in 4 places: the HEAD tree, the index, config files (both .git/config and .gitmodules), and the working directory. Any or all of those places might be missing information about the submodule depending on what state the repo is in. We consider all four places to build the combination of status flags.
\n\nThere are four values that are not really status, but give basic info about what sources of submodule data are available. These will be returned even if ignore is set to "ALL".
\n\nThe following values will be returned so long as ignore is not "ALL".
\n\nThe following can only be returned if ignore is "NONE" or "UNTRACKED".
\n\nLastly, the following will only be returned for ignore "NONE".
\n\nThese values represent settings for the submodule.$name.update
configuration value which says how to handle git submodule update
for this submodule. The value is usually set in the ".gitmodules" file and copied to ".git/config" when the submodule is initialized.
You can override this setting on a per-submodule basis with git_submodule_set_update()
and write the changed value to disk using git_submodule_save()
. If you have overwritten the value, you can revert it by passing GIT_SUBMODULE_UPDATE_RESET
to the set function.
The values are:
\n\nNo tracing will be performed.
\n","value":0},{"type":"int","name":"GIT_TRACE_FATAL","comments":"Severe errors that may impact the program's execution
\n","value":1},{"type":"int","name":"GIT_TRACE_ERROR","comments":"Errors that do not impact the program's execution
\n","value":2},{"type":"int","name":"GIT_TRACE_WARN","comments":"Warnings that suggest abnormal data
\n","value":3},{"type":"int","name":"GIT_TRACE_INFO","comments":"Informational messages about program execution
\n","value":4},{"type":"int","name":"GIT_TRACE_DEBUG","comments":"Detailed data that allows for debugging
\n","value":5},{"type":"int","name":"GIT_TRACE_TRACE","comments":"Exceptionally detailed debugging data
\n","value":6}],"used":{"returns":[],"needs":["git_trace_callback","git_trace_set"]}}],["git_tree",{"decl":"git_tree","type":"struct","value":"git_tree","file":"git2/types.h","line":126,"lineto":126,"tdef":"typedef","description":" Representation of a tree object. ","comments":"","used":{"returns":["git_tree_entry_byid","git_tree_entry_byname","git_treebuilder_get"],"needs":["git_commit_amend","git_commit_tree","git_diff_tree_to_index","git_diff_tree_to_tree","git_diff_tree_to_workdir","git_diff_tree_to_workdir_with_index","git_index_read_tree","git_merge_trees","git_pathspec_match_tree","git_tree_entry_byid","git_tree_entry_byname","git_tree_entry_bypath","git_tree_entry_cmp","git_tree_entry_dup","git_tree_entry_filemode","git_tree_entry_filemode_raw","git_tree_entry_free","git_tree_entry_id","git_tree_entry_name","git_tree_entry_to_object","git_tree_entry_type","git_tree_free","git_tree_id","git_tree_lookup","git_tree_owner","git_tree_walk","git_treebuilder_clear","git_treebuilder_create","git_treebuilder_entrycount","git_treebuilder_filter","git_treebuilder_filter_cb","git_treebuilder_free","git_treebuilder_get","git_treebuilder_insert","git_treebuilder_remove","git_treebuilder_write","git_treewalk_cb"]}}],["git_tree_entry",{"decl":"git_tree_entry","type":"struct","value":"git_tree_entry","file":"git2/types.h","line":123,"lineto":123,"tdef":"typedef","description":" Representation of each one of the entries in a tree object. ","comments":"","used":{"returns":["git_tree_entry_byid","git_tree_entry_byname","git_treebuilder_get"],"needs":["git_tree_entry_bypath","git_tree_entry_cmp","git_tree_entry_dup","git_tree_entry_filemode","git_tree_entry_filemode_raw","git_tree_entry_free","git_tree_entry_id","git_tree_entry_name","git_tree_entry_to_object","git_tree_entry_type","git_treebuilder_filter_cb","git_treebuilder_insert","git_treewalk_cb"]}}],["git_treebuilder",{"decl":"git_treebuilder","type":"struct","value":"git_treebuilder","file":"git2/types.h","line":129,"lineto":129,"tdef":"typedef","description":" Constructor for in-memory trees ","comments":"","used":{"returns":[],"needs":["git_treebuilder_clear","git_treebuilder_create","git_treebuilder_entrycount","git_treebuilder_filter","git_treebuilder_free","git_treebuilder_get","git_treebuilder_insert","git_treebuilder_remove","git_treebuilder_write"]}}],["git_treewalk_mode",{"decl":["GIT_TREEWALK_PRE","GIT_TREEWALK_POST"],"type":"enum","file":"git2/tree.h","line":382,"lineto":385,"block":"GIT_TREEWALK_PRE\nGIT_TREEWALK_POST","tdef":"typedef","description":" Tree traversal modes ","comments":"","fields":[{"type":"int","name":"GIT_TREEWALK_PRE","comments":"","value":0},{"type":"int","name":"GIT_TREEWALK_POST","comments":"","value":1}],"used":{"returns":[],"needs":["git_tree_walk"]}}]],"prefix":"include","groups":[["attr",["git_attr_add_macro","git_attr_cache_flush","git_attr_foreach","git_attr_get"]],["blame",["git_blame_file","git_blame_free","git_blame_get_hunk_byindex","git_blame_get_hunk_byline","git_blame_get_hunk_count","git_blame_init_options"]],["blob",["git_blob_create_fromchunks","git_blob_create_fromdisk","git_blob_create_fromworkdir","git_blob_filtered_content","git_blob_free","git_blob_id","git_blob_is_binary","git_blob_lookup","git_blob_owner","git_blob_rawcontent","git_blob_rawsize"]],["branch",["git_branch_create","git_branch_delete","git_branch_is_head","git_branch_iterator_free","git_branch_iterator_new","git_branch_lookup","git_branch_move","git_branch_name","git_branch_next","git_branch_set_upstream","git_branch_upstream"]],["buf",["git_buf_free"]],["checkout",["git_checkout_head","git_checkout_index","git_checkout_init_options","git_checkout_tree"]],["cherry",["git_cherry_pick","git_cherry_pick_commit","git_cherry_pick_init_options"]],["clone",["git_clone","git_clone_init_options","git_clone_into","git_clone_local_into"]],["commit",["git_commit_amend","git_commit_author","git_commit_committer","git_commit_free","git_commit_id","git_commit_lookup","git_commit_message","git_commit_message_encoding","git_commit_message_raw","git_commit_nth_gen_ancestor","git_commit_owner","git_commit_parent","git_commit_parent_id","git_commit_parentcount","git_commit_raw_header","git_commit_summary","git_commit_time","git_commit_time_offset","git_commit_tree","git_commit_tree_id"]],["config",["git_config_add_file_ondisk","git_config_backend_foreach_match","git_config_delete_entry","git_config_delete_multivar","git_config_find_global","git_config_find_system","git_config_find_xdg","git_config_foreach","git_config_foreach_match","git_config_free","git_config_get_bool","git_config_get_entry","git_config_get_int32","git_config_get_int64","git_config_get_multivar_foreach","git_config_get_string","git_config_iterator_free","git_config_iterator_glob_new","git_config_iterator_new","git_config_multivar_iterator_new","git_config_new","git_config_next","git_config_open_default","git_config_open_global","git_config_open_level","git_config_open_ondisk","git_config_parse_bool","git_config_parse_int32","git_config_parse_int64","git_config_refresh","git_config_set_bool","git_config_set_int32","git_config_set_int64","git_config_set_multivar","git_config_set_string","git_config_snapshot"]],["cred",["git_cred_default_new","git_cred_has_username","git_cred_ssh_interactive_new","git_cred_ssh_key_from_agent","git_cred_ssh_key_new","git_cred_userpass","git_cred_userpass_plaintext_new"]],["diff",["git_diff_blobs","git_diff_find_init_options","git_diff_find_similar","git_diff_foreach","git_diff_format_email","git_diff_format_email_init_options","git_diff_free","git_diff_get_stats","git_diff_index_to_workdir","git_diff_init_options","git_diff_is_sorted_icase","git_diff_merge","git_diff_print","git_diff_stats_free","git_diff_status_char","git_diff_tree_to_index","git_diff_tree_to_tree","git_diff_tree_to_workdir","git_diff_tree_to_workdir_with_index"]],["filter",["git_filter_list_apply_to_blob","git_filter_list_apply_to_data","git_filter_list_apply_to_file","git_filter_list_free","git_filter_list_load"]],["giterr",["giterr_clear","giterr_detach","giterr_last","giterr_set_oom","giterr_set_str"]],["graph",["git_graph_descendant_of"]],["ignore",["git_ignore_add_rule","git_ignore_clear_internal_rules","git_ignore_path_is_ignored"]],["index",["git_index_add","git_index_add_all","git_index_add_bypath","git_index_caps","git_index_clear","git_index_conflict_add","git_index_conflict_cleanup","git_index_conflict_get","git_index_conflict_iterator_free","git_index_conflict_iterator_new","git_index_conflict_next","git_index_conflict_remove","git_index_entry_stage","git_index_free","git_index_get_bypath","git_index_has_conflicts","git_index_new","git_index_open","git_index_owner","git_index_path","git_index_read","git_index_read_tree","git_index_remove","git_index_remove_all","git_index_remove_bypath","git_index_remove_directory","git_index_set_caps","git_index_update_all","git_index_write","git_index_write_tree","git_index_write_tree_to"]],["indexer",["git_indexer_commit","git_indexer_free","git_indexer_hash","git_indexer_new"]],["libgit2",["git_libgit2_features","git_libgit2_opts","git_libgit2_version"]],["merge",["git_merge_base","git_merge_commits","git_merge_file","git_merge_file_from_index","git_merge_file_init_input","git_merge_file_init_options","git_merge_file_result_free","git_merge_head_free","git_merge_head_from_fetchhead","git_merge_head_from_id","git_merge_head_from_ref","git_merge_head_id","git_merge_init_options","git_merge_trees"]],["message",["git_message_prettify"]],["note",["git_note_create","git_note_default_ref","git_note_foreach","git_note_free","git_note_id","git_note_iterator_free","git_note_iterator_new","git_note_message","git_note_next","git_note_read","git_note_remove"]],["object",["git_object_dup","git_object_free","git_object_id","git_object_lookup","git_object_lookup_bypath","git_object_owner","git_object_peel","git_object_short_id","git_object_string2type","git_object_type","git_object_type2string","git_object_typeisloose"]],["odb",["git_odb_add_alternate","git_odb_add_backend","git_odb_add_disk_alternate","git_odb_backend_loose","git_odb_backend_one_pack","git_odb_backend_pack","git_odb_exists","git_odb_foreach","git_odb_free","git_odb_hashfile","git_odb_new","git_odb_object_data","git_odb_object_dup","git_odb_object_free","git_odb_object_id","git_odb_object_type","git_odb_open","git_odb_open_rstream","git_odb_read","git_odb_refresh","git_odb_stream_finalize_write","git_odb_stream_free","git_odb_write_pack"]],["oid",["git_oid_allocfmt","git_oid_cmp","git_oid_cpy","git_oid_equal","git_oid_fmt","git_oid_fromraw","git_oid_fromstr","git_oid_fromstrp","git_oid_iszero","git_oid_pathfmt","git_oid_shorten_add","git_oid_shorten_free","git_oid_strcmp","git_oid_streq"]],["packbuilder",["git_packbuilder_foreach","git_packbuilder_free","git_packbuilder_hash","git_packbuilder_insert","git_packbuilder_insert_commit","git_packbuilder_insert_tree","git_packbuilder_new","git_packbuilder_object_count","git_packbuilder_set_callbacks","git_packbuilder_set_threads","git_packbuilder_write","git_packbuilder_written"]],["patch",["git_patch_free","git_patch_from_blobs","git_patch_get_delta","git_patch_print","git_patch_to_buf"]],["pathspec",["git_pathspec_free","git_pathspec_match_diff","git_pathspec_match_index","git_pathspec_match_list_free","git_pathspec_match_tree","git_pathspec_match_workdir","git_pathspec_matches_path","git_pathspec_new"]],["push",["git_push_add_refspec","git_push_finish","git_push_free","git_push_init_options","git_push_new","git_push_set_callbacks","git_push_set_options","git_push_status_foreach","git_push_unpack_ok","git_push_update_tips"]],["refdb",["git_refdb_compress","git_refdb_free","git_refdb_new","git_refdb_open"]],["reference",["git_reference_cmp","git_reference_create","git_reference_create_matching","git_reference_delete","git_reference_dwim","git_reference_ensure_log","git_reference_foreach","git_reference_foreach_glob","git_reference_foreach_name","git_reference_free","git_reference_has_log","git_reference_is_branch","git_reference_is_note","git_reference_is_remote","git_reference_is_tag","git_reference_is_valid_name","git_reference_iterator_free","git_reference_iterator_glob_new","git_reference_iterator_new","git_reference_list","git_reference_lookup","git_reference_name","git_reference_name_to_id","git_reference_next","git_reference_next_name","git_reference_owner","git_reference_peel","git_reference_remove","git_reference_rename","git_reference_resolve","git_reference_set_target","git_reference_shorthand","git_reference_symbolic_create","git_reference_symbolic_create_matching","git_reference_symbolic_set_target","git_reference_symbolic_target","git_reference_target","git_reference_target_peel","git_reference_type"]],["reflog",["git_reflog_append","git_reflog_delete","git_reflog_entry_committer","git_reflog_entry_id_new","git_reflog_entry_id_old","git_reflog_entry_message","git_reflog_free","git_reflog_read","git_reflog_rename","git_reflog_write"]],["refspec",["git_refspec_direction","git_refspec_dst","git_refspec_dst_matches","git_refspec_force","git_refspec_rtransform","git_refspec_src","git_refspec_src_matches","git_refspec_string","git_refspec_transform"]],["remote",["git_remote_add_fetch","git_remote_add_push","git_remote_autotag","git_remote_check_cert","git_remote_clear_refspecs","git_remote_connect","git_remote_connected","git_remote_create","git_remote_create_anonymous","git_remote_create_with_fetchspec","git_remote_default_branch","git_remote_delete","git_remote_disconnect","git_remote_download","git_remote_dup","git_remote_fetch","git_remote_free","git_remote_get_callbacks","git_remote_get_fetch_refspecs","git_remote_get_push_refspecs","git_remote_init_callbacks","git_remote_is_valid_name","git_remote_list","git_remote_load","git_remote_name","git_remote_owner","git_remote_pushurl","git_remote_rename","git_remote_save","git_remote_set_autotag","git_remote_set_callbacks","git_remote_set_fetch_refspecs","git_remote_set_push_refspecs","git_remote_set_pushurl","git_remote_set_transport","git_remote_set_update_fetchhead","git_remote_set_url","git_remote_stats","git_remote_stop","git_remote_supported_url","git_remote_update_fetchhead","git_remote_update_tips","git_remote_url","git_remote_valid_url"]],["repository",["git_repository_config","git_repository_config_snapshot","git_repository_detach_head","git_repository_discover","git_repository_fetchhead_foreach","git_repository_free","git_repository_get_namespace","git_repository_hashfile","git_repository_head","git_repository_head_detached","git_repository_head_unborn","git_repository_index","git_repository_init","git_repository_init_ext","git_repository_init_init_options","git_repository_is_bare","git_repository_is_empty","git_repository_is_shallow","git_repository_mergehead_foreach","git_repository_message","git_repository_message_remove","git_repository_odb","git_repository_open","git_repository_open_bare","git_repository_open_ext","git_repository_path","git_repository_refdb","git_repository_set_head","git_repository_set_head_detached","git_repository_set_namespace","git_repository_set_workdir","git_repository_state","git_repository_state_cleanup","git_repository_workdir","git_repository_wrap_odb"]],["revert",["git_revert","git_revert_commit","git_revert_init_options"]],["revparse",["git_revparse","git_revparse_ext","git_revparse_single"]],["revwalk",["git_revwalk_add_hide_cb","git_revwalk_free","git_revwalk_hide","git_revwalk_hide_glob","git_revwalk_hide_head","git_revwalk_hide_ref","git_revwalk_new","git_revwalk_next","git_revwalk_push","git_revwalk_push_glob","git_revwalk_push_head","git_revwalk_push_range","git_revwalk_push_ref","git_revwalk_repository","git_revwalk_reset","git_revwalk_simplify_first_parent","git_revwalk_sorting"]],["signature",["git_signature_default","git_signature_dup","git_signature_free","git_signature_new","git_signature_now"]],["smart",["git_smart_subtransport_git","git_smart_subtransport_http","git_smart_subtransport_ssh"]],["stash",["git_stash_foreach"]],["status",["git_status_file","git_status_foreach","git_status_foreach_ext","git_status_init_options","git_status_list_free","git_status_list_new","git_status_should_ignore"]],["strarray",["git_strarray_copy","git_strarray_free"]],["submodule",["git_submodule_add_finalize","git_submodule_add_setup","git_submodule_add_to_index","git_submodule_branch","git_submodule_fetch_recurse_submodules","git_submodule_foreach","git_submodule_free","git_submodule_head_id","git_submodule_ignore","git_submodule_index_id","git_submodule_init","git_submodule_location","git_submodule_lookup","git_submodule_name","git_submodule_open","git_submodule_owner","git_submodule_path","git_submodule_reload","git_submodule_reload_all","git_submodule_save","git_submodule_set_fetch_recurse_submodules","git_submodule_set_ignore","git_submodule_set_update","git_submodule_set_url","git_submodule_status","git_submodule_sync","git_submodule_update","git_submodule_url","git_submodule_wd_id"]],["tag",["git_tag_annotation_create","git_tag_create","git_tag_create_frombuffer","git_tag_create_lightweight","git_tag_delete","git_tag_foreach","git_tag_free","git_tag_id","git_tag_list","git_tag_list_match","git_tag_lookup","git_tag_message","git_tag_name","git_tag_owner","git_tag_peel","git_tag_tagger","git_tag_target","git_tag_target_id","git_tag_target_type"]],["threads",["git_threads_init","git_threads_shutdown"]],["trace",["git_trace_set"]],["transport",["git_transport_dummy","git_transport_init","git_transport_local","git_transport_new","git_transport_register","git_transport_smart","git_transport_unregister"]],["tree",["git_tree_entry_byid","git_tree_entry_byname","git_tree_entry_bypath","git_tree_entry_cmp","git_tree_entry_dup","git_tree_entry_filemode","git_tree_entry_filemode_raw","git_tree_entry_free","git_tree_entry_id","git_tree_entry_name","git_tree_entry_to_object","git_tree_entry_type","git_tree_free","git_tree_id","git_tree_lookup","git_tree_owner","git_tree_walk"]],["treebuilder",["git_treebuilder_clear","git_treebuilder_create","git_treebuilder_entrycount","git_treebuilder_filter","git_treebuilder_free","git_treebuilder_get","git_treebuilder_insert","git_treebuilder_remove","git_treebuilder_write"]]],"examples":[["add.c","ex/v0.21.3/add.html"],["blame.c","ex/v0.21.3/blame.html"],["cat-file.c","ex/v0.21.3/cat-file.html"],["common.c","ex/v0.21.3/common.html"],["diff.c","ex/v0.21.3/diff.html"],["for-each-ref.c","ex/v0.21.3/for-each-ref.html"],["general.c","ex/v0.21.3/general.html"],["init.c","ex/v0.21.3/init.html"],["log.c","ex/v0.21.3/log.html"],["network/clone.c","ex/v0.21.3/network/clone.html"],["network/common.c","ex/v0.21.3/network/common.html"],["network/fetch.c","ex/v0.21.3/network/fetch.html"],["network/git2.c","ex/v0.21.3/network/git2.html"],["network/index-pack.c","ex/v0.21.3/network/index-pack.html"],["network/ls-remote.c","ex/v0.21.3/network/ls-remote.html"],["rev-list.c","ex/v0.21.3/rev-list.html"],["rev-parse.c","ex/v0.21.3/rev-parse.html"],["showindex.c","ex/v0.21.3/showindex.html"],["status.c","ex/v0.21.3/status.html"],["tag.c","ex/v0.21.3/tag.html"]]}