diff --git a/.gitignore b/.gitignore index 2ed763784..099191756 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ /node_modules/ /vendor/libgit2/ /build/ +/coverage/ /test/repos/ /vendor/Release @@ -8,6 +9,9 @@ /vendor/*.filters /vendor/*.sln +/generate/idefs.json +/binding.gyp + /src/* !/src/functions/copy.cc !/src/wrapper.cc @@ -15,6 +19,3 @@ /include/* !/include/functions/copy.h !/include/wrapper.h - -/generate/idefs.json -/binding.gyp diff --git a/.jshintrc b/.jshintrc index 3216c452c..6987d769b 100644 --- a/.jshintrc +++ b/.jshintrc @@ -1,4 +1,23 @@ { + "evil": true, + "boss": true, + "immed": false, + "eqnull": true, + "maxlen": 80, "node": true, - "proto": true + "proto": true, + "curly": true, + "quotmark": "double", + "trailing": true, + "unused": "vars", + "undef": true, + "validthis": true, + "globals": { + "global": true, + "define": true, + "it": true, + "describe": true, + "before": true, + "beforeEach": true + } } diff --git a/build/codegen/v0.20.0.json b/build/codegen/v0.20.0.json deleted file mode 100644 index 79ad8f9c9..000000000 --- a/build/codegen/v0.20.0.json +++ /dev/null @@ -1,24938 +0,0 @@ -{ - "examples": [ - [ - "add.c", - "ex/v0.20.0/add.html" - ], - [ - "blame.c", - "ex/v0.20.0/blame.html" - ], - [ - "cat-file.c", - "ex/v0.20.0/cat-file.html" - ], - [ - "common.c", - "ex/v0.20.0/common.html" - ], - [ - "diff.c", - "ex/v0.20.0/diff.html" - ], - [ - "general.c", - "ex/v0.20.0/general.html" - ], - [ - "init.c", - "ex/v0.20.0/init.html" - ], - [ - "log.c", - "ex/v0.20.0/log.html" - ], - [ - "network/clone.c", - "ex/v0.20.0/network/clone.html" - ], - [ - "network/common.c", - "ex/v0.20.0/network/common.html" - ], - [ - "network/fetch.c", - "ex/v0.20.0/network/fetch.html" - ], - [ - "network/git2.c", - "ex/v0.20.0/network/git2.html" - ], - [ - "network/index-pack.c", - "ex/v0.20.0/network/index-pack.html" - ], - [ - "network/ls-remote.c", - "ex/v0.20.0/network/ls-remote.html" - ], - [ - "rev-list.c", - "ex/v0.20.0/rev-list.html" - ], - [ - "rev-parse.c", - "ex/v0.20.0/rev-parse.html" - ], - [ - "showindex.c", - "ex/v0.20.0/showindex.html" - ], - [ - "status.c", - "ex/v0.20.0/status.html" - ] - ], - "files": [ - { - "file": "attr.h", - "functions": [ - "git_attr_get", - "git_attr_get_many", - "git_attr_foreach", - "git_attr_cache_flush", - "git_attr_add_macro" - ], - "lines": 240, - "meta": { - "brief": "Git attribute management routines", - "comments": "\n", - "defgroup": "git_attr Git attribute management routines", - "ingroup": "Git" - } - }, - { - "file": "blame.h", - "functions": [ - "git_blame_get_hunk_count", - "git_blame_get_hunk_byindex", - "git_blame_get_hunk_byline", - "git_blame_file", - "git_blame_buffer", - "git_blame_free" - ], - "lines": 197, - "meta": { - "brief": "Git blame routines", - "comments": "\n", - "defgroup": "git_blame Git blame routines", - "ingroup": "Git" - } - }, - { - "file": "blob.h", - "functions": [ - "git_blob_lookup", - "git_blob_lookup_prefix", - "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_create_frombuffer", - "git_blob_is_binary" - ], - "lines": 227, - "meta": { - "brief": "Git blob load and write routines", - "comments": "\n", - "defgroup": "git_blob Git blob load and write routines", - "ingroup": "Git" - } - }, - { - "file": "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_upstream_name", - "git_branch_is_head", - "git_branch_remote_name" - ], - "lines": 261, - "meta": { - "brief": "Git branch parsing routines", - "comments": "\n", - "defgroup": "git_branch Git branch management", - "ingroup": "Git" - } - }, - { - "file": "buffer.h", - "functions": [ - "git_buf_free", - "git_buf_grow", - "git_buf_set" - ], - "lines": 111, - "meta": { - "brief": "Buffer export structure", - "comments": "\n", - "ingroup": "Git" - } - }, - { - "file": "checkout.h", - "functions": [ - "git_checkout_head", - "git_checkout_index", - "git_checkout_tree" - ], - "lines": 295, - "meta": { - "brief": "Git checkout routines", - "comments": "\n", - "defgroup": "git_checkout Git checkout routines", - "ingroup": "Git" - } - }, - { - "file": "clone.h", - "functions": [ - "git_clone", - "git_clone_into" - ], - "lines": 102, - "meta": { - "brief": "Git cloning routines", - "comments": "\n", - "defgroup": "git_clone Git cloning routines", - "ingroup": "Git" - } - }, - { - "file": "commit.h", - "functions": [ - "git_commit_lookup", - "git_commit_lookup_prefix", - "git_commit_free", - "git_commit_id", - "git_commit_owner", - "git_commit_message_encoding", - "git_commit_message", - "git_commit_message_raw", - "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_create", - "git_commit_create_v" - ], - "lines": 314, - "meta": { - "brief": "Git commit parsing, formatting routines", - "comments": "\n", - "defgroup": "git_commit Git commit parsing, formatting routines", - "ingroup": "Git" - } - }, - { - "file": "common.h", - "functions": [ - "git_libgit2_version", - "git_libgit2_capabilities", - "git_libgit2_opts" - ], - "lines": 236, - "meta": { - "brief": "Git common platform definitions", - "comments": "\n", - "defgroup": "git_common Git common platform definitions", - "ingroup": "Git" - } - }, - { - "file": "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_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_get_mapped", - "git_config_lookup_map_value", - "git_config_parse_bool", - "git_config_parse_int32", - "git_config_parse_int64", - "git_config_backend_foreach_match" - ], - "lines": 621, - "meta": { - "brief": "Git config management routines", - "comments": "\n", - "defgroup": "git_config Git config management routines", - "ingroup": "Git" - } - }, - { - "file": "cred_helpers.h", - "functions": [ - "git_cred_userpass" - ], - "lines": 53, - "meta": { - "brief": "Utility functions for credential management", - "comments": "\n", - "defgroup": "git_cred_helpers credential management helpers", - "ingroup": "Git" - } - }, - { - "file": "diff.h", - "functions": [ - "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_options_init", - "git_diff_num_deltas", - "git_diff_num_deltas_of_type", - "git_diff_get_delta", - "git_diff_is_sorted_icase", - "git_diff_foreach", - "git_diff_status_char", - "git_diff_print", - "git_diff_blobs", - "git_diff_blob_to_buffer" - ], - "lines": 983, - "meta": { - "brief": "Git tree and file differencing routines.", - "comments": "\n", - "ingroup": "Git" - } - }, - { - "file": "errors.h", - "functions": [ - "giterr_last", - "giterr_clear", - "giterr_detach", - "giterr_set_str", - "giterr_set_oom" - ], - "lines": 137, - "meta": { - "brief": "Git error handling routines and variables", - "comments": "\n", - "ingroup": "Git" - } - }, - { - "file": "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" - ], - "lines": 141, - "meta": { - "brief": "Git filter APIs", - "comments": "\n", - "ingroup": "Git" - } - }, - { - "file": "graph.h", - "functions": [ - "git_graph_ahead_behind" - ], - "lines": 41, - "meta": { - "brief": "Git graph traversal routines", - "comments": "\n", - "defgroup": "git_revwalk Git graph traversal routines", - "ingroup": "Git" - } - }, - { - "file": "ignore.h", - "functions": [ - "git_ignore_add_rule", - "git_ignore_clear_internal_rules", - "git_ignore_path_is_ignored" - ], - "lines": 78, - "meta": {} - }, - { - "file": "index.h", - "functions": [ - "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_entrycount", - "git_index_clear", - "git_index_get_byindex", - "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_find", - "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" - ], - "lines": 684, - "meta": { - "brief": "Git index parsing and manipulation routines", - "comments": "\n", - "defgroup": "git_index Git index parsing and manipulation routines", - "ingroup": "Git" - } - }, - { - "file": "indexer.h", - "functions": [ - "git_indexer_new", - "git_indexer_append", - "git_indexer_commit", - "git_indexer_hash", - "git_indexer_free" - ], - "lines": 76, - "meta": {} - }, - { - "file": "inttypes.h", - "functions": [], - "lines": 309, - "meta": {} - }, - { - "file": "merge.h", - "functions": [ - "git_merge_base", - "git_merge_base_many", - "git_merge_head_from_ref", - "git_merge_head_from_fetchhead", - "git_merge_head_from_oid", - "git_merge_head_free", - "git_merge_trees", - "git_merge", - "git_merge_result_is_uptodate", - "git_merge_result_is_fastforward", - "git_merge_result_fastforward_oid" - ], - "lines": 233, - "meta": { - "brief": "Git merge routines", - "comments": "\n", - "defgroup": "git_merge Git merge routines", - "ingroup": "Git" - } - }, - { - "file": "message.h", - "functions": [ - "git_message_prettify" - ], - "lines": 49, - "meta": { - "brief": "Git message management routines", - "comments": "\n", - "ingroup": "Git" - } - }, - { - "file": "net.h", - "functions": [], - "lines": 53, - "meta": { - "brief": "Git networking declarations", - "comments": "\n", - "ingroup": "Git" - } - }, - { - "file": "notes.h", - "functions": [ - "git_note_iterator_new", - "git_note_iterator_free", - "git_note_next", - "git_note_read", - "git_note_message", - "git_note_oid", - "git_note_create", - "git_note_remove", - "git_note_free", - "git_note_default_ref", - "git_note_foreach" - ], - "lines": 202, - "meta": { - "brief": "Git notes management routines", - "comments": "\n", - "defgroup": "git_note Git notes management routines", - "ingroup": "Git" - } - }, - { - "file": "object.h", - "functions": [ - "git_object_lookup", - "git_object_lookup_prefix", - "git_object_lookup_bypath", - "git_object_id", - "git_object_type", - "git_object_owner", - "git_object_free", - "git_object_type2string", - "git_object_string2type", - "git_object_typeisloose", - "git_object__size", - "git_object_peel", - "git_object_dup" - ], - "lines": 220, - "meta": { - "brief": "Git revision object management routines", - "comments": "\n", - "defgroup": "git_object Git revision object management routines", - "ingroup": "Git" - } - }, - { - "file": "odb.h", - "functions": [ - "git_odb_new", - "git_odb_open", - "git_odb_add_disk_alternate", - "git_odb_free", - "git_odb_read", - "git_odb_read_prefix", - "git_odb_read_header", - "git_odb_exists", - "git_odb_refresh", - "git_odb_foreach", - "git_odb_write", - "git_odb_open_wstream", - "git_odb_stream_write", - "git_odb_stream_finalize_write", - "git_odb_stream_read", - "git_odb_stream_free", - "git_odb_open_rstream", - "git_odb_write_pack", - "git_odb_hash", - "git_odb_hashfile", - "git_odb_object_dup", - "git_odb_object_free", - "git_odb_object_id", - "git_odb_object_data", - "git_odb_object_size", - "git_odb_object_type", - "git_odb_add_backend", - "git_odb_add_alternate", - "git_odb_num_backends", - "git_odb_get_backend" - ], - "lines": 482, - "meta": { - "brief": "Git object database routines", - "comments": "\n", - "defgroup": "git_odb Git object database routines", - "ingroup": "Git" - } - }, - { - "file": "odb_backend.h", - "functions": [ - "git_odb_backend_pack", - "git_odb_backend_loose", - "git_odb_backend_one_pack" - ], - "lines": 134, - "meta": { - "brief": "Git custom backend functions", - "comments": "\n", - "defgroup": "git_odb Git object database routines", - "ingroup": "Git" - } - }, - { - "file": "oid.h", - "functions": [ - "git_oid_fromstr", - "git_oid_fromstrp", - "git_oid_fromstrn", - "git_oid_fromraw", - "git_oid_fmt", - "git_oid_nfmt", - "git_oid_pathfmt", - "git_oid_allocfmt", - "git_oid_tostr", - "git_oid_cpy", - "git_oid_cmp", - "git_oid_equal", - "git_oid_ncmp", - "git_oid_streq", - "git_oid_strcmp", - "git_oid_iszero", - "git_oid_shorten_new", - "git_oid_shorten_add", - "git_oid_shorten_free" - ], - "lines": 268, - "meta": { - "brief": "Git object id routines", - "comments": "\n", - "defgroup": "git_oid Git object id routines", - "ingroup": "Git" - } - }, - { - "file": "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_set_callbacks", - "git_packbuilder_free" - ], - "lines": 203, - "meta": { - "brief": "Git pack management routines", - "comments": "\n", - "ingroup": "Git" - } - }, - { - "file": "patch.h", - "functions": [ - "git_patch_from_diff", - "git_patch_from_blobs", - "git_patch_from_blob_and_buffer", - "git_patch_free", - "git_patch_get_delta", - "git_patch_num_hunks", - "git_patch_line_stats", - "git_patch_get_hunk", - "git_patch_num_lines_in_hunk", - "git_patch_get_line_in_hunk", - "git_patch_size", - "git_patch_print", - "git_patch_to_str" - ], - "lines": 249, - "meta": { - "brief": "Patch handling routines.", - "comments": "\n", - "ingroup": "Git" - } - }, - { - "file": "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", - "git_pathspec_match_list_entrycount", - "git_pathspec_match_list_entry", - "git_pathspec_match_list_diff_entry", - "git_pathspec_match_list_failed_entrycount", - "git_pathspec_match_list_failed_entry" - ], - "lines": 260, - "meta": {} - }, - { - "file": "push.h", - "functions": [ - "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" - ], - "lines": 160, - "meta": { - "brief": "Git push management functions", - "comments": "\n", - "defgroup": "git_push push management functions", - "ingroup": "Git" - } - }, - { - "file": "refdb.h", - "functions": [ - "git_refdb_new", - "git_refdb_open", - "git_refdb_compress", - "git_refdb_free" - ], - "lines": 68, - "meta": { - "brief": "Git custom refs backend functions", - "comments": "\n", - "defgroup": "git_refdb Git custom refs backend API", - "ingroup": "Git" - } - }, - { - "file": "reflog.h", - "functions": [ - "git_reflog_read", - "git_reflog_write", - "git_reflog_append", - "git_reflog_append_to", - "git_reflog_rename", - "git_reflog_delete", - "git_reflog_entrycount", - "git_reflog_entry_byindex", - "git_reflog_drop", - "git_reflog_entry_id_old", - "git_reflog_entry_id_new", - "git_reflog_entry_committer", - "git_reflog_entry_message", - "git_reflog_free" - ], - "lines": 187, - "meta": { - "brief": "Git reflog management routines", - "comments": "\n", - "defgroup": "git_reflog Git reflog management routines", - "ingroup": "Git" - } - }, - { - "file": "refs.h", - "functions": [ - "git_reference_lookup", - "git_reference_name_to_id", - "git_reference_dwim", - "git_reference_symbolic_create", - "git_reference_create", - "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_list", - "git_reference_foreach", - "git_reference_free", - "git_reference_cmp", - "git_reference_iterator_new", - "git_reference_iterator_glob_new", - "git_reference_next", - "git_reference_iterator_free", - "git_reference_foreach_glob", - "git_reference_has_log", - "git_reference_is_branch", - "git_reference_is_remote", - "git_reference_is_tag", - "git_reference_normalize_name", - "git_reference_peel", - "git_reference_is_valid_name", - "git_reference_shorthand" - ], - "lines": 562, - "meta": { - "brief": "Git reference management routines", - "comments": "\n", - "defgroup": "git_reference Git reference management routines", - "ingroup": "Git" - } - }, - { - "file": "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" - ], - "lines": 105, - "meta": { - "brief": "Git refspec attributes", - "comments": "\n", - "defgroup": "git_refspec Git refspec attributes", - "ingroup": "Git" - } - }, - { - "file": "remote.h", - "functions": [ - "git_remote_create", - "git_remote_create_with_fetchspec", - "git_remote_create_inmemory", - "git_remote_load", - "git_remote_save", - "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_refspec_count", - "git_remote_get_refspec", - "git_remote_connect", - "git_remote_ls", - "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_set_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" - ], - "lines": 564, - "meta": { - "brief": "Git remote management functions", - "comments": "\n", - "defgroup": "git_remote remote management functions", - "ingroup": "Git" - } - }, - { - "file": "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_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_odb", - "git_repository_refdb", - "git_repository_index", - "git_repository_message", - "git_repository_message_remove", - "git_repository_merge_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" - ], - "lines": 675, - "meta": { - "brief": "Git repository management routines", - "comments": "\n", - "defgroup": "git_repository Git repository management routines", - "ingroup": "Git" - } - }, - { - "file": "reset.h", - "functions": [ - "git_reset", - "git_reset_default" - ], - "lines": 81, - "meta": { - "brief": "Git reset management routines", - "comments": "\n", - "ingroup": "Git" - } - }, - { - "file": "revparse.h", - "functions": [ - "git_revparse_single", - "git_revparse_ext", - "git_revparse" - ], - "lines": 113, - "meta": { - "brief": "Git revision parsing routines", - "comments": "\n", - "defgroup": "git_revparse Git revision parsing routines", - "ingroup": "Git" - } - }, - { - "file": "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" - ], - "lines": 260, - "meta": { - "brief": "Git revision traversal routines", - "comments": "\n", - "defgroup": "git_revwalk Git revision traversal routines", - "ingroup": "Git" - } - }, - { - "file": "signature.h", - "functions": [ - "git_signature_new", - "git_signature_now", - "git_signature_default", - "git_signature_dup", - "git_signature_free" - ], - "lines": 89, - "meta": { - "brief": "Git signature creation", - "comments": "\n", - "defgroup": "git_signature Git signature creation", - "ingroup": "Git" - } - }, - { - "file": "stash.h", - "functions": [ - "git_stash_save", - "git_stash_foreach", - "git_stash_drop" - ], - "lines": 121, - "meta": { - "brief": "Git stash management routines", - "comments": "\n", - "ingroup": "Git" - } - }, - { - "file": "status.h", - "functions": [ - "git_status_foreach", - "git_status_foreach_ext", - "git_status_file", - "git_status_list_new", - "git_status_list_entrycount", - "git_status_byindex", - "git_status_list_free", - "git_status_should_ignore" - ], - "lines": 322, - "meta": { - "brief": "Git file status routines", - "comments": "\n", - "defgroup": "git_status Git file status routines", - "ingroup": "Git" - } - }, - { - "file": "stdint.h", - "functions": [], - "lines": 247, - "meta": {} - }, - { - "file": "strarray.h", - "functions": [ - "git_strarray_free", - "git_strarray_copy" - ], - "lines": 59, - "meta": { - "brief": "Git string array routines", - "comments": "\n", - "defgroup": "git_strarray Git string array routines", - "ingroup": "Git" - } - }, - { - "file": "submodule.h", - "functions": [ - "git_submodule_lookup", - "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_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" - ], - "lines": 524, - "meta": { - "brief": "Git submodule management utilities", - "comments": "\n", - "defgroup": "git_submodule Git submodule management routines", - "ingroup": "Git" - } - }, - { - "file": "sys/commit.h", - "functions": [ - "git_commit_create_from_oids" - ], - "lines": 46, - "meta": { - "brief": "Low-level Git commit creation", - "comments": "\n", - "defgroup": "git_backend Git custom backend APIs", - "ingroup": "Git" - } - }, - { - "file": "sys/config.h", - "functions": [ - "git_config_add_backend" - ], - "lines": 98, - "meta": { - "brief": "Git config backend routines", - "comments": "\n", - "defgroup": "git_backend Git custom backend APIs", - "ingroup": "Git" - } - }, - { - "file": "sys/filter.h", - "functions": [ - "git_filter_lookup", - "git_filter_list_new", - "git_filter_list_push", - "git_filter_list_length", - "git_filter_source_repo", - "git_filter_source_path", - "git_filter_source_filemode", - "git_filter_source_id", - "git_filter_source_mode", - "git_filter_register", - "git_filter_unregister" - ], - "lines": 292, - "meta": { - "brief": "Git filter backend and plugin routines", - "comments": "\n", - "defgroup": "git_backend Git custom backend APIs", - "ingroup": "Git" - } - }, - { - "file": "sys/index.h", - "functions": [ - "git_index_name_entrycount", - "git_index_name_get_byindex", - "git_index_name_add", - "git_index_name_clear", - "git_index_reuc_entrycount", - "git_index_reuc_find", - "git_index_reuc_get_bypath", - "git_index_reuc_get_byindex", - "git_index_reuc_add", - "git_index_reuc_remove", - "git_index_reuc_clear" - ], - "lines": 177, - "meta": { - "brief": "Low-level Git index manipulation routines", - "comments": "\n", - "defgroup": "git_backend Git custom backend APIs", - "ingroup": "Git" - } - }, - { - "file": "sys/odb_backend.h", - "functions": [], - "lines": 84, - "meta": { - "brief": "Git custom backend implementors functions", - "comments": "\n", - "defgroup": "git_backend Git custom backend APIs", - "ingroup": "Git" - } - }, - { - "file": "sys/refdb_backend.h", - "functions": [ - "git_refdb_backend_fs", - "git_refdb_set_backend" - ], - "lines": 178, - "meta": { - "brief": "Git custom refs backend functions", - "comments": "\n", - "defgroup": "git_refdb_backend Git custom refs backend API", - "ingroup": "Git" - } - }, - { - "file": "sys/reflog.h", - "functions": [], - "lines": 21, - "meta": {} - }, - { - "file": "sys/refs.h", - "functions": [ - "git_reference__alloc", - "git_reference__alloc_symbolic" - ], - "lines": 38, - "meta": {} - }, - { - "file": "sys/repository.h", - "functions": [ - "git_repository_new", - "git_repository__cleanup", - "git_repository_reinit_filesystem", - "git_repository_set_config", - "git_repository_set_odb", - "git_repository_set_refdb", - "git_repository_set_index" - ], - "lines": 124, - "meta": { - "brief": "Git repository custom implementation routines", - "comments": "\n", - "defgroup": "git_backend Git custom backend APIs", - "ingroup": "Git" - } - }, - { - "file": "tag.h", - "functions": [ - "git_tag_lookup", - "git_tag_lookup_prefix", - "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" - ], - "lines": 352, - "meta": { - "brief": "Git tag parsing routines", - "comments": "\n", - "defgroup": "git_tag Git tag management", - "ingroup": "Git" - } - }, - { - "file": "threads.h", - "functions": [ - "git_threads_init", - "git_threads_shutdown" - ], - "lines": 49, - "meta": { - "brief": "Library level thread functions", - "comments": "\n", - "defgroup": "git_thread Threading functions", - "ingroup": "Git" - } - }, - { - "file": "trace.h", - "functions": [ - "git_trace_set" - ], - "lines": 67, - "meta": { - "brief": "Git tracing configuration routines", - "comments": "\n", - "defgroup": "git_trace Git tracing configuration routines", - "ingroup": "Git" - } - }, - { - "file": "transport.h", - "functions": [ - "git_cred_has_username", - "git_cred_userpass_plaintext_new", - "git_cred_ssh_key_new", - "git_cred_ssh_custom_new", - "git_cred_default_new", - "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" - ], - "lines": 488, - "meta": { - "brief": "Git transport interfaces and functions", - "comments": "\n", - "defgroup": "git_transport interfaces and functions", - "ingroup": "Git" - } - }, - { - "file": "tree.h", - "functions": [ - "git_tree_lookup", - "git_tree_lookup_prefix", - "git_tree_free", - "git_tree_id", - "git_tree_owner", - "git_tree_entrycount", - "git_tree_entry_byname", - "git_tree_entry_byindex", - "git_tree_entry_byoid", - "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", - "git_treebuilder_write", - "git_tree_walk" - ], - "lines": 404, - "meta": { - "brief": "Git tree parsing, loading routines", - "comments": "\n", - "defgroup": "git_tree Git tree parsing, loading routines", - "ingroup": "Git" - } - }, - { - "file": "types.h", - "functions": [], - "lines": 329, - "meta": { - "brief": "libgit2 base & compatibility types", - "comments": "\n", - "ingroup": "Git" - } - }, - { - "file": "version.h", - "functions": [], - "lines": 15, - "meta": {} - } - ], - "functions": { - "git_attr_add_macro": { - "argline": "git_repository *repo,\n\tconst char *name,\n\tconst char *values", - "args": [ - { - "name": "repo", - "type": "git_repository *" - }, - { - "name": "name", - "type": "const char *" - }, - { - "name": "values", - "type": "const char *" - } - ], - "comments": "

Macros will automatically be loaded from the top level .gitattributes\nfile of the repository (plus the build-in "binary" macro). This\nfunction allows you to add others. For example, to add the default\nmacro, you would call:

\n\n
git_attr_add_macro(repo, "binary", "-diff -crlf");\n
\n", - "description": "

Add a macro definition.

\n", - "file": "attr.h", - "group": "attr", - "line": 233, - "lineto": 236, - "return": { - "type": "int" - }, - "sig": "git_repository *::const char *::const char *", - "type": "function" - }, - "git_attr_cache_flush": { - "argline": "git_repository *repo", - "args": [ - { - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

Call this if you have reason to believe that the attributes files on\ndisk no longer match the cached contents of memory. This will cause\nthe attributes files to be reloaded the next time that an attribute\naccess function is called.

\n", - "description": "

Flush the gitattributes cache.

\n", - "file": "attr.h", - "group": "attr", - "line": 220, - "lineto": 221, - "return": { - "type": "void" - }, - "sig": "git_repository *", - "type": "function" - }, - "git_attr_foreach": { - "argline": "git_repository *repo,\n\tuint32_t flags,\n\tconst char *path,\n\tgit_attr_foreach_cb callback,\n\tvoid *payload", - "args": [ - { - "comment": "The repository containing the path.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "A combination of GIT_ATTR_CHECK... flags.", - "name": "flags", - "type": "uint32_t" - }, - { - "comment": "Path inside the repo to check attributes. This does not have to exist, but if it does not, then it will be treated as a plain file (i.e. not a directory).", - "name": "path", - "type": "const char *" - }, - { - "comment": "Function to invoke on each attribute name and value. The value may be NULL is the attribute is explicitly set to UNSPECIFIED using the '!' sign. Callback will be invoked only once per attribute name, even if there are multiple rules for a given file. The highest priority rule will be used. Return a non-zero value from this to stop looping.", - "name": "callback", - "type": "git_attr_foreach_cb" - }, - { - "comment": "Passed on as extra parameter to callback function.", - "name": "payload", - "type": "void *" - } - ], - "comments": "", - "description": "

Loop over all the git attributes for a path.

\n", - "file": "attr.h", - "group": "attr", - "line": 205, - "lineto": 210, - "return": { - "comment": "0 on success, GIT_EUSER on non-zero callback, or error code", - "type": "int" - }, - "sig": "git_repository *::uint32_t::const char *::git_attr_foreach_cb::void *", - "type": "function" - }, - "git_attr_get": { - "argline": "const char **value_out,\n\tgit_repository *repo,\n\tuint32_t flags,\n\tconst char *path,\n\tconst char *name", - "args": [ - { - "comment": "Output of the value of the attribute. Use the GIT_ATTR_... macros to test for TRUE, FALSE, UNSPECIFIED, etc. or just use the string value for attributes set to a value. You should NOT modify or free this value.", - "name": "value_out", - "type": "const char **" - }, - { - "comment": "The repository containing the path.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "A combination of GIT_ATTR_CHECK... flags.", - "name": "flags", - "type": "uint32_t" - }, - { - "comment": "The path to check for attributes. Relative paths are interpreted relative to the repo root. The file does not have to exist, but if it does not, then it will be treated as a plain file (not a directory).", - "name": "path", - "type": "const char *" - }, - { - "comment": "The name of the attribute to look up.", - "name": "name", - "type": "const char *" - } - ], - "comments": "", - "description": "

Look up the value of one git attribute for path.

\n", - "file": "attr.h", - "group": "attr", - "line": 142, - "lineto": 147, - "return": { - "type": "int" - }, - "sig": "const char **::git_repository *::uint32_t::const char *::const char *", - "type": "function" - }, - "git_attr_get_many": { - "argline": "const char **values_out,\n\tgit_repository *repo,\n\tuint32_t flags,\n\tconst char *path,\n\tsize_t num_attr,\n\tconst char **names", - "args": [ - { - "comment": "An array of num_attr entries that will have string pointers written into it for the values of the attributes. You should not modify or free the values that are written into this array (although of course, you should free the array itself if you allocated it).", - "name": "values_out", - "type": "const char **" - }, - { - "comment": "The repository containing the path.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "A combination of GIT_ATTR_CHECK... flags.", - "name": "flags", - "type": "uint32_t" - }, - { - "comment": "The path inside the repo to check attributes. This does not have to exist, but if it does not, then it will be treated as a plain file (i.e. not a directory).", - "name": "path", - "type": "const char *" - }, - { - "comment": "The number of attributes being looked up", - "name": "num_attr", - "type": "size_t" - }, - { - "comment": "An array of num_attr strings containing attribute names.", - "name": "names", - "type": "const char **" - } - ], - "comments": "

Use this if you have a known list of attributes that you want to\nlook up in a single call. This is somewhat more efficient than\ncalling git_attr_get() multiple times.

\n\n

For example, you might write:

\n\n
const char *attrs[] = { "crlf", "diff", "foo" };\nconst char **values[3];\ngit_attr_get_many(values, repo, 0, "my/fun/file.c", 3, attrs);\n
\n\n

Then you could loop through the 3 values to get the settings for\nthe three attributes you asked about.

\n", - "description": "

Look up a list of git attributes for path.

\n", - "file": "attr.h", - "group": "attr", - "line": 178, - "lineto": 186, - "return": { - "type": "int" - }, - "sig": "const char **::git_repository *::uint32_t::const char *::size_t::const char **", - "type": "function" - }, - "git_blame_buffer": { - "argline": "git_blame **out,\n\t\tgit_blame *reference,\n\t\tconst char *buffer,\n\t\tuint32_t buffer_len", - "args": [ - { - "comment": "pointer that will receive the resulting blame data", - "name": "out", - "type": "git_blame **" - }, - { - "comment": "cached blame from the history of the file (usually the output from git_blame_file)", - "name": "reference", - "type": "git_blame *" - }, - { - "comment": "the (possibly) modified contents of the file", - "name": "buffer", - "type": "const char *" - }, - { - "comment": "number of valid bytes in the buffer", - "name": "buffer_len", - "type": "uint32_t" - } - ], - "comments": "

Lines that differ between the buffer and the committed version are marked as\nhaving a zero OID for their final_commit_id.

\n", - "description": "

Get blame data for a file that has been modified in memory. The reference\nparameter is a pre-calculated blame for the in-odb history of the file. This\nmeans that once a file blame is completed (which can be expensive), updating\nthe buffer blame is very fast.

\n", - "file": "blame.h", - "group": "blame", - "line": 182, - "lineto": 186, - "return": { - "comment": "0 on success, or an error code. (use giterr_last for information about the error)", - "type": "int" - }, - "sig": "git_blame **::git_blame *::const char *::uint32_t", - "type": "function" - }, - "git_blame_file": { - "argline": "git_blame **out,\n\t\tgit_repository *repo,\n\t\tconst char *path,\n\t\tgit_blame_options *options", - "args": [ - { - "comment": "pointer that will receive the blame object", - "name": "out", - "type": "git_blame **" - }, - { - "comment": "repository whose history is to be walked", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "path to file to consider", - "name": "path", - "type": "const char *" - }, - { - "comment": "options for the blame operation. If NULL, this is treated as though GIT_BLAME_OPTIONS_INIT were passed.", - "name": "options", - "type": "git_blame_options *" - } - ], - "comments": "", - "description": "

Get the blame for a single file.

\n", - "examples": { - "blame.c": [ - "ex/v0.20.0/blame.html#git_blame_file-2" - ] - }, - "file": "blame.h", - "group": "blame", - "line": 158, - "lineto": 162, - "return": { - "comment": "0 on success, or an error code. (use giterr_last for information about the error.)", - "type": "int" - }, - "sig": "git_blame **::git_repository *::const char *::git_blame_options *", - "type": "function" - }, - "git_blame_free": { - "argline": "git_blame *blame", - "args": [ - { - "comment": "the blame structure to free", - "name": "blame", - "type": "git_blame *" - } - ], - "comments": "", - "description": "

Free memory allocated by git_blame_file or git_blame_buffer.

\n", - "examples": { - "blame.c": [ - "ex/v0.20.0/blame.html#git_blame_free-3" - ] - }, - "file": "blame.h", - "group": "blame", - "line": 193, - "lineto": 193, - "return": { - "type": "void" - }, - "sig": "git_blame *", - "type": "function" - }, - "git_blame_get_hunk_byindex": { - "argline": "git_blame *blame,\n\t\tuint32_t index", - "args": [ - { - "comment": "the blame structure to query", - "name": "blame", - "type": "git_blame *" - }, - { - "comment": "index of the hunk to retrieve", - "name": "index", - "type": "uint32_t" - } - ], - "comments": "", - "description": "

Gets the blame hunk at the given index.

\n", - "file": "blame.h", - "group": "blame", - "line": 132, - "lineto": 134, - "return": { - "comment": "the hunk at the given index, or NULL on error", - "type": "const git_blame_hunk*" - }, - "sig": "git_blame *::uint32_t", - "type": "function" - }, - "git_blame_get_hunk_byline": { - "argline": "git_blame *blame,\n\t\tuint32_t lineno", - "args": [ - { - "comment": "the blame structure to query", - "name": "blame", - "type": "git_blame *" - }, - { - "comment": "the (1-based) line number to find a hunk for", - "name": "lineno", - "type": "uint32_t" - } - ], - "comments": "", - "description": "

Gets the hunk that relates to the given line number in the newest commit.

\n", - "examples": { - "blame.c": [ - "ex/v0.20.0/blame.html#git_blame_get_hunk_byline-1" - ] - }, - "file": "blame.h", - "group": "blame", - "line": 143, - "lineto": 145, - "return": { - "comment": "the hunk that contains the given line, or NULL on error", - "type": "const git_blame_hunk*" - }, - "sig": "git_blame *::uint32_t", - "type": "function" - }, - "git_blame_get_hunk_count": { - "argline": "git_blame *blame", - "args": [ - { - "name": "blame", - "type": "git_blame *" - } - ], - "comments": "", - "description": "

Gets the number of hunks that exist in the blame structure.

\n", - "file": "blame.h", - "group": "blame", - "line": 123, - "lineto": 123, - "return": { - "type": "uint32_t" - }, - "sig": "git_blame *", - "type": "function" - }, - "git_blob_create_frombuffer": { - "argline": "git_oid *oid, git_repository *repo, const void *buffer, size_t len", - "args": [ - { - "comment": "return the oid of the written blob", - "name": "oid", - "type": "git_oid *" - }, - { - "comment": "repository where to blob will be written", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "data to be written into the blob", - "name": "buffer", - "type": "const void *" - }, - { - "comment": "length of the data", - "name": "len", - "type": "size_t" - } - ], - "comments": "", - "description": "

Write an in-memory buffer to the ODB as a blob

\n", - "file": "blob.h", - "group": "blob", - "line": 210, - "lineto": 210, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_oid *::git_repository *::const void *::size_t", - "type": "function" - }, - "git_blob_create_fromchunks": { - "argline": "git_oid *id,\n\tgit_repository *repo,\n\tconst char *hintpath,\n\tgit_blob_chunk_cb callback,\n\tvoid *payload", - "args": [ - { - "comment": "Return the id of the written blob", - "name": "id", - "type": "git_oid *" - }, - { - "comment": "repository where the blob will be written. This repository can be bare or not.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "if not NULL, will help selecting the filters to apply onto the content of the blob to be created.", - "name": "hintpath", - "type": "const char *" - }, - { - "name": "callback", - "type": "git_blob_chunk_cb" - }, - { - "name": "payload", - "type": "void *" - } - ], - "comments": "

Provided the hintpath parameter is filled, its value\nwill help to determine what git filters should be applied\nto the object before it can be placed to the object database.

\n\n

The implementation of the callback has to respect the\nfollowing rules:

\n\n\n", - "description": "

Write a loose blob to the Object Database from a\nprovider of chunks of data.

\n", - "file": "blob.h", - "group": "blob", - "line": 194, - "lineto": 199, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_oid *::git_repository *::const char *::git_blob_chunk_cb::void *", - "type": "function" - }, - "git_blob_create_fromdisk": { - "argline": "git_oid *id, git_repository *repo, const char *path", - "args": [ - { - "comment": "return the id of the written blob", - "name": "id", - "type": "git_oid *" - }, - { - "comment": "repository where the blob will be written. this repository can be bare or not", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "file from which the blob will be created", - "name": "path", - "type": "const char *" - } - ], - "comments": "", - "description": "

Read a file from the filesystem and write its content\nto the Object Database as a loose blob

\n", - "file": "blob.h", - "group": "blob", - "line": 153, - "lineto": 156, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_oid *::git_repository *::const char *", - "type": "function" - }, - "git_blob_create_fromworkdir": { - "argline": "git_oid *id, git_repository *repo, const char *relative_path", - "args": [ - { - "comment": "return the id of the written blob", - "name": "id", - "type": "git_oid *" - }, - { - "comment": "repository where the blob will be written. this repository cannot be bare", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "file from which the blob will be created, relative to the repository's working dir", - "name": "relative_path", - "type": "const char *" - } - ], - "comments": "", - "description": "

Read a file from the working folder of a repository\nand write it to the Object Database as a loose blob

\n", - "file": "blob.h", - "group": "blob", - "line": 141, - "lineto": 141, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_oid *::git_repository *::const char *", - "type": "function" - }, - "git_blob_filtered_content": { - "argline": "git_buf *out,\n\tgit_blob *blob,\n\tconst char *as_path,\n\tint check_for_binary_data", - "args": [ - { - "comment": "The git_buf to be filled in", - "name": "out", - "type": "git_buf *" - }, - { - "comment": "Pointer to the blob", - "name": "blob", - "type": "git_blob *" - }, - { - "comment": "Path used for file attribute lookups, etc.", - "name": "as_path", - "type": "const char *" - }, - { - "comment": "Should this test if blob content contains NUL bytes / looks like binary data before applying filters?", - "name": "check_for_binary_data", - "type": "int" - } - ], - "comments": "

This applies filters as if the blob was being checked out to the\nworking directory under the specified filename. This may apply\nCRLF filtering or other types of changes depending on the file\nattributes set for the blob and the content detected in it.

\n\n

The output is written into a git_buf which the caller must free\nwhen done (via git_buf_free).

\n\n

If no filters need to be applied, then the out buffer will just be\npopulated with a pointer to the raw content of the blob. In that case,\nbe careful to not free the blob until done with the buffer. To keep\nthe data detached from the blob, call git_buf_grow on the buffer\nwith a want_size of 0 and the buffer will be reallocated to be\ndetached from the blob.

\n", - "description": "

Get a buffer with the filtered content of a blob.

\n", - "file": "blob.h", - "group": "blob", - "line": 124, - "lineto": 128, - "return": { - "comment": "0 on success or an error code", - "type": "int" - }, - "sig": "git_buf *::git_blob *::const char *::int", - "type": "function" - }, - "git_blob_free": { - "argline": "git_blob *blob", - "args": [ - { - "comment": "the blob to close", - "name": "blob", - "type": "git_blob *" - } - ], - "comments": "

This is a wrapper around git_object_free()

\n\n

IMPORTANT:\nIt is necessary to call this method when you stop\nusing a blob. Failure to do so will cause a memory leak.

\n", - "description": "

Close an open blob

\n", - "examples": { - "blame.c": [ - "ex/v0.20.0/blame.html#git_blob_free-5" - ] - }, - "file": "blob.h", - "group": "blob", - "line": 60, - "lineto": 60, - "return": { - "type": "void" - }, - "sig": "git_blob *", - "type": "function" - }, - "git_blob_id": { - "argline": "const git_blob *blob", - "args": [ - { - "comment": "a previously loaded blob.", - "name": "blob", - "type": "const git_blob *" - } - ], - "comments": "", - "description": "

Get the id of a blob.

\n", - "file": "blob.h", - "group": "blob", - "line": 68, - "lineto": 68, - "return": { - "comment": "SHA1 hash for this blob.", - "type": "const git_oid *" - }, - "sig": "const git_blob *", - "type": "function" - }, - "git_blob_is_binary": { - "argline": "git_blob *blob", - "args": [ - { - "comment": "The blob which content should be analyzed", - "name": "blob", - "type": "git_blob *" - } - ], - "comments": "

The heuristic used to guess if a file is binary is taken from core git:\nSearching for NUL bytes and looking for a reasonable ratio of printable\nto non-printable characters among the first 4000 bytes.

\n", - "description": "

Determine if the blob content is most certainly binary or not.

\n", - "file": "blob.h", - "group": "blob", - "line": 223, - "lineto": 223, - "return": { - "comment": "1 if the content of the blob is detected as binary; 0 otherwise.", - "type": "int" - }, - "sig": "git_blob *", - "type": "function" - }, - "git_blob_lookup": { - "argline": "git_blob **blob, git_repository *repo, const git_oid *id", - "args": [ - { - "comment": "pointer to the looked up blob", - "name": "blob", - "type": "git_blob **" - }, - { - "comment": "the repo to use when locating the blob.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "identity of the blob to locate.", - "name": "id", - "type": "const git_oid *" - } - ], - "comments": "", - "description": "

Lookup a blob object from a repository.

\n", - "examples": { - "blame.c": [ - "ex/v0.20.0/blame.html#git_blob_lookup-4" - ], - "general.c": [ - "ex/v0.20.0/general.html#git_blob_lookup-1" - ] - }, - "file": "blob.h", - "group": "blob", - "line": 33, - "lineto": 33, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_blob **::git_repository *::const git_oid *", - "type": "function" - }, - "git_blob_lookup_prefix": { - "argline": "git_blob **blob, git_repository *repo, const git_oid *id, size_t len", - "args": [ - { - "comment": "pointer to the looked up blob", - "name": "blob", - "type": "git_blob **" - }, - { - "comment": "the repo to use when locating the blob.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "identity of the blob to locate.", - "name": "id", - "type": "const git_oid *" - }, - { - "comment": "the length of the short identifier", - "name": "len", - "type": "size_t" - } - ], - "comments": "

@see git_object_lookup_prefix

\n", - "description": "

Lookup a blob object from a repository,\ngiven a prefix of its identifier (short id).

\n", - "file": "blob.h", - "group": "blob", - "line": 47, - "lineto": 47, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_blob **::git_repository *::const git_oid *::size_t", - "type": "function" - }, - "git_blob_owner": { - "argline": "const git_blob *blob", - "args": [ - { - "comment": "A previously loaded blob.", - "name": "blob", - "type": "const git_blob *" - } - ], - "comments": "", - "description": "

Get the repository that contains the blob.

\n", - "file": "blob.h", - "group": "blob", - "line": 76, - "lineto": 76, - "return": { - "comment": "Repository that contains this blob.", - "type": "git_repository *" - }, - "sig": "const git_blob *", - "type": "function" - }, - "git_blob_rawcontent": { - "argline": "const git_blob *blob", - "args": [ - { - "comment": "pointer to the blob", - "name": "blob", - "type": "const git_blob *" - } - ], - "comments": "

A pointer to the raw content of a blob is returned;\nthis pointer is owned internally by the object and shall\nnot be free'd. The pointer may be invalidated at a later\ntime.

\n", - "description": "

Get a read-only buffer with the raw content of a blob.

\n", - "examples": { - "blame.c": [ - "ex/v0.20.0/blame.html#git_blob_rawcontent-6" - ], - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_blob_rawcontent-1" - ], - "general.c": [ - "ex/v0.20.0/general.html#git_blob_rawcontent-2" - ] - }, - "file": "blob.h", - "group": "blob", - "line": 89, - "lineto": 89, - "return": { - "comment": "the pointer; NULL if the blob has no contents", - "type": "const void *" - }, - "sig": "const git_blob *", - "type": "function" - }, - "git_blob_rawsize": { - "argline": "const git_blob *blob", - "args": [ - { - "comment": "pointer to the blob", - "name": "blob", - "type": "const git_blob *" - } - ], - "comments": "", - "description": "

Get the size in bytes of the contents of a blob

\n", - "examples": { - "blame.c": [ - "ex/v0.20.0/blame.html#git_blob_rawsize-7" - ], - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_blob_rawsize-2" - ], - "general.c": [ - "ex/v0.20.0/general.html#git_blob_rawsize-3", - "ex/v0.20.0/general.html#git_blob_rawsize-4" - ] - }, - "file": "blob.h", - "group": "blob", - "line": 97, - "lineto": 97, - "return": { - "comment": "size on bytes", - "type": "git_off_t" - }, - "sig": "const git_blob *", - "type": "function" - }, - "git_branch_create": { - "argline": "git_reference **out,\n\tgit_repository *repo,\n\tconst char *branch_name,\n\tconst git_commit *target,\n\tint force", - "args": [ - { - "comment": "Pointer where to store the underlying reference.", - "name": "out", - "type": "git_reference **" - }, - { - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "Name for the branch; this name is validated for consistency. It should also not conflict with an already existing branch name.", - "name": "branch_name", - "type": "const char *" - }, - { - "comment": "Commit to which this branch should point. This object must belong to the given `repo`.", - "name": "target", - "type": "const git_commit *" - }, - { - "comment": "Overwrite existing branch.", - "name": "force", - "type": "int" - } - ], - "comments": "

A new direct reference will be created pointing to\nthis target commit. If force is true and a reference\nalready exists with the given name, it'll be replaced.

\n\n

The returned reference must be freed by the user.

\n\n

The branch name will be checked for validity.\nSee git_tag_create() for rules about valid names.

\n", - "description": "

Create a new branch pointing at a target commit

\n", - "file": "branch.h", - "group": "branch", - "line": 50, - "lineto": 55, - "return": { - "comment": "0, GIT_EINVALIDSPEC or an error code. A proper reference is written in the refs/heads namespace pointing to the provided target commit.", - "type": "int" - }, - "sig": "git_reference **::git_repository *::const char *::const git_commit *::int", - "type": "function" - }, - "git_branch_delete": { - "argline": "git_reference *branch", - "args": [ - { - "comment": "A valid reference representing a branch", - "name": "branch", - "type": "git_reference *" - } - ], - "comments": "

If the branch is successfully deleted, the passed reference\nobject will be invalidated. The reference must be freed manually\nby the user.

\n", - "description": "

Delete an existing branch reference.

\n", - "file": "branch.h", - "group": "branch", - "line": 67, - "lineto": 67, - "return": { - "comment": "0 on success, or an error code.", - "type": "int" - }, - "sig": "git_reference *", - "type": "function" - }, - "git_branch_is_head": { - "argline": "git_reference *branch", - "args": [ - { - "comment": "Current underlying reference of the branch.", - "name": "branch", - "type": "git_reference *" - } - ], - "comments": "", - "description": "

Determine if the current local branch is pointed at by HEAD.

\n", - "file": "branch.h", - "group": "branch", - "line": 231, - "lineto": 232, - "return": { - "comment": "1 if HEAD points at the branch, 0 if it isn't, error code otherwise.", - "type": "int" - }, - "sig": "git_reference *", - "type": "function" - }, - "git_branch_iterator_free": { - "argline": "git_branch_iterator *iter", - "args": [ - { - "comment": "the iterator to free", - "name": "iter", - "type": "git_branch_iterator *" - } - ], - "comments": "", - "description": "

Free a branch iterator

\n", - "file": "branch.h", - "group": "branch", - "line": 103, - "lineto": 103, - "return": { - "type": "void" - }, - "sig": "git_branch_iterator *", - "type": "function" - }, - "git_branch_iterator_new": { - "argline": "git_branch_iterator **out,\n\tgit_repository *repo,\n\tgit_branch_t list_flags", - "args": [ - { - "comment": "the iterator", - "name": "out", - "type": "git_branch_iterator **" - }, - { - "comment": "Repository where to find the branches.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "Filtering flags for the branch listing. Valid values are GIT_BRANCH_LOCAL, GIT_BRANCH_REMOTE or a combination of the two.", - "name": "list_flags", - "type": "git_branch_t" - } - ], - "comments": "", - "description": "

Create an iterator which loops over the requested branches.

\n", - "file": "branch.h", - "group": "branch", - "line": 83, - "lineto": 86, - "return": { - "comment": "0 on success or an error code", - "type": "int" - }, - "sig": "git_branch_iterator **::git_repository *::git_branch_t", - "type": "function" - }, - "git_branch_lookup": { - "argline": "git_reference **out,\n\tgit_repository *repo,\n\tconst char *branch_name,\n\tgit_branch_t branch_type", - "args": [ - { - "comment": "pointer to the looked-up branch reference", - "name": "out", - "type": "git_reference **" - }, - { - "comment": "the repository to look up the branch", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "Name of the branch to be looked-up; this name is validated for consistency.", - "name": "branch_name", - "type": "const char *" - }, - { - "comment": "Type of the considered branch. This should be valued with either GIT_BRANCH_LOCAL or GIT_BRANCH_REMOTE.", - "name": "branch_type", - "type": "git_branch_t" - } - ], - "comments": "

The generated reference must be freed by the user.

\n\n

The branch name will be checked for validity.\nSee git_tag_create() for rules about valid names.

\n", - "description": "

Lookup a branch by its name in a repository.

\n", - "file": "branch.h", - "group": "branch", - "line": 147, - "lineto": 151, - "return": { - "comment": "0 on success; GIT_ENOTFOUND when no matching branch exists, GIT_EINVALIDSPEC, otherwise an error code.", - "type": "int" - }, - "sig": "git_reference **::git_repository *::const char *::git_branch_t", - "type": "function" - }, - "git_branch_move": { - "argline": "git_reference **out,\n\tgit_reference *branch,\n\tconst char *new_branch_name,\n\tint force", - "args": [ - { - "name": "out", - "type": "git_reference **" - }, - { - "comment": "Current underlying reference of the branch.", - "name": "branch", - "type": "git_reference *" - }, - { - "comment": "Target name of the branch once the move is performed; this name is validated for consistency.", - "name": "new_branch_name", - "type": "const char *" - }, - { - "comment": "Overwrite existing branch.", - "name": "force", - "type": "int" - } - ], - "comments": "

The new branch name will be checked for validity.\nSee git_tag_create() for rules about valid names.

\n", - "description": "

Move/rename an existing local branch reference.

\n", - "file": "branch.h", - "group": "branch", - "line": 120, - "lineto": 124, - "return": { - "comment": "0 on success, GIT_EINVALIDSPEC or an error code.", - "type": "int" - }, - "sig": "git_reference **::git_reference *::const char *::int", - "type": "function" - }, - "git_branch_name": { - "argline": "const char **out,\n\t\tgit_reference *ref", - "args": [ - { - "comment": "where the pointer of branch name is stored; this is valid as long as the ref is not freed.", - "name": "out", - "type": "const char **" - }, - { - "comment": "the reference ideally pointing to a branch", - "name": "ref", - "type": "git_reference *" - } - ], - "comments": "

The name of the branch matches the definition of the name\nfor git_branch_lookup. That is, if the returned name is given\nto git_branch_lookup() then the reference is returned that\nwas given to this function.

\n", - "description": "

Return the name of the given local or remote branch.

\n", - "file": "branch.h", - "group": "branch", - "line": 168, - "lineto": 169, - "return": { - "comment": "0 on success; otherwise an error code (e.g., if the ref is no local or remote branch).", - "type": "int" - }, - "sig": "const char **::git_reference *", - "type": "function" - }, - "git_branch_next": { - "argline": "git_reference **out, git_branch_t *out_type, git_branch_iterator *iter", - "args": [ - { - "comment": "the reference", - "name": "out", - "type": "git_reference **" - }, - { - "comment": "the type of branch (local or remote-tracking)", - "name": "out_type", - "type": "git_branch_t *" - }, - { - "comment": "the branch iterator", - "name": "iter", - "type": "git_branch_iterator *" - } - ], - "comments": "", - "description": "

Retrieve the next branch from the iterator

\n", - "file": "branch.h", - "group": "branch", - "line": 96, - "lineto": 96, - "return": { - "comment": "0 on success, GIT_ITEROVER if there are no more branches or an error code.", - "type": "int" - }, - "sig": "git_reference **::git_branch_t *::git_branch_iterator *", - "type": "function" - }, - "git_branch_remote_name": { - "argline": "char *remote_name_out,\n\tsize_t buffer_size,\n\tgit_repository *repo,\n\tconst char *canonical_branch_name", - "args": [ - { - "comment": "The user-allocated buffer which will be filled with the name of the remote. Pass NULL if you just want to get the needed size of the name of the remote as the output value.", - "name": "remote_name_out", - "type": "char *" - }, - { - "comment": "Size of the `out` buffer in bytes.", - "name": "buffer_size", - "type": "size_t" - }, - { - "comment": "The repository where the branch lives.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "name of the remote tracking branch.", - "name": "canonical_branch_name", - "type": "const char *" - } - ], - "comments": "", - "description": "

Return the name of remote that the remote tracking branch belongs to.

\n", - "file": "branch.h", - "group": "branch", - "line": 253, - "lineto": 257, - "return": { - "comment": "Number of characters in the reference name including the trailing NUL byte; GIT_ENOTFOUND when no remote matching remote was found, GIT_EAMBIGUOUS when the branch maps to several remotes, otherwise an error code.", - "type": "int" - }, - "sig": "char *::size_t::git_repository *::const char *", - "type": "function" - }, - "git_branch_set_upstream": { - "argline": "git_reference *branch, const char *upstream_name", - "args": [ - { - "comment": "the branch to configure", - "name": "branch", - "type": "git_reference *" - }, - { - "comment": "remote-tracking or local branch to set as upstream. Pass NULL to unset.", - "name": "upstream_name", - "type": "const char *" - } - ], - "comments": "", - "description": "

Set the upstream configuration for a given local branch

\n", - "file": "branch.h", - "group": "branch", - "line": 197, - "lineto": 197, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_reference *::const char *", - "type": "function" - }, - "git_branch_upstream": { - "argline": "git_reference **out,\n\tgit_reference *branch", - "args": [ - { - "comment": "Pointer where to store the retrieved reference.", - "name": "out", - "type": "git_reference **" - }, - { - "comment": "Current underlying reference of the branch.", - "name": "branch", - "type": "git_reference *" - } - ], - "comments": "", - "description": "

Return the reference supporting the remote tracking branch,\ngiven a local branch reference.

\n", - "file": "branch.h", - "group": "branch", - "line": 183, - "lineto": 185, - "return": { - "comment": "0 on success; GIT_ENOTFOUND when no remote tracking reference exists, otherwise an error code.", - "type": "int" - }, - "sig": "git_reference **::git_reference *", - "type": "function" - }, - "git_branch_upstream_name": { - "argline": "char *tracking_branch_name_out,\n\tsize_t buffer_size,\n\tgit_repository *repo,\n\tconst char *canonical_branch_name", - "args": [ - { - "comment": "The user-allocated buffer which will be filled with the name of the reference. Pass NULL if you just want to get the needed size of the name of the reference as the output value.", - "name": "tracking_branch_name_out", - "type": "char *" - }, - { - "comment": "Size of the `out` buffer in bytes.", - "name": "buffer_size", - "type": "size_t" - }, - { - "comment": "the repository where the branches live", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "name of the local branch.", - "name": "canonical_branch_name", - "type": "const char *" - } - ], - "comments": "", - "description": "

Return the name of the reference supporting the remote tracking branch,\ngiven the name of a local branch reference.

\n", - "file": "branch.h", - "group": "branch", - "line": 217, - "lineto": 221, - "return": { - "comment": "number of characters in the reference name including the trailing NUL byte; GIT_ENOTFOUND when no remote tracking reference exists, otherwise an error code.", - "type": "int" - }, - "sig": "char *::size_t::git_repository *::const char *", - "type": "function" - }, - "git_buf_free": { - "argline": "git_buf *buffer", - "args": [ - { - "comment": "The buffer to deallocate", - "name": "buffer", - "type": "git_buf *" - } - ], - "comments": "

Note that this does not free the git_buf itself, just the memory\npointed to by buffer->ptr. This will not free the memory if it looks\nlike it was not allocated internally, but it will clear the buffer back\nto the empty state.

\n", - "description": "

Free the memory referred to by the git_buf.

\n", - "file": "buffer.h", - "group": "buf", - "line": 72, - "lineto": 72, - "return": { - "type": "void" - }, - "sig": "git_buf *", - "type": "function" - }, - "git_buf_grow": { - "argline": "git_buf *buffer, size_t target_size", - "args": [ - { - "comment": "The buffer to be resized; may or may not be allocated yet", - "name": "buffer", - "type": "git_buf *" - }, - { - "comment": "The desired available size", - "name": "target_size", - "type": "size_t" - } - ], - "comments": "

This will attempt to grow the buffer to accomodate the target size.

\n\n

If the buffer refers to memory that was not allocated by libgit2 (i.e.\nthe asize field is zero), then ptr will be replaced with a newly\nallocated block of data. Be careful so that memory allocated by the\ncaller is not lost. As a special variant, if you pass target_size as\n0 and the memory is not allocated by libgit2, this will allocate a new\nbuffer of size size and copy the external data into it.

\n\n

Currently, this will never shrink a buffer, only expand it.

\n\n

If the allocation fails, this will return an error and the buffer will be\nmarked as invalid for future operations, invaliding the contents.

\n", - "description": "

Resize the buffer allocation to make more space.

\n", - "file": "buffer.h", - "group": "buf", - "line": 95, - "lineto": 95, - "return": { - "comment": "0 on success, -1 on allocation failure", - "type": "int" - }, - "sig": "git_buf *::size_t", - "type": "function" - }, - "git_buf_set": { - "argline": "git_buf *buffer, const void *data, size_t datalen", - "args": [ - { - "comment": "The buffer to set", - "name": "buffer", - "type": "git_buf *" - }, - { - "comment": "The data to copy into the buffer", - "name": "data", - "type": "const void *" - }, - { - "comment": "The length of the data to copy into the buffer", - "name": "datalen", - "type": "size_t" - } - ], - "comments": "", - "description": "

Set buffer to a copy of some raw data.

\n", - "file": "buffer.h", - "group": "buf", - "line": 105, - "lineto": 108, - "return": { - "comment": "0 on success, -1 on allocation failure", - "type": "int" - }, - "sig": "git_buf *::const void *::size_t", - "type": "function" - }, - "git_checkout_head": { - "argline": "git_repository *repo,\n\tconst git_checkout_opts *opts", - "args": [ - { - "comment": "repository to check out (must be non-bare)", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "specifies checkout options (may be NULL)", - "name": "opts", - "type": "const git_checkout_opts *" - } - ], - "comments": "", - "description": "

Updates files in the index and the working tree to match the content of\nthe commit pointed at by HEAD.

\n", - "file": "checkout.h", - "group": "checkout", - "line": 259, - "lineto": 261, - "return": { - "comment": "0 on success, GIT_EUNBORNBRANCH when HEAD points to a non existing branch, GIT_ERROR otherwise (use giterr_last for information about the error)", - "type": "int" - }, - "sig": "git_repository *::const git_checkout_opts *", - "type": "function" - }, - "git_checkout_index": { - "argline": "git_repository *repo,\n\tgit_index *index,\n\tconst git_checkout_opts *opts", - "args": [ - { - "comment": "repository into which to check out (must be non-bare)", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "index to be checked out (or NULL to use repository index)", - "name": "index", - "type": "git_index *" - }, - { - "comment": "specifies checkout options (may be NULL)", - "name": "opts", - "type": "const git_checkout_opts *" - } - ], - "comments": "", - "description": "

Updates files in the working tree to match the content of the index.

\n", - "file": "checkout.h", - "group": "checkout", - "line": 272, - "lineto": 275, - "return": { - "comment": "0 on success, GIT_ERROR otherwise (use giterr_last for information about the error)", - "type": "int" - }, - "sig": "git_repository *::git_index *::const git_checkout_opts *", - "type": "function" - }, - "git_checkout_tree": { - "argline": "git_repository *repo,\n\tconst git_object *treeish,\n\tconst git_checkout_opts *opts", - "args": [ - { - "comment": "repository to check out (must be non-bare)", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "a commit, tag or tree which content will be used to update the working directory (or NULL to use HEAD)", - "name": "treeish", - "type": "const git_object *" - }, - { - "comment": "specifies checkout options (may be NULL)", - "name": "opts", - "type": "const git_checkout_opts *" - } - ], - "comments": "", - "description": "

Updates files in the index and working tree to match the content of the\ntree pointed at by the treeish.

\n", - "file": "checkout.h", - "group": "checkout", - "line": 288, - "lineto": 291, - "return": { - "comment": "0 on success, GIT_ERROR otherwise (use giterr_last for information about the error)", - "type": "int" - }, - "sig": "git_repository *::const git_object *::const git_checkout_opts *", - "type": "function" - }, - "git_clone": { - "argline": "git_repository **out,\n\t\tconst char *url,\n\t\tconst char *local_path,\n\t\tconst git_clone_options *options", - "args": [ - { - "comment": "pointer that will receive the resulting repository object", - "name": "out", - "type": "git_repository **" - }, - { - "comment": "the remote repository to clone", - "name": "url", - "type": "const char *" - }, - { - "comment": "local directory to clone to", - "name": "local_path", - "type": "const char *" - }, - { - "comment": "configuration options for the clone. If NULL, the function works as though GIT_OPTIONS_INIT were passed.", - "name": "options", - "type": "const git_clone_options *" - } - ], - "comments": "

This version handles the simple case. If you'd like to create the\nrepository or remote with non-default settings, you can create and\nconfigure them and then use git_clone_into().

\n", - "description": "

Clone a remote repository.

\n", - "examples": { - "network/clone.c": [ - "ex/v0.20.0/network/clone.html#git_clone-1" - ] - }, - "file": "clone.h", - "group": "clone", - "line": 78, - "lineto": 82, - "return": { - "comment": "0 on success, GIT_ERROR otherwise (use giterr_last for information about the error)", - "type": "int" - }, - "sig": "git_repository **::const char *::const char *::const git_clone_options *", - "type": "function" - }, - "git_clone_into": { - "argline": "git_repository *repo, git_remote *remote, const git_checkout_opts *co_opts, const char *branch", - "args": [ - { - "comment": "the repository to use", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "the remote repository to clone from", - "name": "remote", - "type": "git_remote *" - }, - { - "comment": "options to use during checkout", - "name": "co_opts", - "type": "const git_checkout_opts *" - }, - { - "comment": "the branch to checkout after the clone, pass NULL for the remote's default branch", - "name": "branch", - "type": "const char *" - } - ], - "comments": "

After creating the repository and remote and configuring them for\npaths and callbacks respectively, you can call this function to\nperform the clone operation and optionally checkout files.

\n", - "description": "

Clone into a repository

\n", - "file": "clone.h", - "group": "clone", - "line": 98, - "lineto": 98, - "return": { - "comment": "0 on success or an error code", - "type": "int" - }, - "sig": "git_repository *::git_remote *::const git_checkout_opts *::const char *", - "type": "function" - }, - "git_commit_author": { - "argline": "const git_commit *commit", - "args": [ - { - "comment": "a previously loaded commit.", - "name": "commit", - "type": "const git_commit *" - } - ], - "comments": "", - "description": "

Get the author of a commit.

\n", - "examples": { - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_commit_author-6" - ], - "general.c": [ - "ex/v0.20.0/general.html#git_commit_author-19", - "ex/v0.20.0/general.html#git_commit_author-20" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_commit_author-10" - ] - }, - "file": "commit.h", - "group": "commit", - "line": 149, - "lineto": 149, - "return": { - "comment": "the author of a commit", - "type": "const git_signature *" - }, - "sig": "const git_commit *", - "type": "function" - }, - "git_commit_committer": { - "argline": "const git_commit *commit", - "args": [ - { - "comment": "a previously loaded commit.", - "name": "commit", - "type": "const git_commit *" - } - ], - "comments": "", - "description": "

Get the committer of a commit.

\n", - "examples": { - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_commit_committer-5" - ], - "general.c": [ - "ex/v0.20.0/general.html#git_commit_committer-18" - ] - }, - "file": "commit.h", - "group": "commit", - "line": 141, - "lineto": 141, - "return": { - "comment": "the committer of a commit", - "type": "const git_signature *" - }, - "sig": "const git_commit *", - "type": "function" - }, - "git_commit_create": { - "argline": "git_oid *id,\n\tgit_repository *repo,\n\tconst char *update_ref,\n\tconst git_signature *author,\n\tconst git_signature *committer,\n\tconst char *message_encoding,\n\tconst char *message,\n\tconst git_tree *tree,\n\tint parent_count,\n\tconst git_commit *parents[]", - "args": [ - { - "comment": "Pointer in which to store the OID of the newly created commit", - "name": "id", - "type": "git_oid *" - }, - { - "comment": "Repository where to store the commit", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "If not NULL, name of the reference that will be updated to point to this commit. If the reference is not direct, it will be resolved to a direct reference. Use \"HEAD\" to update the HEAD of the current branch and make it point to this commit. If the reference doesn't exist yet, it will be created.", - "name": "update_ref", - "type": "const char *" - }, - { - "comment": "Signature with author and author time of commit", - "name": "author", - "type": "const git_signature *" - }, - { - "comment": "Signature with committer and * commit time of commit", - "name": "committer", - "type": "const git_signature *" - }, - { - "comment": "The encoding for the message in the commit, represented with a standard encoding name. E.g. \"UTF-8\". If NULL, no encoding header is written and UTF-8 is assumed.", - "name": "message_encoding", - "type": "const char *" - }, - { - "comment": "_encoding The encoding for the message in the commit, represented with a standard encoding name. E.g. \"UTF-8\". If NULL, no encoding header is written and UTF-8 is assumed.", - "name": "message", - "type": "const char *" - }, - { - "comment": "An instance of a `git_tree` object that will be used as the tree for the commit. This tree object must also be owned by the given `repo`.", - "name": "tree", - "type": "const git_tree *" - }, - { - "comment": "Number of parents for this commit", - "name": "parent_count", - "type": "int" - } - ], - "comments": "

The message will not be cleaned up automatically. You can do that with\nthe git_message_prettify() function.

\n", - "description": "

Create new commit in the repository from a list of git_object pointers

\n", - "file": "commit.h", - "group": "commit", - "line": 274, - "lineto": 284, - "return": { - "comment": "0 or an error code The created commit will be written to the Object Database and the given reference will be updated to point to it", - "type": "int" - }, - "sig": "git_oid *::git_repository *::const char *::const git_signature *::const git_signature *::const char *::const char *::const git_tree *::int", - "type": "function" - }, - "git_commit_create_from_oids": { - "argline": "git_oid *oid,\n\tgit_repository *repo,\n\tconst char *update_ref,\n\tconst git_signature *author,\n\tconst git_signature *committer,\n\tconst char *message_encoding,\n\tconst char *message,\n\tconst git_oid *tree,\n\tint parent_count,\n\tconst git_oid *parents[]", - "args": [ - { - "name": "oid", - "type": "git_oid *" - }, - { - "name": "repo", - "type": "git_repository *" - }, - { - "name": "update_ref", - "type": "const char *" - }, - { - "name": "author", - "type": "const git_signature *" - }, - { - "name": "committer", - "type": "const git_signature *" - }, - { - "name": "message_encoding", - "type": "const char *" - }, - { - "name": "message", - "type": "const char *" - }, - { - "name": "tree", - "type": "const git_oid *" - }, - { - "name": "parent_count", - "type": "int" - } - ], - "comments": "

See documentation for git_commit_create() for information about the\nparameters, as the meaning is identical excepting that tree and\nparents now take git_oid. This is a dangerous API in that nor\nthe tree, neither the parents list of git_oids are checked for\nvalidity.

\n", - "description": "

Create new commit in the repository from a list of git_oid values

\n", - "file": "sys/commit.h", - "group": "commit", - "line": 32, - "lineto": 42, - "return": { - "type": "int" - }, - "sig": "git_oid *::git_repository *::const char *::const git_signature *::const git_signature *::const char *::const char *::const git_oid *::int", - "type": "function" - }, - "git_commit_create_v": { - "argline": "git_oid *id,\n\tgit_repository *repo,\n\tconst char *update_ref,\n\tconst git_signature *author,\n\tconst git_signature *committer,\n\tconst char *message_encoding,\n\tconst char *message,\n\tconst git_tree *tree,\n\tint parent_count,\n\t...", - "args": [ - { - "name": "id", - "type": "git_oid *" - }, - { - "name": "repo", - "type": "git_repository *" - }, - { - "name": "update_ref", - "type": "const char *" - }, - { - "name": "author", - "type": "const git_signature *" - }, - { - "name": "committer", - "type": "const git_signature *" - }, - { - "name": "message_encoding", - "type": "const char *" - }, - { - "name": "message", - "type": "const char *" - }, - { - "name": "tree", - "type": "const git_tree *" - }, - { - "name": "parent_count", - "type": "int" - } - ], - "comments": "

The message will be cleaned up from excess whitespace and it will be made\nsure that the last line ends with a '\\n'.

\n\n

The parents for the commit are specified as a variable list of pointers\nto const git_commit *. Note that this is a convenience method which may\nnot be safe to export for certain languages or compilers

\n\n

All other parameters remain the same at git_commit_create().

\n\n

@see git_commit_create

\n", - "description": "

Create new commit in the repository using a variable argument list.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_commit_create_v-23" - ], - "init.c": [ - "ex/v0.20.0/init.html#git_commit_create_v-1" - ] - }, - "file": "commit.h", - "group": "commit", - "line": 300, - "lineto": 310, - "return": { - "type": "int" - }, - "sig": "git_oid *::git_repository *::const char *::const git_signature *::const git_signature *::const char *::const char *::const git_tree *::int", - "type": "function" - }, - "git_commit_free": { - "argline": "git_commit *commit", - "args": [ - { - "comment": "the commit to close", - "name": "commit", - "type": "git_commit *" - } - ], - "comments": "

This is a wrapper around git_object_free()

\n\n

IMPORTANT:\nIt is necessary to call this method when you stop\nusing a commit. Failure to do so will cause a memory leak.

\n", - "description": "

Close an open commit

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_commit_free-8", - "ex/v0.20.0/general.html#git_commit_free-9", - "ex/v0.20.0/general.html#git_commit_free-10", - "ex/v0.20.0/general.html#git_commit_free-11" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_commit_free-2", - "ex/v0.20.0/log.html#git_commit_free-3", - "ex/v0.20.0/log.html#git_commit_free-4", - "ex/v0.20.0/log.html#git_commit_free-5" - ] - }, - "file": "commit.h", - "group": "commit", - "line": 69, - "lineto": 69, - "return": { - "type": "void" - }, - "sig": "git_commit *", - "type": "function" - }, - "git_commit_id": { - "argline": "const git_commit *commit", - "args": [ - { - "comment": "a previously loaded commit.", - "name": "commit", - "type": "const git_commit *" - } - ], - "comments": "", - "description": "

Get the id of a commit.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_commit_id-12" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_commit_id-6" - ] - }, - "file": "commit.h", - "group": "commit", - "line": 78, - "lineto": 78, - "return": { - "comment": "object identity for the commit.", - "type": "const git_oid *" - }, - "sig": "const git_commit *", - "type": "function" - }, - "git_commit_lookup": { - "argline": "git_commit **commit, git_repository *repo, const git_oid *id", - "args": [ - { - "comment": "pointer to the looked up commit", - "name": "commit", - "type": "git_commit **" - }, - { - "comment": "the repo to use when locating the commit.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "identity of the commit to locate. If the object is an annotated tag it will be peeled back to the commit.", - "name": "id", - "type": "const git_oid *" - } - ], - "comments": "

The returned object should be released with git_commit_free when no\nlonger needed.

\n", - "description": "

Lookup a commit object from a repository.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_commit_lookup-5", - "ex/v0.20.0/general.html#git_commit_lookup-6", - "ex/v0.20.0/general.html#git_commit_lookup-7" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_commit_lookup-1" - ] - }, - "file": "commit.h", - "group": "commit", - "line": 36, - "lineto": 37, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_commit **::git_repository *::const git_oid *", - "type": "function" - }, - "git_commit_lookup_prefix": { - "argline": "git_commit **commit, git_repository *repo, const git_oid *id, size_t len", - "args": [ - { - "comment": "pointer to the looked up commit", - "name": "commit", - "type": "git_commit **" - }, - { - "comment": "the repo to use when locating the commit.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "identity of the commit to locate. If the object is an annotated tag it will be peeled back to the commit.", - "name": "id", - "type": "const git_oid *" - }, - { - "comment": "the length of the short identifier", - "name": "len", - "type": "size_t" - } - ], - "comments": "

The returned object should be released with git_commit_free when no\nlonger needed.

\n\n

@see git_object_lookup_prefix

\n", - "description": "

Lookup a commit object from a repository, given a prefix of its\nidentifier (short id).

\n", - "file": "commit.h", - "group": "commit", - "line": 55, - "lineto": 56, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_commit **::git_repository *::const git_oid *::size_t", - "type": "function" - }, - "git_commit_message": { - "argline": "const git_commit *commit", - "args": [ - { - "comment": "a previously loaded commit.", - "name": "commit", - "type": "const git_commit *" - } - ], - "comments": "

The returned message will be slightly prettified by removing any\npotential leading newlines.

\n", - "description": "

Get the full message of a commit.

\n", - "examples": { - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_commit_message-3", - "ex/v0.20.0/cat-file.html#git_commit_message-4" - ], - "general.c": [ - "ex/v0.20.0/general.html#git_commit_message-13", - "ex/v0.20.0/general.html#git_commit_message-14", - "ex/v0.20.0/general.html#git_commit_message-15" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_commit_message-9" - ] - }, - "file": "commit.h", - "group": "commit", - "line": 109, - "lineto": 109, - "return": { - "comment": "the message of a commit", - "type": "const char *" - }, - "sig": "const git_commit *", - "type": "function" - }, - "git_commit_message_encoding": { - "argline": "const git_commit *commit", - "args": [ - { - "comment": "a previously loaded commit.", - "name": "commit", - "type": "const git_commit *" - } - ], - "comments": "

The encoding may be NULL if the encoding header\nin the commit is missing; in that case UTF-8 is assumed.

\n", - "description": "

Get the encoding for the message of a commit,\nas a string representing a standard encoding name.

\n", - "file": "commit.h", - "group": "commit", - "line": 98, - "lineto": 98, - "return": { - "comment": "NULL, or the encoding", - "type": "const char *" - }, - "sig": "const git_commit *", - "type": "function" - }, - "git_commit_message_raw": { - "argline": "const git_commit *commit", - "args": [ - { - "comment": "a previously loaded commit.", - "name": "commit", - "type": "const git_commit *" - } - ], - "comments": "", - "description": "

Get the full raw message of a commit.

\n", - "file": "commit.h", - "group": "commit", - "line": 117, - "lineto": 117, - "return": { - "comment": "the raw message of a commit", - "type": "const char *" - }, - "sig": "const git_commit *", - "type": "function" - }, - "git_commit_nth_gen_ancestor": { - "argline": "git_commit **ancestor,\n\tconst git_commit *commit,\n\tunsigned int n", - "args": [ - { - "comment": "Pointer where to store the ancestor commit", - "name": "ancestor", - "type": "git_commit **" - }, - { - "comment": "a previously loaded commit.", - "name": "commit", - "type": "const git_commit *" - }, - { - "comment": "the requested generation", - "name": "n", - "type": "unsigned int" - } - ], - "comments": "

Passing 0 as the generation number returns another instance of the\nbase commit itself.

\n", - "description": "

Get the commit object that is the th generation ancestor\nof the named commit object, following only the first parents.\nThe returned commit has to be freed by the caller.

\n", - "file": "commit.h", - "group": "commit", - "line": 226, - "lineto": 229, - "return": { - "comment": "0 on success; GIT_ENOTFOUND if no matching ancestor exists or an error code", - "type": "int" - }, - "sig": "git_commit **::const git_commit *::unsigned int", - "type": "function" - }, - "git_commit_owner": { - "argline": "const git_commit *commit", - "args": [ - { - "comment": "A previously loaded commit.", - "name": "commit", - "type": "const git_commit *" - } - ], - "comments": "", - "description": "

Get the repository that contains the commit.

\n", - "examples": { - "log.c": [ - "ex/v0.20.0/log.html#git_commit_owner-7", - "ex/v0.20.0/log.html#git_commit_owner-8" - ] - }, - "file": "commit.h", - "group": "commit", - "line": 86, - "lineto": 86, - "return": { - "comment": "Repository that contains this commit.", - "type": "git_repository *" - }, - "sig": "const git_commit *", - "type": "function" - }, - "git_commit_parent": { - "argline": "git_commit **out,\n\tconst git_commit *commit,\n\tunsigned int n", - "args": [ - { - "comment": "Pointer where to store the parent commit", - "name": "out", - "type": "git_commit **" - }, - { - "comment": "a previously loaded commit.", - "name": "commit", - "type": "const git_commit *" - }, - { - "comment": "the position of the parent (from 0 to `parentcount`)", - "name": "n", - "type": "unsigned int" - } - ], - "comments": "", - "description": "

Get the specified parent of the commit.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_commit_parent-22" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_commit_parent-18", - "ex/v0.20.0/log.html#git_commit_parent-19" - ] - }, - "file": "commit.h", - "group": "commit", - "line": 194, - "lineto": 197, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_commit **::const git_commit *::unsigned int", - "type": "function" - }, - "git_commit_parent_id": { - "argline": "const git_commit *commit,\n\tunsigned int n", - "args": [ - { - "comment": "a previously loaded commit.", - "name": "commit", - "type": "const git_commit *" - }, - { - "comment": "the position of the parent (from 0 to `parentcount`)", - "name": "n", - "type": "unsigned int" - } - ], - "comments": "", - "description": "

Get the oid of a specified parent for a commit. This is different from\ngit_commit_parent, which will attempt to load the parent commit from\nthe ODB.

\n", - "examples": { - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_commit_parent_id-9" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_commit_parent_id-20" - ] - }, - "file": "commit.h", - "group": "commit", - "line": 208, - "lineto": 210, - "return": { - "comment": "the id of the parent, NULL on error.", - "type": "const git_oid *" - }, - "sig": "const git_commit *::unsigned int", - "type": "function" - }, - "git_commit_parentcount": { - "argline": "const git_commit *commit", - "args": [ - { - "comment": "a previously loaded commit.", - "name": "commit", - "type": "const git_commit *" - } - ], - "comments": "", - "description": "

Get the number of parents of this commit

\n", - "examples": { - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_commit_parentcount-8" - ], - "general.c": [ - "ex/v0.20.0/general.html#git_commit_parentcount-21" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_commit_parentcount-16", - "ex/v0.20.0/log.html#git_commit_parentcount-17" - ] - }, - "file": "commit.h", - "group": "commit", - "line": 184, - "lineto": 184, - "return": { - "comment": "integer of count of parents", - "type": "unsigned int" - }, - "sig": "const git_commit *", - "type": "function" - }, - "git_commit_raw_header": { - "argline": "const git_commit *commit", - "args": [ - { - "comment": "a previously loaded commit", - "name": "commit", - "type": "const git_commit *" - } - ], - "comments": "", - "description": "

Get the full raw text of the commit header.

\n", - "file": "commit.h", - "group": "commit", - "line": 157, - "lineto": 157, - "return": { - "comment": "the header text of the commit", - "type": "const char *" - }, - "sig": "const git_commit *", - "type": "function" - }, - "git_commit_time": { - "argline": "const git_commit *commit", - "args": [ - { - "comment": "a previously loaded commit.", - "name": "commit", - "type": "const git_commit *" - } - ], - "comments": "", - "description": "

Get the commit time (i.e. committer time) of a commit.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_commit_time-16", - "ex/v0.20.0/general.html#git_commit_time-17" - ] - }, - "file": "commit.h", - "group": "commit", - "line": 125, - "lineto": 125, - "return": { - "comment": "the time of a commit", - "type": "git_time_t" - }, - "sig": "const git_commit *", - "type": "function" - }, - "git_commit_time_offset": { - "argline": "const git_commit *commit", - "args": [ - { - "comment": "a previously loaded commit.", - "name": "commit", - "type": "const git_commit *" - } - ], - "comments": "", - "description": "

Get the commit timezone offset (i.e. committer's preferred timezone) of a commit.

\n", - "file": "commit.h", - "group": "commit", - "line": 133, - "lineto": 133, - "return": { - "comment": "positive or negative timezone offset, in minutes from UTC", - "type": "int" - }, - "sig": "const git_commit *", - "type": "function" - }, - "git_commit_tree": { - "argline": "git_tree **tree_out, const git_commit *commit", - "args": [ - { - "comment": "pointer where to store the tree object", - "name": "tree_out", - "type": "git_tree **" - }, - { - "comment": "a previously loaded commit.", - "name": "commit", - "type": "const git_commit *" - } - ], - "comments": "", - "description": "

Get the tree pointed to by a commit.

\n", - "examples": { - "log.c": [ - "ex/v0.20.0/log.html#git_commit_tree-11", - "ex/v0.20.0/log.html#git_commit_tree-12", - "ex/v0.20.0/log.html#git_commit_tree-13", - "ex/v0.20.0/log.html#git_commit_tree-14", - "ex/v0.20.0/log.html#git_commit_tree-15" - ] - }, - "file": "commit.h", - "group": "commit", - "line": 166, - "lineto": 166, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_tree **::const git_commit *", - "type": "function" - }, - "git_commit_tree_id": { - "argline": "const git_commit *commit", - "args": [ - { - "comment": "a previously loaded commit.", - "name": "commit", - "type": "const git_commit *" - } - ], - "comments": "", - "description": "

Get the id of the tree pointed to by a commit. This differs from\ngit_commit_tree in that no attempts are made to fetch an object\nfrom the ODB.

\n", - "examples": { - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_commit_tree_id-7" - ] - }, - "file": "commit.h", - "group": "commit", - "line": 176, - "lineto": 176, - "return": { - "comment": "the id of tree pointed to by commit.", - "type": "const git_oid *" - }, - "sig": "const git_commit *", - "type": "function" - }, - "git_config_add_backend": { - "argline": "git_config *cfg,\n\tgit_config_backend *file,\n\tgit_config_level_t level,\n\tint force", - "args": [ - { - "comment": "the configuration to add the file to", - "name": "cfg", - "type": "git_config *" - }, - { - "comment": "the configuration file (backend) to add", - "name": "file", - "type": "git_config_backend *" - }, - { - "comment": "the priority level of the backend", - "name": "level", - "type": "git_config_level_t" - }, - { - "comment": "if a config file already exists for the given priority level, replace it", - "name": "force", - "type": "int" - } - ], - "comments": "

Note that the configuration object will free the file\nautomatically.

\n\n

Further queries on this config object will access each\nof the config file instances in order (instances with\na higher priority level will be accessed first).

\n", - "description": "

Add a generic config file instance to an existing config

\n", - "file": "sys/config.h", - "group": "config", - "line": 90, - "lineto": 94, - "return": { - "comment": "0 on success, GIT_EEXISTS when adding more than one file for a given priority level (and force_replace set to 0), or error code", - "type": "int" - }, - "sig": "git_config *::git_config_backend *::git_config_level_t::int", - "type": "function" - }, - "git_config_add_file_ondisk": { - "argline": "git_config *cfg,\n\tconst char *path,\n\tgit_config_level_t level,\n\tint force", - "args": [ - { - "comment": "the configuration to add the file to", - "name": "cfg", - "type": "git_config *" - }, - { - "comment": "path to the configuration file to add", - "name": "path", - "type": "const char *" - }, - { - "comment": "the priority level of the backend", - "name": "level", - "type": "git_config_level_t" - }, - { - "comment": "replace config file at the given priority level", - "name": "force", - "type": "int" - } - ], - "comments": "

The on-disk file pointed at by path will be opened and\nparsed; it's expected to be a native Git config file following\nthe default Git config syntax (see man git-config).

\n\n

Note that the configuration object will free the file\nautomatically.

\n\n

Further queries on this config object will access each\nof the config file instances in order (instances with\na higher priority level will be accessed first).

\n", - "description": "

Add an on-disk config file instance to an existing config

\n", - "file": "config.h", - "group": "config", - "line": 175, - "lineto": 179, - "return": { - "comment": "0 on success, GIT_EEXISTS when adding more than one file for a given priority level (and force_replace set to 0), GIT_ENOTFOUND when the file doesn't exist or error code", - "type": "int" - }, - "sig": "git_config *::const char *::git_config_level_t::int", - "type": "function" - }, - "git_config_backend_foreach_match": { - "argline": "git_config_backend *backend,\n\tconst char *regexp,\n\tint (*fn)(const git_config_entry *, void *),\n\tvoid *data", - "args": [ - { - "comment": "where to get the variables from", - "name": "backend", - "type": "git_config_backend *" - }, - { - "comment": "regular expression to match against config names (can be NULL)", - "name": "regexp", - "type": "const char *" - }, - { - "name": "fn", - "type": "int (*)(const git_config_entry *, void *)" - }, - { - "name": "data", - "type": "void *" - } - ], - "comments": "

This behaviors like git_config_foreach_match except instead of all config\nentries it just enumerates through the given backend entry.

\n", - "description": "

Perform an operation on each config variable in given config backend\nmatching a regular expression.

\n", - "file": "config.h", - "group": "config", - "line": 612, - "lineto": 616, - "return": { - "type": "int" - }, - "sig": "git_config_backend *::const char *::int (*)(const git_config_entry *, void *)::void *", - "type": "function" - }, - "git_config_delete_entry": { - "argline": "git_config *cfg, const char *name", - "args": [ - { - "comment": "the configuration", - "name": "cfg", - "type": "git_config *" - }, - { - "comment": "the variable to delete", - "name": "name", - "type": "const char *" - } - ], - "comments": "", - "description": "

Delete a config variable from the config file\nwith the highest level (usually the local one).

\n", - "file": "config.h", - "group": "config", - "line": 435, - "lineto": 435, - "return": { - "type": "int" - }, - "sig": "git_config *::const char *", - "type": "function" - }, - "git_config_delete_multivar": { - "argline": "git_config *cfg, const char *name, const char *regexp", - "args": [ - { - "comment": "where to look for the variables", - "name": "cfg", - "type": "git_config *" - }, - { - "comment": "the variable's name", - "name": "name", - "type": "const char *" - }, - { - "comment": "a regular expression to indicate which values to delete", - "name": "regexp", - "type": "const char *" - } - ], - "comments": "", - "description": "

Deletes one or several entries from a multivar in the local config file.

\n", - "file": "config.h", - "group": "config", - "line": 446, - "lineto": 446, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_config *::const char *::const char *", - "type": "function" - }, - "git_config_find_global": { - "argline": "char *out, size_t length", - "args": [ - { - "comment": "Buffer to store the path in", - "name": "out", - "type": "char *" - }, - { - "comment": "size of the buffer in bytes", - "name": "length", - "type": "size_t" - } - ], - "comments": "

The user or global configuration file is usually\nlocated in $HOME/.gitconfig.

\n\n

This method will try to guess the full path to that\nfile, if the file exists. The returned path\nmay be used on any git_config call to load the\nglobal configuration file.

\n\n

This method will not guess the path to the xdg compatible\nconfig file (.config/git/config).

\n", - "description": "

Locate the path to the global configuration file

\n", - "file": "config.h", - "group": "config", - "line": 97, - "lineto": 97, - "return": { - "comment": "0 if a global configuration file has been found. Its path will be stored in `buffer`.", - "type": "int" - }, - "sig": "char *::size_t", - "type": "function" - }, - "git_config_find_system": { - "argline": "char *out, size_t length", - "args": [ - { - "comment": "Buffer to store the path in", - "name": "out", - "type": "char *" - }, - { - "comment": "size of the buffer in bytes", - "name": "length", - "type": "size_t" - } - ], - "comments": "

If /etc/gitconfig doesn't exist, it will look for\n%PROGRAMFILES%\\Git\\etc\\gitconfig.

\n", - "description": "

Locate the path to the system configuration file

\n", - "file": "config.h", - "group": "config", - "line": 128, - "lineto": 128, - "return": { - "comment": "0 if a system configuration file has been found. Its path will be stored in `buffer`.", - "type": "int" - }, - "sig": "char *::size_t", - "type": "function" - }, - "git_config_find_xdg": { - "argline": "char *out, size_t length", - "args": [ - { - "comment": "Buffer to store the path in", - "name": "out", - "type": "char *" - }, - { - "comment": "size of the buffer in bytes", - "name": "length", - "type": "size_t" - } - ], - "comments": "

The xdg compatible configuration file is usually\nlocated in $HOME/.config/git/config.

\n\n

This method will try to guess the full path to that\nfile, if the file exists. The returned path\nmay be used on any git_config call to load the\nxdg compatible configuration file.

\n", - "description": "

Locate the path to the global xdg compatible configuration file

\n", - "file": "config.h", - "group": "config", - "line": 115, - "lineto": 115, - "return": { - "comment": "0 if a xdg compatible configuration file has been found. Its path will be stored in `buffer`.", - "type": "int" - }, - "sig": "char *::size_t", - "type": "function" - }, - "git_config_foreach": { - "argline": "const git_config *cfg,\n\tgit_config_foreach_cb callback,\n\tvoid *payload", - "args": [ - { - "comment": "where to get the variables from", - "name": "cfg", - "type": "const git_config *" - }, - { - "comment": "the function to call on each variable", - "name": "callback", - "type": "git_config_foreach_cb" - }, - { - "comment": "the data to pass to the callback", - "name": "payload", - "type": "void *" - } - ], - "comments": "

The callback receives the normalized name and value of each variable\nin the config backend, and the data pointer passed to this function.\nAs soon as one of the callback functions returns something other than 0,\nthis function stops iterating and returns GIT_EUSER.

\n", - "description": "

Perform an operation on each config variable.

\n", - "file": "config.h", - "group": "config", - "line": 461, - "lineto": 464, - "return": { - "comment": "0 on success, GIT_EUSER on non-zero callback, or error code", - "type": "int" - }, - "sig": "const git_config *::git_config_foreach_cb::void *", - "type": "function" - }, - "git_config_foreach_match": { - "argline": "const git_config *cfg,\n\tconst char *regexp,\n\tgit_config_foreach_cb callback,\n\tvoid *payload", - "args": [ - { - "comment": "where to get the variables from", - "name": "cfg", - "type": "const git_config *" - }, - { - "comment": "regular expression to match against config names", - "name": "regexp", - "type": "const char *" - }, - { - "comment": "the function to call on each variable", - "name": "callback", - "type": "git_config_foreach_cb" - }, - { - "comment": "the data to pass to the callback", - "name": "payload", - "type": "void *" - } - ], - "comments": "

This behaviors like git_config_foreach with an additional filter of a\nregular expression that filters which config keys are passed to the\ncallback.

\n", - "description": "

Perform an operation on each config variable matching a regular expression.

\n", - "file": "config.h", - "group": "config", - "line": 502, - "lineto": 506, - "return": { - "comment": "0 or the return value of the callback which didn't return 0", - "type": "int" - }, - "sig": "const git_config *::const char *::git_config_foreach_cb::void *", - "type": "function" - }, - "git_config_free": { - "argline": "git_config *cfg", - "args": [ - { - "comment": "the configuration to free", - "name": "cfg", - "type": "git_config *" - } - ], - "comments": "", - "description": "

Free the configuration and its associated memory and files

\n", - "file": "config.h", - "group": "config", - "line": 250, - "lineto": 250, - "return": { - "type": "void" - }, - "sig": "git_config *", - "type": "function" - }, - "git_config_get_bool": { - "argline": "int *out, const git_config *cfg, const char *name", - "args": [ - { - "comment": "pointer to the variable where the value should be stored", - "name": "out", - "type": "int *" - }, - { - "comment": "where to look for the variable", - "name": "cfg", - "type": "const git_config *" - }, - { - "comment": "the variable's name", - "name": "name", - "type": "const char *" - } - ], - "comments": "

This function uses the usual C convention of 0 being false and\nanything else true.

\n\n

All config files will be looked into, in the order of their\ndefined level. A higher level means a higher priority. The\nfirst occurrence of the variable will be returned here.

\n", - "description": "

Get the value of a boolean config variable.

\n", - "file": "config.h", - "group": "config", - "line": 311, - "lineto": 311, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "int *::const git_config *::const char *", - "type": "function" - }, - "git_config_get_entry": { - "argline": "const git_config_entry **out,\n\tconst git_config *cfg,\n\tconst char *name", - "args": [ - { - "comment": "pointer to the variable git_config_entry", - "name": "out", - "type": "const git_config_entry **" - }, - { - "comment": "where to look for the variable", - "name": "cfg", - "type": "const git_config *" - }, - { - "comment": "the variable's name", - "name": "name", - "type": "const char *" - } - ], - "comments": "

The git_config_entry is owned by the config and should not be freed by the\nuser.

\n", - "description": "

Get the git_config_entry of a config variable.

\n", - "file": "config.h", - "group": "config", - "line": 263, - "lineto": 266, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "const git_config_entry **::const git_config *::const char *", - "type": "function" - }, - "git_config_get_int32": { - "argline": "int32_t *out, const git_config *cfg, const char *name", - "args": [ - { - "comment": "pointer to the variable where the value should be stored", - "name": "out", - "type": "int32_t *" - }, - { - "comment": "where to look for the variable", - "name": "cfg", - "type": "const git_config *" - }, - { - "comment": "the variable's name", - "name": "name", - "type": "const char *" - } - ], - "comments": "

All config files will be looked into, in the order of their\ndefined level. A higher level means a higher priority. The\nfirst occurence of the variable will be returned here.

\n", - "description": "

Get the value of an integer config variable.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_config_get_int32-25" - ] - }, - "file": "config.h", - "group": "config", - "line": 280, - "lineto": 280, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "int32_t *::const git_config *::const char *", - "type": "function" - }, - "git_config_get_int64": { - "argline": "int64_t *out, const git_config *cfg, const char *name", - "args": [ - { - "comment": "pointer to the variable where the value should be stored", - "name": "out", - "type": "int64_t *" - }, - { - "comment": "where to look for the variable", - "name": "cfg", - "type": "const git_config *" - }, - { - "comment": "the variable's name", - "name": "name", - "type": "const char *" - } - ], - "comments": "

All config files will be looked into, in the order of their\ndefined level. A higher level means a higher priority. The\nfirst occurrence of the variable will be returned here.

\n", - "description": "

Get the value of a long integer config variable.

\n", - "file": "config.h", - "group": "config", - "line": 294, - "lineto": 294, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "int64_t *::const git_config *::const char *", - "type": "function" - }, - "git_config_get_mapped": { - "argline": "int *out,\n\tconst git_config *cfg,\n\tconst char *name,\n\tconst git_cvar_map *maps,\n\tsize_t map_n", - "args": [ - { - "comment": "place to store the result of the mapping", - "name": "out", - "type": "int *" - }, - { - "comment": "config file to get the variables from", - "name": "cfg", - "type": "const git_config *" - }, - { - "comment": "name of the config variable to lookup", - "name": "name", - "type": "const char *" - }, - { - "comment": "array of `git_cvar_map` objects specifying the possible mappings", - "name": "maps", - "type": "const git_cvar_map *" - }, - { - "comment": "number of mapping objects in `maps`", - "name": "map_n", - "type": "size_t" - } - ], - "comments": "

This is a helper method to easily map different possible values\nto a variable to integer constants that easily identify them.

\n\n

A mapping array looks as follows:

\n\n

git_cvar_map autocrlf_mapping[] = {\n {GIT_CVAR_FALSE, NULL, GIT_AUTO_CRLF_FALSE},\n {GIT_CVAR_TRUE, NULL, GIT_AUTO_CRLF_TRUE},\n {GIT_CVAR_STRING, "input", GIT_AUTO_CRLF_INPUT},\n {GIT_CVAR_STRING, "default", GIT_AUTO_CRLF_DEFAULT}};

\n\n

On any "false" value for the variable (e.g. "false", "FALSE", "no"), the\nmapping will store GIT_AUTO_CRLF_FALSE in the out parameter.

\n\n

The same thing applies for any "true" value such as "true", "yes" or "1", storing\nthe GIT_AUTO_CRLF_TRUE variable.

\n\n

Otherwise, if the value matches the string "input" (with case insensitive comparison),\nthe given constant will be stored in out, and likewise for "default".

\n\n

If not a single match can be made to store in out, an error code will be\nreturned.

\n", - "description": "

Query the value of a config variable and return it mapped to\nan integer constant.

\n", - "file": "config.h", - "group": "config", - "line": 542, - "lineto": 547, - "return": { - "comment": "0 on success, error code otherwise", - "type": "int" - }, - "sig": "int *::const git_config *::const char *::const git_cvar_map *::size_t", - "type": "function" - }, - "git_config_get_multivar_foreach": { - "argline": "const git_config *cfg, const char *name, const char *regexp, git_config_foreach_cb callback, void *payload", - "args": [ - { - "comment": "where to look for the variable", - "name": "cfg", - "type": "const git_config *" - }, - { - "comment": "the variable's name", - "name": "name", - "type": "const char *" - }, - { - "comment": "regular expression to filter which variables we're interested in. Use NULL to indicate all", - "name": "regexp", - "type": "const char *" - }, - { - "comment": "the function to be called on each value of the variable", - "name": "callback", - "type": "git_config_foreach_cb" - }, - { - "comment": "opaque pointer to pass to the callback", - "name": "payload", - "type": "void *" - } - ], - "comments": "

The callback will be called on each variable found

\n", - "description": "

Get each value of a multivar in a foreach callback

\n", - "file": "config.h", - "group": "config", - "line": 342, - "lineto": 342, - "return": { - "type": "int" - }, - "sig": "const git_config *::const char *::const char *::git_config_foreach_cb::void *", - "type": "function" - }, - "git_config_get_string": { - "argline": "const char **out, const git_config *cfg, const char *name", - "args": [ - { - "comment": "pointer to the variable's value", - "name": "out", - "type": "const char **" - }, - { - "comment": "where to look for the variable", - "name": "cfg", - "type": "const git_config *" - }, - { - "comment": "the variable's name", - "name": "name", - "type": "const char *" - } - ], - "comments": "

The string is owned by the variable and should not be freed by the\nuser.

\n\n

All config files will be looked into, in the order of their\ndefined level. A higher level means a higher priority. The\nfirst occurrence of the variable will be returned here.

\n", - "description": "

Get the value of a string config variable.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_config_get_string-26" - ] - }, - "file": "config.h", - "group": "config", - "line": 328, - "lineto": 328, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "const char **::const git_config *::const char *", - "type": "function" - }, - "git_config_iterator_free": { - "argline": "git_config_iterator *iter", - "args": [ - { - "comment": "the iterator to free", - "name": "iter", - "type": "git_config_iterator *" - } - ], - "comments": "", - "description": "

Free a config iterator

\n", - "file": "config.h", - "group": "config", - "line": 369, - "lineto": 369, - "return": { - "type": "void" - }, - "sig": "git_config_iterator *", - "type": "function" - }, - "git_config_iterator_glob_new": { - "argline": "git_config_iterator **out, const git_config *cfg, const char *regexp", - "args": [ - { - "comment": "pointer to store the iterator", - "name": "out", - "type": "git_config_iterator **" - }, - { - "comment": "where to ge the variables from", - "name": "cfg", - "type": "const git_config *" - }, - { - "comment": "regular expression to match the names", - "name": "regexp", - "type": "const char *" - } - ], - "comments": "

Use git_config_next to advance the iteration and\ngit_config_iterator_free when done.

\n", - "description": "

Iterate over all the config variables whose name matches a pattern

\n", - "file": "config.h", - "group": "config", - "line": 487, - "lineto": 487, - "return": { - "type": "int" - }, - "sig": "git_config_iterator **::const git_config *::const char *", - "type": "function" - }, - "git_config_iterator_new": { - "argline": "git_config_iterator **out, const git_config *cfg", - "args": [ - { - "comment": "pointer to store the iterator", - "name": "out", - "type": "git_config_iterator **" - }, - { - "comment": "where to ge the variables from", - "name": "cfg", - "type": "const git_config *" - } - ], - "comments": "

Use git_config_next to advance the iteration and\ngit_config_iterator_free when done.

\n", - "description": "

Iterate over all the config variables

\n", - "file": "config.h", - "group": "config", - "line": 475, - "lineto": 475, - "return": { - "type": "int" - }, - "sig": "git_config_iterator **::const git_config *", - "type": "function" - }, - "git_config_lookup_map_value": { - "argline": "int *out,\n\tconst git_cvar_map *maps,\n\tsize_t map_n,\n\tconst char *value", - "args": [ - { - "comment": "place to store the result of the parsing", - "name": "out", - "type": "int *" - }, - { - "comment": "array of `git_cvar_map` objects specifying the possible mappings", - "name": "maps", - "type": "const git_cvar_map *" - }, - { - "comment": "number of mapping objects in `maps`", - "name": "map_n", - "type": "size_t" - }, - { - "comment": "value to parse", - "name": "value", - "type": "const char *" - } - ], - "comments": "", - "description": "

Maps a string value to an integer constant

\n", - "file": "config.h", - "group": "config", - "line": 557, - "lineto": 561, - "return": { - "type": "int" - }, - "sig": "int *::const git_cvar_map *::size_t::const char *", - "type": "function" - }, - "git_config_multivar_iterator_new": { - "argline": "git_config_iterator **out, const git_config *cfg, const char *name, const char *regexp", - "args": [ - { - "comment": "pointer to store the iterator", - "name": "out", - "type": "git_config_iterator **" - }, - { - "comment": "where to look for the variable", - "name": "cfg", - "type": "const git_config *" - }, - { - "comment": "the variable's name", - "name": "name", - "type": "const char *" - }, - { - "comment": "regular expression to filter which variables we're interested in. Use NULL to indicate all", - "name": "regexp", - "type": "const char *" - } - ], - "comments": "", - "description": "

Get each value of a multivar

\n", - "file": "config.h", - "group": "config", - "line": 353, - "lineto": 353, - "return": { - "type": "int" - }, - "sig": "git_config_iterator **::const git_config *::const char *::const char *", - "type": "function" - }, - "git_config_new": { - "argline": "git_config **out", - "args": [ - { - "comment": "pointer to the new configuration", - "name": "out", - "type": "git_config **" - } - ], - "comments": "

This object is empty, so you have to add a file to it before you\ncan do anything with it.

\n", - "description": "

Allocate a new configuration object

\n", - "file": "config.h", - "group": "config", - "line": 151, - "lineto": 151, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_config **", - "type": "function" - }, - "git_config_next": { - "argline": "git_config_entry **entry, git_config_iterator *iter", - "args": [ - { - "comment": "pointer to store the entry", - "name": "entry", - "type": "git_config_entry **" - }, - { - "comment": "the iterator", - "name": "iter", - "type": "git_config_iterator *" - } - ], - "comments": "", - "description": "

Return the current entry and advance the iterator

\n", - "file": "config.h", - "group": "config", - "line": 362, - "lineto": 362, - "return": { - "comment": "0 or an error code. GIT_ITEROVER if the iteration has completed", - "type": "int" - }, - "sig": "git_config_entry **::git_config_iterator *", - "type": "function" - }, - "git_config_open_default": { - "argline": "git_config **out", - "args": [ - { - "comment": "Pointer to store the config instance", - "name": "out", - "type": "git_config **" - } - ], - "comments": "

Utility wrapper that finds the global, XDG and system configuration files\nand opens them into a single prioritized config object that can be\nused when accessing default config data outside a repository.

\n", - "description": "

Open the global, XDG and system configuration files

\n", - "file": "config.h", - "group": "config", - "line": 140, - "lineto": 140, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_config **", - "type": "function" - }, - "git_config_open_global": { - "argline": "git_config **out, git_config *config", - "args": [ - { - "comment": "pointer in which to store the config object", - "name": "out", - "type": "git_config **" - }, - { - "comment": "the config object in which to look", - "name": "config", - "type": "git_config *" - } - ], - "comments": "

Git allows you to store your global configuration at\n$HOME/.config or $XDG_CONFIG_HOME/git/config. For backwards\ncompatability, the XDG file shouldn't be used unless the use has\ncreated it explicitly. With this function you'll open the correct\none to write to.

\n", - "description": "

Open the global/XDG configuration file according to git's rules

\n", - "file": "config.h", - "group": "config", - "line": 229, - "lineto": 229, - "return": { - "type": "int" - }, - "sig": "git_config **::git_config *", - "type": "function" - }, - "git_config_open_level": { - "argline": "git_config **out,\n\tconst git_config *parent,\n\tgit_config_level_t level", - "args": [ - { - "comment": "The configuration instance to create", - "name": "out", - "type": "git_config **" - }, - { - "comment": "Multi-level config to search for the given level", - "name": "parent", - "type": "const git_config *" - }, - { - "comment": "Configuration level to search for", - "name": "level", - "type": "git_config_level_t" - } - ], - "comments": "

The returned config object can be used to perform get/set/delete operations\non a single specific level.

\n\n

Getting several times the same level from the same parent multi-level config\nwill return different config instances, but containing the same config_file\ninstance.

\n", - "description": "

Build a single-level focused config object from a multi-level one.

\n", - "file": "config.h", - "group": "config", - "line": 212, - "lineto": 215, - "return": { - "comment": "0, GIT_ENOTFOUND if the passed level cannot be found in the multi-level parent config, or an error code", - "type": "int" - }, - "sig": "git_config **::const git_config *::git_config_level_t", - "type": "function" - }, - "git_config_open_ondisk": { - "argline": "git_config **out, const char *path", - "args": [ - { - "comment": "The configuration instance to create", - "name": "out", - "type": "git_config **" - }, - { - "comment": "Path to the on-disk file to open", - "name": "path", - "type": "const char *" - } - ], - "comments": "

This method is a simple utility wrapper for the following sequence\nof calls:\n- git_config_new\n- git_config_add_file_ondisk

\n", - "description": "

Create a new config instance containing a single on-disk file

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_config_open_ondisk-24" - ] - }, - "file": "config.h", - "group": "config", - "line": 194, - "lineto": 194, - "return": { - "comment": "0 on success, GIT_ENOTFOUND when the file doesn't exist or an error code", - "type": "int" - }, - "sig": "git_config **::const char *", - "type": "function" - }, - "git_config_parse_bool": { - "argline": "int *out, const char *value", - "args": [ - { - "comment": "place to store the result of the parsing", - "name": "out", - "type": "int *" - }, - { - "comment": "value to parse", - "name": "value", - "type": "const char *" - } - ], - "comments": "

Valid values for true are: 'true', 'yes', 'on', 1 or any\n number different from 0\nValid values for false are: 'false', 'no', 'off', 0

\n", - "description": "

Parse a string value as a bool.

\n", - "file": "config.h", - "group": "config", - "line": 573, - "lineto": 573, - "return": { - "type": "int" - }, - "sig": "int *::const char *", - "type": "function" - }, - "git_config_parse_int32": { - "argline": "int32_t *out, const char *value", - "args": [ - { - "comment": "place to store the result of the parsing", - "name": "out", - "type": "int32_t *" - }, - { - "comment": "value to parse", - "name": "value", - "type": "const char *" - } - ], - "comments": "

An optional value suffix of 'k', 'm', or 'g' will\ncause the value to be multiplied by 1024, 1048576,\nor 1073741824 prior to output.

\n", - "description": "

Parse a string value as an int32.

\n", - "file": "config.h", - "group": "config", - "line": 585, - "lineto": 585, - "return": { - "type": "int" - }, - "sig": "int32_t *::const char *", - "type": "function" - }, - "git_config_parse_int64": { - "argline": "int64_t *out, const char *value", - "args": [ - { - "comment": "place to store the result of the parsing", - "name": "out", - "type": "int64_t *" - }, - { - "comment": "value to parse", - "name": "value", - "type": "const char *" - } - ], - "comments": "

An optional value suffix of 'k', 'm', or 'g' will\ncause the value to be multiplied by 1024, 1048576,\nor 1073741824 prior to output.

\n", - "description": "

Parse a string value as an int64.

\n", - "file": "config.h", - "group": "config", - "line": 597, - "lineto": 597, - "return": { - "type": "int" - }, - "sig": "int64_t *::const char *", - "type": "function" - }, - "git_config_refresh": { - "argline": "git_config *cfg", - "args": [ - { - "comment": "The configuration to refresh", - "name": "cfg", - "type": "git_config *" - } - ], - "comments": "

A config file may be changed on disk out from under the in-memory\nconfig object. This function causes us to look for files that have\nbeen modified since we last loaded them and refresh the config with\nthe latest information.

\n", - "description": "

Reload changed config files

\n", - "file": "config.h", - "group": "config", - "line": 243, - "lineto": 243, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_config *", - "type": "function" - }, - "git_config_set_bool": { - "argline": "git_config *cfg, const char *name, int value", - "args": [ - { - "comment": "where to look for the variable", - "name": "cfg", - "type": "git_config *" - }, - { - "comment": "the variable's name", - "name": "name", - "type": "const char *" - }, - { - "comment": "the value to store", - "name": "value", - "type": "int" - } - ], - "comments": "", - "description": "

Set the value of a boolean config variable in the config file\nwith the highest level (usually the local one).

\n", - "file": "config.h", - "group": "config", - "line": 402, - "lineto": 402, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_config *::const char *::int", - "type": "function" - }, - "git_config_set_int32": { - "argline": "git_config *cfg, const char *name, int32_t value", - "args": [ - { - "comment": "where to look for the variable", - "name": "cfg", - "type": "git_config *" - }, - { - "comment": "the variable's name", - "name": "name", - "type": "const char *" - }, - { - "comment": "Integer value for the variable", - "name": "value", - "type": "int32_t" - } - ], - "comments": "", - "description": "

Set the value of an integer config variable in the config file\nwith the highest level (usually the local one).

\n", - "file": "config.h", - "group": "config", - "line": 380, - "lineto": 380, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_config *::const char *::int32_t", - "type": "function" - }, - "git_config_set_int64": { - "argline": "git_config *cfg, const char *name, int64_t value", - "args": [ - { - "comment": "where to look for the variable", - "name": "cfg", - "type": "git_config *" - }, - { - "comment": "the variable's name", - "name": "name", - "type": "const char *" - }, - { - "comment": "Long integer value for the variable", - "name": "value", - "type": "int64_t" - } - ], - "comments": "", - "description": "

Set the value of a long integer config variable in the config file\nwith the highest level (usually the local one).

\n", - "file": "config.h", - "group": "config", - "line": 391, - "lineto": 391, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_config *::const char *::int64_t", - "type": "function" - }, - "git_config_set_multivar": { - "argline": "git_config *cfg, const char *name, const char *regexp, const char *value", - "args": [ - { - "comment": "where to look for the variable", - "name": "cfg", - "type": "git_config *" - }, - { - "comment": "the variable's name", - "name": "name", - "type": "const char *" - }, - { - "comment": "a regular expression to indicate which values to replace", - "name": "regexp", - "type": "const char *" - }, - { - "comment": "the new value.", - "name": "value", - "type": "const char *" - } - ], - "comments": "", - "description": "

Set a multivar in the local config file.

\n", - "file": "config.h", - "group": "config", - "line": 426, - "lineto": 426, - "return": { - "type": "int" - }, - "sig": "git_config *::const char *::const char *::const char *", - "type": "function" - }, - "git_config_set_string": { - "argline": "git_config *cfg, const char *name, const char *value", - "args": [ - { - "comment": "where to look for the variable", - "name": "cfg", - "type": "git_config *" - }, - { - "comment": "the variable's name", - "name": "name", - "type": "const char *" - }, - { - "comment": "the string to store.", - "name": "value", - "type": "const char *" - } - ], - "comments": "

A copy of the string is made and the user is free to use it\nafterwards.

\n", - "description": "

Set the value of a string config variable in the config file\nwith the highest level (usually the local one).

\n", - "file": "config.h", - "group": "config", - "line": 416, - "lineto": 416, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_config *::const char *::const char *", - "type": "function" - }, - "git_cred_default_new": { - "argline": "git_cred **out", - "args": [ - { - "name": "out", - "type": "git_cred **" - } - ], - "comments": "", - "description": "

Create a "default" credential usable for Negotiate mechanisms like NTLM\nor Kerberos authentication.

\n", - "file": "transport.h", - "group": "cred", - "line": 165, - "lineto": 165, - "return": { - "comment": "0 for success or an error code for failure", - "type": "int" - }, - "sig": "git_cred **", - "type": "function" - }, - "git_cred_has_username": { - "argline": "git_cred *cred", - "args": [ - { - "comment": "object to check", - "name": "cred", - "type": "git_cred *" - } - ], - "comments": "", - "description": "

Check whether a credential object contains username information.

\n", - "file": "transport.h", - "group": "cred", - "line": 99, - "lineto": 99, - "return": { - "comment": "1 if the credential object has non-NULL username, 0 otherwise", - "type": "int" - }, - "sig": "git_cred *", - "type": "function" - }, - "git_cred_ssh_custom_new": { - "argline": "git_cred **out,\n\tconst char *username,\n\tconst char *publickey,\n\tsize_t publickey_len,\n\tgit_cred_sign_callback sign_fn,\n\tvoid *sign_data", - "args": [ - { - "comment": "The newly created credential object.", - "name": "out", - "type": "git_cred **" - }, - { - "comment": "username to use to authenticate", - "name": "username", - "type": "const char *" - }, - { - "comment": "The bytes of the public key.", - "name": "publickey", - "type": "const char *" - }, - { - "comment": "The length of the public key in bytes.", - "name": "publickey_len", - "type": "size_t" - }, - { - "comment": "The callback method to sign the data during the challenge.", - "name": "sign_fn", - "type": "git_cred_sign_callback" - }, - { - "comment": "The data to pass to the sign function.", - "name": "sign_data", - "type": "void *" - } - ], - "comments": "

This lets you use your own function to sign the challenge.

\n\n

This function and its credential type is provided for completeness\nand wraps libssh2_userauth_publickey(), which is undocumented.

\n\n

The supplied credential parameter will be internally duplicated.

\n", - "description": "

Create an ssh key credential with a custom signing function.

\n", - "file": "transport.h", - "group": "cred", - "line": 151, - "lineto": 157, - "return": { - "comment": "0 for success or an error code for failure", - "type": "int" - }, - "sig": "git_cred **::const char *::const char *::size_t::git_cred_sign_callback::void *", - "type": "function" - }, - "git_cred_ssh_key_new": { - "argline": "git_cred **out,\n\tconst char *username,\n\tconst char *publickey,\n\tconst char *privatekey,\n\tconst char *passphrase", - "args": [ - { - "comment": "The newly created credential object.", - "name": "out", - "type": "git_cred **" - }, - { - "comment": "username to use to authenticate", - "name": "username", - "type": "const char *" - }, - { - "comment": "The path to the public key of the credential.", - "name": "publickey", - "type": "const char *" - }, - { - "comment": "The path to the private key of the credential.", - "name": "privatekey", - "type": "const char *" - }, - { - "comment": "The passphrase of the credential.", - "name": "passphrase", - "type": "const char *" - } - ], - "comments": "", - "description": "

Create a new passphrase-protected ssh key credential object.\nThe supplied credential parameter will be internally duplicated.

\n", - "file": "transport.h", - "group": "cred", - "line": 126, - "lineto": 131, - "return": { - "comment": "0 for success or an error code for failure", - "type": "int" - }, - "sig": "git_cred **::const char *::const char *::const char *::const char *", - "type": "function" - }, - "git_cred_userpass": { - "argline": "git_cred **cred,\n\t\tconst char *url,\n\t\tconst char *user_from_url,\n\t\tunsigned int allowed_types,\n\t\tvoid *payload", - "args": [ - { - "comment": "The newly created credential object.", - "name": "cred", - "type": "git_cred **" - }, - { - "comment": "The resource for which we are demanding a credential.", - "name": "url", - "type": "const char *" - }, - { - "comment": "The username that was embedded in a \"user@host\" remote url, or NULL if not included.", - "name": "user_from_url", - "type": "const char *" - }, - { - "comment": "A bitmask stating which cred types are OK to return.", - "name": "allowed_types", - "type": "unsigned int" - }, - { - "comment": "The payload provided when specifying this callback. (This is interpreted as a `git_cred_userpass_payload*`.)", - "name": "payload", - "type": "void *" - } - ], - "comments": "", - "description": "

Stock callback usable as a git_cred_acquire_cb. This calls\ngit_cred_userpass_plaintext_new unless the protocol has not specified\nGIT_CREDTYPE_USERPASS_PLAINTEXT as an allowed type.

\n", - "file": "cred_helpers.h", - "group": "cred", - "line": 43, - "lineto": 48, - "return": { - "type": "int" - }, - "sig": "git_cred **::const char *::const char *::unsigned int::void *", - "type": "function" - }, - "git_cred_userpass_plaintext_new": { - "argline": "git_cred **out,\n\tconst char *username,\n\tconst char *password", - "args": [ - { - "comment": "The newly created credential object.", - "name": "out", - "type": "git_cred **" - }, - { - "comment": "The username of the credential.", - "name": "username", - "type": "const char *" - }, - { - "comment": "The password of the credential.", - "name": "password", - "type": "const char *" - } - ], - "comments": "", - "description": "

Create a new plain-text username and password credential object.\nThe supplied credential parameter will be internally duplicated.

\n", - "file": "transport.h", - "group": "cred", - "line": 110, - "lineto": 113, - "return": { - "comment": "0 for success or an error code for failure", - "type": "int" - }, - "sig": "git_cred **::const char *::const char *", - "type": "function" - }, - "git_diff_blob_to_buffer": { - "argline": "const git_blob *old_blob,\n\tconst char *old_as_path,\n\tconst char *buffer,\n\tsize_t buffer_len,\n\tconst char *buffer_as_path,\n\tconst git_diff_options *options,\n\tgit_diff_file_cb file_cb,\n\tgit_diff_hunk_cb hunk_cb,\n\tgit_diff_line_cb line_cb,\n\tvoid *payload", - "args": [ - { - "comment": "Blob for old side of diff, or NULL for empty blob", - "name": "old_blob", - "type": "const git_blob *" - }, - { - "comment": "Treat old blob as if it had this filename; can be NULL", - "name": "old_as_path", - "type": "const char *" - }, - { - "comment": "Raw data for new side of diff, or NULL for empty", - "name": "buffer", - "type": "const char *" - }, - { - "comment": "Length of raw data for new side of diff", - "name": "buffer_len", - "type": "size_t" - }, - { - "comment": "Treat buffer as if it had this filename; can be NULL", - "name": "buffer_as_path", - "type": "const char *" - }, - { - "comment": "Options for diff, or NULL for default options", - "name": "options", - "type": "const git_diff_options *" - }, - { - "comment": "Callback for \"file\"; made once if there is a diff; can be NULL", - "name": "file_cb", - "type": "git_diff_file_cb" - }, - { - "comment": "Callback for each hunk in diff; can be NULL", - "name": "hunk_cb", - "type": "git_diff_hunk_cb" - }, - { - "comment": "Callback for each line in diff; can be NULL", - "name": "line_cb", - "type": "git_diff_line_cb" - }, - { - "comment": "Payload passed to each callback function", - "name": "payload", - "type": "void *" - } - ], - "comments": "

As with git_diff_blobs, comparing a blob and buffer lacks some context,\nso the git_diff_file parameters to the callbacks will be faked a la the\nrules for git_diff_blobs().

\n\n

Passing NULL for old_blob will be treated as an empty blob (i.e. the\nfile_cb will be invoked with GIT_DELTA_ADDED and the diff will be the\nentire content of the buffer added). Passing NULL to the buffer will do\nthe reverse, with GIT_DELTA_REMOVED and blob content removed.

\n", - "description": "

Directly run a diff between a blob and a buffer.

\n", - "file": "diff.h", - "group": "diff", - "line": 967, - "lineto": 980, - "return": { - "comment": "0 on success, GIT_EUSER on non-zero callback return, or error code", - "type": "int" - }, - "sig": "const git_blob *::const char *::const char *::size_t::const char *::const git_diff_options *::git_diff_file_cb::git_diff_hunk_cb::git_diff_line_cb::void *", - "type": "function" - }, - "git_diff_blobs": { - "argline": "const git_blob *old_blob,\n\tconst char *old_as_path,\n\tconst git_blob *new_blob,\n\tconst char *new_as_path,\n\tconst git_diff_options *options,\n\tgit_diff_file_cb file_cb,\n\tgit_diff_hunk_cb hunk_cb,\n\tgit_diff_line_cb line_cb,\n\tvoid *payload", - "args": [ - { - "comment": "Blob for old side of diff, or NULL for empty blob", - "name": "old_blob", - "type": "const git_blob *" - }, - { - "comment": "Treat old blob as if it had this filename; can be NULL", - "name": "old_as_path", - "type": "const char *" - }, - { - "comment": "Blob for new side of diff, or NULL for empty blob", - "name": "new_blob", - "type": "const git_blob *" - }, - { - "comment": "Treat new blob as if it had this filename; can be NULL", - "name": "new_as_path", - "type": "const char *" - }, - { - "comment": "Options for diff, or NULL for default options", - "name": "options", - "type": "const git_diff_options *" - }, - { - "comment": "Callback for \"file\"; made once if there is a diff; can be NULL", - "name": "file_cb", - "type": "git_diff_file_cb" - }, - { - "comment": "Callback for each hunk in diff; can be NULL", - "name": "hunk_cb", - "type": "git_diff_hunk_cb" - }, - { - "comment": "Callback for each line in diff; can be NULL", - "name": "line_cb", - "type": "git_diff_line_cb" - }, - { - "comment": "Payload passed to each callback function", - "name": "payload", - "type": "void *" - } - ], - "comments": "

Compared to a file, a blob lacks some contextual information. As such,\nthe git_diff_file given to the callback will have some fake data; i.e.\nmode will be 0 and path will be NULL.

\n\n

NULL is allowed for either old_blob or new_blob and will be treated\nas an empty blob, with the oid set to NULL in the git_diff_file data.\nPassing NULL for both blobs is a noop; no callbacks will be made at all.

\n\n

We do run a binary content check on the blob content and if either blob\nlooks like binary data, the git_diff_delta binary attribute will be set\nto 1 and no call to the hunk_cb nor line_cb will be made (unless you pass\nGIT_DIFF_FORCE_TEXT of course).

\n", - "description": "

Directly run a diff on two blobs.

\n", - "file": "diff.h", - "group": "diff", - "line": 932, - "lineto": 941, - "return": { - "comment": "0 on success, GIT_EUSER on non-zero callback return, or error code", - "type": "int" - }, - "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 *", - "type": "function" - }, - "git_diff_find_similar": { - "argline": "git_diff *diff,\n\tconst git_diff_find_options *options", - "args": [ - { - "comment": "diff to run detection algorithms on", - "name": "diff", - "type": "git_diff *" - }, - { - "comment": "Control how detection should be run, NULL for defaults", - "name": "options", - "type": "const git_diff_find_options *" - } - ], - "comments": "

This modifies a diff in place, replacing old entries that look\nlike renames or copies with new entries reflecting those changes.\nThis also will, if requested, break modified files into add/remove\npairs if the amount of change is above a threshold.

\n", - "description": "

Transform a diff marking file renames, copies, etc.

\n", - "examples": { - "diff.c": [ - "ex/v0.20.0/diff.html#git_diff_find_similar-7" - ] - }, - "file": "diff.h", - "group": "diff", - "line": 743, - "lineto": 745, - "return": { - "comment": "0 on success, -1 on failure", - "type": "int" - }, - "sig": "git_diff *::const git_diff_find_options *", - "type": "function" - }, - "git_diff_foreach": { - "argline": "git_diff *diff,\n\tgit_diff_file_cb file_cb,\n\tgit_diff_hunk_cb hunk_cb,\n\tgit_diff_line_cb line_cb,\n\tvoid *payload", - "args": [ - { - "comment": "A git_diff generated by one of the above functions.", - "name": "diff", - "type": "git_diff *" - }, - { - "comment": "Callback function to make per file in the diff.", - "name": "file_cb", - "type": "git_diff_file_cb" - }, - { - "comment": "Optional callback to make per hunk of text diff. This callback is called to describe a range of lines in the diff. It will not be issued for binary files.", - "name": "hunk_cb", - "type": "git_diff_hunk_cb" - }, - { - "comment": "Optional callback to make per line of diff text. This same callback will be made for context lines, added, and removed lines, and even for a deleted trailing newline.", - "name": "line_cb", - "type": "git_diff_line_cb" - }, - { - "comment": "Reference pointer that will be passed to your callbacks.", - "name": "payload", - "type": "void *" - } - ], - "comments": "

This will iterate through all of the files described in a diff. You\nshould provide a file callback to learn about each file.

\n\n

The "hunk" and "line" callbacks are optional, and the text diff of the\nfiles will only be calculated if they are not NULL. Of course, these\ncallbacks will not be invoked for binary files on the diff or for\nfiles whose only changed is a file mode change.

\n\n

Returning a non-zero value from any of the callbacks will terminate\nthe iteration and cause this return GIT_EUSER.

\n", - "description": "

Loop over all deltas in a diff issuing callbacks.

\n", - "file": "diff.h", - "group": "diff", - "line": 849, - "lineto": 854, - "return": { - "comment": "0 on success, GIT_EUSER on non-zero callback, or error code", - "type": "int" - }, - "sig": "git_diff *::git_diff_file_cb::git_diff_hunk_cb::git_diff_line_cb::void *", - "type": "function" - }, - "git_diff_free": { - "argline": "git_diff *diff", - "args": [ - { - "comment": "The previously created diff; cannot be used after free.", - "name": "diff", - "type": "git_diff *" - } - ], - "comments": "", - "description": "

Deallocate a diff.

\n", - "examples": { - "diff.c": [ - "ex/v0.20.0/diff.html#git_diff_free-1" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_diff_free-21", - "ex/v0.20.0/log.html#git_diff_free-22" - ] - }, - "file": "diff.h", - "group": "diff", - "line": 582, - "lineto": 582, - "return": { - "type": "void" - }, - "sig": "git_diff *", - "type": "function" - }, - "git_diff_get_delta": { - "argline": "const git_diff *diff, size_t idx", - "args": [ - { - "comment": "Diff list object", - "name": "diff", - "type": "const git_diff *" - }, - { - "comment": "Index into diff list", - "name": "idx", - "type": "size_t" - } - ], - "comments": "

The git_delta pointer points to internal data and you do not have\nto release it when you are done with it. It will go away when the\ngit_diff (or any associated git_patch) goes away.

\n\n

Note that the flags on the delta related to whether it has binary\ncontent or not may not be set if there are no attributes set for the\nfile and there has been no reason to load the file data at this point.\nFor now, if you need those flags to be up to date, your only option is\nto either use git_diff_foreach or create a git_patch.

\n", - "description": "

Return the diff delta for an entry in the diff list.

\n", - "file": "diff.h", - "group": "diff", - "line": 813, - "lineto": 814, - "return": { - "comment": "Pointer to git_diff_delta (or NULL if `idx` out of range)", - "type": "const git_diff_delta *" - }, - "sig": "const git_diff *::size_t", - "type": "function" - }, - "git_diff_index_to_workdir": { - "argline": "git_diff **diff,\n\tgit_repository *repo,\n\tgit_index *index,\n\tconst git_diff_options *opts", - "args": [ - { - "comment": "Output pointer to a git_diff pointer to be allocated.", - "name": "diff", - "type": "git_diff **" - }, - { - "comment": "The repository.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "The index to diff from; repo index used if NULL.", - "name": "index", - "type": "git_index *" - }, - { - "comment": "Structure with options to influence diff or NULL for defaults.", - "name": "opts", - "type": "const git_diff_options *" - } - ], - "comments": "

This matches the git diff command. See the note below on\ngit_diff_tree_to_workdir for a discussion of the difference between\ngit diff and git diff HEAD and how to emulate a git diff <treeish>\nusing libgit2.

\n\n

The index will be used for the "old_file" side of the delta, and the\nworking directory will be used for the "new_file" side of the delta.

\n\n

If you pass NULL for the index, then the existing index of the repo\nwill be used. In this case, the index will be refreshed from disk\n(if it has changed) before the diff is generated.

\n", - "description": "

Create a diff between the repository index and the workdir directory.

\n", - "examples": { - "diff.c": [ - "ex/v0.20.0/diff.html#git_diff_index_to_workdir-5" - ] - }, - "file": "diff.h", - "group": "diff", - "line": 653, - "lineto": 657, - "return": { - "type": "int" - }, - "sig": "git_diff **::git_repository *::git_index *::const git_diff_options *", - "type": "function" - }, - "git_diff_is_sorted_icase": { - "argline": "const git_diff *diff", - "args": [ - { - "comment": "diff to check", - "name": "diff", - "type": "const git_diff *" - } - ], - "comments": "", - "description": "

Check if deltas are sorted case sensitively or insensitively.

\n", - "file": "diff.h", - "group": "diff", - "line": 822, - "lineto": 822, - "return": { - "comment": "0 if case sensitive, 1 if case is ignored", - "type": "int" - }, - "sig": "const git_diff *", - "type": "function" - }, - "git_diff_merge": { - "argline": "git_diff *onto,\n\tconst git_diff *from", - "args": [ - { - "comment": "Diff to merge into.", - "name": "onto", - "type": "git_diff *" - }, - { - "comment": "Diff to merge.", - "name": "from", - "type": "const git_diff *" - } - ], - "comments": "

This merges items from the "from" list into the "onto" list. The\nresulting diff will have all items that appear in either list.\nIf an item appears in both lists, then it will be "merged" to appear\nas if the old version was from the "onto" list and the new version\nis from the "from" list (with the exception that if the item has a\npending DELETE in the middle, then it will show as deleted).

\n", - "description": "

Merge one diff into another.

\n", - "file": "diff.h", - "group": "diff", - "line": 727, - "lineto": 729, - "return": { - "type": "int" - }, - "sig": "git_diff *::const git_diff *", - "type": "function" - }, - "git_diff_num_deltas": { - "argline": "const git_diff *diff", - "args": [ - { - "comment": "A git_diff generated by one of the above functions", - "name": "diff", - "type": "const git_diff *" - } - ], - "comments": "", - "description": "

Query how many diff records are there in a diff.

\n", - "examples": { - "log.c": [ - "ex/v0.20.0/log.html#git_diff_num_deltas-25" - ] - }, - "file": "diff.h", - "group": "diff", - "line": 780, - "lineto": 780, - "return": { - "comment": "Count of number of deltas in the list", - "type": "size_t" - }, - "sig": "const git_diff *", - "type": "function" - }, - "git_diff_num_deltas_of_type": { - "argline": "const git_diff *diff, git_delta_t type", - "args": [ - { - "comment": "A git_diff generated by one of the above functions", - "name": "diff", - "type": "const git_diff *" - }, - { - "comment": "A git_delta_t value to filter the count", - "name": "type", - "type": "git_delta_t" - } - ], - "comments": "

This works just like git_diff_entrycount() with an extra parameter\nthat is a git_delta_t and returns just the count of how many deltas\nmatch that particular type.

\n", - "description": "

Query how many diff deltas are there in a diff filtered by type.

\n", - "file": "diff.h", - "group": "diff", - "line": 793, - "lineto": 794, - "return": { - "comment": "Count of number of deltas matching delta_t type", - "type": "size_t" - }, - "sig": "const git_diff *::git_delta_t", - "type": "function" - }, - "git_diff_options_init": { - "argline": "git_diff_options *options,\n\tunsigned int version", - "args": [ - { - "comment": "Pointer to git_diff_options memory to be initialized", - "name": "options", - "type": "git_diff_options *" - }, - { - "comment": "Should be `GIT_DIFF_OPTIONS_VERSION`", - "name": "version", - "type": "unsigned int" - } - ], - "comments": "

In most cases, you can probably just use GIT_DIFF_OPTIONS_INIT to\ninitialize the diff options structure, but in some cases that is not\ngoing to work. You can call this function instead. Note that you\nmust pass both a pointer to the structure to be initialized and the\nGIT_DIFF_OPTIONS_VERSION value from the header you compiled with.

\n", - "description": "

Initialize diff options structure

\n", - "file": "diff.h", - "group": "diff", - "line": 760, - "lineto": 762, - "return": { - "comment": "0 on success, negative on failure (such as unsupported version)", - "type": "int" - }, - "sig": "git_diff_options *::unsigned int", - "type": "function" - }, - "git_diff_print": { - "argline": "git_diff *diff,\n\tgit_diff_format_t format,\n\tgit_diff_line_cb print_cb,\n\tvoid *payload", - "args": [ - { - "comment": "A git_diff generated by one of the above functions.", - "name": "diff", - "type": "git_diff *" - }, - { - "comment": "A git_diff_format_t value to pick the text format.", - "name": "format", - "type": "git_diff_format_t" - }, - { - "comment": "Callback to make per line of diff text.", - "name": "print_cb", - "type": "git_diff_line_cb" - }, - { - "comment": "Reference pointer that will be passed to your callback.", - "name": "payload", - "type": "void *" - } - ], - "comments": "

Returning a non-zero value from the callbacks will terminate the\niteration and cause this return GIT_EUSER.

\n", - "description": "

Iterate over a diff generating formatted text output.

\n", - "examples": { - "diff.c": [ - "ex/v0.20.0/diff.html#git_diff_print-8" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_diff_print-26" - ] - }, - "file": "diff.h", - "group": "diff", - "line": 892, - "lineto": 896, - "return": { - "comment": "0 on success, GIT_EUSER on non-zero callback, or error code", - "type": "int" - }, - "sig": "git_diff *::git_diff_format_t::git_diff_line_cb::void *", - "type": "function" - }, - "git_diff_status_char": { - "argline": "git_delta_t status", - "args": [ - { - "comment": "The git_delta_t value to look up", - "name": "status", - "type": "git_delta_t" - } - ], - "comments": "

When you run git diff --name-status it uses single letter codes in\nthe output such as 'A' for added, 'D' for deleted, 'M' for modified,\netc. This function converts a git_delta_t value into these letters for\nyour own purposes. GIT_DELTA_UNTRACKED will return a space (i.e. ' ').

\n", - "description": "

Look up the single character abbreviation for a delta status code.

\n", - "file": "diff.h", - "group": "diff", - "line": 867, - "lineto": 867, - "return": { - "comment": "The single character label for that code", - "type": "char" - }, - "sig": "git_delta_t", - "type": "function" - }, - "git_diff_tree_to_index": { - "argline": "git_diff **diff,\n\tgit_repository *repo,\n\tgit_tree *old_tree,\n\tgit_index *index,\n\tconst git_diff_options *opts", - "args": [ - { - "comment": "Output pointer to a git_diff pointer to be allocated.", - "name": "diff", - "type": "git_diff **" - }, - { - "comment": "The repository containing the tree and index.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "A git_tree object to diff from, or NULL for empty tree.", - "name": "old_tree", - "type": "git_tree *" - }, - { - "comment": "The index to diff with; repo index used if NULL.", - "name": "index", - "type": "git_index *" - }, - { - "comment": "Structure with options to influence diff or NULL for defaults.", - "name": "opts", - "type": "const git_diff_options *" - } - ], - "comments": "

This is equivalent to git diff --cached <treeish> or if you pass\nthe HEAD tree, then like git diff --cached.

\n\n

The tree you pass will be used for the "old_file" side of the delta, and\nthe index will be used for the "new_file" side of the delta.

\n\n

If you pass NULL for the index, then the existing index of the repo\nwill be used. In this case, the index will be refreshed from disk\n(if it has changed) before the diff is generated.

\n", - "description": "

Create a diff between a tree and repository index.

\n", - "examples": { - "diff.c": [ - "ex/v0.20.0/diff.html#git_diff_tree_to_index-3", - "ex/v0.20.0/diff.html#git_diff_tree_to_index-4" - ] - }, - "file": "diff.h", - "group": "diff", - "line": 626, - "lineto": 631, - "return": { - "type": "int" - }, - "sig": "git_diff **::git_repository *::git_tree *::git_index *::const git_diff_options *", - "type": "function" - }, - "git_diff_tree_to_tree": { - "argline": "git_diff **diff,\n\tgit_repository *repo,\n\tgit_tree *old_tree,\n\tgit_tree *new_tree,\n\tconst git_diff_options *opts", - "args": [ - { - "comment": "Output pointer to a git_diff pointer to be allocated.", - "name": "diff", - "type": "git_diff **" - }, - { - "comment": "The repository containing the trees.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "A git_tree object to diff from, or NULL for empty tree.", - "name": "old_tree", - "type": "git_tree *" - }, - { - "comment": "A git_tree object to diff to, or NULL for empty tree.", - "name": "new_tree", - "type": "git_tree *" - }, - { - "comment": "Structure with options to influence diff or NULL for defaults.", - "name": "opts", - "type": "const git_diff_options *" - } - ], - "comments": "

This is equivalent to git diff <old-tree> <new-tree>

\n\n

The first tree will be used for the "old_file" side of the delta and the\nsecond tree will be used for the "new_file" side of the delta. You can\npass NULL to indicate an empty tree, although it is an error to pass\nNULL for both the old_tree and new_tree.

\n", - "description": "

Create a diff with the difference between two tree objects.

\n", - "examples": { - "diff.c": [ - "ex/v0.20.0/diff.html#git_diff_tree_to_tree-2" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_diff_tree_to_tree-23", - "ex/v0.20.0/log.html#git_diff_tree_to_tree-24" - ] - }, - "file": "diff.h", - "group": "diff", - "line": 600, - "lineto": 605, - "return": { - "type": "int" - }, - "sig": "git_diff **::git_repository *::git_tree *::git_tree *::const git_diff_options *", - "type": "function" - }, - "git_diff_tree_to_workdir": { - "argline": "git_diff **diff,\n\tgit_repository *repo,\n\tgit_tree *old_tree,\n\tconst git_diff_options *opts", - "args": [ - { - "comment": "A pointer to a git_diff pointer that will be allocated.", - "name": "diff", - "type": "git_diff **" - }, - { - "comment": "The repository containing the tree.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "A git_tree object to diff from, or NULL for empty tree.", - "name": "old_tree", - "type": "git_tree *" - }, - { - "comment": "Structure with options to influence diff or NULL for defaults.", - "name": "opts", - "type": "const git_diff_options *" - } - ], - "comments": "

The tree you provide will be used for the "old_file" side of the delta,\nand the working directory will be used for the "new_file" side.

\n\n

Please note: this is NOT the same as git diff <treeish>. Running\ngit diff HEAD or the like actually uses information from the index,\nalong with the tree and working directory info.

\n\n

This function returns strictly the differences between the tree and the\nfiles contained in the working directory, regardless of the state of\nfiles in the index. It may come as a surprise, but there is no direct\nequivalent in core git.

\n\n

To emulate git diff <tree>, use git_diff_tree_to_workdir_with_index\n(or git_diff_tree_to_index and git_diff_index_to_workdir, then call\ngit_diff_merge on the results). That will yield a git_diff that\nmatches the git output.

\n\n

If this seems confusing, take the case of a file with a staged deletion\nwhere the file has then been put back into the working dir and modified.\nThe tree-to-workdir diff for that file is 'modified', but core git would\nshow status 'deleted' since there is a pending deletion in the index.

\n", - "description": "

Create a diff between a tree and the working directory.

\n", - "file": "diff.h", - "group": "diff", - "line": 689, - "lineto": 693, - "return": { - "type": "int" - }, - "sig": "git_diff **::git_repository *::git_tree *::const git_diff_options *", - "type": "function" - }, - "git_diff_tree_to_workdir_with_index": { - "argline": "git_diff **diff,\n\tgit_repository *repo,\n\tgit_tree *old_tree,\n\tconst git_diff_options *opts", - "args": [ - { - "comment": "A pointer to a git_diff pointer that will be allocated.", - "name": "diff", - "type": "git_diff **" - }, - { - "comment": "The repository containing the tree.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "A git_tree object to diff from, or NULL for empty tree.", - "name": "old_tree", - "type": "git_tree *" - }, - { - "comment": "Structure with options to influence diff or NULL for defaults.", - "name": "opts", - "type": "const git_diff_options *" - } - ], - "comments": "

This emulates git diff <tree> by diffing the tree to the index and\nthe index to the working directory and blending the results into a\nsingle diff that includes staged deleted, etc.

\n", - "description": "

Create a diff between a tree and the working directory using index data\nto account for staged deletes, tracked files, etc.

\n", - "examples": { - "diff.c": [ - "ex/v0.20.0/diff.html#git_diff_tree_to_workdir_with_index-6" - ] - }, - "file": "diff.h", - "group": "diff", - "line": 708, - "lineto": 712, - "return": { - "type": "int" - }, - "sig": "git_diff **::git_repository *::git_tree *::const git_diff_options *", - "type": "function" - }, - "git_filter_list_apply_to_blob": { - "argline": "git_buf *out,\n\tgit_filter_list *filters,\n\tgit_blob *blob", - "args": [ - { - "name": "out", - "type": "git_buf *" - }, - { - "name": "filters", - "type": "git_filter_list *" - }, - { - "name": "blob", - "type": "git_blob *" - } - ], - "comments": "", - "description": "

Apply filter list to the contents of a blob

\n", - "file": "filter.h", - "group": "filter", - "line": 125, - "lineto": 128, - "return": { - "type": "int" - }, - "sig": "git_buf *::git_filter_list *::git_blob *", - "type": "function" - }, - "git_filter_list_apply_to_data": { - "argline": "git_buf *out,\n\tgit_filter_list *filters,\n\tgit_buf *in", - "args": [ - { - "comment": "Buffer to store the result of the filtering", - "name": "out", - "type": "git_buf *" - }, - { - "comment": "A loaded git_filter_list (or NULL)", - "name": "filters", - "type": "git_filter_list *" - }, - { - "comment": "Buffer containing the data to filter", - "name": "in", - "type": "git_buf *" - } - ], - "comments": "

See git2/buffer.h for background on git_buf objects.

\n\n

If the in buffer holds data allocated by libgit2 (i.e. in->asize is\nnot zero), then it will be overwritten when applying the filters. If\nnot, then it will be left untouched.

\n\n

If there are no filters to apply (or filters is NULL), then the out\nbuffer will reference the in buffer data (with asize set to zero)\ninstead of allocating data. This keeps allocations to a minimum, but\nit means you have to be careful about freeing the in data since out\nmay be pointing to it!

\n", - "description": "

Apply filter list to a data buffer.

\n", - "file": "filter.h", - "group": "filter", - "line": 108, - "lineto": 111, - "return": { - "comment": "0 on success, an error code otherwise", - "type": "int" - }, - "sig": "git_buf *::git_filter_list *::git_buf *", - "type": "function" - }, - "git_filter_list_apply_to_file": { - "argline": "git_buf *out,\n\tgit_filter_list *filters,\n\tgit_repository *repo,\n\tconst char *path", - "args": [ - { - "name": "out", - "type": "git_buf *" - }, - { - "name": "filters", - "type": "git_filter_list *" - }, - { - "name": "repo", - "type": "git_repository *" - }, - { - "name": "path", - "type": "const char *" - } - ], - "comments": "", - "description": "

Apply filter list to the contents of a file on disk

\n", - "file": "filter.h", - "group": "filter", - "line": 116, - "lineto": 120, - "return": { - "type": "int" - }, - "sig": "git_buf *::git_filter_list *::git_repository *::const char *", - "type": "function" - }, - "git_filter_list_free": { - "argline": "git_filter_list *filters", - "args": [ - { - "comment": "A git_filter_list created by `git_filter_list_load`", - "name": "filters", - "type": "git_filter_list *" - } - ], - "comments": "", - "description": "

Free a git_filter_list

\n", - "file": "filter.h", - "group": "filter", - "line": 135, - "lineto": 138, - "return": { - "type": "void" - }, - "sig": "git_filter_list *", - "type": "function" - }, - "git_filter_list_length": { - "argline": "const git_filter_list *fl", - "args": [ - { - "comment": "A filter list", - "name": "fl", - "type": "const git_filter_list *" - } - ], - "comments": "

We will attempt to apply all of these filters to any data passed in,\nbut note that the filter apply action still has the option of skipping\ndata that is passed in (for example, the CRLF filter will skip data\nthat appears to be binary).

\n", - "description": "

Look up how many filters are in the list

\n", - "file": "sys/filter.h", - "group": "filter", - "line": 87, - "lineto": 87, - "return": { - "comment": "The number of filters in the list", - "type": "size_t" - }, - "sig": "const git_filter_list *", - "type": "function" - }, - "git_filter_list_load": { - "argline": "git_filter_list **filters,\n\tgit_repository *repo,\n\tgit_blob *blob, \n\tconst char *path,\n\tgit_filter_mode_t mode", - "args": [ - { - "comment": "Output newly created git_filter_list (or NULL)", - "name": "filters", - "type": "git_filter_list **" - }, - { - "comment": "Repository object that contains `path`", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "The blob to which the filter will be applied (if known)", - "name": "blob", - "type": "git_blob *" - }, - { - "comment": "Relative path of the file to be filtered", - "name": "path", - "type": "const char *" - }, - { - "comment": "Filtering direction (WT->ODB or ODB->WT)", - "name": "mode", - "type": "git_filter_mode_t" - } - ], - "comments": "

This will return 0 (success) but set the output git_filter_list to NULL\nif no filters are requested for the given file.

\n", - "description": "

Load the filter list for a given path.

\n", - "file": "filter.h", - "group": "filter", - "line": 81, - "lineto": 86, - "return": { - "comment": "0 on success (which could still return NULL if no filters are needed for the requested file), <0 on error", - "type": "int" - }, - "sig": "git_filter_list **::git_repository *::git_blob *::const char *::git_filter_mode_t", - "type": "function" - }, - "git_filter_list_new": { - "argline": "git_filter_list **out, git_repository *repo, git_filter_mode_t mode", - "args": [ - { - "name": "out", - "type": "git_filter_list **" - }, - { - "name": "repo", - "type": "git_repository *" - }, - { - "name": "mode", - "type": "git_filter_mode_t" - } - ], - "comments": "

Normally you won't use this because git_filter_list_load will create\nthe filter list for you, but you can use this in combination with the\ngit_filter_lookup and git_filter_list_push functions to assemble\nyour own chains of filters.

\n", - "description": "

Create a new empty filter list

\n", - "file": "sys/filter.h", - "group": "filter", - "line": 57, - "lineto": 58, - "return": { - "type": "int" - }, - "sig": "git_filter_list **::git_repository *::git_filter_mode_t", - "type": "function" - }, - "git_filter_list_push": { - "argline": "git_filter_list *fl, git_filter *filter, void *payload", - "args": [ - { - "name": "fl", - "type": "git_filter_list *" - }, - { - "name": "filter", - "type": "git_filter *" - }, - { - "name": "payload", - "type": "void *" - } - ], - "comments": "

Normally you won't have to do this because the filter list is created\nby calling the "check" function on registered filters when the filter\nattributes are set, but this does allow more direct manipulation of\nfilter lists when desired.

\n\n

Note that normally the "check" function can set up a payload for the\nfilter. Using this function, you can either pass in a payload if you\nknow the expected payload format, or you can pass NULL. Some filters\nmay fail with a NULL payload. Good luck!

\n", - "description": "

Add a filter to a filter list with the given payload.

\n", - "file": "sys/filter.h", - "group": "filter", - "line": 73, - "lineto": 74, - "return": { - "type": "int" - }, - "sig": "git_filter_list *::git_filter *::void *", - "type": "function" - }, - "git_filter_lookup": { - "argline": "const char *name", - "args": [ - { - "comment": "The name of the filter", - "name": "name", - "type": "const char *" - } - ], - "comments": "", - "description": "

Look up a filter by name

\n", - "file": "sys/filter.h", - "group": "filter", - "line": 27, - "lineto": 30, - "return": { - "comment": "Pointer to the filter object or NULL if not found", - "type": "git_filter *" - }, - "sig": "const char *", - "type": "function" - }, - "git_filter_register": { - "argline": "const char *name, git_filter *filter, int priority", - "args": [ - { - "comment": "A name by which the filter can be referenced. Attempting to register with an in-use name will return GIT_EEXISTS.", - "name": "name", - "type": "const char *" - }, - { - "comment": "The filter definition. This pointer will be stored as is by libgit2 so it must be a durable allocation (either static or on the heap).", - "name": "filter", - "type": "git_filter *" - }, - { - "comment": "The priority for filter application", - "name": "priority", - "type": "int" - } - ], - "comments": "

As mentioned elsewhere, the initialize callback will not be invoked\nimmediately. It is deferred until the filter is used in some way.

\n\n

A filter's attribute checks and check and apply callbacks will be\nissued in order of priority on smudge (to workdir), and in reverse\norder of priority on clean (to odb).

\n\n

Two filters are preregistered with libgit2:\n- GIT_FILTER_CRLF with priority 0\n- GIT_FILTER_IDENT with priority 100

\n\n

Currently the filter registry is not thread safe, so any registering or\nderegistering of filters must be done outside of any possible usage of\nthe filters (i.e. during application setup or shutdown).

\n", - "description": "

Register a filter under a given name with a given priority.

\n", - "file": "sys/filter.h", - "group": "filter", - "line": 272, - "lineto": 273, - "return": { - "comment": "0 on successful registry, error code <0 on failure", - "type": "int" - }, - "sig": "const char *::git_filter *::int", - "type": "function" - }, - "git_filter_source_filemode": { - "argline": "const git_filter_source *src", - "args": [ - { - "name": "src", - "type": "const git_filter_source *" - } - ], - "comments": "", - "description": "

Get the file mode of the source file\nIf the mode is unknown, this will return 0

\n", - "file": "sys/filter.h", - "group": "filter", - "line": 108, - "lineto": 108, - "return": { - "type": "uint16_t" - }, - "sig": "const git_filter_source *", - "type": "function" - }, - "git_filter_source_id": { - "argline": "const git_filter_source *src", - "args": [ - { - "name": "src", - "type": "const git_filter_source *" - } - ], - "comments": "", - "description": "

Get the OID of the source\nIf the OID is unknown (often the case with GIT_FILTER_CLEAN) then\nthis will return NULL.

\n", - "file": "sys/filter.h", - "group": "filter", - "line": 115, - "lineto": 115, - "return": { - "type": "const git_oid *" - }, - "sig": "const git_filter_source *", - "type": "function" - }, - "git_filter_source_mode": { - "argline": "const git_filter_source *src", - "args": [ - { - "name": "src", - "type": "const git_filter_source *" - } - ], - "comments": "", - "description": "

Get the git_filter_mode_t to be applied

\n", - "file": "sys/filter.h", - "group": "filter", - "line": 120, - "lineto": 131, - "return": { - "type": "git_filter_mode_t" - }, - "sig": "const git_filter_source *", - "type": "function" - }, - "git_filter_source_path": { - "argline": "const git_filter_source *src", - "args": [ - { - "name": "src", - "type": "const git_filter_source *" - } - ], - "comments": "", - "description": "

Get the path that the source data is coming from.

\n", - "file": "sys/filter.h", - "group": "filter", - "line": 102, - "lineto": 102, - "return": { - "type": "const char *" - }, - "sig": "const git_filter_source *", - "type": "function" - }, - "git_filter_source_repo": { - "argline": "const git_filter_source *src", - "args": [ - { - "name": "src", - "type": "const git_filter_source *" - } - ], - "comments": "", - "description": "

Get the repository that the source data is coming from.

\n", - "file": "sys/filter.h", - "group": "filter", - "line": 97, - "lineto": 97, - "return": { - "type": "git_repository *" - }, - "sig": "const git_filter_source *", - "type": "function" - }, - "git_filter_unregister": { - "argline": "const char *name", - "args": [ - { - "comment": "The name under which the filter was registered", - "name": "name", - "type": "const char *" - } - ], - "comments": "

Attempting to remove the builtin libgit2 filters is not permitted and\nwill return an error.

\n\n

Currently the filter registry is not thread safe, so any registering or\nderegistering of filters must be done outside of any possible usage of\nthe filters (i.e. during application setup or shutdown).

\n", - "description": "

Remove the filter with the given name

\n", - "file": "sys/filter.h", - "group": "filter", - "line": 288, - "lineto": 288, - "return": { - "comment": "0 on success, error code <0 on failure", - "type": "int" - }, - "sig": "const char *", - "type": "function" - }, - "git_graph_ahead_behind": { - "argline": "size_t *ahead, size_t *behind, git_repository *repo, const git_oid *local, const git_oid *upstream", - "args": [ - { - "comment": "number of unique from commits in `upstream`", - "name": "ahead", - "type": "size_t *" - }, - { - "comment": "number of unique from commits in `local`", - "name": "behind", - "type": "size_t *" - }, - { - "comment": "the repository where the commits exist", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "the commit for local", - "name": "local", - "type": "const git_oid *" - }, - { - "comment": "the commit for upstream", - "name": "upstream", - "type": "const git_oid *" - } - ], - "comments": "

There is no need for branches containing the commits to have any\nupstream relationship, but it helps to think of one as a branch and\nthe other as its upstream, the ahead and behind values will be\nwhat git would report for the branches.

\n", - "description": "

Count the number of unique commits between two commit objects

\n", - "file": "graph.h", - "group": "graph", - "line": 37, - "lineto": 37, - "return": { - "type": "int" - }, - "sig": "size_t *::size_t *::git_repository *::const git_oid *::const git_oid *", - "type": "function" - }, - "git_ignore_add_rule": { - "argline": "git_repository *repo,\n\tconst char *rules", - "args": [ - { - "comment": "The repository to add ignore rules to.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "Text of rules, a la the contents of a .gitignore file. It is okay to have multiple rules in the text; if so, each rule should be terminated with a newline.", - "name": "rules", - "type": "const char *" - } - ], - "comments": "

Excludesfile rules (i.e. .gitignore rules) are generally read from\n.gitignore files in the repository tree or from a shared system file\nonly if a "core.excludesfile" config value is set. The library also\nkeeps a set of per-repository internal ignores that can be configured\nin-memory and will not persist. This function allows you to add to\nthat internal rules list.

\n\n

Example usage:

\n\n
error = git_ignore_add_rule(myrepo, "*.c\\ndir/\\nFile with space\\n");\n
\n\n

This would add three rules to the ignores.

\n", - "description": "

Add ignore rules for a repository.

\n", - "file": "ignore.h", - "group": "ignore", - "line": 37, - "lineto": 39, - "return": { - "comment": "0 on success", - "type": "int" - }, - "sig": "git_repository *::const char *", - "type": "function" - }, - "git_ignore_clear_internal_rules": { - "argline": "git_repository *repo", - "args": [ - { - "comment": "The repository to remove ignore rules from.", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

Resets to the default internal ignore rules. This will not turn off\nrules in .gitignore files that actually exist in the filesystem.

\n\n

The default internal ignores ignore ".", ".." and ".git" entries.

\n", - "description": "

Clear ignore rules that were explicitly added.

\n", - "file": "ignore.h", - "group": "ignore", - "line": 52, - "lineto": 53, - "return": { - "comment": "0 on success", - "type": "int" - }, - "sig": "git_repository *", - "type": "function" - }, - "git_ignore_path_is_ignored": { - "argline": "int *ignored,\n\tgit_repository *repo,\n\tconst char *path", - "args": [ - { - "comment": "boolean returning 0 if the file is not ignored, 1 if it is", - "name": "ignored", - "type": "int *" - }, - { - "comment": "a repository object", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "the file to check ignores for, relative to the repo's workdir.", - "name": "path", - "type": "const char *" - } - ], - "comments": "

This function checks the ignore rules to see if they would apply to the\ngiven file. This indicates if the file would be ignored regardless of\nwhether the file is already in the index or committed to the repository.

\n\n

One way to think of this is if you were to do "git add ." on the\ndirectory containing the file, would it be added or not?

\n", - "description": "

Test if the ignore rules apply to a given path.

\n", - "file": "ignore.h", - "group": "ignore", - "line": 71, - "lineto": 78, - "return": { - "comment": "0 if ignore rules could be processed for the file (regardless of whether it exists or not), or an error < 0 if they could not.", - "type": "int" - }, - "sig": "int *::git_repository *::const char *", - "type": "function" - }, - "git_index_add": { - "argline": "git_index *index, const git_index_entry *source_entry", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - }, - { - "comment": "new entry object", - "name": "source_entry", - "type": "const git_index_entry *" - } - ], - "comments": "

If a previous index entry exists that has the same path and stage\nas the given 'source_entry', it will be replaced. Otherwise, the\n'source_entry' will be added.

\n\n

A full copy (including the 'path' string) of the given\n'source_entry' will be inserted on the index.

\n", - "description": "

Add or update an index entry from an in-memory struct

\n", - "file": "index.h", - "group": "index", - "line": 401, - "lineto": 401, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_index *::const git_index_entry *", - "type": "function" - }, - "git_index_add_all": { - "argline": "git_index *index,\n\tconst git_strarray *pathspec,\n\tunsigned int flags,\n\tgit_index_matched_path_cb callback,\n\tvoid *payload", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - }, - { - "comment": "array of path patterns", - "name": "pathspec", - "type": "const git_strarray *" - }, - { - "comment": "combination of git_index_add_option_t flags", - "name": "flags", - "type": "unsigned int" - }, - { - "comment": "notification callback for each added/updated path (also gets index of matching pathspec entry); can be NULL; return 0 to add, >0 to skip, <0 to abort scan.", - "name": "callback", - "type": "git_index_matched_path_cb" - }, - { - "comment": "payload passed through to callback function", - "name": "payload", - "type": "void *" - } - ], - "comments": "

This method will fail in bare index instances.

\n\n

The pathspec is a list of file names or shell glob patterns that will\nmatched against files in the repository's working directory. Each file\nthat matches will be added to the index (either updating an existing\nentry or adding a new entry). You can disable glob expansion and force\nexact matching with the GIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH flag.

\n\n

Files that are ignored will be skipped (unlike git_index_add_bypath).\nIf a file is already tracked in the index, then it will be updated\neven if it is ignored. Pass the GIT_INDEX_ADD_FORCE flag to\nskip the checking of ignore rules.

\n\n

To emulate git add -A and generate an error if the pathspec contains\nthe exact path of an ignored file (when not using FORCE), add the\nGIT_INDEX_ADD_CHECK_PATHSPEC flag. This checks that each entry\nin the pathspec that is an exact match to a filename on disk is\neither not ignored or already in the index. If this check fails, the\nfunction will return GIT_EINVALIDSPEC.

\n\n

To emulate git add -A with the "dry-run" option, just use a callback\nfunction that always returns a positive value. See below for details.

\n\n

If any files are currently the result of a merge conflict, those files\nwill no longer be marked as conflicting. The data about the conflicts\nwill be moved to the "resolve undo" (REUC) section.

\n\n

If you provide a callback function, it will be invoked on each matching\nitem in the working directory immediately before it is added to /\nupdated in the index. Returning zero will add the item to the index,\ngreater than zero will skip the item, and less than zero will abort the\nscan and cause GIT_EUSER to be returned.

\n", - "description": "

Add or update index entries matching files in the working directory.

\n", - "file": "index.h", - "group": "index", - "line": 507, - "lineto": 512, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_index *::const git_strarray *::unsigned int::git_index_matched_path_cb::void *", - "type": "function" - }, - "git_index_add_bypath": { - "argline": "git_index *index, const char *path", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - }, - { - "comment": "filename to add", - "name": "path", - "type": "const char *" - } - ], - "comments": "

The file path must be relative to the repository's\nworking folder and must be readable.

\n\n

This method will fail in bare index instances.

\n\n

This forces the file to be added to the index, not looking\nat gitignore rules. Those rules can be evaluated through\nthe git_status APIs (in status.h) before calling this.

\n\n

If this file currently is the result of a merge conflict, this\nfile will no longer be marked as conflicting. The data about\nthe conflict will be moved to the "resolve undo" (REUC) section.

\n", - "description": "

Add or update an index entry from a file on disk

\n", - "file": "index.h", - "group": "index", - "line": 444, - "lineto": 444, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_index *::const char *", - "type": "function" - }, - "git_index_caps": { - "argline": "const git_index *index", - "args": [ - { - "comment": "An existing index object", - "name": "index", - "type": "const git_index *" - } - ], - "comments": "", - "description": "

Read index capabilities flags.

\n", - "file": "index.h", - "group": "index", - "line": 209, - "lineto": 209, - "return": { - "comment": "A combination of GIT_INDEXCAP values", - "type": "unsigned int" - }, - "sig": "const git_index *", - "type": "function" - }, - "git_index_clear": { - "argline": "git_index *index", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - } - ], - "comments": "", - "description": "

Clear the contents (all the entries) of an index object.\nThis clears the index object in memory; changes must be manually\nwritten to disk for them to take effect.

\n", - "file": "index.h", - "group": "index", - "line": 335, - "lineto": 335, - "return": { - "type": "void" - }, - "sig": "git_index *", - "type": "function" - }, - "git_index_conflict_add": { - "argline": "git_index *index,\n\tconst git_index_entry *ancestor_entry,\n\tconst git_index_entry *our_entry,\n\tconst git_index_entry *their_entry", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - }, - { - "comment": "the entry data for the ancestor of the conflict", - "name": "ancestor_entry", - "type": "const git_index_entry *" - }, - { - "comment": "the entry data for our side of the merge conflict", - "name": "our_entry", - "type": "const git_index_entry *" - }, - { - "comment": "the entry data for their side of the merge conflict", - "name": "their_entry", - "type": "const git_index_entry *" - } - ], - "comments": "

The entries are the entries from the tree included in the merge. Any\nentry may be null to indicate that that file was not present in the\ntrees during the merge. For example, ancestor_entry may be NULL to\nindicate that a file was added in both branches and must be resolved.

\n", - "description": "

Add or update index entries to represent a conflict

\n", - "file": "index.h", - "group": "index", - "line": 598, - "lineto": 602, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_index *::const git_index_entry *::const git_index_entry *::const git_index_entry *", - "type": "function" - }, - "git_index_conflict_cleanup": { - "argline": "git_index *index", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - } - ], - "comments": "", - "description": "

Remove all conflicts in the index (entries with a stage greater than 0.)

\n", - "file": "index.h", - "group": "index", - "line": 637, - "lineto": 637, - "return": { - "type": "void" - }, - "sig": "git_index *", - "type": "function" - }, - "git_index_conflict_get": { - "argline": "const git_index_entry **ancestor_out,\n\tconst git_index_entry **our_out,\n\tconst git_index_entry **their_out,\n\tgit_index *index,\n\tconst char *path", - "args": [ - { - "comment": "Pointer to store the ancestor entry", - "name": "ancestor_out", - "type": "const git_index_entry **" - }, - { - "comment": "Pointer to store the our entry", - "name": "our_out", - "type": "const git_index_entry **" - }, - { - "comment": "Pointer to store the their entry", - "name": "their_out", - "type": "const git_index_entry **" - }, - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - }, - { - "comment": "path to search", - "name": "path", - "type": "const char *" - } - ], - "comments": "

The entries are not modifiable and should not be freed. Because the\ngit_index_entry struct is a publicly defined struct, you should\nbe able to make your own permanent copy of the data if necessary.

\n", - "description": "

Get the index entries that represent a conflict of a single file.

\n", - "file": "index.h", - "group": "index", - "line": 617, - "lineto": 622, - "return": { - "type": "int" - }, - "sig": "const git_index_entry **::const git_index_entry **::const git_index_entry **::git_index *::const char *", - "type": "function" - }, - "git_index_conflict_iterator_free": { - "argline": "git_index_conflict_iterator *iterator", - "args": [ - { - "comment": "pointer to the iterator", - "name": "iterator", - "type": "git_index_conflict_iterator *" - } - ], - "comments": "", - "description": "

Frees a git_index_conflict_iterator.

\n", - "file": "index.h", - "group": "index", - "line": 677, - "lineto": 678, - "return": { - "type": "void" - }, - "sig": "git_index_conflict_iterator *", - "type": "function" - }, - "git_index_conflict_iterator_new": { - "argline": "git_index_conflict_iterator **iterator_out,\n\tgit_index *index", - "args": [ - { - "name": "iterator_out", - "type": "git_index_conflict_iterator **" - }, - { - "name": "index", - "type": "git_index *" - } - ], - "comments": "", - "description": "

Create an iterator for the conflicts in the index. You may not modify the\nindex while iterating, the results are undefined.

\n", - "file": "index.h", - "group": "index", - "line": 652, - "lineto": 654, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_index_conflict_iterator **::git_index *", - "type": "function" - }, - "git_index_conflict_next": { - "argline": "const git_index_entry **ancestor_out,\n\tconst git_index_entry **our_out,\n\tconst git_index_entry **their_out,\n\tgit_index_conflict_iterator *iterator", - "args": [ - { - "comment": "Pointer to store the ancestor side of the conflict", - "name": "ancestor_out", - "type": "const git_index_entry **" - }, - { - "comment": "Pointer to store our side of the conflict", - "name": "our_out", - "type": "const git_index_entry **" - }, - { - "comment": "Pointer to store their side of the conflict", - "name": "their_out", - "type": "const git_index_entry **" - }, - { - "name": "iterator", - "type": "git_index_conflict_iterator *" - } - ], - "comments": "", - "description": "

Returns the current conflict (ancestor, ours and theirs entry) and\nadvance the iterator internally to the next value.

\n", - "file": "index.h", - "group": "index", - "line": 666, - "lineto": 670, - "return": { - "comment": "0 (no error), GIT_ITEROVER (iteration is done) or an error code (negative value)", - "type": "int" - }, - "sig": "const git_index_entry **::const git_index_entry **::const git_index_entry **::git_index_conflict_iterator *", - "type": "function" - }, - "git_index_conflict_remove": { - "argline": "git_index *index, const char *path", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - }, - { - "comment": "to search", - "name": "path", - "type": "const char *" - } - ], - "comments": "", - "description": "

Removes the index entries that represent a conflict of a single file.

\n", - "file": "index.h", - "group": "index", - "line": 630, - "lineto": 630, - "return": { - "type": "int" - }, - "sig": "git_index *::const char *", - "type": "function" - }, - "git_index_entry_stage": { - "argline": "const git_index_entry *entry", - "args": [ - { - "comment": "The entry", - "name": "entry", - "type": "const git_index_entry *" - } - ], - "comments": "

This entry is calculated from the entry's flag attribute like this:

\n\n

(entry->flags & GIT_IDXENTRY_STAGEMASK) >> GIT_IDXENTRY_STAGESHIFT

\n", - "description": "

Return the stage number from a git index entry

\n", - "file": "index.h", - "group": "index", - "line": 413, - "lineto": 413, - "return": { - "type": "int" - }, - "sig": "const git_index_entry *", - "type": "function" - }, - "git_index_entrycount": { - "argline": "const git_index *index", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "const git_index *" - } - ], - "comments": "", - "description": "

Get the count of entries currently in the index

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_index_entrycount-29" - ] - }, - "file": "index.h", - "group": "index", - "line": 326, - "lineto": 326, - "return": { - "comment": "integer of count of current entries", - "type": "size_t" - }, - "sig": "const git_index *", - "type": "function" - }, - "git_index_find": { - "argline": "size_t *at_pos, git_index *index, const char *path", - "args": [ - { - "comment": "the address to which the position of the index entry is written (optional)", - "name": "at_pos", - "type": "size_t *" - }, - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - }, - { - "comment": "path to search", - "name": "path", - "type": "const char *" - } - ], - "comments": "", - "description": "

Find the first position of any entries which point to given\npath in the Git index.

\n", - "file": "index.h", - "group": "index", - "line": 574, - "lineto": 574, - "return": { - "comment": "a zero-based position in the index if found; GIT_ENOTFOUND otherwise", - "type": "int" - }, - "sig": "size_t *::git_index *::const char *", - "type": "function" - }, - "git_index_free": { - "argline": "git_index *index", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - } - ], - "comments": "", - "description": "

Free an existing index object.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_index_free-28" - ], - "init.c": [ - "ex/v0.20.0/init.html#git_index_free-2" - ] - }, - "file": "index.h", - "group": "index", - "line": 193, - "lineto": 193, - "return": { - "type": "void" - }, - "sig": "git_index *", - "type": "function" - }, - "git_index_get_byindex": { - "argline": "git_index *index, size_t n", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - }, - { - "comment": "the position of the entry", - "name": "n", - "type": "size_t" - } - ], - "comments": "

The entry is not modifiable and should not be freed. Because the\ngit_index_entry struct is a publicly defined struct, you should\nbe able to make your own permanent copy of the data if necessary.

\n", - "description": "

Get a pointer to one of the entries in the index

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_index_get_byindex-30" - ] - }, - "file": "index.h", - "group": "index", - "line": 348, - "lineto": 349, - "return": { - "comment": "a pointer to the entry; NULL if out of bounds", - "type": "const git_index_entry *" - }, - "sig": "git_index *::size_t", - "type": "function" - }, - "git_index_get_bypath": { - "argline": "git_index *index, const char *path, int stage", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - }, - { - "comment": "path to search", - "name": "path", - "type": "const char *" - }, - { - "comment": "stage to search", - "name": "stage", - "type": "int" - } - ], - "comments": "

The entry is not modifiable and should not be freed. Because the\ngit_index_entry struct is a publicly defined struct, you should\nbe able to make your own permanent copy of the data if necessary.

\n", - "description": "

Get a pointer to one of the entries in the index

\n", - "file": "index.h", - "group": "index", - "line": 363, - "lineto": 364, - "return": { - "comment": "a pointer to the entry; NULL if it was not found", - "type": "const git_index_entry *" - }, - "sig": "git_index *::const char *::int", - "type": "function" - }, - "git_index_has_conflicts": { - "argline": "const git_index *index", - "args": [ - { - "name": "index", - "type": "const git_index *" - } - ], - "comments": "", - "description": "

Determine if the index contains entries representing file conflicts.

\n", - "file": "index.h", - "group": "index", - "line": 644, - "lineto": 644, - "return": { - "comment": "1 if at least one conflict is found, 0 otherwise.", - "type": "int" - }, - "sig": "const git_index *", - "type": "function" - }, - "git_index_name_add": { - "argline": "git_index *index,\n\tconst char *ancestor, const char *ours, const char *theirs", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - }, - { - "comment": "the path of the file as it existed in the ancestor", - "name": "ancestor", - "type": "const char *" - }, - { - "comment": "the path of the file as it existed in our tree", - "name": "ours", - "type": "const char *" - }, - { - "comment": "the path of the file as it existed in their tree", - "name": "theirs", - "type": "const char *" - } - ], - "comments": "", - "description": "

Record the filenames involved in a rename conflict.

\n", - "file": "sys/index.h", - "group": "index", - "line": 68, - "lineto": 69, - "return": { - "type": "int" - }, - "sig": "git_index *::const char *::const char *::const char *", - "type": "function" - }, - "git_index_name_clear": { - "argline": "git_index *index", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - } - ], - "comments": "", - "description": "

Remove all filename conflict entries.

\n", - "file": "sys/index.h", - "group": "index", - "line": 76, - "lineto": 76, - "return": { - "type": "void" - }, - "sig": "git_index *", - "type": "function" - }, - "git_index_name_entrycount": { - "argline": "git_index *index", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - } - ], - "comments": "", - "description": "

Get the count of filename conflict entries currently in the index.

\n", - "file": "sys/index.h", - "group": "index", - "line": 45, - "lineto": 45, - "return": { - "comment": "integer of count of current filename conflict entries", - "type": "unsigned int" - }, - "sig": "git_index *", - "type": "function" - }, - "git_index_name_get_byindex": { - "argline": "git_index *index, size_t n", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - }, - { - "comment": "the position of the entry", - "name": "n", - "type": "size_t" - } - ], - "comments": "

The returned entry is read-only and should not be modified\nor freed by the caller.

\n", - "description": "

Get a filename conflict entry from the index.

\n", - "file": "sys/index.h", - "group": "index", - "line": 57, - "lineto": 58, - "return": { - "comment": "a pointer to the filename conflict entry; NULL if out of bounds", - "type": "const git_index_name_entry *" - }, - "sig": "git_index *::size_t", - "type": "function" - }, - "git_index_new": { - "argline": "git_index **out", - "args": [ - { - "comment": "the pointer for the new index", - "name": "out", - "type": "git_index **" - } - ], - "comments": "

This index object cannot be read/written to the filesystem,\nbut may be used to perform in-memory index operations.

\n\n

The index must be freed once it's no longer in use.

\n", - "description": "

Create an in-memory index object.

\n", - "file": "index.h", - "group": "index", - "line": 186, - "lineto": 186, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_index **", - "type": "function" - }, - "git_index_open": { - "argline": "git_index **out, const char *index_path", - "args": [ - { - "comment": "the pointer for the new index", - "name": "out", - "type": "git_index **" - }, - { - "comment": "the path to the index file in disk", - "name": "index_path", - "type": "const char *" - } - ], - "comments": "

Since there is no ODB or working directory behind this index,\nany Index methods which rely on these (e.g. index_add) will\nfail with the GIT_EBAREINDEX error code.

\n\n

If you need to access the index of an actual repository,\nuse the git_repository_index wrapper.

\n\n

The index must be freed once it's no longer in use.

\n", - "description": "

Create a new bare Git index object as a memory representation\nof the Git index file in 'index_path', without a repository\nto back it.

\n", - "file": "index.h", - "group": "index", - "line": 173, - "lineto": 173, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_index **::const char *", - "type": "function" - }, - "git_index_owner": { - "argline": "const git_index *index", - "args": [ - { - "comment": "The index", - "name": "index", - "type": "const git_index *" - } - ], - "comments": "", - "description": "

Get the repository this index relates to

\n", - "file": "index.h", - "group": "index", - "line": 201, - "lineto": 201, - "return": { - "comment": "A pointer to the repository", - "type": "git_repository *" - }, - "sig": "const git_index *", - "type": "function" - }, - "git_index_path": { - "argline": "git_index *index", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - } - ], - "comments": "", - "description": "

Get the full path to the index file on disk.

\n", - "file": "index.h", - "group": "index", - "line": 258, - "lineto": 258, - "return": { - "comment": "path to index file or NULL for in-memory index", - "type": "const char *" - }, - "sig": "git_index *", - "type": "function" - }, - "git_index_read": { - "argline": "git_index *index, int force", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - }, - { - "comment": "if true, always reload, vs. only read if file has changed", - "name": "force", - "type": "int" - } - ], - "comments": "

If force is true, this performs a "hard" read that discards in-memory\nchanges and always reloads the on-disk index data. If there is no\non-disk version, the index will be cleared.

\n\n

If force is false, this does a "soft" read that reloads the index\ndata from disk only if it has changed since the last time it was\nloaded. Purely in-memory index data will be untouched. Be aware: if\nthere are changes on disk, unwritten in-memory changes are discarded.

\n", - "description": "

Update the contents of an existing index object in memory by reading\nfrom the hard disk.

\n", - "file": "index.h", - "group": "index", - "line": 241, - "lineto": 241, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_index *::int", - "type": "function" - }, - "git_index_read_tree": { - "argline": "git_index *index, const git_tree *tree", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - }, - { - "comment": "tree to read", - "name": "tree", - "type": "const git_tree *" - } - ], - "comments": "

The current index contents will be replaced by the specified tree.

\n", - "description": "

Read a tree into the index file with stats

\n", - "file": "index.h", - "group": "index", - "line": 269, - "lineto": 269, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_index *::const git_tree *", - "type": "function" - }, - "git_index_remove": { - "argline": "git_index *index, const char *path, int stage", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - }, - { - "comment": "path to search", - "name": "path", - "type": "const char *" - }, - { - "comment": "stage to search", - "name": "stage", - "type": "int" - } - ], - "comments": "", - "description": "

Remove an entry from the index

\n", - "file": "index.h", - "group": "index", - "line": 374, - "lineto": 374, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_index *::const char *::int", - "type": "function" - }, - "git_index_remove_all": { - "argline": "git_index *index,\n\tconst git_strarray *pathspec,\n\tgit_index_matched_path_cb callback,\n\tvoid *payload", - "args": [ - { - "comment": "An existing index object", - "name": "index", - "type": "git_index *" - }, - { - "comment": "array of path patterns", - "name": "pathspec", - "type": "const git_strarray *" - }, - { - "comment": "notification callback for each removed path (also gets index of matching pathspec entry); can be NULL; return 0 to add, >0 to skip, <0 to abort scan.", - "name": "callback", - "type": "git_index_matched_path_cb" - }, - { - "comment": "payload passed through to callback function", - "name": "payload", - "type": "void *" - } - ], - "comments": "

If you provide a callback function, it will be invoked on each matching\nitem in the index immediately before it is removed. Return 0 to\nremove the item, > 0 to skip the item, and < 0 to abort the scan.

\n", - "description": "

Remove all matching index entries.

\n", - "file": "index.h", - "group": "index", - "line": 529, - "lineto": 533, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_index *::const git_strarray *::git_index_matched_path_cb::void *", - "type": "function" - }, - "git_index_remove_bypath": { - "argline": "git_index *index, const char *path", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - }, - { - "comment": "filename to remove", - "name": "path", - "type": "const char *" - } - ], - "comments": "

The file path must be relative to the repository's\nworking folder. It may exist.

\n\n

If this file currently is the result of a merge conflict, this\nfile will no longer be marked as conflicting. The data about\nthe conflict will be moved to the "resolve undo" (REUC) section.

\n", - "description": "

Remove an index entry corresponding to a file on disk

\n", - "file": "index.h", - "group": "index", - "line": 460, - "lineto": 460, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_index *::const char *", - "type": "function" - }, - "git_index_remove_directory": { - "argline": "git_index *index, const char *dir, int stage", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - }, - { - "comment": "container directory path", - "name": "dir", - "type": "const char *" - }, - { - "comment": "stage to search", - "name": "stage", - "type": "int" - } - ], - "comments": "", - "description": "

Remove all entries from the index under a given directory

\n", - "file": "index.h", - "group": "index", - "line": 384, - "lineto": 385, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_index *::const char *::int", - "type": "function" - }, - "git_index_reuc_add": { - "argline": "git_index *index, const char *path,\n\tint ancestor_mode, const git_oid *ancestor_id,\n\tint our_mode, const git_oid *our_id,\n\tint their_mode, const git_oid *their_id", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - }, - { - "comment": "filename to add", - "name": "path", - "type": "const char *" - }, - { - "comment": "mode of the ancestor file", - "name": "ancestor_mode", - "type": "int" - }, - { - "comment": "oid of the ancestor file", - "name": "ancestor_id", - "type": "const git_oid *" - }, - { - "comment": "mode of our file", - "name": "our_mode", - "type": "int" - }, - { - "comment": "oid of our file", - "name": "our_id", - "type": "const git_oid *" - }, - { - "comment": "mode of their file", - "name": "their_mode", - "type": "int" - }, - { - "comment": "oid of their file", - "name": "their_id", - "type": "const git_oid *" - } - ], - "comments": "

The resolve undo entry contains the OIDs of files that were involved\nin a merge conflict after the conflict has been resolved. This allows\nconflicts to be re-resolved later.

\n\n

If there exists a resolve undo entry for the given path in the index,\nit will be removed.

\n\n

This method will fail in bare index instances.

\n", - "description": "

Adds a resolve undo entry for a file based on the given parameters.

\n", - "file": "sys/index.h", - "group": "index", - "line": 152, - "lineto": 155, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_index *::const char *::int::const git_oid *::int::const git_oid *::int::const git_oid *", - "type": "function" - }, - "git_index_reuc_clear": { - "argline": "git_index *index", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - } - ], - "comments": "", - "description": "

Remove all resolve undo entries from the index

\n", - "file": "sys/index.h", - "group": "index", - "line": 171, - "lineto": 171, - "return": { - "type": "void" - }, - "sig": "git_index *", - "type": "function" - }, - "git_index_reuc_entrycount": { - "argline": "git_index *index", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - } - ], - "comments": "", - "description": "

Get the count of resolve undo entries currently in the index.

\n", - "file": "sys/index.h", - "group": "index", - "line": 93, - "lineto": 93, - "return": { - "comment": "integer of count of current resolve undo entries", - "type": "unsigned int" - }, - "sig": "git_index *", - "type": "function" - }, - "git_index_reuc_find": { - "argline": "size_t *at_pos, git_index *index, const char *path", - "args": [ - { - "comment": "the address to which the position of the reuc entry is written (optional)", - "name": "at_pos", - "type": "size_t *" - }, - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - }, - { - "comment": "path to search", - "name": "path", - "type": "const char *" - } - ], - "comments": "", - "description": "

Finds the resolve undo entry that points to the given path in the Git\nindex.

\n", - "file": "sys/index.h", - "group": "index", - "line": 104, - "lineto": 104, - "return": { - "comment": "0 if found, < 0 otherwise (GIT_ENOTFOUND)", - "type": "int" - }, - "sig": "size_t *::git_index *::const char *", - "type": "function" - }, - "git_index_reuc_get_byindex": { - "argline": "git_index *index, size_t n", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - }, - { - "comment": "the position of the entry", - "name": "n", - "type": "size_t" - } - ], - "comments": "

The returned entry is read-only and should not be modified\nor freed by the caller.

\n", - "description": "

Get a resolve undo entry from the index.

\n", - "file": "sys/index.h", - "group": "index", - "line": 128, - "lineto": 128, - "return": { - "comment": "a pointer to the resolve undo entry; NULL if out of bounds", - "type": "const git_index_reuc_entry *" - }, - "sig": "git_index *::size_t", - "type": "function" - }, - "git_index_reuc_get_bypath": { - "argline": "git_index *index, const char *path", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - }, - { - "comment": "path to search", - "name": "path", - "type": "const char *" - } - ], - "comments": "

The returned entry is read-only and should not be modified\nor freed by the caller.

\n", - "description": "

Get a resolve undo entry from the index.

\n", - "file": "sys/index.h", - "group": "index", - "line": 116, - "lineto": 116, - "return": { - "comment": "the resolve undo entry; NULL if not found", - "type": "const git_index_reuc_entry *" - }, - "sig": "git_index *::const char *", - "type": "function" - }, - "git_index_reuc_remove": { - "argline": "git_index *index, size_t n", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - }, - { - "comment": "position of the resolve undo entry to remove", - "name": "n", - "type": "size_t" - } - ], - "comments": "", - "description": "

Remove an resolve undo entry from the index

\n", - "file": "sys/index.h", - "group": "index", - "line": 164, - "lineto": 164, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_index *::size_t", - "type": "function" - }, - "git_index_set_caps": { - "argline": "git_index *index, unsigned int caps", - "args": [ - { - "comment": "An existing index object", - "name": "index", - "type": "git_index *" - }, - { - "comment": "A combination of GIT_INDEXCAP values", - "name": "caps", - "type": "unsigned int" - } - ], - "comments": "

If you pass GIT_INDEXCAP_FROM_OWNER for the caps, then the\ncapabilities will be read from the config of the owner object,\nlooking at core.ignorecase, core.filemode, core.symlinks.

\n", - "description": "

Set index capabilities flags.

\n", - "file": "index.h", - "group": "index", - "line": 222, - "lineto": 222, - "return": { - "comment": "0 on success, -1 on failure", - "type": "int" - }, - "sig": "git_index *::unsigned int", - "type": "function" - }, - "git_index_update_all": { - "argline": "git_index *index,\n\tconst git_strarray *pathspec,\n\tgit_index_matched_path_cb callback,\n\tvoid *payload", - "args": [ - { - "comment": "An existing index object", - "name": "index", - "type": "git_index *" - }, - { - "comment": "array of path patterns", - "name": "pathspec", - "type": "const git_strarray *" - }, - { - "comment": "notification callback for each updated path (also gets index of matching pathspec entry); can be NULL; return 0 to add, >0 to skip, <0 to abort scan.", - "name": "callback", - "type": "git_index_matched_path_cb" - }, - { - "comment": "payload passed through to callback function", - "name": "payload", - "type": "void *" - } - ], - "comments": "

This method will fail in bare index instances.

\n\n

This scans the existing index entries and synchronizes them with the\nworking directory, deleting them if the corresponding working directory\nfile no longer exists otherwise updating the information (including\nadding the latest version of file to the ODB if needed).

\n\n

If you provide a callback function, it will be invoked on each matching\nitem in the index immediately before it is updated (either refreshed\nor removed depending on working directory state). Return 0 to proceed\nwith updating the item, > 0 to skip the item, and < 0 to abort the scan.

\n", - "description": "

Update all index entries to match the working directory

\n", - "file": "index.h", - "group": "index", - "line": 558, - "lineto": 562, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_index *::const git_strarray *::git_index_matched_path_cb::void *", - "type": "function" - }, - "git_index_write": { - "argline": "git_index *index", - "args": [ - { - "comment": "an existing index object", - "name": "index", - "type": "git_index *" - } - ], - "comments": "", - "description": "

Write an existing index object from memory back to disk\nusing an atomic file lock.

\n", - "file": "index.h", - "group": "index", - "line": 250, - "lineto": 250, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_index *", - "type": "function" - }, - "git_index_write_tree": { - "argline": "git_oid *out, git_index *index", - "args": [ - { - "comment": "Pointer where to store the OID of the written tree", - "name": "out", - "type": "git_oid *" - }, - { - "comment": "Index to write", - "name": "index", - "type": "git_index *" - } - ], - "comments": "

This method will scan the index and write a representation\nof its current state back to disk; it recursively creates\ntree objects for each of the subtrees stored in the index,\nbut only returns the OID of the root tree. This is the OID\nthat can be used e.g. to create a commit.

\n\n

The index instance cannot be bare, and needs to be associated\nto an existing repository.

\n\n

The index must not contain any file in conflict.

\n", - "description": "

Write the index as a tree

\n", - "examples": { - "init.c": [ - "ex/v0.20.0/init.html#git_index_write_tree-3" - ] - }, - "file": "index.h", - "group": "index", - "line": 290, - "lineto": 290, - "return": { - "comment": "0 on success, GIT_EUNMERGED when the index is not clean or an error code", - "type": "int" - }, - "sig": "git_oid *::git_index *", - "type": "function" - }, - "git_index_write_tree_to": { - "argline": "git_oid *out, git_index *index, git_repository *repo", - "args": [ - { - "comment": "Pointer where to store OID of the the written tree", - "name": "out", - "type": "git_oid *" - }, - { - "comment": "Index to write", - "name": "index", - "type": "git_index *" - }, - { - "comment": "Repository where to write the tree", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

This method will do the same as git_index_write_tree, but\nletting the user choose the repository where the tree will\nbe written.

\n\n

The index must not contain any file in conflict.

\n", - "description": "

Write the index as a tree to the given repository

\n", - "file": "index.h", - "group": "index", - "line": 307, - "lineto": 307, - "return": { - "comment": "0 on success, GIT_EUNMERGED when the index is not clean or an error code", - "type": "int" - }, - "sig": "git_oid *::git_index *::git_repository *", - "type": "function" - }, - "git_indexer_append": { - "argline": "git_indexer *idx, const void *data, size_t size, git_transfer_progress *stats", - "args": [ - { - "comment": "the indexer", - "name": "idx", - "type": "git_indexer *" - }, - { - "comment": "the data to add", - "name": "data", - "type": "const void *" - }, - { - "comment": "the size of the data in bytes", - "name": "size", - "type": "size_t" - }, - { - "comment": "stat storage", - "name": "stats", - "type": "git_transfer_progress *" - } - ], - "comments": "", - "description": "

Add data to the indexer

\n", - "examples": { - "network/index-pack.c": [ - "ex/v0.20.0/network/index-pack.html#git_indexer_append-2" - ] - }, - "file": "indexer.h", - "group": "indexer", - "line": 46, - "lineto": 46, - "return": { - "type": "int" - }, - "sig": "git_indexer *::const void *::size_t::git_transfer_progress *", - "type": "function" - }, - "git_indexer_commit": { - "argline": "git_indexer *idx, git_transfer_progress *stats", - "args": [ - { - "comment": "the indexer", - "name": "idx", - "type": "git_indexer *" - }, - { - "name": "stats", - "type": "git_transfer_progress *" - } - ], - "comments": "

Resolve any pending deltas and write out the index file

\n", - "description": "

Finalize the pack and index

\n", - "examples": { - "network/index-pack.c": [ - "ex/v0.20.0/network/index-pack.html#git_indexer_commit-3" - ] - }, - "file": "indexer.h", - "group": "indexer", - "line": 55, - "lineto": 55, - "return": { - "type": "int" - }, - "sig": "git_indexer *::git_transfer_progress *", - "type": "function" - }, - "git_indexer_free": { - "argline": "git_indexer *idx", - "args": [ - { - "comment": "the indexer to free", - "name": "idx", - "type": "git_indexer *" - } - ], - "comments": "", - "description": "

Free the indexer and its resources

\n", - "examples": { - "network/index-pack.c": [ - "ex/v0.20.0/network/index-pack.html#git_indexer_free-5" - ] - }, - "file": "indexer.h", - "group": "indexer", - "line": 72, - "lineto": 76, - "return": { - "type": "void" - }, - "sig": "git_indexer *", - "type": "function" - }, - "git_indexer_hash": { - "argline": "const git_indexer *idx", - "args": [ - { - "comment": "the indexer instance", - "name": "idx", - "type": "const git_indexer *" - } - ], - "comments": "

A packfile's name is derived from the sorted hashing of all object\nnames. This is only correct after the index has been finalized.

\n", - "description": "

Get the packfile's hash

\n", - "examples": { - "network/index-pack.c": [ - "ex/v0.20.0/network/index-pack.html#git_indexer_hash-4" - ] - }, - "file": "indexer.h", - "group": "indexer", - "line": 65, - "lineto": 65, - "return": { - "type": "const git_oid *" - }, - "sig": "const git_indexer *", - "type": "function" - }, - "git_indexer_new": { - "argline": "git_indexer **out,\n\t\tconst char *path,\n\t\tunsigned int mode,\n\t\tgit_odb *odb,\n\t\tgit_transfer_progress_callback progress_cb,\n\t\tvoid *progress_cb_payload", - "args": [ - { - "comment": "where to store the indexer instance", - "name": "out", - "type": "git_indexer **" - }, - { - "comment": "to the directory where the packfile should be stored", - "name": "path", - "type": "const char *" - }, - { - "comment": "permissions to use creating packfile or 0 for defaults", - "name": "mode", - "type": "unsigned int" - }, - { - "comment": "object database from which to read base objects when fixing thin packs. Pass NULL if no thin pack is expected (an error will be returned if there are bases missing)", - "name": "odb", - "type": "git_odb *" - }, - { - "comment": "function to call with progress information", - "name": "progress_cb", - "type": "git_transfer_progress_callback" - }, - { - "comment": "payload for the progress callback", - "name": "progress_cb_payload", - "type": "void *" - } - ], - "comments": "", - "description": "

Create a new indexer instance

\n", - "examples": { - "network/index-pack.c": [ - "ex/v0.20.0/network/index-pack.html#git_indexer_new-1" - ] - }, - "file": "indexer.h", - "group": "indexer", - "line": 30, - "lineto": 36, - "return": { - "type": "int" - }, - "sig": "git_indexer **::const char *::unsigned int::git_odb *::git_transfer_progress_callback::void *", - "type": "function" - }, - "git_libgit2_capabilities": { - "argline": "void", - "args": [], - "comments": "", - "description": "

Query compile time options for libgit2.

\n", - "file": "common.h", - "group": "libgit2", - "line": 126, - "lineto": 142, - "return": { - "comment": "A combination of GIT_CAP_* values. - GIT_CAP_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_CAP_HTTPS Libgit2 supports the https:// protocol. This requires the openssl library to be found when compiling libgit2.", - "type": "int" - }, - "sig": "", - "type": "function" - }, - "git_libgit2_opts": { - "argline": "int option, ...", - "args": [ - { - "comment": "Option key", - "name": "option", - "type": "int" - } - ], - "comments": "

Available options:

\n\n\n", - "description": "

Set or query a library global option

\n", - "file": "common.h", - "group": "libgit2", - "line": 231, - "lineto": 231, - "return": { - "comment": "0 on success, <0 on failure", - "type": "int" - }, - "sig": "int", - "type": "function" - }, - "git_libgit2_version": { - "argline": "int *major, int *minor, int *rev", - "args": [ - { - "comment": "Store the major version number", - "name": "major", - "type": "int *" - }, - { - "comment": "Store the minor version number", - "name": "minor", - "type": "int *" - }, - { - "comment": "Store the revision (patch) number", - "name": "rev", - "type": "int *" - } - ], - "comments": "", - "description": "

Return the version of the libgit2 library\nbeing currently used.

\n", - "file": "common.h", - "group": "libgit2", - "line": 101, - "lineto": 101, - "return": { - "type": "void" - }, - "sig": "int *::int *::int *", - "type": "function" - }, - "git_merge": { - "argline": "git_merge_result **out,\n\tgit_repository *repo,\n\tconst git_merge_head **their_heads,\n\tsize_t their_heads_len,\n\tconst git_merge_opts *opts", - "args": [ - { - "comment": "the results of the merge", - "name": "out", - "type": "git_merge_result **" - }, - { - "comment": "the repository to merge", - "name": "repo", - "type": "git_repository *" - }, - { - "name": "their_heads", - "type": "const git_merge_head **" - }, - { - "name": "their_heads_len", - "type": "size_t" - }, - { - "name": "opts", - "type": "const git_merge_opts *" - } - ], - "comments": "", - "description": "

Merges the given commits into HEAD, producing a new commit.

\n", - "file": "merge.h", - "group": "merge", - "line": 203, - "lineto": 208, - "return": { - "type": "int" - }, - "sig": "git_merge_result **::git_repository *::const git_merge_head **::size_t::const git_merge_opts *", - "type": "function" - }, - "git_merge_base": { - "argline": "git_oid *out,\n\tgit_repository *repo,\n\tconst git_oid *one,\n\tconst git_oid *two", - "args": [ - { - "comment": "the OID of a merge base between 'one' and 'two'", - "name": "out", - "type": "git_oid *" - }, - { - "comment": "the repository where the commits exist", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "one of the commits", - "name": "one", - "type": "const git_oid *" - }, - { - "comment": "the other commit", - "name": "two", - "type": "const git_oid *" - } - ], - "comments": "", - "description": "

Find a merge base between two commits

\n", - "examples": { - "log.c": [ - "ex/v0.20.0/log.html#git_merge_base-27" - ], - "rev-parse.c": [ - "ex/v0.20.0/rev-parse.html#git_merge_base-1" - ] - }, - "file": "merge.h", - "group": "merge", - "line": 100, - "lineto": 104, - "return": { - "comment": "Zero on success; GIT_ENOTFOUND or -1 on failure.", - "type": "int" - }, - "sig": "git_oid *::git_repository *::const git_oid *::const git_oid *", - "type": "function" - }, - "git_merge_base_many": { - "argline": "git_oid *out,\n\tgit_repository *repo,\n\tsize_t length,\n\tconst git_oid input_array[]", - "args": [ - { - "comment": "the OID of a merge base considering all the commits", - "name": "out", - "type": "git_oid *" - }, - { - "comment": "the repository where the commits exist", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "The number of commits in the provided `input_array`", - "name": "length", - "type": "size_t" - } - ], - "comments": "", - "description": "

Find a merge base given a list of commits

\n", - "file": "merge.h", - "group": "merge", - "line": 115, - "lineto": 119, - "return": { - "comment": "Zero on success; GIT_ENOTFOUND or -1 on failure.", - "type": "int" - }, - "sig": "git_oid *::git_repository *::size_t", - "type": "function" - }, - "git_merge_head_free": { - "argline": "git_merge_head *head", - "args": [ - { - "comment": "merge head to free", - "name": "head", - "type": "git_merge_head *" - } - ], - "comments": "", - "description": "

Frees a git_merge_head

\n", - "file": "merge.h", - "group": "merge", - "line": 169, - "lineto": 170, - "return": { - "type": "void" - }, - "sig": "git_merge_head *", - "type": "function" - }, - "git_merge_head_from_fetchhead": { - "argline": "git_merge_head **out,\n\tgit_repository *repo,\n\tconst char *branch_name,\n\tconst char *remote_url,\n\tconst git_oid *oid", - "args": [ - { - "comment": "pointer to store the git_merge_head result in", - "name": "out", - "type": "git_merge_head **" - }, - { - "comment": "repository that contains the given commit", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "name of the (remote) branch", - "name": "branch_name", - "type": "const char *" - }, - { - "comment": "url of the remote", - "name": "remote_url", - "type": "const char *" - }, - { - "comment": "the commit object id to use as a merge input", - "name": "oid", - "type": "const git_oid *" - } - ], - "comments": "", - "description": "

Creates a git_merge_head from the given fetch head data

\n", - "file": "merge.h", - "group": "merge", - "line": 144, - "lineto": 149, - "return": { - "comment": "zero on success, -1 on failure.", - "type": "int" - }, - "sig": "git_merge_head **::git_repository *::const char *::const char *::const git_oid *", - "type": "function" - }, - "git_merge_head_from_oid": { - "argline": "git_merge_head **out,\n\tgit_repository *repo,\n\tconst git_oid *oid", - "args": [ - { - "comment": "pointer to store the git_merge_head result in", - "name": "out", - "type": "git_merge_head **" - }, - { - "comment": "repository that contains the given commit", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "the commit object id to use as a merge input", - "name": "oid", - "type": "const git_oid *" - } - ], - "comments": "", - "description": "

Creates a git_merge_head from the given commit id

\n", - "file": "merge.h", - "group": "merge", - "line": 159, - "lineto": 162, - "return": { - "comment": "zero on success, -1 on failure.", - "type": "int" - }, - "sig": "git_merge_head **::git_repository *::const git_oid *", - "type": "function" - }, - "git_merge_head_from_ref": { - "argline": "git_merge_head **out,\n\tgit_repository *repo,\n\tgit_reference *ref", - "args": [ - { - "comment": "pointer to store the git_merge_head result in", - "name": "out", - "type": "git_merge_head **" - }, - { - "comment": "repository that contains the given reference", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "reference to use as a merge input", - "name": "ref", - "type": "git_reference *" - } - ], - "comments": "", - "description": "

Creates a git_merge_head from the given reference

\n", - "file": "merge.h", - "group": "merge", - "line": 129, - "lineto": 132, - "return": { - "comment": "zero on success, -1 on failure.", - "type": "int" - }, - "sig": "git_merge_head **::git_repository *::git_reference *", - "type": "function" - }, - "git_merge_result_fastforward_oid": { - "argline": "git_oid *out, git_merge_result *merge_result", - "args": [ - { - "comment": "the OID of the fast-forward", - "name": "out", - "type": "git_oid *" - }, - { - "comment": "the results of the merge", - "name": "merge_result", - "type": "git_merge_result *" - } - ], - "comments": "", - "description": "

Gets the fast-forward OID if the merge was a fastforward.

\n", - "file": "merge.h", - "group": "merge", - "line": 227, - "lineto": 229, - "return": { - "type": "int" - }, - "sig": "git_oid *::git_merge_result *", - "type": "function" - }, - "git_merge_result_is_fastforward": { - "argline": "git_merge_result *merge_result", - "args": [ - { - "name": "merge_result", - "type": "git_merge_result *" - } - ], - "comments": "", - "description": "

Returns true if a merge is eligible for fastforward

\n", - "file": "merge.h", - "group": "merge", - "line": 219, - "lineto": 219, - "return": { - "type": "int" - }, - "sig": "git_merge_result *", - "type": "function" - }, - "git_merge_result_is_uptodate": { - "argline": "git_merge_result *merge_result", - "args": [ - { - "name": "merge_result", - "type": "git_merge_result *" - } - ], - "comments": "", - "description": "

Returns true if a merge is up-to-date (we were asked to merge the target\ninto itself.)

\n", - "file": "merge.h", - "group": "merge", - "line": 214, - "lineto": 214, - "return": { - "type": "int" - }, - "sig": "git_merge_result *", - "type": "function" - }, - "git_merge_trees": { - "argline": "git_index **out,\n\tgit_repository *repo,\n\tconst git_tree *ancestor_tree,\n\tconst git_tree *our_tree,\n\tconst git_tree *their_tree,\n\tconst git_merge_tree_opts *opts", - "args": [ - { - "comment": "pointer to store the index result in", - "name": "out", - "type": "git_index **" - }, - { - "comment": "repository that contains the given trees", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "the common ancestor between the trees (or null if none)", - "name": "ancestor_tree", - "type": "const git_tree *" - }, - { - "comment": "the tree that reflects the destination tree", - "name": "our_tree", - "type": "const git_tree *" - }, - { - "comment": "the tree to merge in to `our_tree`", - "name": "their_tree", - "type": "const git_tree *" - }, - { - "comment": "the merge tree options (or null for defaults)", - "name": "opts", - "type": "const git_merge_tree_opts *" - } - ], - "comments": "

The returned index must be freed explicitly with git_index_free.

\n", - "description": "

Merge two trees, producing a git_index that reflects the result of\nthe merge.

\n", - "file": "merge.h", - "group": "merge", - "line": 186, - "lineto": 192, - "return": { - "comment": "zero on success, -1 on failure.", - "type": "int" - }, - "sig": "git_index **::git_repository *::const git_tree *::const git_tree *::const git_tree *::const git_merge_tree_opts *", - "type": "function" - }, - "git_message_prettify": { - "argline": "char *out,\n\tsize_t out_size,\n\tconst char *message,\n\tint strip_comments", - "args": [ - { - "comment": "The user-allocated buffer which will be filled with the cleaned up message. Pass NULL if you just want to get the needed size of the prettified message as the output value.", - "name": "out", - "type": "char *" - }, - { - "comment": "Size of the `out` buffer in bytes.", - "name": "out_size", - "type": "size_t" - }, - { - "comment": "The message to be prettified.", - "name": "message", - "type": "const char *" - }, - { - "comment": "Non-zero to remove lines starting with \"#\", 0 to leave them in.", - "name": "strip_comments", - "type": "int" - } - ], - "comments": "

Optionally, can remove lines starting with a "#".

\n", - "description": "

Clean up message from excess whitespace and make sure that the last line\nends with a '\\n'.

\n", - "file": "message.h", - "group": "message", - "line": 40, - "lineto": 44, - "return": { - "comment": "-1 on error, else number of characters in prettified message including the trailing NUL byte", - "type": "int" - }, - "sig": "char *::size_t::const char *::int", - "type": "function" - }, - "git_note_create": { - "argline": "git_oid *out,\n\tgit_repository *repo,\n\tconst git_signature *author,\n\tconst git_signature *committer,\n\tconst char *notes_ref,\n\tconst git_oid *oid,\n\tconst char *note,\n\tint force", - "args": [ - { - "comment": "pointer to store the OID (optional); NULL in case of error", - "name": "out", - "type": "git_oid *" - }, - { - "comment": "repository where to store the note", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "signature of the notes commit author", - "name": "author", - "type": "const git_signature *" - }, - { - "comment": "signature of the notes commit committer", - "name": "committer", - "type": "const git_signature *" - }, - { - "comment": "canonical name of the reference to use (optional); defaults to \"refs/notes/commits\"", - "name": "notes_ref", - "type": "const char *" - }, - { - "comment": "OID of the git object to decorate", - "name": "oid", - "type": "const git_oid *" - }, - { - "comment": "s_ref canonical name of the reference to use (optional); defaults to \"refs/notes/commits\"", - "name": "note", - "type": "const char *" - }, - { - "comment": "Overwrite existing note", - "name": "force", - "type": "int" - } - ], - "comments": "", - "description": "

Add a note for an object

\n", - "file": "notes.h", - "group": "note", - "line": 131, - "lineto": 139, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_oid *::git_repository *::const git_signature *::const git_signature *::const char *::const git_oid *::const char *::int", - "type": "function" - }, - "git_note_default_ref": { - "argline": "const char **out, git_repository *repo", - "args": [ - { - "comment": "Pointer to the default notes reference", - "name": "out", - "type": "const char **" - }, - { - "comment": "The Git repository", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "", - "description": "

Get the default notes reference for a repository

\n", - "file": "notes.h", - "group": "note", - "line": 176, - "lineto": 176, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "const char **::git_repository *", - "type": "function" - }, - "git_note_foreach": { - "argline": "git_repository *repo,\n\tconst char *notes_ref,\n\tgit_note_foreach_cb note_cb,\n\tvoid *payload", - "args": [ - { - "comment": "Repository where to find the notes.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "Reference to read from (optional); defaults to \"refs/notes/commits\".", - "name": "notes_ref", - "type": "const char *" - }, - { - "comment": "Callback to invoke per found annotation. Return non-zero to stop looping.", - "name": "note_cb", - "type": "git_note_foreach_cb" - }, - { - "comment": "Extra parameter to callback function.", - "name": "payload", - "type": "void *" - } - ], - "comments": "", - "description": "

Loop over all the notes within a specified namespace\nand issue a callback for each one.

\n", - "file": "notes.h", - "group": "note", - "line": 194, - "lineto": 198, - "return": { - "comment": "0 on success, GIT_EUSER on non-zero callback, or error code", - "type": "int" - }, - "sig": "git_repository *::const char *::git_note_foreach_cb::void *", - "type": "function" - }, - "git_note_free": { - "argline": "git_note *note", - "args": [ - { - "comment": "git_note object", - "name": "note", - "type": "git_note *" - } - ], - "comments": "", - "description": "

Free a git_note object

\n", - "file": "notes.h", - "group": "note", - "line": 166, - "lineto": 166, - "return": { - "type": "void" - }, - "sig": "git_note *", - "type": "function" - }, - "git_note_iterator_free": { - "argline": "git_note_iterator *it", - "args": [ - { - "comment": "pointer to the iterator", - "name": "it", - "type": "git_note_iterator *" - } - ], - "comments": "", - "description": "

Frees an git_note_iterator

\n", - "file": "notes.h", - "group": "note", - "line": 59, - "lineto": 59, - "return": { - "type": "void" - }, - "sig": "git_note_iterator *", - "type": "function" - }, - "git_note_iterator_new": { - "argline": "git_note_iterator **out,\n\tgit_repository *repo,\n\tconst char *notes_ref", - "args": [ - { - "comment": "pointer to the iterator", - "name": "out", - "type": "git_note_iterator **" - }, - { - "comment": "repository where to look up the note", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "canonical name of the reference to use (optional); defaults to \"refs/notes/commits\"", - "name": "notes_ref", - "type": "const char *" - } - ], - "comments": "

The iterator must be freed manually by the user.

\n", - "description": "

Creates a new iterator for notes

\n", - "file": "notes.h", - "group": "note", - "line": 49, - "lineto": 52, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_note_iterator **::git_repository *::const char *", - "type": "function" - }, - "git_note_message": { - "argline": "const git_note *note", - "args": [ - { - "comment": "the note", - "name": "note", - "type": "const git_note *" - } - ], - "comments": "", - "description": "

Get the note message

\n", - "file": "notes.h", - "group": "note", - "line": 105, - "lineto": 105, - "return": { - "comment": "the note message", - "type": "const char *" - }, - "sig": "const git_note *", - "type": "function" - }, - "git_note_next": { - "argline": "git_oid* note_id,\n\tgit_oid* annotated_id,\n\tgit_note_iterator *it", - "args": [ - { - "comment": "id of blob containing the message", - "name": "note_id", - "type": "git_oid*" - }, - { - "comment": "id of the git object being annotated", - "name": "annotated_id", - "type": "git_oid*" - }, - { - "comment": "pointer to the iterator", - "name": "it", - "type": "git_note_iterator *" - } - ], - "comments": "

The notes must not be freed manually by the user.

\n", - "description": "

Returns the current item (note_id and annotated_id) and advance the iterator\ninternally to the next value

\n", - "file": "notes.h", - "group": "note", - "line": 74, - "lineto": 77, - "return": { - "comment": "0 (no error), GIT_ITEROVER (iteration is done) or an error code (negative value)", - "type": "int" - }, - "sig": "git_oid*::git_oid*::git_note_iterator *", - "type": "function" - }, - "git_note_oid": { - "argline": "const git_note *note", - "args": [ - { - "comment": "the note", - "name": "note", - "type": "const git_note *" - } - ], - "comments": "", - "description": "

Get the note object OID

\n", - "file": "notes.h", - "group": "note", - "line": 114, - "lineto": 114, - "return": { - "comment": "the note object OID", - "type": "const git_oid *" - }, - "sig": "const git_note *", - "type": "function" - }, - "git_note_read": { - "argline": "git_note **out,\n\tgit_repository *repo,\n\tconst char *notes_ref,\n\tconst git_oid *oid", - "args": [ - { - "comment": "pointer to the read note; NULL in case of error", - "name": "out", - "type": "git_note **" - }, - { - "comment": "repository where to look up the note", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "canonical name of the reference to use (optional); defaults to \"refs/notes/commits\"", - "name": "notes_ref", - "type": "const char *" - }, - { - "comment": "OID of the git object to read the note from", - "name": "oid", - "type": "const git_oid *" - } - ], - "comments": "

The note must be freed manually by the user.

\n", - "description": "

Read the note for an object

\n", - "file": "notes.h", - "group": "note", - "line": 93, - "lineto": 97, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_note **::git_repository *::const char *::const git_oid *", - "type": "function" - }, - "git_note_remove": { - "argline": "git_repository *repo,\n\tconst char *notes_ref,\n\tconst git_signature *author,\n\tconst git_signature *committer,\n\tconst git_oid *oid", - "args": [ - { - "comment": "repository where the note lives", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "canonical name of the reference to use (optional); defaults to \"refs/notes/commits\"", - "name": "notes_ref", - "type": "const char *" - }, - { - "comment": "signature of the notes commit author", - "name": "author", - "type": "const git_signature *" - }, - { - "comment": "signature of the notes commit committer", - "name": "committer", - "type": "const git_signature *" - }, - { - "comment": "OID of the git object to remove the note from", - "name": "oid", - "type": "const git_oid *" - } - ], - "comments": "", - "description": "

Remove the note for an object

\n", - "file": "notes.h", - "group": "note", - "line": 154, - "lineto": 159, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_repository *::const char *::const git_signature *::const git_signature *::const git_oid *", - "type": "function" - }, - "git_object__size": { - "argline": "git_otype type", - "args": [ - { - "comment": "object type to get its size", - "name": "type", - "type": "git_otype" - } - ], - "comments": "

For all the core types, this would the equivalent\nof calling sizeof(git_commit) if the core types\nwere not opaque on the external API.

\n", - "description": "

Get the size in bytes for the structure which\nacts as an in-memory representation of any given\nobject type.

\n", - "file": "object.h", - "group": "object", - "line": 185, - "lineto": 185, - "return": { - "comment": "size in bytes of the object", - "type": "size_t" - }, - "sig": "git_otype", - "type": "function" - }, - "git_object_dup": { - "argline": "git_object **dest, git_object *source", - "args": [ - { - "comment": "Pointer to store the copy of the object", - "name": "dest", - "type": "git_object **" - }, - { - "comment": "Original object to copy", - "name": "source", - "type": "git_object *" - } - ], - "comments": "", - "description": "

Create an in-memory copy of a Git object. The copy must be\nexplicitly free'd or it will leak.

\n", - "file": "object.h", - "group": "object", - "line": 215, - "lineto": 215, - "return": { - "type": "int" - }, - "sig": "git_object **::git_object *", - "type": "function" - }, - "git_object_free": { - "argline": "git_object *object", - "args": [ - { - "comment": "the object to close", - "name": "object", - "type": "git_object *" - } - ], - "comments": "

This method instructs the library to close an existing\nobject; note that git_objects are owned and cached by the repository\nso the object may or may not be freed after this library call,\ndepending on how aggressive is the caching mechanism used\nby the repository.

\n\n

IMPORTANT:\nIt is necessary to call this method when you stop using\nan object. Failure to do so will cause a memory leak.

\n", - "description": "

Close an open object

\n", - "examples": { - "blame.c": [ - "ex/v0.20.0/blame.html#git_object_free-12", - "ex/v0.20.0/blame.html#git_object_free-13", - "ex/v0.20.0/blame.html#git_object_free-14", - "ex/v0.20.0/blame.html#git_object_free-15" - ], - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_object_free-15" - ], - "general.c": [ - "ex/v0.20.0/general.html#git_object_free-31" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_object_free-33" - ], - "rev-parse.c": [ - "ex/v0.20.0/rev-parse.html#git_object_free-7", - "ex/v0.20.0/rev-parse.html#git_object_free-8", - "ex/v0.20.0/rev-parse.html#git_object_free-9" - ] - }, - "file": "object.h", - "group": "object", - "line": 143, - "lineto": 143, - "return": { - "type": "void" - }, - "sig": "git_object *", - "type": "function" - }, - "git_object_id": { - "argline": "const git_object *obj", - "args": [ - { - "comment": "the repository object", - "name": "obj", - "type": "const git_object *" - } - ], - "comments": "", - "description": "

Get the id (SHA1) of a repository object

\n", - "examples": { - "blame.c": [ - "ex/v0.20.0/blame.html#git_object_id-8", - "ex/v0.20.0/blame.html#git_object_id-9", - "ex/v0.20.0/blame.html#git_object_id-10", - "ex/v0.20.0/blame.html#git_object_id-11" - ], - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_object_id-10", - "ex/v0.20.0/cat-file.html#git_object_id-11" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_object_id-29", - "ex/v0.20.0/log.html#git_object_id-30", - "ex/v0.20.0/log.html#git_object_id-31", - "ex/v0.20.0/log.html#git_object_id-32" - ], - "rev-parse.c": [ - "ex/v0.20.0/rev-parse.html#git_object_id-2", - "ex/v0.20.0/rev-parse.html#git_object_id-3", - "ex/v0.20.0/rev-parse.html#git_object_id-4", - "ex/v0.20.0/rev-parse.html#git_object_id-5", - "ex/v0.20.0/rev-parse.html#git_object_id-6" - ] - }, - "file": "object.h", - "group": "object", - "line": 104, - "lineto": 104, - "return": { - "comment": "the SHA1 id", - "type": "const git_oid *" - }, - "sig": "const git_object *", - "type": "function" - }, - "git_object_lookup": { - "argline": "git_object **object,\n\t\tgit_repository *repo,\n\t\tconst git_oid *id,\n\t\tgit_otype type", - "args": [ - { - "comment": "pointer to the looked-up object", - "name": "object", - "type": "git_object **" - }, - { - "comment": "the repository to look up the object", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "the unique identifier for the object", - "name": "id", - "type": "const git_oid *" - }, - { - "comment": "the type of the object", - "name": "type", - "type": "git_otype" - } - ], - "comments": "

The generated reference is owned by the repository and\nshould be closed with the git_object_free method\ninstead of free'd manually.

\n\n

The 'type' parameter must match the type of the object\nin the odb; the method will fail otherwise.\nThe special value 'GIT_OBJ_ANY' may be passed to let\nthe method guess the object's type.

\n", - "description": "

Lookup a reference to one of the objects in a repository.

\n", - "examples": { - "log.c": [ - "ex/v0.20.0/log.html#git_object_lookup-28" - ] - }, - "file": "object.h", - "group": "object", - "line": 41, - "lineto": 45, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_object **::git_repository *::const git_oid *::git_otype", - "type": "function" - }, - "git_object_lookup_bypath": { - "argline": "git_object **out,\n\t\tconst git_object *treeish,\n\t\tconst char *path,\n\t\tgit_otype type", - "args": [ - { - "comment": "buffer that receives a pointer to the object (which must be freed by the caller)", - "name": "out", - "type": "git_object **" - }, - { - "comment": "root object that can be peeled to a tree", - "name": "treeish", - "type": "const git_object *" - }, - { - "comment": "relative path from the root object to the desired object", - "name": "path", - "type": "const char *" - }, - { - "comment": "type of object desired", - "name": "type", - "type": "git_otype" - } - ], - "comments": "", - "description": "

Lookup an object that represents a tree entry.

\n", - "file": "object.h", - "group": "object", - "line": 92, - "lineto": 96, - "return": { - "comment": "0 on success, or an error code", - "type": "int" - }, - "sig": "git_object **::const git_object *::const char *::git_otype", - "type": "function" - }, - "git_object_lookup_prefix": { - "argline": "git_object **object_out,\n\t\tgit_repository *repo,\n\t\tconst git_oid *id,\n\t\tsize_t len,\n\t\tgit_otype type", - "args": [ - { - "comment": "pointer where to store the looked-up object", - "name": "object_out", - "type": "git_object **" - }, - { - "comment": "the repository to look up the object", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "a short identifier for the object", - "name": "id", - "type": "const git_oid *" - }, - { - "comment": "the length of the short identifier", - "name": "len", - "type": "size_t" - }, - { - "comment": "the type of the object", - "name": "type", - "type": "git_otype" - } - ], - "comments": "

The object obtained will be so that its identifier\nmatches the first 'len' hexadecimal characters\n(packets of 4 bits) of the given 'id'.\n'len' must be at least GIT_OID_MINPREFIXLEN, and\nlong enough to identify a unique object matching\nthe prefix; otherwise the method will fail.

\n\n

The generated reference is owned by the repository and\nshould be closed with the git_object_free method\ninstead of free'd manually.

\n\n

The 'type' parameter must match the type of the object\nin the odb; the method will fail otherwise.\nThe special value 'GIT_OBJ_ANY' may be passed to let\nthe method guess the object's type.

\n", - "description": "

Lookup a reference to one of the objects in a repository,\ngiven a prefix of its identifier (short id).

\n", - "file": "object.h", - "group": "object", - "line": 74, - "lineto": 79, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_object **::git_repository *::const git_oid *::size_t::git_otype", - "type": "function" - }, - "git_object_owner": { - "argline": "const git_object *obj", - "args": [ - { - "comment": "the object", - "name": "obj", - "type": "const git_object *" - } - ], - "comments": "

Freeing or calling git_repository_close on the\nreturned pointer will invalidate the actual object.

\n\n

Any other operation may be run on the repository without\naffecting the object.

\n", - "description": "

Get the repository that owns this object

\n", - "file": "object.h", - "group": "object", - "line": 126, - "lineto": 126, - "return": { - "comment": "the repository who owns this object", - "type": "git_repository *" - }, - "sig": "const git_object *", - "type": "function" - }, - "git_object_peel": { - "argline": "git_object **peeled,\n\tconst git_object *object,\n\tgit_otype target_type", - "args": [ - { - "comment": "Pointer to the peeled git_object", - "name": "peeled", - "type": "git_object **" - }, - { - "comment": "The object to be processed", - "name": "object", - "type": "const git_object *" - }, - { - "comment": "The type of the requested object (GIT_OBJ_COMMIT, GIT_OBJ_TAG, GIT_OBJ_TREE, GIT_OBJ_BLOB or GIT_OBJ_ANY).", - "name": "target_type", - "type": "git_otype" - } - ], - "comments": "

The retrieved peeled object is owned by the repository and should be\nclosed with the git_object_free method.

\n\n

If you pass GIT_OBJ_ANY as the target type, then the object will be\npeeled until the type changes (e.g. a tag will be chased until the\nreferenced object is no longer a tag).

\n", - "description": "

Recursively peel an object until an object of the specified type is met.

\n", - "file": "object.h", - "group": "object", - "line": 203, - "lineto": 206, - "return": { - "comment": "0 on success, GIT_EAMBIGUOUS, GIT_ENOTFOUND or an error code", - "type": "int" - }, - "sig": "git_object **::const git_object *::git_otype", - "type": "function" - }, - "git_object_string2type": { - "argline": "const char *str", - "args": [ - { - "comment": "the string to convert.", - "name": "str", - "type": "const char *" - } - ], - "comments": "", - "description": "

Convert a string object type representation to it's git_otype.

\n", - "file": "object.h", - "group": "object", - "line": 162, - "lineto": 162, - "return": { - "comment": "the corresponding git_otype.", - "type": "git_otype" - }, - "sig": "const char *", - "type": "function" - }, - "git_object_type": { - "argline": "const git_object *obj", - "args": [ - { - "comment": "the repository object", - "name": "obj", - "type": "const git_object *" - } - ], - "comments": "", - "description": "

Get the object type of an object

\n", - "examples": { - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_object_type-12", - "ex/v0.20.0/cat-file.html#git_object_type-13", - "ex/v0.20.0/cat-file.html#git_object_type-14" - ] - }, - "file": "object.h", - "group": "object", - "line": 112, - "lineto": 112, - "return": { - "comment": "the object's type", - "type": "git_otype" - }, - "sig": "const git_object *", - "type": "function" - }, - "git_object_type2string": { - "argline": "git_otype type", - "args": [ - { - "comment": "object type to convert.", - "name": "type", - "type": "git_otype" - } - ], - "comments": "

The result is a pointer to a string in static memory and\nshould not be free()'ed.

\n", - "description": "

Convert an object type to it's string representation.

\n", - "examples": { - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_object_type2string-16", - "ex/v0.20.0/cat-file.html#git_object_type2string-17", - "ex/v0.20.0/cat-file.html#git_object_type2string-18", - "ex/v0.20.0/cat-file.html#git_object_type2string-19" - ], - "general.c": [ - "ex/v0.20.0/general.html#git_object_type2string-32" - ] - }, - "file": "object.h", - "group": "object", - "line": 154, - "lineto": 154, - "return": { - "comment": "the corresponding string representation.", - "type": "const char *" - }, - "sig": "git_otype", - "type": "function" - }, - "git_object_typeisloose": { - "argline": "git_otype type", - "args": [ - { - "comment": "object type to test.", - "name": "type", - "type": "git_otype" - } - ], - "comments": "", - "description": "

Determine if the given git_otype is a valid loose object type.

\n", - "file": "object.h", - "group": "object", - "line": 171, - "lineto": 171, - "return": { - "comment": "true if the type represents a valid loose object type, false otherwise.", - "type": "int" - }, - "sig": "git_otype", - "type": "function" - }, - "git_odb_add_alternate": { - "argline": "git_odb *odb, git_odb_backend *backend, int priority", - "args": [ - { - "comment": "database to add the backend to", - "name": "odb", - "type": "git_odb *" - }, - { - "comment": "pointer to a git_odb_backend instance", - "name": "backend", - "type": "git_odb_backend *" - }, - { - "comment": "Value for ordering the backends queue", - "name": "priority", - "type": "int" - } - ], - "comments": "

Alternate backends are always checked for objects after\nall the main backends have been exhausted.

\n\n

The backends are checked in relative ordering, based on the\nvalue of the priority parameter.

\n\n

Writing is disabled on alternate backends.

\n\n

Read for more information.

\n", - "description": "

Add a custom backend to an existing Object DB; this\nbackend will work as an alternate.

\n", - "file": "odb.h", - "group": "odb", - "line": 460, - "lineto": 460, - "return": { - "comment": "0 on success; error code otherwise", - "type": "int" - }, - "sig": "git_odb *::git_odb_backend *::int", - "type": "function" - }, - "git_odb_add_backend": { - "argline": "git_odb *odb, git_odb_backend *backend, int priority", - "args": [ - { - "comment": "database to add the backend to", - "name": "odb", - "type": "git_odb *" - }, - { - "comment": "pointer to a git_odb_backend instance", - "name": "backend", - "type": "git_odb_backend *" - }, - { - "comment": "Value for ordering the backends queue", - "name": "priority", - "type": "int" - } - ], - "comments": "

The backends are checked in relative ordering, based on the\nvalue of the priority parameter.

\n\n

Read for more information.

\n", - "description": "

Add a custom backend to an existing Object DB

\n", - "file": "odb.h", - "group": "odb", - "line": 439, - "lineto": 439, - "return": { - "comment": "0 on success; error code otherwise", - "type": "int" - }, - "sig": "git_odb *::git_odb_backend *::int", - "type": "function" - }, - "git_odb_add_disk_alternate": { - "argline": "git_odb *odb, const char *path", - "args": [ - { - "comment": "database to add the backend to", - "name": "odb", - "type": "git_odb *" - }, - { - "comment": "path to the objects folder for the alternate", - "name": "path", - "type": "const char *" - } - ], - "comments": "

Note that the added path must point to an objects, not\nto a full repository, to use it as an alternate store.

\n\n

Alternate backends are always checked for objects after\nall the main backends have been exhausted.

\n\n

Writing is disabled on alternate backends.

\n", - "description": "

Add an on-disk alternate to an existing Object DB.

\n", - "file": "odb.h", - "group": "odb", - "line": 73, - "lineto": 73, - "return": { - "comment": "0 on success; error code otherwise", - "type": "int" - }, - "sig": "git_odb *::const char *", - "type": "function" - }, - "git_odb_backend_loose": { - "argline": "git_odb_backend **out,\n\tconst char *objects_dir,\n\tint compression_level,\n\tint do_fsync,\n\tunsigned int dir_mode,\n\tunsigned int file_mode", - "args": [ - { - "comment": "location to store the odb backend pointer", - "name": "out", - "type": "git_odb_backend **" - }, - { - "comment": "the Git repository's objects directory", - "name": "objects_dir", - "type": "const char *" - }, - { - "comment": "zlib compression level to use", - "name": "compression_level", - "type": "int" - }, - { - "comment": "whether to do an fsync() after writing (currently ignored)", - "name": "do_fsync", - "type": "int" - }, - { - "comment": "permissions to use creating a directory or 0 for defaults", - "name": "dir_mode", - "type": "unsigned int" - }, - { - "comment": "permissions to use creating a file or 0 for defaults", - "name": "file_mode", - "type": "unsigned int" - } - ], - "comments": "", - "description": "

Create a backend for loose objects

\n", - "file": "odb_backend.h", - "group": "odb", - "line": 48, - "lineto": 54, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_odb_backend **::const char *::int::int::unsigned int::unsigned int", - "type": "function" - }, - "git_odb_backend_one_pack": { - "argline": "git_odb_backend **out, const char *index_file", - "args": [ - { - "comment": "location to store the odb backend pointer", - "name": "out", - "type": "git_odb_backend **" - }, - { - "comment": "path to the packfile's .idx file", - "name": "index_file", - "type": "const char *" - } - ], - "comments": "

This can be useful for inspecting the contents of a single\npackfile.

\n", - "description": "

Create a backend out of a single packfile

\n", - "file": "odb_backend.h", - "group": "odb", - "line": 67, - "lineto": 67, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_odb_backend **::const char *", - "type": "function" - }, - "git_odb_backend_pack": { - "argline": "git_odb_backend **out, const char *objects_dir", - "args": [ - { - "comment": "location to store the odb backend pointer", - "name": "out", - "type": "git_odb_backend **" - }, - { - "comment": "the Git repository's objects directory", - "name": "objects_dir", - "type": "const char *" - } - ], - "comments": "", - "description": "

Create a backend for the packfiles.

\n", - "file": "odb_backend.h", - "group": "odb", - "line": 34, - "lineto": 34, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_odb_backend **::const char *", - "type": "function" - }, - "git_odb_exists": { - "argline": "git_odb *db, const git_oid *id", - "args": [ - { - "comment": "database to be searched for the given object.", - "name": "db", - "type": "git_odb *" - }, - { - "comment": "the object to search for.", - "name": "id", - "type": "const git_oid *" - } - ], - "comments": "", - "description": "

Determine if the given object can be found in the object database.

\n", - "file": "odb.h", - "group": "odb", - "line": 159, - "lineto": 159, - "return": { - "comment": "- 1, if the object was found - 0, otherwise", - "type": "int" - }, - "sig": "git_odb *::const git_oid *", - "type": "function" - }, - "git_odb_foreach": { - "argline": "git_odb *db, git_odb_foreach_cb cb, void *payload", - "args": [ - { - "comment": "database to use", - "name": "db", - "type": "git_odb *" - }, - { - "comment": "the callback to call for each object", - "name": "cb", - "type": "git_odb_foreach_cb" - }, - { - "comment": "data to pass to the callback", - "name": "payload", - "type": "void *" - } - ], - "comments": "

The callback will be called for each object available in the\ndatabase. Note that the objects are likely to be returned in the index\norder, which would make accessing the objects in that order inefficient.\nReturn a non-zero value from the callback to stop looping.

\n", - "description": "

List all objects available in the database

\n", - "file": "odb.h", - "group": "odb", - "line": 194, - "lineto": 194, - "return": { - "comment": "0 on success, GIT_EUSER on non-zero callback, or error code", - "type": "int" - }, - "sig": "git_odb *::git_odb_foreach_cb::void *", - "type": "function" - }, - "git_odb_free": { - "argline": "git_odb *db", - "args": [ - { - "comment": "database pointer to close. If NULL no action is taken.", - "name": "db", - "type": "git_odb *" - } - ], - "comments": "", - "description": "

Close an open object database.

\n", - "examples": { - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_odb_free-20" - ] - }, - "file": "odb.h", - "group": "odb", - "line": 80, - "lineto": 80, - "return": { - "type": "void" - }, - "sig": "git_odb *", - "type": "function" - }, - "git_odb_get_backend": { - "argline": "git_odb_backend **out, git_odb *odb, size_t pos", - "args": [ - { - "comment": "output pointer to ODB backend at pos", - "name": "out", - "type": "git_odb_backend **" - }, - { - "comment": "object database", - "name": "odb", - "type": "git_odb *" - }, - { - "comment": "index into object database backend list", - "name": "pos", - "type": "size_t" - } - ], - "comments": "", - "description": "

Lookup an ODB backend object by index

\n", - "file": "odb.h", - "group": "odb", - "line": 478, - "lineto": 478, - "return": { - "comment": "0 on success; GIT_ENOTFOUND if pos is invalid; other errors < 0", - "type": "int" - }, - "sig": "git_odb_backend **::git_odb *::size_t", - "type": "function" - }, - "git_odb_hash": { - "argline": "git_oid *out, const void *data, size_t len, git_otype type", - "args": [ - { - "comment": "the resulting object-ID.", - "name": "out", - "type": "git_oid *" - }, - { - "comment": "data to hash", - "name": "data", - "type": "const void *" - }, - { - "comment": "size of the data", - "name": "len", - "type": "size_t" - }, - { - "comment": "of the data to hash", - "name": "type", - "type": "git_otype" - } - ], - "comments": "

The resulting SHA-1 OID will be the identifier for the data\nbuffer as if the data buffer it were to written to the ODB.

\n", - "description": "

Determine the object-ID (sha1 hash) of a data buffer

\n", - "file": "odb.h", - "group": "odb", - "line": 343, - "lineto": 343, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_oid *::const void *::size_t::git_otype", - "type": "function" - }, - "git_odb_hashfile": { - "argline": "git_oid *out, const char *path, git_otype type", - "args": [ - { - "comment": "oid structure the result is written into.", - "name": "out", - "type": "git_oid *" - }, - { - "comment": "file to read and determine object id for", - "name": "path", - "type": "const char *" - }, - { - "comment": "the type of the object that will be hashed", - "name": "type", - "type": "git_otype" - } - ], - "comments": "", - "description": "

Read a file from disk and fill a git_oid with the object id\nthat the file would have if it were written to the Object\nDatabase as an object of the given type (w/o applying filters).\nSimilar functionality to git.git's git hash-object without\nthe -w flag, however, with the --no-filters flag.\nIf you need filters, see git_repository_hashfile.

\n", - "file": "odb.h", - "group": "odb", - "line": 358, - "lineto": 358, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_oid *::const char *::git_otype", - "type": "function" - }, - "git_odb_new": { - "argline": "git_odb **out", - "args": [ - { - "comment": "location to store the database pointer, if opened. Set to NULL if the open failed.", - "name": "out", - "type": "git_odb **" - } - ], - "comments": "

Before the ODB can be used for read/writing, a custom database\nbackend must be manually added using git_odb_add_backend()

\n", - "description": "

Create a new object database with no backends.

\n", - "file": "odb.h", - "group": "odb", - "line": 38, - "lineto": 38, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_odb **", - "type": "function" - }, - "git_odb_num_backends": { - "argline": "git_odb *odb", - "args": [ - { - "comment": "object database", - "name": "odb", - "type": "git_odb *" - } - ], - "comments": "", - "description": "

Get the number of ODB backend objects

\n", - "file": "odb.h", - "group": "odb", - "line": 468, - "lineto": 468, - "return": { - "comment": "number of backends in the ODB", - "type": "size_t" - }, - "sig": "git_odb *", - "type": "function" - }, - "git_odb_object_data": { - "argline": "git_odb_object *object", - "args": [ - { - "comment": "the object", - "name": "object", - "type": "git_odb_object *" - } - ], - "comments": "

This is the uncompressed, raw data as read from the ODB,\nwithout the leading header.

\n\n

This pointer is owned by the object and shall not be free'd.

\n", - "description": "

Return the data of an ODB object

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_odb_object_data-36" - ] - }, - "file": "odb.h", - "group": "odb", - "line": 405, - "lineto": 405, - "return": { - "comment": "a pointer to the data", - "type": "const void *" - }, - "sig": "git_odb_object *", - "type": "function" - }, - "git_odb_object_dup": { - "argline": "git_odb_object **dest, git_odb_object *source", - "args": [ - { - "comment": "pointer where to store the copy", - "name": "dest", - "type": "git_odb_object **" - }, - { - "comment": "object to copy", - "name": "source", - "type": "git_odb_object *" - } - ], - "comments": "

The returned copy must be manually freed with git_odb_object_free.\nNote that because of an implementation detail, the returned copy will be\nthe same pointer as source: the object is internally refcounted, so the\ncopy still needs to be freed twice.

\n", - "description": "

Create a copy of an odb_object

\n", - "file": "odb.h", - "group": "odb", - "line": 372, - "lineto": 372, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_odb_object **::git_odb_object *", - "type": "function" - }, - "git_odb_object_free": { - "argline": "git_odb_object *object", - "args": [ - { - "comment": "object to close", - "name": "object", - "type": "git_odb_object *" - } - ], - "comments": "

This method must always be called once a git_odb_object is no\nlonger needed, otherwise memory will leak.

\n", - "description": "

Close an ODB object

\n", - "examples": { - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_odb_object_free-22" - ], - "general.c": [ - "ex/v0.20.0/general.html#git_odb_object_free-35" - ] - }, - "file": "odb.h", - "group": "odb", - "line": 382, - "lineto": 382, - "return": { - "type": "void" - }, - "sig": "git_odb_object *", - "type": "function" - }, - "git_odb_object_id": { - "argline": "git_odb_object *object", - "args": [ - { - "comment": "the object", - "name": "object", - "type": "git_odb_object *" - } - ], - "comments": "

This is the OID from which the object was read from

\n", - "description": "

Return the OID of an ODB object

\n", - "file": "odb.h", - "group": "odb", - "line": 392, - "lineto": 392, - "return": { - "comment": "a pointer to the OID", - "type": "const git_oid *" - }, - "sig": "git_odb_object *", - "type": "function" - }, - "git_odb_object_size": { - "argline": "git_odb_object *object", - "args": [ - { - "comment": "the object", - "name": "object", - "type": "git_odb_object *" - } - ], - "comments": "

This is the real size of the data buffer, not the\nactual size of the object.

\n", - "description": "

Return the size of an ODB object

\n", - "examples": { - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_odb_object_size-23" - ], - "general.c": [ - "ex/v0.20.0/general.html#git_odb_object_size-37" - ] - }, - "file": "odb.h", - "group": "odb", - "line": 416, - "lineto": 416, - "return": { - "comment": "the size", - "type": "size_t" - }, - "sig": "git_odb_object *", - "type": "function" - }, - "git_odb_object_type": { - "argline": "git_odb_object *object", - "args": [ - { - "comment": "the object", - "name": "object", - "type": "git_odb_object *" - } - ], - "comments": "", - "description": "

Return the type of an ODB object

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_odb_object_type-38" - ] - }, - "file": "odb.h", - "group": "odb", - "line": 424, - "lineto": 424, - "return": { - "comment": "the type", - "type": "git_otype" - }, - "sig": "git_odb_object *", - "type": "function" - }, - "git_odb_open": { - "argline": "git_odb **out, const char *objects_dir", - "args": [ - { - "comment": "location to store the database pointer, if opened. Set to NULL if the open failed.", - "name": "out", - "type": "git_odb **" - }, - { - "comment": "path of the backends' \"objects\" directory.", - "name": "objects_dir", - "type": "const char *" - } - ], - "comments": "\n", - "description": "

Create a new object database and automatically add\nthe two default backends:

\n", - "file": "odb.h", - "group": "odb", - "line": 56, - "lineto": 56, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_odb **::const char *", - "type": "function" - }, - "git_odb_open_rstream": { - "argline": "git_odb_stream **out, git_odb *db, const git_oid *oid", - "args": [ - { - "comment": "pointer where to store the stream", - "name": "out", - "type": "git_odb_stream **" - }, - { - "comment": "object database where the stream will read from", - "name": "db", - "type": "git_odb *" - }, - { - "comment": "oid of the object the stream will read from", - "name": "oid", - "type": "const git_oid *" - } - ], - "comments": "

Note that most backends do not support streaming reads\nbecause they store their objects as compressed/delta'ed blobs.

\n\n

It's recommended to use git_odb_read instead, which is\nassured to work on all backends.

\n\n

The returned stream will be of type GIT_STREAM_RDONLY and\nwill have the following methods:

\n\n
- stream->read: read `n` bytes from the stream\n- stream->free: free the stream\n
\n\n

The stream must always be free'd or will leak memory.

\n\n

@see git_odb_stream

\n", - "description": "

Open a stream to read an object from the ODB

\n", - "file": "odb.h", - "group": "odb", - "line": 305, - "lineto": 305, - "return": { - "comment": "0 if the stream was created; error code otherwise", - "type": "int" - }, - "sig": "git_odb_stream **::git_odb *::const git_oid *", - "type": "function" - }, - "git_odb_open_wstream": { - "argline": "git_odb_stream **out, git_odb *db, size_t size, git_otype type", - "args": [ - { - "comment": "pointer where to store the stream", - "name": "out", - "type": "git_odb_stream **" - }, - { - "comment": "object database where the stream will write", - "name": "db", - "type": "git_odb *" - }, - { - "comment": "final size of the object that will be written", - "name": "size", - "type": "size_t" - }, - { - "comment": "type of the object that will be written", - "name": "type", - "type": "git_otype" - } - ], - "comments": "

The type and final length of the object must be specified\nwhen opening the stream.

\n\n

The returned stream will be of type GIT_STREAM_WRONLY, and it\nwon't be effective until git_odb_stream_finalize_write is called\nand returns without an error

\n\n

The stream must always be freed when done with git_odb_stream_free or\nwill leak memory.

\n\n

@see git_odb_stream

\n", - "description": "

Open a stream to write an object into the ODB

\n", - "file": "odb.h", - "group": "odb", - "line": 237, - "lineto": 237, - "return": { - "comment": "0 if the stream was created; error code otherwise", - "type": "int" - }, - "sig": "git_odb_stream **::git_odb *::size_t::git_otype", - "type": "function" - }, - "git_odb_read": { - "argline": "git_odb_object **out, git_odb *db, const git_oid *id", - "args": [ - { - "comment": "pointer where to store the read object", - "name": "out", - "type": "git_odb_object **" - }, - { - "comment": "database to search for the object in.", - "name": "db", - "type": "git_odb *" - }, - { - "comment": "identity of the object to read.", - "name": "id", - "type": "const git_oid *" - } - ], - "comments": "

This method queries all available ODB backends\ntrying to read the given OID.

\n\n

The returned object is reference counted and\ninternally cached, so it should be closed\nby the user once it's no longer in use.

\n", - "description": "

Read an object from the database.

\n", - "examples": { - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_odb_read-21" - ], - "general.c": [ - "ex/v0.20.0/general.html#git_odb_read-33" - ] - }, - "file": "odb.h", - "group": "odb", - "line": 99, - "lineto": 99, - "return": { - "comment": "- 0 if the object was read; - GIT_ENOTFOUND if the object is not in the database.", - "type": "int" - }, - "sig": "git_odb_object **::git_odb *::const git_oid *", - "type": "function" - }, - "git_odb_read_header": { - "argline": "size_t *len_out, git_otype *type_out, git_odb *db, const git_oid *id", - "args": [ - { - "comment": "pointer where to store the length", - "name": "len_out", - "type": "size_t *" - }, - { - "comment": "pointer where to store the type", - "name": "type_out", - "type": "git_otype *" - }, - { - "comment": "database to search for the object in.", - "name": "db", - "type": "git_odb *" - }, - { - "comment": "identity of the object to read.", - "name": "id", - "type": "const git_oid *" - } - ], - "comments": "

The header includes the length and the type of an object.

\n\n

Note that most backends do not support reading only the header\nof an object, so the whole object will be read and then the\nheader will be returned.

\n", - "description": "

Read the header of an object from the database, without\nreading its full contents.

\n", - "file": "odb.h", - "group": "odb", - "line": 148, - "lineto": 148, - "return": { - "comment": "- 0 if the object was read; - GIT_ENOTFOUND if the object is not in the database.", - "type": "int" - }, - "sig": "size_t *::git_otype *::git_odb *::const git_oid *", - "type": "function" - }, - "git_odb_read_prefix": { - "argline": "git_odb_object **out, git_odb *db, const git_oid *short_id, size_t len", - "args": [ - { - "comment": "pointer where to store the read object", - "name": "out", - "type": "git_odb_object **" - }, - { - "comment": "database to search for the object in.", - "name": "db", - "type": "git_odb *" - }, - { - "comment": "a prefix of the id of the object to read.", - "name": "short_id", - "type": "const git_oid *" - }, - { - "comment": "the length of the prefix", - "name": "len", - "type": "size_t" - } - ], - "comments": "

This method queries all available ODB backends\ntrying to match the 'len' first hexadecimal\ncharacters of the 'short_id'.\nThe remaining (GIT_OID_HEXSZ-len)*4 bits of\n'short_id' must be 0s.\n'len' must be at least GIT_OID_MINPREFIXLEN,\nand the prefix must be long enough to identify\na unique object in all the backends; the\nmethod will fail otherwise.

\n\n

The returned object is reference counted and\ninternally cached, so it should be closed\nby the user once it's no longer in use.

\n", - "description": "

Read an object from the database, given a prefix\nof its identifier.

\n", - "file": "odb.h", - "group": "odb", - "line": 128, - "lineto": 128, - "return": { - "comment": "- 0 if the object was read; - GIT_ENOTFOUND if the object is not in the database. - GIT_EAMBIGUOUS if the prefix is ambiguous (several objects match the prefix)", - "type": "int" - }, - "sig": "git_odb_object **::git_odb *::const git_oid *::size_t", - "type": "function" - }, - "git_odb_refresh": { - "argline": "struct git_odb *db", - "args": [ - { - "comment": "database to refresh", - "name": "db", - "type": "struct git_odb *" - } - ], - "comments": "

If the object databases have changed on disk while the library\nis running, this function will force a reload of the underlying\nindexes.

\n\n

Use this function when you're confident that an external\napplication has tampered with the ODB.

\n\n

NOTE that it is not necessary to call this function at all. The\nlibrary will automatically attempt to refresh the ODB\nwhen a lookup fails, to see if the looked up object exists\non disk but hasn't been loaded yet.

\n", - "description": "

Refresh the object database to load newly added files.

\n", - "file": "odb.h", - "group": "odb", - "line": 179, - "lineto": 179, - "return": { - "comment": "0 on success, error code otherwise", - "type": "int" - }, - "sig": "struct git_odb *", - "type": "function" - }, - "git_odb_stream_finalize_write": { - "argline": "git_oid *out, git_odb_stream *stream", - "args": [ - { - "comment": "pointer to store the resulting object's id", - "name": "out", - "type": "git_oid *" - }, - { - "comment": "the stream", - "name": "stream", - "type": "git_odb_stream *" - } - ], - "comments": "

The object will take its final name and will be available to the\nodb.

\n\n

This method will fail if the total number of received bytes\ndiffers from the size declared with git_odb_open_wstream()

\n", - "description": "

Finish writing to an odb stream

\n", - "file": "odb.h", - "group": "odb", - "line": 265, - "lineto": 265, - "return": { - "comment": "0 on success; an error code otherwise", - "type": "int" - }, - "sig": "git_oid *::git_odb_stream *", - "type": "function" - }, - "git_odb_stream_free": { - "argline": "git_odb_stream *stream", - "args": [ - { - "comment": "the stream to free", - "name": "stream", - "type": "git_odb_stream *" - } - ], - "comments": "", - "description": "

Free an odb stream

\n", - "file": "odb.h", - "group": "odb", - "line": 279, - "lineto": 279, - "return": { - "type": "void" - }, - "sig": "git_odb_stream *", - "type": "function" - }, - "git_odb_stream_read": { - "argline": "git_odb_stream *stream, char *buffer, size_t len", - "args": [ - { - "name": "stream", - "type": "git_odb_stream *" - }, - { - "name": "buffer", - "type": "char *" - }, - { - "name": "len", - "type": "size_t" - } - ], - "comments": "

Most backends don't implement streaming reads

\n", - "description": "

Read from an odb stream

\n", - "file": "odb.h", - "group": "odb", - "line": 272, - "lineto": 272, - "return": { - "type": "int" - }, - "sig": "git_odb_stream *::char *::size_t", - "type": "function" - }, - "git_odb_stream_write": { - "argline": "git_odb_stream *stream, const char *buffer, size_t len", - "args": [ - { - "comment": "the stream", - "name": "stream", - "type": "git_odb_stream *" - }, - { - "comment": "the data to write", - "name": "buffer", - "type": "const char *" - }, - { - "comment": "the buffer's length", - "name": "len", - "type": "size_t" - } - ], - "comments": "

This method will fail if the total number of received bytes exceeds the\nsize declared with git_odb_open_wstream()

\n", - "description": "

Write to an odb stream

\n", - "file": "odb.h", - "group": "odb", - "line": 250, - "lineto": 250, - "return": { - "comment": "0 if the write succeeded; error code otherwise", - "type": "int" - }, - "sig": "git_odb_stream *::const char *::size_t", - "type": "function" - }, - "git_odb_write": { - "argline": "git_oid *out, git_odb *odb, const void *data, size_t len, git_otype type", - "args": [ - { - "comment": "pointer to store the OID result of the write", - "name": "out", - "type": "git_oid *" - }, - { - "comment": "object database where to store the object", - "name": "odb", - "type": "git_odb *" - }, - { - "comment": "buffer with the data to store", - "name": "data", - "type": "const void *" - }, - { - "comment": "size of the buffer", - "name": "len", - "type": "size_t" - }, - { - "comment": "type of the data to store", - "name": "type", - "type": "git_otype" - } - ], - "comments": "

This method writes a full object straight into the ODB.\nFor most cases, it is preferred to write objects through a write\nstream, which is both faster and less memory intensive, specially\nfor big objects.

\n\n

This method is provided for compatibility with custom backends\nwhich are not able to support streaming writes

\n", - "description": "

Write an object directly into the ODB

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_odb_write-34" - ] - }, - "file": "odb.h", - "group": "odb", - "line": 214, - "lineto": 214, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_oid *::git_odb *::const void *::size_t::git_otype", - "type": "function" - }, - "git_odb_write_pack": { - "argline": "git_odb_writepack **out,\n\tgit_odb *db,\n\tgit_transfer_progress_callback progress_cb,\n\tvoid *progress_payload", - "args": [ - { - "comment": "pointer to the writepack functions", - "name": "out", - "type": "git_odb_writepack **" - }, - { - "comment": "object database where the stream will read from", - "name": "db", - "type": "git_odb *" - }, - { - "comment": "function to call with progress information. Be aware that this is called inline with network and indexing operations, so performance may be affected.", - "name": "progress_cb", - "type": "git_transfer_progress_callback" - }, - { - "comment": "payload for the progress callback", - "name": "progress_payload", - "type": "void *" - } - ], - "comments": "

If the ODB layer understands pack files, then the given\npackfile will likely be streamed directly to disk (and a\ncorresponding index created). If the ODB layer does not\nunderstand pack files, the objects will be stored in whatever\nformat the ODB layer uses.

\n\n

@see git_odb_writepack

\n", - "description": "

Open a stream for writing a pack file to the ODB.

\n", - "file": "odb.h", - "group": "odb", - "line": 325, - "lineto": 329, - "return": { - "type": "int" - }, - "sig": "git_odb_writepack **::git_odb *::git_transfer_progress_callback::void *", - "type": "function" - }, - "git_oid_allocfmt": { - "argline": "const git_oid *id", - "args": [ - { - "comment": "the oid structure to format", - "name": "id", - "type": "const git_oid *" - } - ], - "comments": "", - "description": "

Format a git_oid into a newly allocated c-string.

\n", - "file": "oid.h", - "group": "oid", - "line": 125, - "lineto": 125, - "return": { - "comment": "the c-string; NULL if memory is exhausted. Caller must deallocate the string with git__free().", - "type": "char *" - }, - "sig": "const git_oid *", - "type": "function" - }, - "git_oid_cmp": { - "argline": "const git_oid *a, const git_oid *b", - "args": [ - { - "comment": "first oid structure.", - "name": "a", - "type": "const git_oid *" - }, - { - "comment": "second oid structure.", - "name": "b", - "type": "const git_oid *" - } - ], - "comments": "", - "description": "

Compare two oid structures.

\n", - "file": "oid.h", - "group": "oid", - "line": 161, - "lineto": 161, - "return": { - "comment": "<0, 0, >0 if a < b, a == b, a > b.", - "type": "int" - }, - "sig": "const git_oid *::const git_oid *", - "type": "function" - }, - "git_oid_cpy": { - "argline": "git_oid *out, const git_oid *src", - "args": [ - { - "comment": "oid structure the result is written into.", - "name": "out", - "type": "git_oid *" - }, - { - "comment": "oid structure to copy from.", - "name": "src", - "type": "const git_oid *" - } - ], - "comments": "", - "description": "

Copy an oid from one structure to another.

\n", - "examples": { - "blame.c": [ - "ex/v0.20.0/blame.html#git_oid_cpy-18", - "ex/v0.20.0/blame.html#git_oid_cpy-19", - "ex/v0.20.0/blame.html#git_oid_cpy-20" - ] - }, - "file": "oid.h", - "group": "oid", - "line": 152, - "lineto": 152, - "return": { - "type": "void" - }, - "sig": "git_oid *::const git_oid *", - "type": "function" - }, - "git_oid_equal": { - "argline": "const git_oid *a, const git_oid *b", - "args": [ - { - "comment": "first oid structure.", - "name": "a", - "type": "const git_oid *" - }, - { - "comment": "second oid structure.", - "name": "b", - "type": "const git_oid *" - } - ], - "comments": "", - "description": "

Compare two oid structures for equality

\n", - "file": "oid.h", - "group": "oid", - "line": 170, - "lineto": 173, - "return": { - "comment": "true if equal, false otherwise", - "type": "int" - }, - "sig": "const git_oid *::const git_oid *", - "type": "function" - }, - "git_oid_fmt": { - "argline": "char *out, const git_oid *id", - "args": [ - { - "comment": "output hex string; must be pointing at the start of the hex sequence and have at least the number of bytes needed for an oid encoded in hex (40 bytes). Only the oid digits are written; a '\\\\0' terminator must be added by the caller if it is required.", - "name": "out", - "type": "char *" - }, - { - "comment": "oid structure to format.", - "name": "id", - "type": "const git_oid *" - } - ], - "comments": "", - "description": "

Format a git_oid into a hex string.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_oid_fmt-47", - "ex/v0.20.0/general.html#git_oid_fmt-48", - "ex/v0.20.0/general.html#git_oid_fmt-49", - "ex/v0.20.0/general.html#git_oid_fmt-50", - "ex/v0.20.0/general.html#git_oid_fmt-51" - ], - "network/fetch.c": [ - "ex/v0.20.0/network/fetch.html#git_oid_fmt-1", - "ex/v0.20.0/network/fetch.html#git_oid_fmt-2" - ], - "network/index-pack.c": [ - "ex/v0.20.0/network/index-pack.html#git_oid_fmt-6" - ], - "network/ls-remote.c": [ - "ex/v0.20.0/network/ls-remote.html#git_oid_fmt-1" - ] - }, - "file": "oid.h", - "group": "oid", - "line": 90, - "lineto": 90, - "return": { - "type": "void" - }, - "sig": "char *::const git_oid *", - "type": "function" - }, - "git_oid_fromraw": { - "argline": "git_oid *out, const unsigned char *raw", - "args": [ - { - "comment": "oid structure the result is written into.", - "name": "out", - "type": "git_oid *" - }, - { - "comment": "the raw input bytes to be copied.", - "name": "raw", - "type": "const unsigned char *" - } - ], - "comments": "", - "description": "

Copy an already raw oid into a git_oid structure.

\n", - "file": "oid.h", - "group": "oid", - "line": 78, - "lineto": 78, - "return": { - "type": "void" - }, - "sig": "git_oid *::const unsigned char *", - "type": "function" - }, - "git_oid_fromstr": { - "argline": "git_oid *out, const char *str", - "args": [ - { - "comment": "oid structure the result is written into.", - "name": "out", - "type": "git_oid *" - }, - { - "comment": "input hex string; must be pointing at the start of the hex sequence and have at least the number of bytes needed for an oid encoded in hex (40 bytes).", - "name": "str", - "type": "const char *" - } - ], - "comments": "", - "description": "

Parse a hex formatted object id into a git_oid.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_oid_fromstr-39", - "ex/v0.20.0/general.html#git_oid_fromstr-40", - "ex/v0.20.0/general.html#git_oid_fromstr-41", - "ex/v0.20.0/general.html#git_oid_fromstr-42", - "ex/v0.20.0/general.html#git_oid_fromstr-43", - "ex/v0.20.0/general.html#git_oid_fromstr-44", - "ex/v0.20.0/general.html#git_oid_fromstr-45", - "ex/v0.20.0/general.html#git_oid_fromstr-46" - ] - }, - "file": "oid.h", - "group": "oid", - "line": 47, - "lineto": 47, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_oid *::const char *", - "type": "function" - }, - "git_oid_fromstrn": { - "argline": "git_oid *out, const char *str, size_t length", - "args": [ - { - "comment": "oid structure the result is written into.", - "name": "out", - "type": "git_oid *" - }, - { - "comment": "input hex string of at least size `length`", - "name": "str", - "type": "const char *" - }, - { - "comment": "length of the input string", - "name": "length", - "type": "size_t" - } - ], - "comments": "

If N is odd, N-1 characters will be parsed instead.\nThe remaining space in the git_oid will be set to zero.

\n", - "description": "

Parse N characters of a hex formatted object id into a git_oid

\n", - "file": "oid.h", - "group": "oid", - "line": 70, - "lineto": 70, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_oid *::const char *::size_t", - "type": "function" - }, - "git_oid_fromstrp": { - "argline": "git_oid *out, const char *str", - "args": [ - { - "comment": "oid structure the result is written into.", - "name": "out", - "type": "git_oid *" - }, - { - "comment": "input hex string; must be at least 4 characters long and null-terminated.", - "name": "str", - "type": "const char *" - } - ], - "comments": "", - "description": "

Parse a hex formatted null-terminated string into a git_oid.

\n", - "file": "oid.h", - "group": "oid", - "line": 57, - "lineto": 57, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_oid *::const char *", - "type": "function" - }, - "git_oid_iszero": { - "argline": "const git_oid *id", - "args": [ - { - "name": "id", - "type": "const git_oid *" - } - ], - "comments": "", - "description": "

Check is an oid is all zeros.

\n", - "examples": { - "blame.c": [ - "ex/v0.20.0/blame.html#git_oid_iszero-21" - ], - "network/fetch.c": [ - "ex/v0.20.0/network/fetch.html#git_oid_iszero-3" - ] - }, - "file": "oid.h", - "group": "oid", - "line": 210, - "lineto": 210, - "return": { - "comment": "1 if all zeros, 0 otherwise.", - "type": "int" - }, - "sig": "const git_oid *", - "type": "function" - }, - "git_oid_ncmp": { - "argline": "const git_oid *a, const git_oid *b, size_t len", - "args": [ - { - "comment": "first oid structure.", - "name": "a", - "type": "const git_oid *" - }, - { - "comment": "second oid structure.", - "name": "b", - "type": "const git_oid *" - }, - { - "comment": "the number of hex chars to compare", - "name": "len", - "type": "size_t" - } - ], - "comments": "", - "description": "

Compare the first 'len' hexadecimal characters (packets of 4 bits)\nof two oid structures.

\n", - "file": "oid.h", - "group": "oid", - "line": 184, - "lineto": 184, - "return": { - "comment": "0 in case of a match", - "type": "int" - }, - "sig": "const git_oid *::const git_oid *::size_t", - "type": "function" - }, - "git_oid_nfmt": { - "argline": "char *out, size_t n, const git_oid *id", - "args": [ - { - "comment": "output hex string; you say how many bytes to write. If the number of bytes is > GIT_OID_HEXSZ, extra bytes will be zeroed; if not, a '\\0' terminator is NOT added.", - "name": "out", - "type": "char *" - }, - { - "comment": "number of characters to write into out string", - "name": "n", - "type": "size_t" - }, - { - "comment": "oid structure to format.", - "name": "id", - "type": "const git_oid *" - } - ], - "comments": "", - "description": "

Format a git_oid into a partial hex string.

\n", - "file": "oid.h", - "group": "oid", - "line": 101, - "lineto": 101, - "return": { - "type": "void" - }, - "sig": "char *::size_t::const git_oid *", - "type": "function" - }, - "git_oid_pathfmt": { - "argline": "char *out, const git_oid *id", - "args": [ - { - "comment": "output hex string; must be pointing at the start of the hex sequence and have at least the number of bytes needed for an oid encoded in hex (41 bytes). Only the oid digits are written; a '\\\\0' terminator must be added by the caller if it is required.", - "name": "out", - "type": "char *" - }, - { - "comment": "oid structure to format.", - "name": "id", - "type": "const git_oid *" - } - ], - "comments": "

The resulting string is "aa/...", where "aa" is the first two\nhex digits of the oid and "..." is the remaining 38 digits.

\n", - "description": "

Format a git_oid into a loose-object path string.

\n", - "file": "oid.h", - "group": "oid", - "line": 116, - "lineto": 116, - "return": { - "type": "void" - }, - "sig": "char *::const git_oid *", - "type": "function" - }, - "git_oid_shorten_add": { - "argline": "git_oid_shorten *os, const char *text_id", - "args": [ - { - "comment": "a `git_oid_shorten` instance", - "name": "os", - "type": "git_oid_shorten *" - }, - { - "comment": "an OID in text form", - "name": "text_id", - "type": "const char *" - } - ], - "comments": "

The OID is expected to be a 40-char hexadecimal string.\nThe OID is owned by the user and will not be modified\nor freed.

\n\n

For performance reasons, there is a hard-limit of how many\nOIDs can be added to a single set (around ~32000, assuming\na mostly randomized distribution), which should be enough\nfor any kind of program, and keeps the algorithm fast and\nmemory-efficient.

\n\n

Attempting to add more than those OIDs will result in a\nGITERR_INVALID error

\n", - "description": "

Add a new OID to set of shortened OIDs and calculate\nthe minimal length to uniquely identify all the OIDs in\nthe set.

\n", - "file": "oid.h", - "group": "oid", - "line": 257, - "lineto": 257, - "return": { - "comment": "the minimal length to uniquely identify all OIDs added so far to the set; or an error code (<0) if an error occurs.", - "type": "int" - }, - "sig": "git_oid_shorten *::const char *", - "type": "function" - }, - "git_oid_shorten_free": { - "argline": "git_oid_shorten *os", - "args": [ - { - "comment": "a `git_oid_shorten` instance", - "name": "os", - "type": "git_oid_shorten *" - } - ], - "comments": "", - "description": "

Free an OID shortener instance

\n", - "file": "oid.h", - "group": "oid", - "line": 264, - "lineto": 264, - "return": { - "type": "void" - }, - "sig": "git_oid_shorten *", - "type": "function" - }, - "git_oid_shorten_new": { - "argline": "size_t min_length", - "args": [ - { - "comment": "The minimal length for all identifiers, which will be used even if shorter OIDs would still be unique.", - "name": "min_length", - "type": "size_t" - } - ], - "comments": "

The OID shortener is used to process a list of OIDs\nin text form and return the shortest length that would\nuniquely identify all of them.

\n\n

E.g. look at the result of git log --abbrev.

\n", - "description": "

Create a new OID shortener.

\n", - "file": "oid.h", - "group": "oid", - "line": 231, - "lineto": 231, - "return": { - "comment": "a `git_oid_shorten` instance, NULL if OOM", - "type": "git_oid_shorten *" - }, - "sig": "size_t", - "type": "function" - }, - "git_oid_strcmp": { - "argline": "const git_oid *id, const char *str", - "args": [ - { - "comment": "oid structure.", - "name": "id", - "type": "const git_oid *" - }, - { - "comment": "input hex string of an object id.", - "name": "str", - "type": "const char *" - } - ], - "comments": "", - "description": "

Compare an oid to an hex formatted object id.

\n", - "file": "oid.h", - "group": "oid", - "line": 203, - "lineto": 203, - "return": { - "comment": "-1 if str is not valid, <0 if id sorts before str, 0 if id matches str, >0 if id sorts after str.", - "type": "int" - }, - "sig": "const git_oid *::const char *", - "type": "function" - }, - "git_oid_streq": { - "argline": "const git_oid *id, const char *str", - "args": [ - { - "comment": "oid structure.", - "name": "id", - "type": "const git_oid *" - }, - { - "comment": "input hex string of an object id.", - "name": "str", - "type": "const char *" - } - ], - "comments": "", - "description": "

Check if an oid equals an hex formatted object id.

\n", - "file": "oid.h", - "group": "oid", - "line": 193, - "lineto": 193, - "return": { - "comment": "0 in case of a match, -1 otherwise.", - "type": "int" - }, - "sig": "const git_oid *::const char *", - "type": "function" - }, - "git_oid_tostr": { - "argline": "char *out, size_t n, const git_oid *id", - "args": [ - { - "comment": "the buffer into which the oid string is output.", - "name": "out", - "type": "char *" - }, - { - "comment": "the size of the out buffer.", - "name": "n", - "type": "size_t" - }, - { - "comment": "the oid structure to format.", - "name": "id", - "type": "const git_oid *" - } - ], - "comments": "

If the buffer is smaller than GIT_OID_HEXSZ+1, then the resulting\noid c-string will be truncated to n-1 characters (but will still be\nNUL-byte terminated).

\n\n

If there are any input parameter errors (out == NULL, n == 0, oid ==\nNULL), then a pointer to an empty string is returned, so that the\nreturn value can always be printed.

\n", - "description": "

Format a git_oid into a buffer as a hex format c-string.

\n", - "examples": { - "blame.c": [ - "ex/v0.20.0/blame.html#git_oid_tostr-16", - "ex/v0.20.0/blame.html#git_oid_tostr-17" - ], - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_oid_tostr-24", - "ex/v0.20.0/cat-file.html#git_oid_tostr-25", - "ex/v0.20.0/cat-file.html#git_oid_tostr-26", - "ex/v0.20.0/cat-file.html#git_oid_tostr-27", - "ex/v0.20.0/cat-file.html#git_oid_tostr-28" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_oid_tostr-34", - "ex/v0.20.0/log.html#git_oid_tostr-35" - ], - "rev-parse.c": [ - "ex/v0.20.0/rev-parse.html#git_oid_tostr-10", - "ex/v0.20.0/rev-parse.html#git_oid_tostr-11", - "ex/v0.20.0/rev-parse.html#git_oid_tostr-12", - "ex/v0.20.0/rev-parse.html#git_oid_tostr-13" - ] - }, - "file": "oid.h", - "group": "oid", - "line": 144, - "lineto": 144, - "return": { - "comment": "the out buffer pointer, assuming no input parameter errors, otherwise a pointer to an empty string.", - "type": "char *" - }, - "sig": "char *::size_t::const git_oid *", - "type": "function" - }, - "git_packbuilder_foreach": { - "argline": "git_packbuilder *pb, git_packbuilder_foreach_cb cb, void *payload", - "args": [ - { - "comment": "the packbuilder", - "name": "pb", - "type": "git_packbuilder *" - }, - { - "comment": "the callback to call with each packed object's buffer", - "name": "cb", - "type": "git_packbuilder_foreach_cb" - }, - { - "comment": "the callback's data", - "name": "payload", - "type": "void *" - } - ], - "comments": "", - "description": "

Create the new pack and pass each object to the callback

\n", - "file": "pack.h", - "group": "packbuilder", - "line": 154, - "lineto": 154, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_packbuilder *::git_packbuilder_foreach_cb::void *", - "type": "function" - }, - "git_packbuilder_free": { - "argline": "git_packbuilder *pb", - "args": [ - { - "comment": "The packbuilder", - "name": "pb", - "type": "git_packbuilder *" - } - ], - "comments": "", - "description": "

Free the packbuilder and all associated data

\n", - "file": "pack.h", - "group": "packbuilder", - "line": 199, - "lineto": 199, - "return": { - "type": "void" - }, - "sig": "git_packbuilder *", - "type": "function" - }, - "git_packbuilder_hash": { - "argline": "git_packbuilder *pb", - "args": [ - { - "comment": "The packbuilder object", - "name": "pb", - "type": "git_packbuilder *" - } - ], - "comments": "

A packfile's name is derived from the sorted hashing of all object\nnames. This is only correct after the packfile has been written.

\n", - "description": "

Get the packfile's hash

\n", - "file": "pack.h", - "group": "packbuilder", - "line": 143, - "lineto": 145, - "return": { - "type": "const git_oid *" - }, - "sig": "git_packbuilder *", - "type": "function" - }, - "git_packbuilder_insert": { - "argline": "git_packbuilder *pb, const git_oid *id, const char *name", - "args": [ - { - "comment": "The packbuilder", - "name": "pb", - "type": "git_packbuilder *" - }, - { - "comment": "The oid of the commit", - "name": "id", - "type": "const git_oid *" - }, - { - "comment": "The name; might be NULL", - "name": "name", - "type": "const char *" - } - ], - "comments": "

For an optimal pack it's mandatory to insert objects in recency order,\ncommits followed by trees and blobs.

\n", - "description": "

Insert a single object

\n", - "file": "pack.h", - "group": "packbuilder", - "line": 91, - "lineto": 91, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_packbuilder *::const git_oid *::const char *", - "type": "function" - }, - "git_packbuilder_insert_commit": { - "argline": "git_packbuilder *pb, const git_oid *id", - "args": [ - { - "comment": "The packbuilder", - "name": "pb", - "type": "git_packbuilder *" - }, - { - "comment": "The oid of the commit", - "name": "id", - "type": "const git_oid *" - } - ], - "comments": "

This will add a commit as well as the completed referenced tree.

\n", - "description": "

Insert a commit object

\n", - "file": "pack.h", - "group": "packbuilder", - "line": 115, - "lineto": 115, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_packbuilder *::const git_oid *", - "type": "function" - }, - "git_packbuilder_insert_tree": { - "argline": "git_packbuilder *pb, const git_oid *id", - "args": [ - { - "comment": "The packbuilder", - "name": "pb", - "type": "git_packbuilder *" - }, - { - "comment": "The oid of the root tree", - "name": "id", - "type": "const git_oid *" - } - ], - "comments": "

This will add the tree as well as all referenced trees and blobs.

\n", - "description": "

Insert a root tree object

\n", - "file": "pack.h", - "group": "packbuilder", - "line": 103, - "lineto": 103, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_packbuilder *::const git_oid *", - "type": "function" - }, - "git_packbuilder_new": { - "argline": "git_packbuilder **out, git_repository *repo", - "args": [ - { - "comment": "The new packbuilder object", - "name": "out", - "type": "git_packbuilder **" - }, - { - "comment": "The repository", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "", - "description": "

Initialize a new packbuilder

\n", - "file": "pack.h", - "group": "packbuilder", - "line": 64, - "lineto": 64, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_packbuilder **::git_repository *", - "type": "function" - }, - "git_packbuilder_object_count": { - "argline": "git_packbuilder *pb", - "args": [ - { - "comment": "the packbuilder", - "name": "pb", - "type": "git_packbuilder *" - } - ], - "comments": "", - "description": "

Get the total number of objects the packbuilder will write out

\n", - "file": "pack.h", - "group": "packbuilder", - "line": 162, - "lineto": 162, - "return": { - "comment": "the number of objects in the packfile", - "type": "uint32_t" - }, - "sig": "git_packbuilder *", - "type": "function" - }, - "git_packbuilder_set_callbacks": { - "argline": "git_packbuilder *pb,\n\tgit_packbuilder_progress progress_cb,\n\tvoid *progress_cb_payload", - "args": [ - { - "comment": "The packbuilder object", - "name": "pb", - "type": "git_packbuilder *" - }, - { - "comment": "Function to call with progress information during pack building. Be aware that this is called inline with pack building operations, so performance may be affected.", - "name": "progress_cb", - "type": "git_packbuilder_progress" - }, - { - "comment": "Payload for progress callback.", - "name": "progress_cb_payload", - "type": "void *" - } - ], - "comments": "", - "description": "

Set the callbacks for a packbuilder

\n", - "file": "pack.h", - "group": "packbuilder", - "line": 189, - "lineto": 192, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_packbuilder *::git_packbuilder_progress::void *", - "type": "function" - }, - "git_packbuilder_set_threads": { - "argline": "git_packbuilder *pb, unsigned int n", - "args": [ - { - "comment": "The packbuilder", - "name": "pb", - "type": "git_packbuilder *" - }, - { - "comment": "Number of threads to spawn", - "name": "n", - "type": "unsigned int" - } - ], - "comments": "

By default, libgit2 won't spawn any threads at all;\nwhen set to 0, libgit2 will autodetect the number of\nCPUs.

\n", - "description": "

Set number of threads to spawn

\n", - "file": "pack.h", - "group": "packbuilder", - "line": 77, - "lineto": 77, - "return": { - "comment": "number of actual threads to be used", - "type": "unsigned int" - }, - "sig": "git_packbuilder *::unsigned int", - "type": "function" - }, - "git_packbuilder_write": { - "argline": "git_packbuilder *pb,\n\tconst char *path,\n\tunsigned int mode,\n\tgit_transfer_progress_callback progress_cb,\n\tvoid *progress_cb_payload", - "args": [ - { - "comment": "The packbuilder", - "name": "pb", - "type": "git_packbuilder *" - }, - { - "comment": "to the directory where the packfile and index should be stored", - "name": "path", - "type": "const char *" - }, - { - "comment": "permissions to use creating a packfile or 0 for defaults", - "name": "mode", - "type": "unsigned int" - }, - { - "comment": "function to call with progress information from the indexer (optional)", - "name": "progress_cb", - "type": "git_transfer_progress_callback" - }, - { - "comment": "payload for the progress callback (optional)", - "name": "progress_cb_payload", - "type": "void *" - } - ], - "comments": "", - "description": "

Write the new pack and corresponding index file to path.

\n", - "file": "pack.h", - "group": "packbuilder", - "line": 128, - "lineto": 133, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_packbuilder *::const char *::unsigned int::git_transfer_progress_callback::void *", - "type": "function" - }, - "git_packbuilder_written": { - "argline": "git_packbuilder *pb", - "args": [ - { - "comment": "the packbuilder", - "name": "pb", - "type": "git_packbuilder *" - } - ], - "comments": "", - "description": "

Get the number of objects the packbuilder has already written out

\n", - "file": "pack.h", - "group": "packbuilder", - "line": 170, - "lineto": 170, - "return": { - "comment": "the number of objects which have already been written", - "type": "uint32_t" - }, - "sig": "git_packbuilder *", - "type": "function" - }, - "git_patch_free": { - "argline": "git_patch *patch", - "args": [ - { - "name": "patch", - "type": "git_patch *" - } - ], - "comments": "", - "description": "

Free a git_patch object.

\n", - "file": "patch.h", - "group": "patch", - "line": 111, - "lineto": 111, - "return": { - "type": "void" - }, - "sig": "git_patch *", - "type": "function" - }, - "git_patch_from_blob_and_buffer": { - "argline": "git_patch **out,\n\tconst git_blob *old_blob,\n\tconst char *old_as_path,\n\tconst char *buffer,\n\tsize_t buffer_len,\n\tconst char *buffer_as_path,\n\tconst git_diff_options *opts", - "args": [ - { - "comment": "The generated patch; NULL on error", - "name": "out", - "type": "git_patch **" - }, - { - "comment": "Blob for old side of diff, or NULL for empty blob", - "name": "old_blob", - "type": "const git_blob *" - }, - { - "comment": "Treat old blob as if it had this filename; can be NULL", - "name": "old_as_path", - "type": "const char *" - }, - { - "comment": "Raw data for new side of diff, or NULL for empty", - "name": "buffer", - "type": "const char *" - }, - { - "comment": "Length of raw data for new side of diff", - "name": "buffer_len", - "type": "size_t" - }, - { - "comment": "Treat buffer as if it had this filename; can be NULL", - "name": "buffer_as_path", - "type": "const char *" - }, - { - "comment": "Options for diff, or NULL for default options", - "name": "opts", - "type": "const git_diff_options *" - } - ], - "comments": "

This is just like git_diff_blob_to_buffer() except it generates a patch\nobject for the difference instead of directly making callbacks. You can\nuse the standard git_patch accessor functions to read the patch\ndata, and you must call git_patch_free() on the patch when done.

\n", - "description": "

Directly generate a patch from the difference between a blob and a buffer.

\n", - "file": "patch.h", - "group": "patch", - "line": 99, - "lineto": 106, - "return": { - "comment": "0 on success or error code < 0", - "type": "int" - }, - "sig": "git_patch **::const git_blob *::const char *::const char *::size_t::const char *::const git_diff_options *", - "type": "function" - }, - "git_patch_from_blobs": { - "argline": "git_patch **out,\n\tconst git_blob *old_blob,\n\tconst char *old_as_path,\n\tconst git_blob *new_blob,\n\tconst char *new_as_path,\n\tconst git_diff_options *opts", - "args": [ - { - "comment": "The generated patch; NULL on error", - "name": "out", - "type": "git_patch **" - }, - { - "comment": "Blob for old side of diff, or NULL for empty blob", - "name": "old_blob", - "type": "const git_blob *" - }, - { - "comment": "Treat old blob as if it had this filename; can be NULL", - "name": "old_as_path", - "type": "const char *" - }, - { - "comment": "Blob for new side of diff, or NULL for empty blob", - "name": "new_blob", - "type": "const git_blob *" - }, - { - "comment": "Treat new blob as if it had this filename; can be NULL", - "name": "new_as_path", - "type": "const char *" - }, - { - "comment": "Options for diff, or NULL for default options", - "name": "opts", - "type": "const git_diff_options *" - } - ], - "comments": "

This is just like git_diff_blobs() except it generates a patch object\nfor the difference instead of directly making callbacks. You can use the\nstandard git_patch accessor functions to read the patch data, and\nyou must call git_patch_free() on the patch when done.

\n", - "description": "

Directly generate a patch from the difference between two blobs.

\n", - "file": "patch.h", - "group": "patch", - "line": 74, - "lineto": 80, - "return": { - "comment": "0 on success or error code < 0", - "type": "int" - }, - "sig": "git_patch **::const git_blob *::const char *::const git_blob *::const char *::const git_diff_options *", - "type": "function" - }, - "git_patch_from_diff": { - "argline": "git_patch **out, git_diff *diff, size_t idx", - "args": [ - { - "comment": "Output parameter for the delta patch object", - "name": "out", - "type": "git_patch **" - }, - { - "comment": "Diff list object", - "name": "diff", - "type": "git_diff *" - }, - { - "comment": "Index into diff list", - "name": "idx", - "type": "size_t" - } - ], - "comments": "

The git_patch is a newly created object contains the text diffs\nfor the delta. You have to call git_patch_free() when you are\ndone with it. You can use the patch object to loop over all the hunks\nand lines in the diff of the one delta.

\n\n

For an unchanged file or a binary file, no git_patch will be\ncreated, the output will be set to NULL, and the binary flag will be\nset true in the git_diff_delta structure.

\n\n

The git_diff_delta pointer points to internal data and you do not have\nto release it when you are done with it. It will go away when the\ngit_diff and git_patch go away.

\n\n

It is okay to pass NULL for either of the output parameters; if you pass\nNULL for the git_patch, then the text diff will not be calculated.

\n", - "description": "

Return the diff delta and patch for an entry in the diff list.

\n", - "file": "patch.h", - "group": "patch", - "line": 55, - "lineto": 56, - "return": { - "comment": "0 on success, other value < 0 on error", - "type": "int" - }, - "sig": "git_patch **::git_diff *::size_t", - "type": "function" - }, - "git_patch_get_delta": { - "argline": "git_patch *patch", - "args": [ - { - "name": "patch", - "type": "git_patch *" - } - ], - "comments": "", - "description": "

Get the delta associated with a patch

\n", - "file": "patch.h", - "group": "patch", - "line": 116, - "lineto": 116, - "return": { - "type": "const git_diff_delta *" - }, - "sig": "git_patch *", - "type": "function" - }, - "git_patch_get_hunk": { - "argline": "const git_diff_hunk **out,\n\tsize_t *lines_in_hunk,\n\tgit_patch *patch,\n\tsize_t hunk_idx", - "args": [ - { - "comment": "Output pointer to git_diff_hunk of hunk", - "name": "out", - "type": "const git_diff_hunk **" - }, - { - "comment": "Output count of total lines in this hunk", - "name": "lines_in_hunk", - "type": "size_t *" - }, - { - "comment": "Input pointer to patch object", - "name": "patch", - "type": "git_patch *" - }, - { - "comment": "Input index of hunk to get information about", - "name": "hunk_idx", - "type": "size_t" - } - ], - "comments": "

Given a patch and a hunk index into the patch, this returns detailed\ninformation about that hunk. Any of the output pointers can be passed\nas NULL if you don't care about that particular piece of information.

\n", - "description": "

Get the information about a hunk in a patch

\n", - "file": "patch.h", - "group": "patch", - "line": 158, - "lineto": 162, - "return": { - "comment": "0 on success, GIT_ENOTFOUND if hunk_idx out of range, <0 on error", - "type": "int" - }, - "sig": "const git_diff_hunk **::size_t *::git_patch *::size_t", - "type": "function" - }, - "git_patch_get_line_in_hunk": { - "argline": "const git_diff_line **out,\n\tgit_patch *patch,\n\tsize_t hunk_idx,\n\tsize_t line_of_hunk", - "args": [ - { - "comment": "The git_diff_line data for this line", - "name": "out", - "type": "const git_diff_line **" - }, - { - "comment": "The patch to look in", - "name": "patch", - "type": "git_patch *" - }, - { - "comment": "The index of the hunk", - "name": "hunk_idx", - "type": "size_t" - }, - { - "comment": "The index of the line in the hunk", - "name": "line_of_hunk", - "type": "size_t" - } - ], - "comments": "

Given a patch, a hunk index, and a line index in the hunk, this\nwill return a lot of details about that line. If you pass a hunk\nindex larger than the number of hunks or a line index larger than\nthe number of lines in the hunk, this will return -1.

\n", - "description": "

Get data about a line in a hunk of a patch.

\n", - "file": "patch.h", - "group": "patch", - "line": 189, - "lineto": 193, - "return": { - "comment": "0 on success, <0 on failure", - "type": "int" - }, - "sig": "const git_diff_line **::git_patch *::size_t::size_t", - "type": "function" - }, - "git_patch_line_stats": { - "argline": "size_t *total_context,\n\tsize_t *total_additions,\n\tsize_t *total_deletions,\n\tconst git_patch *patch", - "args": [ - { - "comment": "Count of context lines in output, can be NULL.", - "name": "total_context", - "type": "size_t *" - }, - { - "comment": "Count of addition lines in output, can be NULL.", - "name": "total_additions", - "type": "size_t *" - }, - { - "comment": "Count of deletion lines in output, can be NULL.", - "name": "total_deletions", - "type": "size_t *" - }, - { - "comment": "The git_patch object", - "name": "patch", - "type": "const git_patch *" - } - ], - "comments": "

This helps imitate a diff --numstat type of output. For that purpose,\nyou only need the total_additions and total_deletions values, but we\ninclude the total_context line count in case you want the total number\nof lines of diff output that will be generated.

\n\n

All outputs are optional. Pass NULL if you don't need a particular count.

\n", - "description": "

Get line counts of each type in a patch.

\n", - "file": "patch.h", - "group": "patch", - "line": 139, - "lineto": 143, - "return": { - "comment": "0 on success, <0 on error", - "type": "int" - }, - "sig": "size_t *::size_t *::size_t *::const git_patch *", - "type": "function" - }, - "git_patch_num_hunks": { - "argline": "git_patch *patch", - "args": [ - { - "name": "patch", - "type": "git_patch *" - } - ], - "comments": "", - "description": "

Get the number of hunks in a patch

\n", - "file": "patch.h", - "group": "patch", - "line": 121, - "lineto": 121, - "return": { - "type": "size_t" - }, - "sig": "git_patch *", - "type": "function" - }, - "git_patch_num_lines_in_hunk": { - "argline": "git_patch *patch,\n\tsize_t hunk_idx", - "args": [ - { - "comment": "The git_patch object", - "name": "patch", - "type": "git_patch *" - }, - { - "comment": "Index of the hunk", - "name": "hunk_idx", - "type": "size_t" - } - ], - "comments": "", - "description": "

Get the number of lines in a hunk.

\n", - "file": "patch.h", - "group": "patch", - "line": 171, - "lineto": 173, - "return": { - "comment": "Number of lines in hunk or -1 if invalid hunk index", - "type": "int" - }, - "sig": "git_patch *::size_t", - "type": "function" - }, - "git_patch_print": { - "argline": "git_patch *patch,\n\tgit_diff_line_cb print_cb,\n\tvoid *payload", - "args": [ - { - "comment": "A git_patch representing changes to one file", - "name": "patch", - "type": "git_patch *" - }, - { - "comment": "Callback function to output lines of the patch. Will be called for file headers, hunk headers, and diff lines.", - "name": "print_cb", - "type": "git_diff_line_cb" - }, - { - "comment": "Reference pointer that will be passed to your callbacks.", - "name": "payload", - "type": "void *" - } - ], - "comments": "

Returning a non-zero value from the callback will terminate the iteration\nand cause this return GIT_EUSER.

\n", - "description": "

Serialize the patch to text via callback.

\n", - "file": "patch.h", - "group": "patch", - "line": 229, - "lineto": 232, - "return": { - "comment": "0 on success, GIT_EUSER on non-zero callback, or error code", - "type": "int" - }, - "sig": "git_patch *::git_diff_line_cb::void *", - "type": "function" - }, - "git_patch_size": { - "argline": "git_patch *patch,\n\tint include_context,\n\tint include_hunk_headers,\n\tint include_file_headers", - "args": [ - { - "comment": "A git_patch representing changes to one file", - "name": "patch", - "type": "git_patch *" - }, - { - "comment": "Include context lines in size if non-zero", - "name": "include_context", - "type": "int" - }, - { - "comment": "Include hunk header lines if non-zero", - "name": "include_hunk_headers", - "type": "int" - }, - { - "comment": "Include file header lines if non-zero", - "name": "include_file_headers", - "type": "int" - } - ], - "comments": "

This returns the raw size of the patch data. This only includes the\nactual data from the lines of the diff, not the file or hunk headers.

\n\n

If you pass include_context as true (non-zero), this will be the size\nof all of the diff output; if you pass it as false (zero), this will\nonly include the actual changed lines (as if context_lines was 0).

\n", - "description": "

Look up size of patch diff data in bytes

\n", - "file": "patch.h", - "group": "patch", - "line": 211, - "lineto": 215, - "return": { - "comment": "The number of bytes of data", - "type": "size_t" - }, - "sig": "git_patch *::int::int::int", - "type": "function" - }, - "git_patch_to_str": { - "argline": "char **string,\n\tgit_patch *patch", - "args": [ - { - "comment": "Allocated string; caller must free.", - "name": "string", - "type": "char **" - }, - { - "comment": "A git_patch representing changes to one file", - "name": "patch", - "type": "git_patch *" - } - ], - "comments": "", - "description": "

Get the content of a patch as a single diff text.

\n", - "file": "patch.h", - "group": "patch", - "line": 241, - "lineto": 246, - "return": { - "comment": "0 on success, <0 on failure.", - "type": "int" - }, - "sig": "char **::git_patch *", - "type": "function" - }, - "git_pathspec_free": { - "argline": "git_pathspec *ps", - "args": [ - { - "comment": "The compiled pathspec", - "name": "ps", - "type": "git_pathspec *" - } - ], - "comments": "", - "description": "

Free a pathspec

\n", - "examples": { - "log.c": [ - "ex/v0.20.0/log.html#git_pathspec_free-37" - ] - }, - "file": "pathspec.h", - "group": "pathspec", - "line": 71, - "lineto": 71, - "return": { - "type": "void" - }, - "sig": "git_pathspec *", - "type": "function" - }, - "git_pathspec_match_diff": { - "argline": "git_pathspec_match_list **out,\n\tgit_diff *diff,\n\tuint32_t flags,\n\tgit_pathspec *ps", - "args": [ - { - "comment": "Output list of matches; pass NULL to just get return value", - "name": "out", - "type": "git_pathspec_match_list **" - }, - { - "comment": "A generated diff list", - "name": "diff", - "type": "git_diff *" - }, - { - "comment": "Combination of git_pathspec_flag_t options to control match", - "name": "flags", - "type": "uint32_t" - }, - { - "comment": "Pathspec to be matched", - "name": "ps", - "type": "git_pathspec *" - } - ], - "comments": "

This matches the pathspec against the files in the given diff list.

\n\n

If out is not NULL, this returns a git_patchspec_match_list. That\ncontains the list of all matched filenames (unless you pass the\nGIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of\npathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES\nflag). You must call git_pathspec_match_list_free() on this object.

\n", - "description": "

Match a pathspec against files in a diff list.

\n", - "file": "pathspec.h", - "group": "pathspec", - "line": 188, - "lineto": 192, - "return": { - "comment": "0 on success, -1 on error, GIT_ENOTFOUND if no matches and the GIT_PATHSPEC_NO_MATCH_ERROR flag is used", - "type": "int" - }, - "sig": "git_pathspec_match_list **::git_diff *::uint32_t::git_pathspec *", - "type": "function" - }, - "git_pathspec_match_index": { - "argline": "git_pathspec_match_list **out,\n\tgit_index *index,\n\tuint32_t flags,\n\tgit_pathspec *ps", - "args": [ - { - "comment": "Output list of matches; pass NULL to just get return value", - "name": "out", - "type": "git_pathspec_match_list **" - }, - { - "comment": "The index to match against", - "name": "index", - "type": "git_index *" - }, - { - "comment": "Combination of git_pathspec_flag_t options to control match", - "name": "flags", - "type": "uint32_t" - }, - { - "comment": "Pathspec to be matched", - "name": "ps", - "type": "git_pathspec *" - } - ], - "comments": "

This matches the pathspec against the files in the repository index.

\n\n

NOTE: At the moment, the case sensitivity of this match is controlled\nby the current case-sensitivity of the index object itself and the\nUSE_CASE and IGNORE_CASE flags will have no effect. This behavior will\nbe corrected in a future release.

\n\n

If out is not NULL, this returns a git_patchspec_match_list. That\ncontains the list of all matched filenames (unless you pass the\nGIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of\npathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES\nflag). You must call git_pathspec_match_list_free() on this object.

\n", - "description": "

Match a pathspec against entries in an index.

\n", - "file": "pathspec.h", - "group": "pathspec", - "line": 140, - "lineto": 144, - "return": { - "comment": "0 on success, -1 on error, GIT_ENOTFOUND if no matches and the GIT_PATHSPEC_NO_MATCH_ERROR flag is used", - "type": "int" - }, - "sig": "git_pathspec_match_list **::git_index *::uint32_t::git_pathspec *", - "type": "function" - }, - "git_pathspec_match_list_diff_entry": { - "argline": "const git_pathspec_match_list *m, size_t pos", - "args": [ - { - "comment": "The git_pathspec_match_list object", - "name": "m", - "type": "const git_pathspec_match_list *" - }, - { - "comment": "The index into the list", - "name": "pos", - "type": "size_t" - } - ], - "comments": "

This routine can only be used if the match list was generated by\ngit_pathspec_match_diff. Otherwise it will always return NULL.

\n", - "description": "

Get a matching diff delta by position.

\n", - "file": "pathspec.h", - "group": "pathspec", - "line": 233, - "lineto": 234, - "return": { - "comment": "The filename of the match", - "type": "const git_diff_delta *" - }, - "sig": "const git_pathspec_match_list *::size_t", - "type": "function" - }, - "git_pathspec_match_list_entry": { - "argline": "const git_pathspec_match_list *m, size_t pos", - "args": [ - { - "comment": "The git_pathspec_match_list object", - "name": "m", - "type": "const git_pathspec_match_list *" - }, - { - "comment": "The index into the list", - "name": "pos", - "type": "size_t" - } - ], - "comments": "

This routine cannot be used if the match list was generated by\ngit_pathspec_match_diff. If so, it will always return NULL.

\n", - "description": "

Get a matching filename by position.

\n", - "file": "pathspec.h", - "group": "pathspec", - "line": 220, - "lineto": 221, - "return": { - "comment": "The filename of the match", - "type": "const char *" - }, - "sig": "const git_pathspec_match_list *::size_t", - "type": "function" - }, - "git_pathspec_match_list_entrycount": { - "argline": "const git_pathspec_match_list *m", - "args": [ - { - "comment": "The git_pathspec_match_list object", - "name": "m", - "type": "const git_pathspec_match_list *" - } - ], - "comments": "", - "description": "

Get the number of items in a match list.

\n", - "file": "pathspec.h", - "group": "pathspec", - "line": 207, - "lineto": 208, - "return": { - "comment": "Number of items in match list", - "type": "size_t" - }, - "sig": "const git_pathspec_match_list *", - "type": "function" - }, - "git_pathspec_match_list_failed_entry": { - "argline": "const git_pathspec_match_list *m, size_t pos", - "args": [ - { - "comment": "The git_pathspec_match_list object", - "name": "m", - "type": "const git_pathspec_match_list *" - }, - { - "comment": "The index into the failed items", - "name": "pos", - "type": "size_t" - } - ], - "comments": "

This will be return NULL for positions out of range.

\n", - "description": "

Get an original pathspec string that had no matches.

\n", - "file": "pathspec.h", - "group": "pathspec", - "line": 257, - "lineto": 260, - "return": { - "comment": "The pathspec pattern that didn't match anything", - "type": "const char *" - }, - "sig": "const git_pathspec_match_list *::size_t", - "type": "function" - }, - "git_pathspec_match_list_failed_entrycount": { - "argline": "const git_pathspec_match_list *m", - "args": [ - { - "comment": "The git_pathspec_match_list object", - "name": "m", - "type": "const git_pathspec_match_list *" - } - ], - "comments": "

This will be zero unless you passed GIT_PATHSPEC_FIND_FAILURES when\ngenerating the git_pathspec_match_list.

\n", - "description": "

Get the number of pathspec items that did not match.

\n", - "file": "pathspec.h", - "group": "pathspec", - "line": 245, - "lineto": 246, - "return": { - "comment": "Number of items in original pathspec that had no matches", - "type": "size_t" - }, - "sig": "const git_pathspec_match_list *", - "type": "function" - }, - "git_pathspec_match_list_free": { - "argline": "git_pathspec_match_list *m", - "args": [ - { - "comment": "The git_pathspec_match_list to be freed", - "name": "m", - "type": "git_pathspec_match_list *" - } - ], - "comments": "", - "description": "

Free memory associates with a git_pathspec_match_list

\n", - "file": "pathspec.h", - "group": "pathspec", - "line": 199, - "lineto": 199, - "return": { - "type": "void" - }, - "sig": "git_pathspec_match_list *", - "type": "function" - }, - "git_pathspec_match_tree": { - "argline": "git_pathspec_match_list **out,\n\tgit_tree *tree,\n\tuint32_t flags,\n\tgit_pathspec *ps", - "args": [ - { - "comment": "Output list of matches; pass NULL to just get return value", - "name": "out", - "type": "git_pathspec_match_list **" - }, - { - "comment": "The root-level tree to match against", - "name": "tree", - "type": "git_tree *" - }, - { - "comment": "Combination of git_pathspec_flag_t options to control match", - "name": "flags", - "type": "uint32_t" - }, - { - "comment": "Pathspec to be matched", - "name": "ps", - "type": "git_pathspec *" - } - ], - "comments": "

This matches the pathspec against the files in the given tree.

\n\n

If out is not NULL, this returns a git_patchspec_match_list. That\ncontains the list of all matched filenames (unless you pass the\nGIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of\npathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES\nflag). You must call git_pathspec_match_list_free() on this object.

\n", - "description": "

Match a pathspec against files in a tree.

\n", - "examples": { - "log.c": [ - "ex/v0.20.0/log.html#git_pathspec_match_tree-38" - ] - }, - "file": "pathspec.h", - "group": "pathspec", - "line": 164, - "lineto": 168, - "return": { - "comment": "0 on success, -1 on error, GIT_ENOTFOUND if no matches and the GIT_PATHSPEC_NO_MATCH_ERROR flag is used", - "type": "int" - }, - "sig": "git_pathspec_match_list **::git_tree *::uint32_t::git_pathspec *", - "type": "function" - }, - "git_pathspec_match_workdir": { - "argline": "git_pathspec_match_list **out,\n\tgit_repository *repo,\n\tuint32_t flags,\n\tgit_pathspec *ps", - "args": [ - { - "comment": "Output list of matches; pass NULL to just get return value", - "name": "out", - "type": "git_pathspec_match_list **" - }, - { - "comment": "The repository in which to match; bare repo is an error", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "Combination of git_pathspec_flag_t options to control match", - "name": "flags", - "type": "uint32_t" - }, - { - "comment": "Pathspec to be matched", - "name": "ps", - "type": "git_pathspec *" - } - ], - "comments": "

This matches the pathspec against the current files in the working\ndirectory of the repository. It is an error to invoke this on a bare\nrepo. This handles git ignores (i.e. ignored files will not be\nconsidered to match the pathspec unless the file is tracked in the\nindex).

\n\n

If out is not NULL, this returns a git_patchspec_match_list. That\ncontains the list of all matched filenames (unless you pass the\nGIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of\npathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES\nflag). You must call git_pathspec_match_list_free() on this object.

\n", - "description": "

Match a pathspec against the working directory of a repository.

\n", - "file": "pathspec.h", - "group": "pathspec", - "line": 111, - "lineto": 115, - "return": { - "comment": "0 on success, -1 on error, GIT_ENOTFOUND if no matches and the GIT_PATHSPEC_NO_MATCH_ERROR flag was given", - "type": "int" - }, - "sig": "git_pathspec_match_list **::git_repository *::uint32_t::git_pathspec *", - "type": "function" - }, - "git_pathspec_matches_path": { - "argline": "const git_pathspec *ps, uint32_t flags, const char *path", - "args": [ - { - "comment": "The compiled pathspec", - "name": "ps", - "type": "const git_pathspec *" - }, - { - "comment": "Combination of git_pathspec_flag_t options to control match", - "name": "flags", - "type": "uint32_t" - }, - { - "comment": "The pathname to attempt to match", - "name": "path", - "type": "const char *" - } - ], - "comments": "

Unlike most of the other pathspec matching functions, this will not\nfall back on the native case-sensitivity for your platform. You must\nexplicitly pass flags to control case sensitivity or else this will\nfall back on being case sensitive.

\n", - "description": "

Try to match a path against a pathspec

\n", - "file": "pathspec.h", - "group": "pathspec", - "line": 86, - "lineto": 87, - "return": { - "comment": "1 is path matches spec, 0 if it does not", - "type": "int" - }, - "sig": "const git_pathspec *::uint32_t::const char *", - "type": "function" - }, - "git_pathspec_new": { - "argline": "git_pathspec **out, const git_strarray *pathspec", - "args": [ - { - "comment": "Output of the compiled pathspec", - "name": "out", - "type": "git_pathspec **" - }, - { - "comment": "A git_strarray of the paths to match", - "name": "pathspec", - "type": "const git_strarray *" - } - ], - "comments": "", - "description": "

Compile a pathspec

\n", - "examples": { - "log.c": [ - "ex/v0.20.0/log.html#git_pathspec_new-36" - ] - }, - "file": "pathspec.h", - "group": "pathspec", - "line": 63, - "lineto": 64, - "return": { - "comment": "0 on success, <0 on failure", - "type": "int" - }, - "sig": "git_pathspec **::const git_strarray *", - "type": "function" - }, - "git_push_add_refspec": { - "argline": "git_push *push, const char *refspec", - "args": [ - { - "comment": "The push object", - "name": "push", - "type": "git_push *" - }, - { - "comment": "Refspec string", - "name": "refspec", - "type": "const char *" - } - ], - "comments": "", - "description": "

Add a refspec to be pushed

\n", - "file": "push.h", - "group": "push", - "line": 100, - "lineto": 100, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_push *::const char *", - "type": "function" - }, - "git_push_finish": { - "argline": "git_push *push", - "args": [ - { - "comment": "The push object", - "name": "push", - "type": "git_push *" - } - ], - "comments": "

Note: To check if the push was successful (i.e. all remote references\nhave been updated as requested), you need to call both\ngit_push_unpack_ok and git_push_status_foreach. The remote\nrepository might have refused to update some or all of the references.

\n", - "description": "

Actually push all given refspecs

\n", - "file": "push.h", - "group": "push", - "line": 123, - "lineto": 123, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_push *", - "type": "function" - }, - "git_push_free": { - "argline": "git_push *push", - "args": [ - { - "comment": "The push object", - "name": "push", - "type": "git_push *" - } - ], - "comments": "", - "description": "

Free the given push object

\n", - "file": "push.h", - "group": "push", - "line": 156, - "lineto": 156, - "return": { - "type": "void" - }, - "sig": "git_push *", - "type": "function" - }, - "git_push_new": { - "argline": "git_push **out, git_remote *remote", - "args": [ - { - "comment": "New push object", - "name": "out", - "type": "git_push **" - }, - { - "comment": "Remote instance", - "name": "remote", - "type": "git_remote *" - } - ], - "comments": "", - "description": "

Create a new push object

\n", - "file": "push.h", - "group": "push", - "line": 57, - "lineto": 57, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_push **::git_remote *", - "type": "function" - }, - "git_push_set_callbacks": { - "argline": "git_push *push,\n\tgit_packbuilder_progress pack_progress_cb,\n\tvoid *pack_progress_cb_payload,\n\tgit_push_transfer_progress transfer_progress_cb,\n\tvoid *transfer_progress_cb_payload", - "args": [ - { - "comment": "The push object", - "name": "push", - "type": "git_push *" - }, - { - "comment": "Function to call with progress information during pack building. Be aware that this is called inline with pack building operations, so performance may be affected.", - "name": "pack_progress_cb", - "type": "git_packbuilder_progress" - }, - { - "comment": "Payload for the pack progress callback.", - "name": "pack_progress_cb_payload", - "type": "void *" - }, - { - "comment": "Function to call with progress information during the upload portion of a push. Be aware that this is called inline with pack building operations, so performance may be affected.", - "name": "transfer_progress_cb", - "type": "git_push_transfer_progress" - }, - { - "comment": "Payload for the network progress callback.", - "name": "transfer_progress_cb_payload", - "type": "void *" - } - ], - "comments": "", - "description": "

Set the callbacks for a push

\n", - "file": "push.h", - "group": "push", - "line": 85, - "lineto": 90, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_push *::git_packbuilder_progress::void *::git_push_transfer_progress::void *", - "type": "function" - }, - "git_push_set_options": { - "argline": "git_push *push,\n\tconst git_push_options *opts", - "args": [ - { - "comment": "The push object", - "name": "push", - "type": "git_push *" - }, - { - "comment": "The options to set on the push object", - "name": "opts", - "type": "const git_push_options *" - } - ], - "comments": "", - "description": "

Set options on a push object

\n", - "file": "push.h", - "group": "push", - "line": 67, - "lineto": 69, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_push *::const git_push_options *", - "type": "function" - }, - "git_push_status_foreach": { - "argline": "git_push *push,\n\t\t\tint (*cb)(const char *ref, const char *msg, void *data),\n\t\t\tvoid *data", - "args": [ - { - "comment": "The push object", - "name": "push", - "type": "git_push *" - }, - { - "comment": "The callback to call on each object", - "name": "cb", - "type": "int (*)(const char *ref, const char *msg, void *data)" - }, - { - "name": "data", - "type": "void *" - } - ], - "comments": "

For each of the updated references, we receive a status report in the\nform of ok refs/heads/master or ng refs/heads/master <msg>.\nmsg != NULL means the reference has not been updated for the given\nreason.

\n", - "description": "

Call callback `cb' on each status

\n", - "file": "push.h", - "group": "push", - "line": 147, - "lineto": 149, - "return": { - "comment": "0 on success, GIT_EUSER on non-zero callback, or error code", - "type": "int" - }, - "sig": "git_push *::int (*)(const char *ref, const char *msg, void *data)::void *", - "type": "function" - }, - "git_push_unpack_ok": { - "argline": "git_push *push", - "args": [ - { - "comment": "The push object", - "name": "push", - "type": "git_push *" - } - ], - "comments": "", - "description": "

Check if remote side successfully unpacked

\n", - "file": "push.h", - "group": "push", - "line": 132, - "lineto": 132, - "return": { - "comment": "true if remote side successfully unpacked, false otherwise", - "type": "int" - }, - "sig": "git_push *", - "type": "function" - }, - "git_push_update_tips": { - "argline": "git_push *push", - "args": [ - { - "comment": "The push object", - "name": "push", - "type": "git_push *" - } - ], - "comments": "", - "description": "

Update remote tips after a push

\n", - "file": "push.h", - "group": "push", - "line": 109, - "lineto": 109, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_push *", - "type": "function" - }, - "git_refdb_backend_fs": { - "argline": "git_refdb_backend **backend_out,\n\tgit_repository *repo", - "args": [ - { - "comment": "Output pointer to the git_refdb_backend object", - "name": "backend_out", - "type": "git_refdb_backend **" - }, - { - "comment": "Git repository to access", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

Under normal usage, this is called for you when the repository is\nopened / created, but you can use this to explicitly construct a\nfilesystem refdb backend for a repository.

\n", - "description": "

Constructors for default filesystem-based refdb backend

\n", - "file": "sys/refdb_backend.h", - "group": "refdb", - "line": 158, - "lineto": 160, - "return": { - "comment": "0 on success, <0 error code on failure", - "type": "int" - }, - "sig": "git_refdb_backend **::git_repository *", - "type": "function" - }, - "git_refdb_compress": { - "argline": "git_refdb *refdb", - "args": [ - { - "name": "refdb", - "type": "git_refdb *" - } - ], - "comments": "", - "description": "

Suggests that the given refdb compress or optimize its references.\nThis mechanism is implementation specific. For on-disk reference\ndatabases, for example, this may pack all loose references.

\n", - "file": "refdb.h", - "group": "refdb", - "line": 56, - "lineto": 56, - "return": { - "type": "int" - }, - "sig": "git_refdb *", - "type": "function" - }, - "git_refdb_free": { - "argline": "git_refdb *refdb", - "args": [ - { - "comment": "reference database pointer or NULL", - "name": "refdb", - "type": "git_refdb *" - } - ], - "comments": "", - "description": "

Close an open reference database.

\n", - "file": "refdb.h", - "group": "refdb", - "line": 63, - "lineto": 63, - "return": { - "type": "void" - }, - "sig": "git_refdb *", - "type": "function" - }, - "git_refdb_new": { - "argline": "git_refdb **out, git_repository *repo", - "args": [ - { - "comment": "location to store the database pointer, if opened. Set to NULL if the open failed.", - "name": "out", - "type": "git_refdb **" - }, - { - "comment": "the repository", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

Before the Ref DB can be used for read/writing, a custom database\nbackend must be manually set using git_refdb_set_backend()

\n", - "description": "

Create a new reference database with no backends.

\n", - "file": "refdb.h", - "group": "refdb", - "line": 35, - "lineto": 35, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_refdb **::git_repository *", - "type": "function" - }, - "git_refdb_open": { - "argline": "git_refdb **out, git_repository *repo", - "args": [ - { - "comment": "location to store the database pointer, if opened. Set to NULL if the open failed.", - "name": "out", - "type": "git_refdb **" - }, - { - "comment": "the repository", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "\n", - "description": "

Create a new reference database and automatically add\nthe default backends:

\n", - "file": "refdb.h", - "group": "refdb", - "line": 49, - "lineto": 49, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_refdb **::git_repository *", - "type": "function" - }, - "git_refdb_set_backend": { - "argline": "git_refdb *refdb,\n\tgit_refdb_backend *backend", - "args": [ - { - "comment": "database to add the backend to", - "name": "refdb", - "type": "git_refdb *" - }, - { - "comment": "pointer to a git_refdb_backend instance", - "name": "backend", - "type": "git_refdb_backend *" - } - ], - "comments": "

The git_refdb will take ownership of the git_refdb_backend so you\nshould NOT free it after calling this function.

\n", - "description": "

Sets the custom backend to an existing reference DB

\n", - "file": "sys/refdb_backend.h", - "group": "refdb", - "line": 172, - "lineto": 178, - "return": { - "comment": "0 on success; error code otherwise", - "type": "int" - }, - "sig": "git_refdb *::git_refdb_backend *", - "type": "function" - }, - "git_reference__alloc": { - "argline": "const char *name,\n\tconst git_oid *oid,\n\tconst git_oid *peel", - "args": [ - { - "comment": "the reference name", - "name": "name", - "type": "const char *" - }, - { - "comment": "the object id for a direct reference", - "name": "oid", - "type": "const git_oid *" - }, - { - "comment": "the first non-tag object's OID, or NULL", - "name": "peel", - "type": "const git_oid *" - } - ], - "comments": "", - "description": "

Create a new direct reference from an OID.

\n", - "file": "sys/refs.h", - "group": "reference", - "line": 22, - "lineto": 25, - "return": { - "comment": "the created git_reference or NULL on error", - "type": "git_reference *" - }, - "sig": "const char *::const git_oid *::const git_oid *", - "type": "function" - }, - "git_reference__alloc_symbolic": { - "argline": "const char *name,\n\tconst char *target", - "args": [ - { - "comment": "the reference name", - "name": "name", - "type": "const char *" - }, - { - "comment": "the target for a symbolic reference", - "name": "target", - "type": "const char *" - } - ], - "comments": "", - "description": "

Create a new symbolic reference.

\n", - "file": "sys/refs.h", - "group": "reference", - "line": 34, - "lineto": 38, - "return": { - "comment": "the created git_reference or NULL on error", - "type": "git_reference *" - }, - "sig": "const char *::const char *", - "type": "function" - }, - "git_reference_cmp": { - "argline": "git_reference *ref1, git_reference *ref2", - "args": [ - { - "comment": "The first git_reference", - "name": "ref1", - "type": "git_reference *" - }, - { - "comment": "The second git_reference", - "name": "ref2", - "type": "git_reference *" - } - ], - "comments": "", - "description": "

Compare two references.

\n", - "file": "refs.h", - "group": "reference", - "line": 346, - "lineto": 346, - "return": { - "comment": "0 if the same, else a stable but meaningless ordering.", - "type": "int" - }, - "sig": "git_reference *::git_reference *", - "type": "function" - }, - "git_reference_create": { - "argline": "git_reference **out, git_repository *repo, const char *name, const git_oid *id, int force", - "args": [ - { - "comment": "Pointer to the newly created reference", - "name": "out", - "type": "git_reference **" - }, - { - "comment": "Repository where that reference will live", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "The name of the reference", - "name": "name", - "type": "const char *" - }, - { - "comment": "The object id pointed to by the reference.", - "name": "id", - "type": "const git_oid *" - }, - { - "comment": "Overwrite existing references", - "name": "force", - "type": "int" - } - ], - "comments": "

A direct reference (also called an object id reference) refers directly\nto a specific object id (a.k.a. OID or SHA) in the repository. The id\npermanently refers to the object (although the reference itself can be\nmoved). For example, in libgit2 the direct ref "refs/tags/v0.17.0"\nrefers to OID 5b9fac39d8a76b9139667c26a63e6b3f204b3977.

\n\n

The direct reference will be created in the repository and written to\nthe disk. The generated reference object must be freed by the user.

\n\n

Valid reference names must follow one of two patterns:

\n\n
    \n
  1. Top-level names must contain only capital letters and underscores,\nand must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD").
  2. \n
  3. Names prefixed with "refs/" can be almost anything. You must avoid\nthe characters '~', '^', ':', '\\', '?', '[', and '*', and the\nsequences ".." and "@{" which have special meaning to revparse.
  4. \n
\n\n

This function will return an error if a reference already exists with the\ngiven name unless force is true, in which case it will be overwritten.

\n", - "description": "

Create a new direct reference.

\n", - "file": "refs.h", - "group": "reference", - "line": 131, - "lineto": 131, - "return": { - "comment": "0 on success, GIT_EEXISTS, GIT_EINVALIDSPEC or an error code", - "type": "int" - }, - "sig": "git_reference **::git_repository *::const char *::const git_oid *::int", - "type": "function" - }, - "git_reference_delete": { - "argline": "git_reference *ref", - "args": [ - { - "comment": "The reference to remove", - "name": "ref", - "type": "git_reference *" - } - ], - "comments": "

This method works for both direct and symbolic references. The reference\nwill be immediately removed on disk but the memory will not be freed.\nCallers must call git_reference_free.

\n", - "description": "

Delete an existing reference.

\n", - "file": "refs.h", - "group": "reference", - "line": 290, - "lineto": 290, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_reference *", - "type": "function" - }, - "git_reference_dwim": { - "argline": "git_reference **out, git_repository *repo, const char *shorthand", - "args": [ - { - "comment": "pointer in which to store the reference", - "name": "out", - "type": "git_reference **" - }, - { - "comment": "the repository in which to look", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "the short name for the reference", - "name": "shorthand", - "type": "const char *" - } - ], - "comments": "

Apply the git precendence rules to the given shorthand to determine\nwhich reference the user is refering to.

\n", - "description": "

Lookup a reference by DWIMing its short name

\n", - "file": "refs.h", - "group": "reference", - "line": 68, - "lineto": 68, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_reference **::git_repository *::const char *", - "type": "function" - }, - "git_reference_foreach": { - "argline": "git_repository *repo,\n\tgit_reference_foreach_cb callback,\n\tvoid *payload", - "args": [ - { - "comment": "Repository where to find the refs", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "Function which will be called for every listed ref", - "name": "callback", - "type": "git_reference_foreach_cb" - }, - { - "comment": "Additional data to pass to the callback", - "name": "payload", - "type": "void *" - } - ], - "comments": "

The callback function will be called for each reference in the\nrepository, receiving the name of the reference and the payload value\npassed to this method. Returning a non-zero value from the callback\nwill terminate the iteration.

\n", - "description": "

Perform a callback on each reference in the repository.

\n", - "file": "refs.h", - "group": "reference", - "line": 322, - "lineto": 330, - "return": { - "comment": "0 on success, GIT_EUSER on non-zero callback, or error code", - "type": "int" - }, - "sig": "git_repository *::git_reference_foreach_cb::void *", - "type": "function" - }, - "git_reference_foreach_glob": { - "argline": "git_repository *repo,\n\tconst char *glob,\n\tgit_reference_foreach_name_cb callback,\n\tvoid *payload", - "args": [ - { - "comment": "Repository where to find the refs", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "Pattern to match (fnmatch-style) against reference name.", - "name": "glob", - "type": "const char *" - }, - { - "comment": "Function which will be called for every listed ref", - "name": "callback", - "type": "git_reference_foreach_name_cb" - }, - { - "comment": "Additional data to pass to the callback", - "name": "payload", - "type": "void *" - } - ], - "comments": "

This function acts like git_reference_foreach() with an additional\npattern match being applied to the reference name before issuing the\ncallback function. See that function for more information.

\n\n

The pattern is matched using fnmatch or "glob" style where a '*' matches\nany sequence of letters, a '?' matches any letter, and square brackets\ncan be used to define character ranges (such as "[0-9]" for digits).

\n", - "description": "

Perform a callback on each reference in the repository whose name\nmatches the given pattern.

\n", - "file": "refs.h", - "group": "reference", - "line": 409, - "lineto": 413, - "return": { - "comment": "0 on success, GIT_EUSER on non-zero callback, or error code", - "type": "int" - }, - "sig": "git_repository *::const char *::git_reference_foreach_name_cb::void *", - "type": "function" - }, - "git_reference_free": { - "argline": "git_reference *ref", - "args": [ - { - "comment": "git_reference", - "name": "ref", - "type": "git_reference *" - } - ], - "comments": "", - "description": "

Free the given reference.

\n", - "examples": { - "status.c": [ - "ex/v0.20.0/status.html#git_reference_free-1" - ] - }, - "file": "refs.h", - "group": "reference", - "line": 337, - "lineto": 337, - "return": { - "type": "void" - }, - "sig": "git_reference *", - "type": "function" - }, - "git_reference_has_log": { - "argline": "git_reference *ref", - "args": [ - { - "comment": "A git reference", - "name": "ref", - "type": "git_reference *" - } - ], - "comments": "", - "description": "

Check if a reflog exists for the specified reference.

\n", - "file": "refs.h", - "group": "reference", - "line": 423, - "lineto": 423, - "return": { - "comment": "0 when no reflog can be found, 1 when it exists; otherwise an error code.", - "type": "int" - }, - "sig": "git_reference *", - "type": "function" - }, - "git_reference_is_branch": { - "argline": "git_reference *ref", - "args": [ - { - "comment": "A git reference", - "name": "ref", - "type": "git_reference *" - } - ], - "comments": "", - "description": "

Check if a reference is a local branch.

\n", - "file": "refs.h", - "group": "reference", - "line": 433, - "lineto": 433, - "return": { - "comment": "1 when the reference lives in the refs/heads namespace; 0 otherwise.", - "type": "int" - }, - "sig": "git_reference *", - "type": "function" - }, - "git_reference_is_remote": { - "argline": "git_reference *ref", - "args": [ - { - "comment": "A git reference", - "name": "ref", - "type": "git_reference *" - } - ], - "comments": "", - "description": "

Check if a reference is a remote tracking branch

\n", - "file": "refs.h", - "group": "reference", - "line": 443, - "lineto": 443, - "return": { - "comment": "1 when the reference lives in the refs/remotes namespace; 0 otherwise.", - "type": "int" - }, - "sig": "git_reference *", - "type": "function" - }, - "git_reference_is_tag": { - "argline": "git_reference *ref", - "args": [ - { - "comment": "A git reference", - "name": "ref", - "type": "git_reference *" - } - ], - "comments": "", - "description": "

Check if a reference is a tag

\n", - "file": "refs.h", - "group": "reference", - "line": 453, - "lineto": 456, - "return": { - "comment": "1 when the reference lives in the refs/tags namespace; 0 otherwise.", - "type": "int" - }, - "sig": "git_reference *", - "type": "function" - }, - "git_reference_is_valid_name": { - "argline": "const char *refname", - "args": [ - { - "comment": "name to be checked.", - "name": "refname", - "type": "const char *" - } - ], - "comments": "

Valid reference names must follow one of two patterns:

\n\n
    \n
  1. Top-level names must contain only capital letters and underscores,\nand must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD").
  2. \n
  3. Names prefixed with "refs/" can be almost anything. You must avoid\nthe characters '~', '^', ':', '\\', '?', '[', and '*', and the\nsequences ".." and "@{" which have special meaning to revparse.
  4. \n
\n", - "description": "

Ensure the reference name is well-formed.

\n", - "file": "refs.h", - "group": "reference", - "line": 543, - "lineto": 543, - "return": { - "comment": "1 if the reference name is acceptable; 0 if it isn't", - "type": "int" - }, - "sig": "const char *", - "type": "function" - }, - "git_reference_iterator_free": { - "argline": "git_reference_iterator *iter", - "args": [ - { - "comment": "the iterator to free", - "name": "iter", - "type": "git_reference_iterator *" - } - ], - "comments": "", - "description": "

Free the iterator and its associated resources

\n", - "file": "refs.h", - "group": "reference", - "line": 389, - "lineto": 389, - "return": { - "type": "void" - }, - "sig": "git_reference_iterator *", - "type": "function" - }, - "git_reference_iterator_glob_new": { - "argline": "git_reference_iterator **out,\n\tgit_repository *repo,\n\tconst char *glob", - "args": [ - { - "comment": "pointer in which to store the iterator", - "name": "out", - "type": "git_reference_iterator **" - }, - { - "comment": "the repository", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "the glob to match against the reference names", - "name": "glob", - "type": "const char *" - } - ], - "comments": "", - "description": "

Create an iterator for the repo's references that match the\nspecified glob

\n", - "file": "refs.h", - "group": "reference", - "line": 368, - "lineto": 371, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_reference_iterator **::git_repository *::const char *", - "type": "function" - }, - "git_reference_iterator_new": { - "argline": "git_reference_iterator **out,\n\tgit_repository *repo", - "args": [ - { - "comment": "pointer in which to store the iterator", - "name": "out", - "type": "git_reference_iterator **" - }, - { - "comment": "the repository", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "", - "description": "

Create an iterator for the repo's references

\n", - "file": "refs.h", - "group": "reference", - "line": 355, - "lineto": 357, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_reference_iterator **::git_repository *", - "type": "function" - }, - "git_reference_list": { - "argline": "git_strarray *array, git_repository *repo", - "args": [ - { - "comment": "Pointer to a git_strarray structure where the reference names will be stored", - "name": "array", - "type": "git_strarray *" - }, - { - "comment": "Repository where to find the refs", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

The string array will be filled with the names of all references; these\nvalues are owned by the user and should be free'd manually when no\nlonger needed, using git_strarray_free().

\n", - "description": "

Fill a list with all the references that can be found in a repository.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_reference_list-56" - ] - }, - "file": "refs.h", - "group": "reference", - "line": 304, - "lineto": 307, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_strarray *::git_repository *", - "type": "function" - }, - "git_reference_lookup": { - "argline": "git_reference **out, git_repository *repo, const char *name", - "args": [ - { - "comment": "pointer to the looked-up reference", - "name": "out", - "type": "git_reference **" - }, - { - "comment": "the repository to look up the reference", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "the long name for the reference (e.g. HEAD, refs/heads/master, refs/tags/v0.1.0, ...)", - "name": "name", - "type": "const char *" - } - ], - "comments": "

The returned reference must be freed by the user.

\n\n

The name will be checked for validity.\nSee git_reference_create_symbolic() for rules about valid names.

\n", - "description": "

Lookup a reference by name in a repository.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_reference_lookup-52" - ] - }, - "file": "refs.h", - "group": "reference", - "line": 37, - "lineto": 37, - "return": { - "comment": "0 on success, GIT_ENOTFOUND, GIT_EINVALIDSPEC or an error code.", - "type": "int" - }, - "sig": "git_reference **::git_repository *::const char *", - "type": "function" - }, - "git_reference_name": { - "argline": "const git_reference *ref", - "args": [ - { - "comment": "The reference", - "name": "ref", - "type": "const git_reference *" - } - ], - "comments": "

See git_reference_create_symbolic() for rules about valid names.

\n", - "description": "

Get the full name of a reference.

\n", - "file": "refs.h", - "group": "reference", - "line": 187, - "lineto": 187, - "return": { - "comment": "the full name for the ref", - "type": "const char *" - }, - "sig": "const git_reference *", - "type": "function" - }, - "git_reference_name_to_id": { - "argline": "git_oid *out, git_repository *repo, const char *name", - "args": [ - { - "comment": "Pointer to oid to be filled in", - "name": "out", - "type": "git_oid *" - }, - { - "comment": "The repository in which to look up the reference", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "The long name for the reference (e.g. HEAD, refs/heads/master, refs/tags/v0.1.0, ...)", - "name": "name", - "type": "const char *" - } - ], - "comments": "

This function provides a quick way to resolve a reference name straight\nthrough to the object id that it refers to. This avoids having to\nallocate or free any git_reference objects for simple situations.

\n\n

The name will be checked for validity.\nSee git_reference_symbolic_create() for rules about valid names.

\n", - "description": "

Lookup a reference by name and resolve immediately to OID.

\n", - "file": "refs.h", - "group": "reference", - "line": 54, - "lineto": 55, - "return": { - "comment": "0 on success, GIT_ENOTFOUND, GIT_EINVALIDSPEC or an error code.", - "type": "int" - }, - "sig": "git_oid *::git_repository *::const char *", - "type": "function" - }, - "git_reference_next": { - "argline": "git_reference **out, git_reference_iterator *iter", - "args": [ - { - "comment": "pointer in which to store the reference", - "name": "out", - "type": "git_reference **" - }, - { - "comment": "the iterator", - "name": "iter", - "type": "git_reference_iterator *" - } - ], - "comments": "", - "description": "

Get the next reference

\n", - "file": "refs.h", - "group": "reference", - "line": 380, - "lineto": 382, - "return": { - "comment": "0, GIT_ITEROVER if there are no more; or an error code", - "type": "int" - }, - "sig": "git_reference **::git_reference_iterator *", - "type": "function" - }, - "git_reference_normalize_name": { - "argline": "char *buffer_out,\n\tsize_t buffer_size,\n\tconst char *name,\n\tunsigned int flags", - "args": [ - { - "comment": "User allocated buffer to store normalized name", - "name": "buffer_out", - "type": "char *" - }, - { - "comment": "Size of buffer_out", - "name": "buffer_size", - "type": "size_t" - }, - { - "comment": "Reference name to be checked.", - "name": "name", - "type": "const char *" - }, - { - "comment": "Flags to constrain name validation rules - see the GIT_REF_FORMAT constants above.", - "name": "flags", - "type": "unsigned int" - } - ], - "comments": "

This will normalize the reference name by removing any leading slash\n'/' characters and collapsing runs of adjacent slashes between name\ncomponents into a single slash.

\n\n

Once normalized, if the reference name is valid, it will be returned in\nthe user allocated buffer.

\n\n

See git_reference_create_symbolic() for rules about valid names.

\n", - "description": "

Normalize reference name and check validity.

\n", - "file": "refs.h", - "group": "reference", - "line": 503, - "lineto": 507, - "return": { - "comment": "0 on success, GIT_EBUFS if buffer is too small, GIT_EINVALIDSPEC or an error code.", - "type": "int" - }, - "sig": "char *::size_t::const char *::unsigned int", - "type": "function" - }, - "git_reference_owner": { - "argline": "const git_reference *ref", - "args": [ - { - "comment": "The reference", - "name": "ref", - "type": "const git_reference *" - } - ], - "comments": "", - "description": "

Get the repository where a reference resides.

\n", - "file": "refs.h", - "group": "reference", - "line": 213, - "lineto": 213, - "return": { - "comment": "a pointer to the repo", - "type": "git_repository *" - }, - "sig": "const git_reference *", - "type": "function" - }, - "git_reference_peel": { - "argline": "git_object **out,\n\tgit_reference *ref,\n\tgit_otype type", - "args": [ - { - "comment": "Pointer to the peeled git_object", - "name": "out", - "type": "git_object **" - }, - { - "comment": "The reference to be processed", - "name": "ref", - "type": "git_reference *" - }, - { - "comment": "The type of the requested object (GIT_OBJ_COMMIT, GIT_OBJ_TAG, GIT_OBJ_TREE, GIT_OBJ_BLOB or GIT_OBJ_ANY).", - "name": "type", - "type": "git_otype" - } - ], - "comments": "

The retrieved peeled object is owned by the repository\nand should be closed with the git_object_free method.

\n\n

If you pass GIT_OBJ_ANY as the target type, then the object\nwill be peeled until a non-tag object is met.

\n", - "description": "

Recursively peel reference until object of the specified type is found.

\n", - "file": "refs.h", - "group": "reference", - "line": 524, - "lineto": 527, - "return": { - "comment": "0 on success, GIT_EAMBIGUOUS, GIT_ENOTFOUND or an error code", - "type": "int" - }, - "sig": "git_object **::git_reference *::git_otype", - "type": "function" - }, - "git_reference_rename": { - "argline": "git_reference **new_ref,\n\tgit_reference *ref,\n\tconst char *new_name,\n\tint force", - "args": [ - { - "name": "new_ref", - "type": "git_reference **" - }, - { - "comment": "The reference to rename", - "name": "ref", - "type": "git_reference *" - }, - { - "comment": "The new name for the reference", - "name": "new_name", - "type": "const char *" - }, - { - "comment": "Overwrite an existing reference", - "name": "force", - "type": "int" - } - ], - "comments": "

This method works for both direct and symbolic references.

\n\n

The new name will be checked for validity.\nSee git_reference_create_symbolic() for rules about valid names.

\n\n

If the force flag is not enabled, and there's already\na reference with the given name, the renaming will fail.

\n\n

IMPORTANT:\nThe user needs to write a proper reflog entry if the\nreflog is enabled for the repository. We only rename\nthe reflog if it exists.

\n", - "description": "

Rename an existing reference.

\n", - "file": "refs.h", - "group": "reference", - "line": 274, - "lineto": 278, - "return": { - "comment": "0 on success, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code", - "type": "int" - }, - "sig": "git_reference **::git_reference *::const char *::int", - "type": "function" - }, - "git_reference_resolve": { - "argline": "git_reference **out, const git_reference *ref", - "args": [ - { - "comment": "Pointer to the peeled reference", - "name": "out", - "type": "git_reference **" - }, - { - "comment": "The reference", - "name": "ref", - "type": "const git_reference *" - } - ], - "comments": "

This method iteratively peels a symbolic reference until it resolves to\na direct reference to an OID.

\n\n

The peeled reference is returned in the resolved_ref argument, and\nmust be freed manually once it's no longer needed.

\n\n

If a direct reference is passed as an argument, a copy of that\nreference is returned. This copy must be manually freed too.

\n", - "description": "

Resolve a symbolic reference to a direct reference.

\n", - "file": "refs.h", - "group": "reference", - "line": 205, - "lineto": 205, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_reference **::const git_reference *", - "type": "function" - }, - "git_reference_set_target": { - "argline": "git_reference **out,\n\tgit_reference *ref,\n\tconst git_oid *id", - "args": [ - { - "comment": "Pointer to the newly created reference", - "name": "out", - "type": "git_reference **" - }, - { - "comment": "The reference", - "name": "ref", - "type": "git_reference *" - }, - { - "comment": "The new target OID for the reference", - "name": "id", - "type": "const git_oid *" - } - ], - "comments": "

The new reference will be written to disk, overwriting the given reference.

\n", - "description": "

Create a new reference with the same name as the given reference but a\ndifferent OID target. The reference must be a direct reference, otherwise\nthis will fail.

\n", - "file": "refs.h", - "group": "reference", - "line": 247, - "lineto": 250, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_reference **::git_reference *::const git_oid *", - "type": "function" - }, - "git_reference_shorthand": { - "argline": "git_reference *ref", - "args": [ - { - "comment": "a reference", - "name": "ref", - "type": "git_reference *" - } - ], - "comments": "

This will transform the reference name into a name "human-readable"\nversion. If no shortname is appropriate, it will return the full\nname.

\n\n

The memory is owned by the reference and must not be freed.

\n", - "description": "

Get the reference's short name

\n", - "examples": { - "status.c": [ - "ex/v0.20.0/status.html#git_reference_shorthand-2" - ] - }, - "file": "refs.h", - "group": "reference", - "line": 557, - "lineto": 557, - "return": { - "comment": "the human-readable version of the name", - "type": "const char *" - }, - "sig": "git_reference *", - "type": "function" - }, - "git_reference_symbolic_create": { - "argline": "git_reference **out, git_repository *repo, const char *name, const char *target, int force", - "args": [ - { - "comment": "Pointer to the newly created reference", - "name": "out", - "type": "git_reference **" - }, - { - "comment": "Repository where that reference will live", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "The name of the reference", - "name": "name", - "type": "const char *" - }, - { - "comment": "The target of the reference", - "name": "target", - "type": "const char *" - }, - { - "comment": "Overwrite existing references", - "name": "force", - "type": "int" - } - ], - "comments": "

A symbolic reference is a reference name that refers to another\nreference name. If the other name moves, the symbolic name will move,\ntoo. As a simple example, the "HEAD" reference might refer to\n"refs/heads/master" while on the "master" branch of a repository.

\n\n

The symbolic reference will be created in the repository and written to\nthe disk. The generated reference object must be freed by the user.

\n\n

Valid reference names must follow one of two patterns:

\n\n
    \n
  1. Top-level names must contain only capital letters and underscores,\nand must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD").
  2. \n
  3. Names prefixed with "refs/" can be almost anything. You must avoid\nthe characters '~', '^', ':', '\\', '?', '[', and '*', and the\nsequences ".." and "@{" which have special meaning to revparse.
  4. \n
\n\n

This function will return an error if a reference already exists with the\ngiven name unless force is true, in which case it will be overwritten.

\n", - "description": "

Create a new symbolic reference.

\n", - "file": "refs.h", - "group": "reference", - "line": 99, - "lineto": 99, - "return": { - "comment": "0 on success, GIT_EEXISTS, GIT_EINVALIDSPEC or an error code", - "type": "int" - }, - "sig": "git_reference **::git_repository *::const char *::const char *::int", - "type": "function" - }, - "git_reference_symbolic_set_target": { - "argline": "git_reference **out,\n\tgit_reference *ref,\n\tconst char *target", - "args": [ - { - "comment": "Pointer to the newly created reference", - "name": "out", - "type": "git_reference **" - }, - { - "comment": "The reference", - "name": "ref", - "type": "git_reference *" - }, - { - "comment": "The new target for the reference", - "name": "target", - "type": "const char *" - } - ], - "comments": "

The new reference will be written to disk, overwriting the given reference.

\n\n

The target name will be checked for validity.\nSee git_reference_create_symbolic() for rules about valid names.

\n", - "description": "

Create a new reference with the same name as the given reference but a\ndifferent symbolic target. The reference must be a symbolic reference,\notherwise this will fail.

\n", - "file": "refs.h", - "group": "reference", - "line": 230, - "lineto": 233, - "return": { - "comment": "0 on success, GIT_EINVALIDSPEC or an error code", - "type": "int" - }, - "sig": "git_reference **::git_reference *::const char *", - "type": "function" - }, - "git_reference_symbolic_target": { - "argline": "const git_reference *ref", - "args": [ - { - "comment": "The reference", - "name": "ref", - "type": "const git_reference *" - } - ], - "comments": "

Only available if the reference is symbolic.

\n", - "description": "

Get full name to the reference pointed to by a symbolic reference.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_reference_symbolic_target-54" - ] - }, - "file": "refs.h", - "group": "reference", - "line": 167, - "lineto": 167, - "return": { - "comment": "a pointer to the name if available, NULL otherwise", - "type": "const char *" - }, - "sig": "const git_reference *", - "type": "function" - }, - "git_reference_target": { - "argline": "const git_reference *ref", - "args": [ - { - "comment": "The reference", - "name": "ref", - "type": "const git_reference *" - } - ], - "comments": "

Only available if the reference is direct (i.e. an object id reference,\nnot a symbolic one).

\n\n

To find the OID of a symbolic ref, call git_reference_resolve() and\nthen this function (or maybe use git_reference_name_to_id() to\ndirectly resolve a reference name all the way through to an OID).

\n", - "description": "

Get the OID pointed to by a direct reference.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_reference_target-53" - ] - }, - "file": "refs.h", - "group": "reference", - "line": 146, - "lineto": 146, - "return": { - "comment": "a pointer to the oid if available, NULL otherwise", - "type": "const git_oid *" - }, - "sig": "const git_reference *", - "type": "function" - }, - "git_reference_target_peel": { - "argline": "const git_reference *ref", - "args": [ - { - "comment": "The reference", - "name": "ref", - "type": "const git_reference *" - } - ], - "comments": "

This peeled OID only applies to direct references that point to\na hard Tag object: it is the result of peeling such Tag.

\n", - "description": "

Return the peeled OID target of this reference.

\n", - "file": "refs.h", - "group": "reference", - "line": 157, - "lineto": 157, - "return": { - "comment": "a pointer to the oid if available, NULL otherwise", - "type": "const git_oid *" - }, - "sig": "const git_reference *", - "type": "function" - }, - "git_reference_type": { - "argline": "const git_reference *ref", - "args": [ - { - "comment": "The reference", - "name": "ref", - "type": "const git_reference *" - } - ], - "comments": "

Either direct (GIT_REF_OID) or symbolic (GIT_REF_SYMBOLIC)

\n", - "description": "

Get the type of a reference.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_reference_type-55" - ] - }, - "file": "refs.h", - "group": "reference", - "line": 177, - "lineto": 177, - "return": { - "comment": "the type", - "type": "git_ref_t" - }, - "sig": "const git_reference *", - "type": "function" - }, - "git_reflog_append": { - "argline": "git_reflog *reflog, const git_oid *id, const git_signature *committer, const char *msg", - "args": [ - { - "comment": "an existing reflog object", - "name": "reflog", - "type": "git_reflog *" - }, - { - "comment": "the OID the reference is now pointing to", - "name": "id", - "type": "const git_oid *" - }, - { - "comment": "the signature of the committer", - "name": "committer", - "type": "const git_signature *" - }, - { - "comment": "the reflog message", - "name": "msg", - "type": "const char *" - } - ], - "comments": "

msg is optional and can be NULL.

\n", - "description": "

Add a new entry to the reflog.

\n", - "file": "reflog.h", - "group": "reflog", - "line": 60, - "lineto": 60, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_reflog *::const git_oid *::const git_signature *::const char *", - "type": "function" - }, - "git_reflog_append_to": { - "argline": "git_repository *repo, const char *name, const git_oid *id, const git_signature *committer, const char *msg", - "args": [ - { - "comment": "the repository to act on", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "the reflog's name", - "name": "name", - "type": "const char *" - }, - { - "comment": "the OID the reference is now pointing to", - "name": "id", - "type": "const git_oid *" - }, - { - "comment": "the signature of the committer", - "name": "committer", - "type": "const git_signature *" - }, - { - "comment": "the reflog message", - "name": "msg", - "type": "const char *" - } - ], - "comments": "

This utility function loads the named reflog, appends to it and\nwrites it back out to the backend.

\n\n

msg is optional and can be NULL.

\n", - "description": "

Add a new entry to the named reflog.

\n", - "file": "reflog.h", - "group": "reflog", - "line": 77, - "lineto": 77, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_repository *::const char *::const git_oid *::const git_signature *::const char *", - "type": "function" - }, - "git_reflog_delete": { - "argline": "git_repository *repo, const char *name", - "args": [ - { - "comment": "the repository", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "the reflog to delete", - "name": "name", - "type": "const char *" - } - ], - "comments": "", - "description": "

Delete the reflog for the given reference

\n", - "file": "reflog.h", - "group": "reflog", - "line": 101, - "lineto": 101, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_repository *::const char *", - "type": "function" - }, - "git_reflog_drop": { - "argline": "git_reflog *reflog,\n\tsize_t idx,\n\tint rewrite_previous_entry", - "args": [ - { - "comment": "a previously loaded reflog.", - "name": "reflog", - "type": "git_reflog *" - }, - { - "comment": "the position of the entry to remove. Should be greater than or equal to 0 (zero) and less than `git_reflog_entrycount()`.", - "name": "idx", - "type": "size_t" - }, - { - "comment": "1 to rewrite the history; 0 otherwise.", - "name": "rewrite_previous_entry", - "type": "int" - } - ], - "comments": "

To ensure there's no gap in the log history, set rewrite_previous_entry\nparam value to 1. When deleting entry n, member old_oid of entry n-1\n(if any) will be updated with the value of member new_oid of entry n+1.

\n", - "description": "

Remove an entry from the reflog by its index

\n", - "file": "reflog.h", - "group": "reflog", - "line": 141, - "lineto": 144, - "return": { - "comment": "0 on success, GIT_ENOTFOUND if the entry doesn't exist or an error code.", - "type": "int" - }, - "sig": "git_reflog *::size_t::int", - "type": "function" - }, - "git_reflog_entry_byindex": { - "argline": "git_reflog *reflog, size_t idx", - "args": [ - { - "comment": "a previously loaded reflog", - "name": "reflog", - "type": "git_reflog *" - }, - { - "comment": "the position of the entry to lookup. Should be greater than or equal to 0 (zero) and less than `git_reflog_entrycount()`.", - "name": "idx", - "type": "size_t" - } - ], - "comments": "

Requesting the reflog entry with an index of 0 (zero) will\nreturn the most recently created entry.

\n", - "description": "

Lookup an entry by its index

\n", - "file": "reflog.h", - "group": "reflog", - "line": 122, - "lineto": 122, - "return": { - "comment": "the entry; NULL if not found", - "type": "const git_reflog_entry *" - }, - "sig": "git_reflog *::size_t", - "type": "function" - }, - "git_reflog_entry_committer": { - "argline": "const git_reflog_entry *entry", - "args": [ - { - "comment": "a reflog entry", - "name": "entry", - "type": "const git_reflog_entry *" - } - ], - "comments": "", - "description": "

Get the committer of this entry

\n", - "file": "reflog.h", - "group": "reflog", - "line": 168, - "lineto": 168, - "return": { - "comment": "the committer", - "type": "const git_signature *" - }, - "sig": "const git_reflog_entry *", - "type": "function" - }, - "git_reflog_entry_id_new": { - "argline": "const git_reflog_entry *entry", - "args": [ - { - "comment": "a reflog entry", - "name": "entry", - "type": "const git_reflog_entry *" - } - ], - "comments": "", - "description": "

Get the new oid

\n", - "file": "reflog.h", - "group": "reflog", - "line": 160, - "lineto": 160, - "return": { - "comment": "the new oid at this time", - "type": "const git_oid *" - }, - "sig": "const git_reflog_entry *", - "type": "function" - }, - "git_reflog_entry_id_old": { - "argline": "const git_reflog_entry *entry", - "args": [ - { - "comment": "a reflog entry", - "name": "entry", - "type": "const git_reflog_entry *" - } - ], - "comments": "", - "description": "

Get the old oid

\n", - "file": "reflog.h", - "group": "reflog", - "line": 152, - "lineto": 152, - "return": { - "comment": "the old oid", - "type": "const git_oid *" - }, - "sig": "const git_reflog_entry *", - "type": "function" - }, - "git_reflog_entry_message": { - "argline": "const git_reflog_entry *entry", - "args": [ - { - "comment": "a reflog entry", - "name": "entry", - "type": "const git_reflog_entry *" - } - ], - "comments": "", - "description": "

Get the log message

\n", - "file": "reflog.h", - "group": "reflog", - "line": 176, - "lineto": 176, - "return": { - "comment": "the log msg", - "type": "const char *" - }, - "sig": "const git_reflog_entry *", - "type": "function" - }, - "git_reflog_entrycount": { - "argline": "git_reflog *reflog", - "args": [ - { - "comment": "the previously loaded reflog", - "name": "reflog", - "type": "git_reflog *" - } - ], - "comments": "", - "description": "

Get the number of log entries in a reflog

\n", - "file": "reflog.h", - "group": "reflog", - "line": 109, - "lineto": 109, - "return": { - "comment": "the number of log entries", - "type": "size_t" - }, - "sig": "git_reflog *", - "type": "function" - }, - "git_reflog_free": { - "argline": "git_reflog *reflog", - "args": [ - { - "comment": "reflog to free", - "name": "reflog", - "type": "git_reflog *" - } - ], - "comments": "", - "description": "

Free the reflog

\n", - "file": "reflog.h", - "group": "reflog", - "line": 183, - "lineto": 183, - "return": { - "type": "void" - }, - "sig": "git_reflog *", - "type": "function" - }, - "git_reflog_read": { - "argline": "git_reflog **out, git_repository *repo, const char *name", - "args": [ - { - "comment": "pointer to reflog", - "name": "out", - "type": "git_reflog **" - }, - { - "comment": "the repostiory", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "reference to look up", - "name": "name", - "type": "const char *" - } - ], - "comments": "

If there is no reflog file for the given\nreference yet, an empty reflog object will\nbe returned.

\n\n

The reflog must be freed manually by using\ngit_reflog_free().

\n", - "description": "

Read the reflog for the given reference

\n", - "file": "reflog.h", - "group": "reflog", - "line": 38, - "lineto": 38, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_reflog **::git_repository *::const char *", - "type": "function" - }, - "git_reflog_rename": { - "argline": "git_repository *repo, const char *old_name, const char *name", - "args": [ - { - "comment": "the repository", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "the old name of the reference", - "name": "old_name", - "type": "const char *" - }, - { - "name": "name", - "type": "const char *" - } - ], - "comments": "

The reflog to be renamed is expected to already exist

\n\n

The new name will be checked for validity.\nSee git_reference_create_symbolic() for rules about valid names.

\n", - "description": "

Rename a reflog

\n", - "file": "reflog.h", - "group": "reflog", - "line": 92, - "lineto": 92, - "return": { - "comment": "0 on success, GIT_EINVALIDSPEC or an error code", - "type": "int" - }, - "sig": "git_repository *::const char *::const char *", - "type": "function" - }, - "git_reflog_write": { - "argline": "git_reflog *reflog", - "args": [ - { - "comment": "an existing reflog object", - "name": "reflog", - "type": "git_reflog *" - } - ], - "comments": "", - "description": "

Write an existing in-memory reflog object back to disk\nusing an atomic file lock.

\n", - "file": "reflog.h", - "group": "reflog", - "line": 47, - "lineto": 47, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_reflog *", - "type": "function" - }, - "git_refspec_direction": { - "argline": "const git_refspec *spec", - "args": [ - { - "comment": "refspec", - "name": "spec", - "type": "const git_refspec *" - } - ], - "comments": "", - "description": "

Get the refspec's direction.

\n", - "file": "refspec.h", - "group": "refspec", - "line": 61, - "lineto": 61, - "return": { - "comment": "GIT_DIRECTION_FETCH or GIT_DIRECTION_PUSH", - "type": "git_direction" - }, - "sig": "const git_refspec *", - "type": "function" - }, - "git_refspec_dst": { - "argline": "const git_refspec *refspec", - "args": [ - { - "comment": "the refspec", - "name": "refspec", - "type": "const git_refspec *" - } - ], - "comments": "", - "description": "

Get the destination specifier

\n", - "file": "refspec.h", - "group": "refspec", - "line": 37, - "lineto": 37, - "return": { - "comment": "the refspec's destination specifier", - "type": "const char *" - }, - "sig": "const git_refspec *", - "type": "function" - }, - "git_refspec_dst_matches": { - "argline": "const git_refspec *refspec, const char *refname", - "args": [ - { - "comment": "the refspec", - "name": "refspec", - "type": "const git_refspec *" - }, - { - "comment": "the name of the reference to check", - "name": "refname", - "type": "const char *" - } - ], - "comments": "", - "description": "

Check if a refspec's destination descriptor matches a reference

\n", - "file": "refspec.h", - "group": "refspec", - "line": 79, - "lineto": 79, - "return": { - "comment": "1 if the refspec matches, 0 otherwise", - "type": "int" - }, - "sig": "const git_refspec *::const char *", - "type": "function" - }, - "git_refspec_force": { - "argline": "const git_refspec *refspec", - "args": [ - { - "comment": "the refspec", - "name": "refspec", - "type": "const git_refspec *" - } - ], - "comments": "", - "description": "

Get the force update setting

\n", - "file": "refspec.h", - "group": "refspec", - "line": 53, - "lineto": 53, - "return": { - "comment": "1 if force update has been set, 0 otherwise", - "type": "int" - }, - "sig": "const git_refspec *", - "type": "function" - }, - "git_refspec_rtransform": { - "argline": "char *out, size_t outlen, const git_refspec *spec, const char *name", - "args": [ - { - "comment": "where to store the source reference name", - "name": "out", - "type": "char *" - }, - { - "comment": "the size of the `out` buffer", - "name": "outlen", - "type": "size_t" - }, - { - "comment": "the refspec", - "name": "spec", - "type": "const git_refspec *" - }, - { - "comment": "the name of the reference to transform", - "name": "name", - "type": "const char *" - } - ], - "comments": "", - "description": "

Transform a target reference to its source reference following the refspec's rules

\n", - "file": "refspec.h", - "group": "refspec", - "line": 101, - "lineto": 105, - "return": { - "comment": "0, GIT_EBUFS or another error", - "type": "int" - }, - "sig": "char *::size_t::const git_refspec *::const char *", - "type": "function" - }, - "git_refspec_src": { - "argline": "const git_refspec *refspec", - "args": [ - { - "comment": "the refspec", - "name": "refspec", - "type": "const git_refspec *" - } - ], - "comments": "", - "description": "

Get the source specifier

\n", - "file": "refspec.h", - "group": "refspec", - "line": 29, - "lineto": 29, - "return": { - "comment": "the refspec's source specifier", - "type": "const char *" - }, - "sig": "const git_refspec *", - "type": "function" - }, - "git_refspec_src_matches": { - "argline": "const git_refspec *refspec, const char *refname", - "args": [ - { - "comment": "the refspec", - "name": "refspec", - "type": "const git_refspec *" - }, - { - "comment": "the name of the reference to check", - "name": "refname", - "type": "const char *" - } - ], - "comments": "", - "description": "

Check if a refspec's source descriptor matches a reference

\n", - "file": "refspec.h", - "group": "refspec", - "line": 70, - "lineto": 70, - "return": { - "comment": "1 if the refspec matches, 0 otherwise", - "type": "int" - }, - "sig": "const git_refspec *::const char *", - "type": "function" - }, - "git_refspec_string": { - "argline": "const git_refspec *refspec", - "args": [ - { - "comment": "the refspec", - "name": "refspec", - "type": "const git_refspec *" - } - ], - "comments": "", - "description": "

Get the refspec's string

\n", - "file": "refspec.h", - "group": "refspec", - "line": 45, - "lineto": 45, - "return": { - "type": "const char *" - }, - "sig": "const git_refspec *", - "type": "function" - }, - "git_refspec_transform": { - "argline": "char *out, size_t outlen, const git_refspec *spec, const char *name", - "args": [ - { - "comment": "where to store the target name", - "name": "out", - "type": "char *" - }, - { - "comment": "the size of the `out` buffer", - "name": "outlen", - "type": "size_t" - }, - { - "comment": "the refspec", - "name": "spec", - "type": "const git_refspec *" - }, - { - "comment": "the name of the reference to transform", - "name": "name", - "type": "const char *" - } - ], - "comments": "", - "description": "

Transform a reference to its target following the refspec's rules

\n", - "file": "refspec.h", - "group": "refspec", - "line": 90, - "lineto": 90, - "return": { - "comment": "0, GIT_EBUFS or another error", - "type": "int" - }, - "sig": "char *::size_t::const git_refspec *::const char *", - "type": "function" - }, - "git_remote_add_fetch": { - "argline": "git_remote *remote, const char *refspec", - "args": [ - { - "comment": "the remote", - "name": "remote", - "type": "git_remote *" - }, - { - "comment": "the new fetch refspec", - "name": "refspec", - "type": "const char *" - } - ], - "comments": "

Convenience function for adding a single fetch refspec to the\ncurrent list in the remote.

\n", - "description": "

Add a fetch refspec to the remote

\n", - "file": "remote.h", - "group": "remote", - "line": 174, - "lineto": 174, - "return": { - "comment": "0 or an error value", - "type": "int" - }, - "sig": "git_remote *::const char *", - "type": "function" - }, - "git_remote_add_push": { - "argline": "git_remote *remote, const char *refspec", - "args": [ - { - "comment": "the remote", - "name": "remote", - "type": "git_remote *" - }, - { - "comment": "the new push refspec", - "name": "refspec", - "type": "const char *" - } - ], - "comments": "

Convenience function for adding a single push refspec to the\ncurrent list in the remote.

\n", - "description": "

Add a push refspec to the remote

\n", - "file": "remote.h", - "group": "remote", - "line": 207, - "lineto": 207, - "return": { - "comment": "0 or an error value", - "type": "int" - }, - "sig": "git_remote *::const char *", - "type": "function" - }, - "git_remote_autotag": { - "argline": "git_remote *remote", - "args": [ - { - "comment": "the remote to query", - "name": "remote", - "type": "git_remote *" - } - ], - "comments": "", - "description": "

Retrieve the tag auto-follow setting

\n", - "file": "remote.h", - "group": "remote", - "line": 501, - "lineto": 501, - "return": { - "comment": "the auto-follow setting", - "type": "git_remote_autotag_option_t" - }, - "sig": "git_remote *", - "type": "function" - }, - "git_remote_check_cert": { - "argline": "git_remote *remote, int check", - "args": [ - { - "comment": "the remote to configure", - "name": "remote", - "type": "git_remote *" - }, - { - "comment": "whether to check the server's certificate (defaults to yes)", - "name": "check", - "type": "int" - } - ], - "comments": "", - "description": "

Choose whether to check the server's certificate (applies to HTTPS only)

\n", - "file": "remote.h", - "group": "remote", - "line": 394, - "lineto": 394, - "return": { - "type": "void" - }, - "sig": "git_remote *::int", - "type": "function" - }, - "git_remote_clear_refspecs": { - "argline": "git_remote *remote", - "args": [ - { - "comment": "the remote", - "name": "remote", - "type": "git_remote *" - } - ], - "comments": "

Remove all configured fetch and push refspecs from the remote.

\n", - "description": "

Clear the refspecs

\n", - "file": "remote.h", - "group": "remote", - "line": 237, - "lineto": 237, - "return": { - "type": "void" - }, - "sig": "git_remote *", - "type": "function" - }, - "git_remote_connect": { - "argline": "git_remote *remote, git_direction direction", - "args": [ - { - "comment": "the remote to connect to", - "name": "remote", - "type": "git_remote *" - }, - { - "comment": "GIT_DIRECTION_FETCH if you want to fetch or GIT_DIRECTION_PUSH if you want to push", - "name": "direction", - "type": "git_direction" - } - ], - "comments": "

The transport is selected based on the URL. The direction argument\nis due to a limitation of the git protocol (over TCP or SSH) which\nstarts up a specific binary which can only do the one or the other.

\n", - "description": "

Open a connection to a remote

\n", - "examples": { - "network/fetch.c": [ - "ex/v0.20.0/network/fetch.html#git_remote_connect-6" - ], - "network/ls-remote.c": [ - "ex/v0.20.0/network/ls-remote.html#git_remote_connect-4" - ] - }, - "file": "remote.h", - "group": "remote", - "line": 268, - "lineto": 268, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_remote *::git_direction", - "type": "function" - }, - "git_remote_connected": { - "argline": "git_remote *remote", - "args": [ - { - "comment": "the remote", - "name": "remote", - "type": "git_remote *" - } - ], - "comments": "

Check whether the remote's underlying transport is connected to the\nremote host.

\n", - "description": "

Check whether the remote is connected

\n", - "file": "remote.h", - "group": "remote", - "line": 310, - "lineto": 310, - "return": { - "comment": "1 if it's connected, 0 otherwise.", - "type": "int" - }, - "sig": "git_remote *", - "type": "function" - }, - "git_remote_create": { - "argline": "git_remote **out,\n\t\tgit_repository *repo,\n\t\tconst char *name,\n\t\tconst char *url", - "args": [ - { - "comment": "the resulting remote", - "name": "out", - "type": "git_remote **" - }, - { - "comment": "the repository in which to create the remote", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "the remote's name", - "name": "name", - "type": "const char *" - }, - { - "comment": "the remote's url", - "name": "url", - "type": "const char *" - } - ], - "comments": "", - "description": "

Add a remote with the default fetch refspec to the repository's configuration. This\ncalls git_remote_save before returning.

\n", - "file": "remote.h", - "group": "remote", - "line": 39, - "lineto": 43, - "return": { - "comment": "0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code", - "type": "int" - }, - "sig": "git_remote **::git_repository *::const char *::const char *", - "type": "function" - }, - "git_remote_create_inmemory": { - "argline": "git_remote **out,\n\t\tgit_repository *repo,\n\t\tconst char *fetch,\n\t\tconst char *url", - "args": [ - { - "comment": "pointer to the new remote object", - "name": "out", - "type": "git_remote **" - }, - { - "comment": "the associated repository", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "the fetch refspec to use for this remote.", - "name": "fetch", - "type": "const char *" - }, - { - "comment": "the remote repository's URL", - "name": "url", - "type": "const char *" - } - ], - "comments": "

Create a remote with the given refspec in memory. You can use\nthis when you have a URL instead of a remote's name. Note that in-memory\nremotes cannot be converted to persisted remotes.

\n\n

The name, when provided, will be checked for validity.\nSee git_tag_create() for rules about valid names.

\n", - "description": "

Create a remote in memory

\n", - "examples": { - "network/fetch.c": [ - "ex/v0.20.0/network/fetch.html#git_remote_create_inmemory-4" - ], - "network/ls-remote.c": [ - "ex/v0.20.0/network/ls-remote.html#git_remote_create_inmemory-2" - ] - }, - "file": "remote.h", - "group": "remote", - "line": 80, - "lineto": 84, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_remote **::git_repository *::const char *::const char *", - "type": "function" - }, - "git_remote_create_with_fetchspec": { - "argline": "git_remote **out,\n\t\tgit_repository *repo,\n\t\tconst char *name,\n\t\tconst char *url,\n\t\tconst char *fetch", - "args": [ - { - "comment": "the resulting remote", - "name": "out", - "type": "git_remote **" - }, - { - "comment": "the repository in which to create the remote", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "the remote's name", - "name": "name", - "type": "const char *" - }, - { - "comment": "the remote's url", - "name": "url", - "type": "const char *" - }, - { - "comment": "the remote fetch value", - "name": "fetch", - "type": "const char *" - } - ], - "comments": "", - "description": "

Add a remote with the provided fetch refspec (or default if NULL) to the repository's\nconfiguration. This\ncalls git_remote_save before returning.

\n", - "file": "remote.h", - "group": "remote", - "line": 57, - "lineto": 62, - "return": { - "comment": "0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code", - "type": "int" - }, - "sig": "git_remote **::git_repository *::const char *::const char *::const char *", - "type": "function" - }, - "git_remote_disconnect": { - "argline": "git_remote *remote", - "args": [ - { - "comment": "the remote to disconnect from", - "name": "remote", - "type": "git_remote *" - } - ], - "comments": "

Close the connection to the remote and free the underlying\ntransport.

\n", - "description": "

Disconnect from the remote

\n", - "examples": { - "network/fetch.c": [ - "ex/v0.20.0/network/fetch.html#git_remote_disconnect-8" - ] - }, - "file": "remote.h", - "group": "remote", - "line": 330, - "lineto": 330, - "return": { - "type": "void" - }, - "sig": "git_remote *", - "type": "function" - }, - "git_remote_download": { - "argline": "git_remote *remote", - "args": [ - { - "name": "remote", - "type": "git_remote *" - } - ], - "comments": "

Connect to the remote if it hasn't been done yet, negotiate with\nthe remote git which objects are missing, download and index the\npackfile.

\n\n

The .idx file will be created and both it and the packfile with be\nrenamed to their final name.

\n", - "description": "

Download and index the packfile

\n", - "examples": { - "network/fetch.c": [ - "ex/v0.20.0/network/fetch.html#git_remote_download-7" - ] - }, - "file": "remote.h", - "group": "remote", - "line": 299, - "lineto": 299, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_remote *", - "type": "function" - }, - "git_remote_fetch": { - "argline": "git_remote *remote", - "args": [ - { - "comment": "the remote to fetch from", - "name": "remote", - "type": "git_remote *" - } - ], - "comments": "

Convenience function to connect to a remote, download the data,\ndisconnect and update the remote-tracking branches.

\n", - "description": "

Download new data and update tips

\n", - "file": "remote.h", - "group": "remote", - "line": 359, - "lineto": 359, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_remote *", - "type": "function" - }, - "git_remote_free": { - "argline": "git_remote *remote", - "args": [ - { - "comment": "the remote to free", - "name": "remote", - "type": "git_remote *" - } - ], - "comments": "

This also disconnects from the remote, if the connection\nhas not been closed yet (using git_remote_disconnect).

\n", - "description": "

Free the memory associated with a remote

\n", - "examples": { - "network/fetch.c": [ - "ex/v0.20.0/network/fetch.html#git_remote_free-9", - "ex/v0.20.0/network/fetch.html#git_remote_free-10" - ], - "network/ls-remote.c": [ - "ex/v0.20.0/network/ls-remote.html#git_remote_free-6" - ] - }, - "file": "remote.h", - "group": "remote", - "line": 340, - "lineto": 340, - "return": { - "type": "void" - }, - "sig": "git_remote *", - "type": "function" - }, - "git_remote_get_fetch_refspecs": { - "argline": "git_strarray *array, git_remote *remote", - "args": [ - { - "comment": "pointer to the array in which to store the strings", - "name": "array", - "type": "git_strarray *" - }, - { - "comment": "the remote to query", - "name": "remote", - "type": "git_remote *" - } - ], - "comments": "

The memory is owned by the user and should be freed with\ngit_strarray_free.

\n", - "description": "

Get the remote's list of fetch refspecs

\n", - "file": "remote.h", - "group": "remote", - "line": 185, - "lineto": 185, - "return": { - "type": "int" - }, - "sig": "git_strarray *::git_remote *", - "type": "function" - }, - "git_remote_get_push_refspecs": { - "argline": "git_strarray *array, git_remote *remote", - "args": [ - { - "comment": "pointer to the array in which to store the strings", - "name": "array", - "type": "git_strarray *" - }, - { - "comment": "the remote to query", - "name": "remote", - "type": "git_remote *" - } - ], - "comments": "

The memory is owned by the user and should be freed with\ngit_strarray_free.

\n", - "description": "

Get the remote's list of push refspecs

\n", - "file": "remote.h", - "group": "remote", - "line": 218, - "lineto": 218, - "return": { - "type": "int" - }, - "sig": "git_strarray *::git_remote *", - "type": "function" - }, - "git_remote_get_refspec": { - "argline": "git_remote *remote, size_t n", - "args": [ - { - "comment": "the remote to query", - "name": "remote", - "type": "git_remote *" - }, - { - "comment": "the refspec to get", - "name": "n", - "type": "size_t" - } - ], - "comments": "", - "description": "

Get a refspec from the remote

\n", - "file": "remote.h", - "group": "remote", - "line": 254, - "lineto": 254, - "return": { - "comment": "the nth refspec", - "type": "const git_refspec *" - }, - "sig": "git_remote *::size_t", - "type": "function" - }, - "git_remote_is_valid_name": { - "argline": "const char *remote_name", - "args": [ - { - "comment": "name to be checked.", - "name": "remote_name", - "type": "const char *" - } - ], - "comments": "", - "description": "

Ensure the remote name is well-formed.

\n", - "file": "remote.h", - "group": "remote", - "line": 560, - "lineto": 560, - "return": { - "comment": "1 if the reference name is acceptable; 0 if it isn't", - "type": "int" - }, - "sig": "const char *", - "type": "function" - }, - "git_remote_list": { - "argline": "git_strarray *out, git_repository *repo", - "args": [ - { - "comment": "a string array which receives the names of the remotes", - "name": "out", - "type": "git_strarray *" - }, - { - "comment": "the repository to query", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

The string array must be freed by the user.

\n", - "description": "

Get a list of the configured remotes for a repo

\n", - "file": "remote.h", - "group": "remote", - "line": 386, - "lineto": 386, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_strarray *::git_repository *", - "type": "function" - }, - "git_remote_load": { - "argline": "git_remote **out, git_repository *repo, const char *name", - "args": [ - { - "comment": "pointer to the new remote object", - "name": "out", - "type": "git_remote **" - }, - { - "comment": "the associated repository", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "the remote's name", - "name": "name", - "type": "const char *" - } - ], - "comments": "

The name will be checked for validity.\nSee git_tag_create() for rules about valid names.

\n", - "description": "

Get the information for a particular remote

\n", - "examples": { - "network/fetch.c": [ - "ex/v0.20.0/network/fetch.html#git_remote_load-5" - ], - "network/ls-remote.c": [ - "ex/v0.20.0/network/ls-remote.html#git_remote_load-3" - ] - }, - "file": "remote.h", - "group": "remote", - "line": 97, - "lineto": 97, - "return": { - "comment": "0, GIT_ENOTFOUND, GIT_EINVALIDSPEC or an error code", - "type": "int" - }, - "sig": "git_remote **::git_repository *::const char *", - "type": "function" - }, - "git_remote_ls": { - "argline": "const git_remote_head ***out, size_t *size, git_remote *remote", - "args": [ - { - "comment": "pointer to the array", - "name": "out", - "type": "const git_remote_head ***" - }, - { - "comment": "the number of remote heads", - "name": "size", - "type": "size_t *" - }, - { - "comment": "the remote", - "name": "remote", - "type": "git_remote *" - } - ], - "comments": "

The remote (or more exactly its transport) must be connected. The\nmemory belongs to the remote.

\n\n

The array will stay valid as long as the remote object exists and\nits transport isn't changed, but a copy is recommended for usage of\nthe data.

\n", - "description": "

Get a list of refs at the remote

\n", - "examples": { - "network/ls-remote.c": [ - "ex/v0.20.0/network/ls-remote.html#git_remote_ls-5" - ] - }, - "file": "remote.h", - "group": "remote", - "line": 285, - "lineto": 285, - "return": { - "comment": "0 on success, or an error code", - "type": "int" - }, - "sig": "const git_remote_head ***::size_t *::git_remote *", - "type": "function" - }, - "git_remote_name": { - "argline": "const git_remote *remote", - "args": [ - { - "comment": "the remote", - "name": "remote", - "type": "const git_remote *" - } - ], - "comments": "", - "description": "

Get the remote's name

\n", - "file": "remote.h", - "group": "remote", - "line": 124, - "lineto": 124, - "return": { - "comment": "a pointer to the name or NULL for in-memory remotes", - "type": "const char *" - }, - "sig": "const git_remote *", - "type": "function" - }, - "git_remote_owner": { - "argline": "const git_remote *remote", - "args": [ - { - "comment": "the remote", - "name": "remote", - "type": "const git_remote *" - } - ], - "comments": "", - "description": "

Get the remote's repository

\n", - "file": "remote.h", - "group": "remote", - "line": 116, - "lineto": 116, - "return": { - "comment": "a pointer to the repository", - "type": "git_repository *" - }, - "sig": "const git_remote *", - "type": "function" - }, - "git_remote_pushurl": { - "argline": "const git_remote *remote", - "args": [ - { - "comment": "the remote", - "name": "remote", - "type": "const git_remote *" - } - ], - "comments": "", - "description": "

Get the remote's url for pushing

\n", - "file": "remote.h", - "group": "remote", - "line": 140, - "lineto": 140, - "return": { - "comment": "a pointer to the url or NULL if no special url for pushing is set", - "type": "const char *" - }, - "sig": "const git_remote *", - "type": "function" - }, - "git_remote_refspec_count": { - "argline": "git_remote *remote", - "args": [ - { - "comment": "the remote", - "name": "remote", - "type": "git_remote *" - } - ], - "comments": "", - "description": "

Get the number of refspecs for a remote

\n", - "file": "remote.h", - "group": "remote", - "line": 245, - "lineto": 245, - "return": { - "comment": "the amount of refspecs configured in this remote", - "type": "size_t" - }, - "sig": "git_remote *", - "type": "function" - }, - "git_remote_rename": { - "argline": "git_remote *remote,\n\tconst char *new_name,\n\tgit_remote_rename_problem_cb callback,\n\tvoid *payload", - "args": [ - { - "comment": "the remote to rename", - "name": "remote", - "type": "git_remote *" - }, - { - "comment": "the new name the remote should bear", - "name": "new_name", - "type": "const char *" - }, - { - "comment": "Optional callback to notify the consumer of fetch refspecs that haven't been automatically updated and need potential manual tweaking.", - "name": "callback", - "type": "git_remote_rename_problem_cb" - }, - { - "comment": "Additional data to pass to the callback", - "name": "payload", - "type": "void *" - } - ], - "comments": "

All remote-tracking branches and configuration settings\nfor the remote are updated.

\n\n

The new name will be checked for validity.\nSee git_tag_create() for rules about valid names.

\n\n

A temporary in-memory remote cannot be given a name with this method.

\n", - "description": "

Give the remote a new name

\n", - "file": "remote.h", - "group": "remote", - "line": 531, - "lineto": 535, - "return": { - "comment": "0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code", - "type": "int" - }, - "sig": "git_remote *::const char *::git_remote_rename_problem_cb::void *", - "type": "function" - }, - "git_remote_save": { - "argline": "const git_remote *remote", - "args": [ - { - "comment": "the remote to save to config", - "name": "remote", - "type": "const git_remote *" - } - ], - "comments": "

One can't save a in-memory remote. Doing so will\nresult in a GIT_EINVALIDSPEC being returned.

\n", - "description": "

Save a remote to its repository's configuration

\n", - "file": "remote.h", - "group": "remote", - "line": 108, - "lineto": 108, - "return": { - "comment": "0, GIT_EINVALIDSPEC or an error code", - "type": "int" - }, - "sig": "const git_remote *", - "type": "function" - }, - "git_remote_set_autotag": { - "argline": "git_remote *remote,\n\tgit_remote_autotag_option_t value", - "args": [ - { - "comment": "the remote to configure", - "name": "remote", - "type": "git_remote *" - }, - { - "comment": "a GIT_REMOTE_DOWNLOAD_TAGS value", - "name": "value", - "type": "git_remote_autotag_option_t" - } - ], - "comments": "", - "description": "

Set the tag auto-follow setting

\n", - "file": "remote.h", - "group": "remote", - "line": 509, - "lineto": 511, - "return": { - "type": "void" - }, - "sig": "git_remote *::git_remote_autotag_option_t", - "type": "function" - }, - "git_remote_set_callbacks": { - "argline": "git_remote *remote, const git_remote_callbacks *callbacks", - "args": [ - { - "comment": "the remote to configure", - "name": "remote", - "type": "git_remote *" - }, - { - "comment": "a pointer to the user's callback settings", - "name": "callbacks", - "type": "const git_remote_callbacks *" - } - ], - "comments": "

Note that the remote keeps its own copy of the data and you need to\ncall this function again if you want to change the callbacks.

\n", - "description": "

Set the callbacks for a remote

\n", - "examples": { - "network/fetch.c": [ - "ex/v0.20.0/network/fetch.html#git_remote_set_callbacks-12" - ], - "network/ls-remote.c": [ - "ex/v0.20.0/network/ls-remote.html#git_remote_set_callbacks-7" - ] - }, - "file": "remote.h", - "group": "remote", - "line": 482, - "lineto": 482, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_remote *::const git_remote_callbacks *", - "type": "function" - }, - "git_remote_set_fetch_refspecs": { - "argline": "git_remote *remote, git_strarray *array", - "args": [ - { - "comment": "the remote to modify", - "name": "remote", - "type": "git_remote *" - }, - { - "comment": "the new list of fetch resfpecs", - "name": "array", - "type": "git_strarray *" - } - ], - "comments": "

The contents of the string array are copied.

\n", - "description": "

Set the remote's list of fetch refspecs

\n", - "file": "remote.h", - "group": "remote", - "line": 195, - "lineto": 195, - "return": { - "type": "int" - }, - "sig": "git_remote *::git_strarray *", - "type": "function" - }, - "git_remote_set_push_refspecs": { - "argline": "git_remote *remote, git_strarray *array", - "args": [ - { - "comment": "the remote to modify", - "name": "remote", - "type": "git_remote *" - }, - { - "comment": "the new list of push resfpecs", - "name": "array", - "type": "git_strarray *" - } - ], - "comments": "

The contents of the string array are copied.

\n", - "description": "

Set the remote's list of push refspecs

\n", - "file": "remote.h", - "group": "remote", - "line": 228, - "lineto": 228, - "return": { - "type": "int" - }, - "sig": "git_remote *::git_strarray *", - "type": "function" - }, - "git_remote_set_pushurl": { - "argline": "git_remote *remote, const char* url", - "args": [ - { - "comment": "the remote", - "name": "remote", - "type": "git_remote *" - }, - { - "comment": "the url to set or NULL to clear the pushurl", - "name": "url", - "type": "const char*" - } - ], - "comments": "

Existing connections will not be updated.

\n", - "description": "

Set the remote's url for pushing

\n", - "file": "remote.h", - "group": "remote", - "line": 162, - "lineto": 162, - "return": { - "comment": "0 or an error value", - "type": "int" - }, - "sig": "git_remote *::const char*", - "type": "function" - }, - "git_remote_set_transport": { - "argline": "git_remote *remote,\n\tgit_transport *transport", - "args": [ - { - "comment": "the remote to configure", - "name": "remote", - "type": "git_remote *" - }, - { - "comment": "the transport object for the remote to use", - "name": "transport", - "type": "git_transport *" - } - ], - "comments": "", - "description": "

Sets a custom transport for the remote. The caller can use this function\nto bypass the automatic discovery of a transport by URL scheme (i.e.\nhttp://, https://, git://) and supply their own transport to be used\ninstead. After providing the transport to a remote using this function,\nthe transport object belongs exclusively to that remote, and the remote will\nfree it when it is freed with git_remote_free.

\n", - "file": "remote.h", - "group": "remote", - "line": 408, - "lineto": 410, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_remote *::git_transport *", - "type": "function" - }, - "git_remote_set_update_fetchhead": { - "argline": "git_remote *remote, int value", - "args": [ - { - "comment": "the remote to configure", - "name": "remote", - "type": "git_remote *" - }, - { - "comment": "0 to disable updating FETCH_HEAD", - "name": "value", - "type": "int" - } - ], - "comments": "", - "description": "

Sets the update FETCH_HEAD setting. By default, FETCH_HEAD will be\nupdated on every fetch. Set to 0 to disable.

\n", - "file": "remote.h", - "group": "remote", - "line": 552, - "lineto": 552, - "return": { - "type": "void" - }, - "sig": "git_remote *::int", - "type": "function" - }, - "git_remote_set_url": { - "argline": "git_remote *remote, const char* url", - "args": [ - { - "comment": "the remote", - "name": "remote", - "type": "git_remote *" - }, - { - "comment": "the url to set", - "name": "url", - "type": "const char*" - } - ], - "comments": "

Existing connections will not be updated.

\n", - "description": "

Set the remote's url

\n", - "file": "remote.h", - "group": "remote", - "line": 151, - "lineto": 151, - "return": { - "comment": "0 or an error value", - "type": "int" - }, - "sig": "git_remote *::const char*", - "type": "function" - }, - "git_remote_stats": { - "argline": "git_remote *remote", - "args": [ - { - "name": "remote", - "type": "git_remote *" - } - ], - "comments": "", - "description": "

Get the statistics structure that is filled in by the fetch operation.

\n", - "examples": { - "network/fetch.c": [ - "ex/v0.20.0/network/fetch.html#git_remote_stats-13" - ] - }, - "file": "remote.h", - "group": "remote", - "line": 487, - "lineto": 493, - "return": { - "type": "const git_transfer_progress *" - }, - "sig": "git_remote *", - "type": "function" - }, - "git_remote_stop": { - "argline": "git_remote *remote", - "args": [ - { - "comment": "the remote", - "name": "remote", - "type": "git_remote *" - } - ], - "comments": "

At certain points in its operation, the network code checks whether\nthe operation has been cancelled and if so stops the operation.

\n", - "description": "

Cancel the operation

\n", - "file": "remote.h", - "group": "remote", - "line": 320, - "lineto": 320, - "return": { - "type": "void" - }, - "sig": "git_remote *", - "type": "function" - }, - "git_remote_supported_url": { - "argline": "const char* url", - "args": [ - { - "comment": "the url to check", - "name": "url", - "type": "const char*" - } - ], - "comments": "", - "description": "

Return whether the passed URL is supported by this version of the library.

\n", - "file": "remote.h", - "group": "remote", - "line": 375, - "lineto": 375, - "return": { - "comment": "1 if the url is supported, 0 otherwise", - "type": "int" - }, - "sig": "const char*", - "type": "function" - }, - "git_remote_update_fetchhead": { - "argline": "git_remote *remote", - "args": [ - { - "comment": "the remote to query", - "name": "remote", - "type": "git_remote *" - } - ], - "comments": "", - "description": "

Retrieve the update FETCH_HEAD setting.

\n", - "file": "remote.h", - "group": "remote", - "line": 543, - "lineto": 543, - "return": { - "comment": "the update FETCH_HEAD setting", - "type": "int" - }, - "sig": "git_remote *", - "type": "function" - }, - "git_remote_update_tips": { - "argline": "git_remote *remote", - "args": [ - { - "comment": "the remote to update", - "name": "remote", - "type": "git_remote *" - } - ], - "comments": "", - "description": "

Update the tips to the new state

\n", - "examples": { - "network/fetch.c": [ - "ex/v0.20.0/network/fetch.html#git_remote_update_tips-11" - ] - }, - "file": "remote.h", - "group": "remote", - "line": 348, - "lineto": 348, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_remote *", - "type": "function" - }, - "git_remote_url": { - "argline": "const git_remote *remote", - "args": [ - { - "comment": "the remote", - "name": "remote", - "type": "const git_remote *" - } - ], - "comments": "", - "description": "

Get the remote's url

\n", - "file": "remote.h", - "group": "remote", - "line": 132, - "lineto": 132, - "return": { - "comment": "a pointer to the url", - "type": "const char *" - }, - "sig": "const git_remote *", - "type": "function" - }, - "git_remote_valid_url": { - "argline": "const char *url", - "args": [ - { - "comment": "the url to check", - "name": "url", - "type": "const char *" - } - ], - "comments": "", - "description": "

Return whether a string is a valid remote URL

\n", - "file": "remote.h", - "group": "remote", - "line": 367, - "lineto": 367, - "return": { - "comment": "1 if the url is valid, 0 otherwise", - "type": "int" - }, - "sig": "const char *", - "type": "function" - }, - "git_repository__cleanup": { - "argline": "git_repository *repo", - "args": [ - { - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

This will free all the mapped memory and internal objects\nof the repository and leave it in a "blank" state.

\n\n

There's no need to call this function directly unless you're\ntrying to aggressively cleanup the repo before its\ndeallocation. git_repository_free already performs this operation\nbefore deallocation the repo.

\n", - "description": "

Reset all the internal state in a repository.

\n", - "file": "sys/repository.h", - "group": "repository", - "line": 41, - "lineto": 41, - "return": { - "type": "void" - }, - "sig": "git_repository *", - "type": "function" - }, - "git_repository_config": { - "argline": "git_config **out, git_repository *repo", - "args": [ - { - "comment": "Pointer to store the loaded config file", - "name": "out", - "type": "git_config **" - }, - { - "comment": "A repository object", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

If a configuration file has not been set, the default\nconfig set for the repository will be returned, including\nglobal and system configurations (if they are available).

\n\n

The configuration file must be freed once it's no longer\nbeing used by the user.

\n", - "description": "

Get the configuration file for this repository.

\n", - "file": "repository.h", - "group": "repository", - "line": 405, - "lineto": 405, - "return": { - "comment": "0, or an error code", - "type": "int" - }, - "sig": "git_config **::git_repository *", - "type": "function" - }, - "git_repository_detach_head": { - "argline": "git_repository* repo", - "args": [ - { - "comment": "Repository pointer", - "name": "repo", - "type": "git_repository*" - } - ], - "comments": "

If the HEAD is already detached and points to a Commit, 0 is returned.

\n\n

If the HEAD is already detached and points to a Tag, the HEAD is\nupdated into making it point to the peeled Commit, and 0 is returned.

\n\n

If the HEAD is already detached and points to a non commitish, the HEAD is\nunaltered, and -1 is returned.

\n\n

Otherwise, the HEAD will be detached and point to the peeled Commit.

\n", - "description": "

Detach the HEAD.

\n", - "file": "repository.h", - "group": "repository", - "line": 617, - "lineto": 631, - "return": { - "comment": "0 on success, GIT_EUNBORNBRANCH when HEAD points to a non existing branch or an error code", - "type": "int" - }, - "sig": "git_repository*", - "type": "function" - }, - "git_repository_discover": { - "argline": "char *path_out,\n\t\tsize_t path_size,\n\t\tconst char *start_path,\n\t\tint across_fs,\n\t\tconst char *ceiling_dirs", - "args": [ - { - "comment": "The user allocated buffer which will contain the found path.", - "name": "path_out", - "type": "char *" - }, - { - "comment": "repository_path size", - "name": "path_size", - "type": "size_t" - }, - { - "comment": "The base path where the lookup starts.", - "name": "start_path", - "type": "const char *" - }, - { - "comment": "If true, then the lookup will not stop when a filesystem device change is detected while exploring parent directories.", - "name": "across_fs", - "type": "int" - }, - { - "comment": "A GIT_PATH_LIST_SEPARATOR separated list of absolute symbolic link free paths. The lookup will stop when any of this paths is reached. Note that the lookup always performs on start_path no matter start_path appears in ceiling_dirs ceiling_dirs might be NULL (which is equivalent to an empty string)", - "name": "ceiling_dirs", - "type": "const char *" - } - ], - "comments": "

The method will automatically detect if the repository is bare\n(if there is a repository).

\n", - "description": "

Look for a git repository and copy its path in the given buffer.\nThe lookup start from base_path and walk across parent directories\nif nothing has been found. The lookup ends when the first repository\nis found, or when reaching a directory referenced in ceiling_dirs\nor when the filesystem changes (in case across_fs is true).

\n", - "file": "repository.h", - "group": "repository", - "line": 79, - "lineto": 84, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "char *::size_t::const char *::int::const char *", - "type": "function" - }, - "git_repository_fetchhead_foreach": { - "argline": "git_repository *repo,\n\tgit_repository_fetchhead_foreach_cb callback,\n\tvoid *payload", - "args": [ - { - "comment": "A repository object", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "Callback function", - "name": "callback", - "type": "git_repository_fetchhead_foreach_cb" - }, - { - "comment": "Pointer to callback data (optional)", - "name": "payload", - "type": "void *" - } - ], - "comments": "", - "description": "

Call callback 'callback' for each entry in the given FETCH_HEAD file.

\n", - "file": "repository.h", - "group": "repository", - "line": 513, - "lineto": 518, - "return": { - "comment": "0 on success, GIT_ENOTFOUND, GIT_EUSER or error", - "type": "int" - }, - "sig": "git_repository *::git_repository_fetchhead_foreach_cb::void *", - "type": "function" - }, - "git_repository_free": { - "argline": "git_repository *repo", - "args": [ - { - "comment": "repository handle to close. If NULL nothing occurs.", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

Note that after a repository is free'd, all the objects it has spawned\nwill still exist until they are manually closed by the user\nwith git_object_free, but accessing any of the attributes of\nan object without a backing repository will result in undefined\nbehavior

\n", - "description": "

Free a previously allocated repository

\n", - "examples": { - "blame.c": [ - "ex/v0.20.0/blame.html#git_repository_free-23" - ], - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_repository_free-30" - ], - "diff.c": [ - "ex/v0.20.0/diff.html#git_repository_free-10" - ], - "general.c": [ - "ex/v0.20.0/general.html#git_repository_free-58" - ], - "init.c": [ - "ex/v0.20.0/init.html#git_repository_free-4" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_repository_free-41" - ], - "network/clone.c": [ - "ex/v0.20.0/network/clone.html#git_repository_free-3" - ], - "network/git2.c": [ - "ex/v0.20.0/network/git2.html#git_repository_free-4" - ], - "rev-parse.c": [ - "ex/v0.20.0/rev-parse.html#git_repository_free-15" - ], - "status.c": [ - "ex/v0.20.0/status.html#git_repository_free-4" - ] - }, - "file": "repository.h", - "group": "repository", - "line": 154, - "lineto": 154, - "return": { - "type": "void" - }, - "sig": "git_repository *", - "type": "function" - }, - "git_repository_get_namespace": { - "argline": "git_repository *repo", - "args": [ - { - "comment": "The repo", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "", - "description": "

Get the currently active namespace for this repository

\n", - "file": "repository.h", - "group": "repository", - "line": 662, - "lineto": 662, - "return": { - "comment": "the active namespace, or NULL if there isn't one", - "type": "const char *" - }, - "sig": "git_repository *", - "type": "function" - }, - "git_repository_hashfile": { - "argline": "git_oid *out,\n\tgit_repository *repo,\n\tconst char *path,\n\tgit_otype type,\n\tconst char *as_path", - "args": [ - { - "comment": "Output value of calculated SHA", - "name": "out", - "type": "git_oid *" - }, - { - "comment": "Repository pointer", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "Path to file on disk whose contents should be hashed. If the repository is not NULL, this can be a relative path.", - "name": "path", - "type": "const char *" - }, - { - "comment": "The object type to hash as (e.g. GIT_OBJ_BLOB)", - "name": "type", - "type": "git_otype" - }, - { - "comment": "The path to use to look up filtering rules. If this is NULL, then the `path` parameter will be used instead. If this is passed as the empty string, then no filters will be applied when calculating the hash.", - "name": "as_path", - "type": "const char *" - } - ], - "comments": "

If you simply want to calculate the hash of a file on disk with no filters,\nyou can just use the git_odb_hashfile() API. However, if you want to\nhash a file in the repository and you want to apply filtering rules (e.g.\ncrlf filters) before generating the SHA, then use this function.

\n", - "description": "

Calculate hash of file using repository filtering rules.

\n", - "file": "repository.h", - "group": "repository", - "line": 551, - "lineto": 556, - "return": { - "type": "int" - }, - "sig": "git_oid *::git_repository *::const char *::git_otype::const char *", - "type": "function" - }, - "git_repository_head": { - "argline": "git_reference **out, git_repository *repo", - "args": [ - { - "comment": "pointer to the reference which will be retrieved", - "name": "out", - "type": "git_reference **" - }, - { - "comment": "a repository object", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

The returned git_reference will be owned by caller and\ngit_reference_free() must be called when done with it to release the\nallocated memory and prevent a leak.

\n", - "description": "

Retrieve and resolve the reference pointed at by HEAD.

\n", - "examples": { - "status.c": [ - "ex/v0.20.0/status.html#git_repository_head-5" - ] - }, - "file": "repository.h", - "group": "repository", - "line": 303, - "lineto": 303, - "return": { - "comment": "0 on success, GIT_EUNBORNBRANCH when HEAD points to a non existing branch, GIT_ENOTFOUND when HEAD is missing; an error code otherwise", - "type": "int" - }, - "sig": "git_reference **::git_repository *", - "type": "function" - }, - "git_repository_head_detached": { - "argline": "git_repository *repo", - "args": [ - { - "comment": "Repo to test", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

A repository's HEAD is detached when it points directly to a commit\ninstead of a branch.

\n", - "description": "

Check if a repository's HEAD is detached

\n", - "file": "repository.h", - "group": "repository", - "line": 315, - "lineto": 315, - "return": { - "comment": "1 if HEAD is detached, 0 if it's not; error code if there was an error.", - "type": "int" - }, - "sig": "git_repository *", - "type": "function" - }, - "git_repository_head_unborn": { - "argline": "git_repository *repo", - "args": [ - { - "comment": "Repo to test", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

An unborn branch is one named from HEAD but which doesn't exist in\nthe refs namespace, because it doesn't have any commit to point to.

\n", - "description": "

Check if the current branch is unborn

\n", - "file": "repository.h", - "group": "repository", - "line": 327, - "lineto": 327, - "return": { - "comment": "1 if the current branch is unborn, 0 if it's not; error code if there was an error", - "type": "int" - }, - "sig": "git_repository *", - "type": "function" - }, - "git_repository_index": { - "argline": "git_index **out, git_repository *repo", - "args": [ - { - "comment": "Pointer to store the loaded index", - "name": "out", - "type": "git_index **" - }, - { - "comment": "A repository object", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

If a custom index has not been set, the default\nindex for the repository will be returned (the one\nlocated in .git/index).

\n\n

The index must be freed once it's no longer being used by\nthe user.

\n", - "description": "

Get the Index file for this repository.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_repository_index-60" - ], - "init.c": [ - "ex/v0.20.0/init.html#git_repository_index-9" - ] - }, - "file": "repository.h", - "group": "repository", - "line": 453, - "lineto": 453, - "return": { - "comment": "0, or an error code", - "type": "int" - }, - "sig": "git_index **::git_repository *", - "type": "function" - }, - "git_repository_init": { - "argline": "git_repository **out,\n\tconst char *path,\n\tunsigned is_bare", - "args": [ - { - "comment": "pointer to the repo which will be created or reinitialized", - "name": "out", - "type": "git_repository **" - }, - { - "comment": "the path to the repository", - "name": "path", - "type": "const char *" - }, - { - "comment": "if true, a Git repository without a working directory is created at the pointed path. If false, provided path will be considered as the working directory into which the .git directory will be created.", - "name": "is_bare", - "type": "unsigned" - } - ], - "comments": "

TODO:\n- Reinit the repository

\n", - "description": "

Creates a new Git repository in the given folder.

\n", - "examples": { - "init.c": [ - "ex/v0.20.0/init.html#git_repository_init-5" - ] - }, - "file": "repository.h", - "group": "repository", - "line": 171, - "lineto": 174, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_repository **::const char *::unsigned", - "type": "function" - }, - "git_repository_init_ext": { - "argline": "git_repository **out,\n\tconst char *repo_path,\n\tgit_repository_init_options *opts", - "args": [ - { - "comment": "Pointer to the repo which will be created or reinitialized.", - "name": "out", - "type": "git_repository **" - }, - { - "comment": "The path to the repository.", - "name": "repo_path", - "type": "const char *" - }, - { - "comment": "Pointer to git_repository_init_options struct.", - "name": "opts", - "type": "git_repository_init_options *" - } - ], - "comments": "

This will initialize a new git repository (creating the repo_path\nif requested by flags) and working directory as needed. It will\nauto-detect the case sensitivity of the file system and if the\nfile system supports file mode bits correctly.

\n", - "description": "

Create a new Git repository in the given folder with extended controls.

\n", - "examples": { - "init.c": [ - "ex/v0.20.0/init.html#git_repository_init_ext-6" - ] - }, - "file": "repository.h", - "group": "repository", - "line": 285, - "lineto": 288, - "return": { - "comment": "0 or an error code on failure.", - "type": "int" - }, - "sig": "git_repository **::const char *::git_repository_init_options *", - "type": "function" - }, - "git_repository_is_bare": { - "argline": "git_repository *repo", - "args": [ - { - "comment": "Repo to test", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "", - "description": "

Check if a repository is bare

\n", - "examples": { - "status.c": [ - "ex/v0.20.0/status.html#git_repository_is_bare-7" - ] - }, - "file": "repository.h", - "group": "repository", - "line": 389, - "lineto": 389, - "return": { - "comment": "1 if the repository is bare, 0 otherwise.", - "type": "int" - }, - "sig": "git_repository *", - "type": "function" - }, - "git_repository_is_empty": { - "argline": "git_repository *repo", - "args": [ - { - "comment": "Repo to test", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

An empty repository has just been initialized and contains\nno references.

\n", - "description": "

Check if a repository is empty

\n", - "file": "repository.h", - "group": "repository", - "line": 339, - "lineto": 339, - "return": { - "comment": "1 if the repository is empty, 0 if it isn't, error code if the repository is corrupted", - "type": "int" - }, - "sig": "git_repository *", - "type": "function" - }, - "git_repository_is_shallow": { - "argline": "git_repository *repo", - "args": [ - { - "comment": "The repository", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "", - "description": "

Determine if the repository was a shallow clone

\n", - "file": "repository.h", - "group": "repository", - "line": 671, - "lineto": 671, - "return": { - "comment": "1 if shallow, zero if not", - "type": "int" - }, - "sig": "git_repository *", - "type": "function" - }, - "git_repository_merge_cleanup": { - "argline": "git_repository *repo", - "args": [ - { - "comment": "A repository object", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "", - "description": "

Remove all the metadata associated with an ongoing git merge, including\nMERGE_HEAD, MERGE_MSG, etc.

\n", - "file": "repository.h", - "group": "repository", - "line": 497, - "lineto": 503, - "return": { - "comment": "0 on success, or error", - "type": "int" - }, - "sig": "git_repository *", - "type": "function" - }, - "git_repository_mergehead_foreach": { - "argline": "git_repository *repo,\n\tgit_repository_mergehead_foreach_cb callback,\n\tvoid *payload", - "args": [ - { - "comment": "A repository object", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "Callback function", - "name": "callback", - "type": "git_repository_mergehead_foreach_cb" - }, - { - "comment": "Pointer to callback data (optional)", - "name": "payload", - "type": "void *" - } - ], - "comments": "", - "description": "

If a merge is in progress, call callback 'cb' for each commit ID in the\nMERGE_HEAD file.

\n", - "file": "repository.h", - "group": "repository", - "line": 529, - "lineto": 531, - "return": { - "comment": "0 on success, GIT_ENOTFOUND, GIT_EUSER or error", - "type": "int" - }, - "sig": "git_repository *::git_repository_mergehead_foreach_cb::void *", - "type": "function" - }, - "git_repository_message": { - "argline": "char *out, size_t len, git_repository *repo", - "args": [ - { - "comment": "Buffer to write data into or NULL to just read required size", - "name": "out", - "type": "char *" - }, - { - "comment": "Length of `out` buffer in bytes", - "name": "len", - "type": "size_t" - }, - { - "comment": "Repository to read prepared message from", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

Operations such as git revert/cherry-pick/merge with the -n option\nstop just short of creating a commit with the changes and save\ntheir prepared message in .git/MERGE_MSG so the next git-commit\nexecution can present it to the user for them to amend if they\nwish.

\n\n

Use this function to get the contents of this file. Don't forget to\nremove the file after you create the commit.

\n\n

If the repository message exists and there are no errors reading it, this\nreturns the bytes needed to store the message in memory (i.e. message\nfile size plus one terminating NUL byte). That value is returned even if\nout is NULL or len is shorter than the necessary size.

\n\n

The out buffer will always be NUL terminated, even if truncation\noccurs.

\n", - "description": "

Retrieve git's prepared message

\n", - "file": "repository.h", - "group": "repository", - "line": 481, - "lineto": 481, - "return": { - "comment": "GIT_ENOTFOUND if no message exists, other value < 0 for other errors, or total bytes in message (may be > `len`) on success", - "type": "int" - }, - "sig": "char *::size_t::git_repository *", - "type": "function" - }, - "git_repository_message_remove": { - "argline": "git_repository *repo", - "args": [ - { - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

Remove the message that git_repository_message retrieves.

\n", - "description": "

Remove git's prepared message.

\n", - "file": "repository.h", - "group": "repository", - "line": 488, - "lineto": 488, - "return": { - "type": "int" - }, - "sig": "git_repository *", - "type": "function" - }, - "git_repository_new": { - "argline": "git_repository **out", - "args": [ - { - "comment": "The blank repository", - "name": "out", - "type": "git_repository **" - } - ], - "comments": "

Note that this is only useful if you wish to associate the repository\nwith a non-filesystem-backed object database and config store.

\n", - "description": "

Create a new repository with neither backends nor config object

\n", - "file": "sys/repository.h", - "group": "repository", - "line": 28, - "lineto": 28, - "return": { - "comment": "0 on success, or an error code", - "type": "int" - }, - "sig": "git_repository **", - "type": "function" - }, - "git_repository_odb": { - "argline": "git_odb **out, git_repository *repo", - "args": [ - { - "comment": "Pointer to store the loaded ODB", - "name": "out", - "type": "git_odb **" - }, - { - "comment": "A repository object", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

If a custom ODB has not been set, the default\ndatabase for the repository will be returned (the one\nlocated in .git/objects).

\n\n

The ODB must be freed once it's no longer being used by\nthe user.

\n", - "description": "

Get the Object Database for this repository.

\n", - "examples": { - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_repository_odb-31" - ], - "general.c": [ - "ex/v0.20.0/general.html#git_repository_odb-59" - ] - }, - "file": "repository.h", - "group": "repository", - "line": 421, - "lineto": 421, - "return": { - "comment": "0, or an error code", - "type": "int" - }, - "sig": "git_odb **::git_repository *", - "type": "function" - }, - "git_repository_open": { - "argline": "git_repository **out, const char *path", - "args": [ - { - "comment": "pointer to the repo which will be opened", - "name": "out", - "type": "git_repository **" - }, - { - "comment": "the path to the repository", - "name": "path", - "type": "const char *" - } - ], - "comments": "

The 'path' argument must point to either a git repository\nfolder, or an existing work dir.

\n\n

The method will automatically detect if 'path' is a normal\nor bare repository or fail is 'path' is neither.

\n", - "description": "

Open a git repository.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_repository_open-57" - ], - "network/git2.c": [ - "ex/v0.20.0/network/git2.html#git_repository_open-3" - ] - }, - "file": "repository.h", - "group": "repository", - "line": 36, - "lineto": 36, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_repository **::const char *", - "type": "function" - }, - "git_repository_open_bare": { - "argline": "git_repository **out, const char *bare_path", - "args": [ - { - "comment": "Pointer to the repo which will be opened.", - "name": "out", - "type": "git_repository **" - }, - { - "comment": "Direct path to the bare repository", - "name": "bare_path", - "type": "const char *" - } - ], - "comments": "

This is a fast open for bare repositories that will come in handy\nif you're e.g. hosting git repositories and need to access them\nefficiently

\n", - "description": "

Open a bare repository on the serverside.

\n", - "file": "repository.h", - "group": "repository", - "line": 141, - "lineto": 141, - "return": { - "comment": "0 on success, or an error code", - "type": "int" - }, - "sig": "git_repository **::const char *", - "type": "function" - }, - "git_repository_open_ext": { - "argline": "git_repository **out,\n\tconst char *path,\n\tunsigned int flags,\n\tconst char *ceiling_dirs", - "args": [ - { - "comment": "Pointer to the repo which will be opened. This can actually be NULL if you only want to use the error code to see if a repo at this path could be opened.", - "name": "out", - "type": "git_repository **" - }, - { - "comment": "Path to open as git repository. If the flags permit \"searching\", then this can be a path to a subdirectory inside the working directory of the repository.", - "name": "path", - "type": "const char *" - }, - { - "comment": "A combination of the GIT_REPOSITORY_OPEN flags above.", - "name": "flags", - "type": "unsigned int" - }, - { - "comment": "A GIT_PATH_LIST_SEPARATOR delimited list of path prefixes at which the search for a containing repository should terminate.", - "name": "ceiling_dirs", - "type": "const char *" - } - ], - "comments": "", - "description": "

Find and open a repository with extended controls.

\n", - "examples": { - "blame.c": [ - "ex/v0.20.0/blame.html#git_repository_open_ext-22" - ], - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_repository_open_ext-29" - ], - "diff.c": [ - "ex/v0.20.0/diff.html#git_repository_open_ext-9" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_repository_open_ext-39", - "ex/v0.20.0/log.html#git_repository_open_ext-40" - ], - "rev-parse.c": [ - "ex/v0.20.0/rev-parse.html#git_repository_open_ext-14" - ], - "status.c": [ - "ex/v0.20.0/status.html#git_repository_open_ext-3" - ] - }, - "file": "repository.h", - "group": "repository", - "line": 124, - "lineto": 128, - "return": { - "comment": "0 on success, GIT_ENOTFOUND if no repository could be found, or -1 if there was a repository but open failed for some reason (such as repo corruption or system errors).", - "type": "int" - }, - "sig": "git_repository **::const char *::unsigned int::const char *", - "type": "function" - }, - "git_repository_path": { - "argline": "git_repository *repo", - "args": [ - { - "comment": "A repository object", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

This is the path of the .git folder for normal repositories,\nor of the repository itself for bare repositories.

\n", - "description": "

Get the path of this repository

\n", - "examples": { - "init.c": [ - "ex/v0.20.0/init.html#git_repository_path-7" - ], - "status.c": [ - "ex/v0.20.0/status.html#git_repository_path-6" - ] - }, - "file": "repository.h", - "group": "repository", - "line": 350, - "lineto": 350, - "return": { - "comment": "the path to the repository", - "type": "const char *" - }, - "sig": "git_repository *", - "type": "function" - }, - "git_repository_refdb": { - "argline": "git_refdb **out, git_repository *repo", - "args": [ - { - "comment": "Pointer to store the loaded refdb", - "name": "out", - "type": "git_refdb **" - }, - { - "comment": "A repository object", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

If a custom refsdb has not been set, the default database for\nthe repository will be returned (the one that manipulates loose\nand packed references in the .git directory).

\n\n

The refdb must be freed once it's no longer being used by\nthe user.

\n", - "description": "

Get the Reference Database Backend for this repository.

\n", - "file": "repository.h", - "group": "repository", - "line": 437, - "lineto": 437, - "return": { - "comment": "0, or an error code", - "type": "int" - }, - "sig": "git_refdb **::git_repository *", - "type": "function" - }, - "git_repository_reinit_filesystem": { - "argline": "git_repository *repo,\n\tint recurse_submodules", - "args": [ - { - "comment": "A repository object", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "Should submodules be updated recursively @returrn 0 on success, < 0 on error", - "name": "recurse_submodules", - "type": "int" - } - ], - "comments": "

When a repository is initialized, config values are set based on the\nproperties of the filesystem that the repository is on, such as\n"core.ignorecase", "core.filemode", "core.symlinks", etc. If the\nrepository is moved to a new filesystem, these properties may no\nlonger be correct and API calls may not behave as expected. This\ncall reruns the phase of repository initialization that sets those\nproperties to compensate for the current filesystem of the repo.

\n", - "description": "

Update the filesystem config settings for an open repository

\n", - "file": "sys/repository.h", - "group": "repository", - "line": 58, - "lineto": 60, - "return": { - "type": "int" - }, - "sig": "git_repository *::int", - "type": "function" - }, - "git_repository_set_config": { - "argline": "git_repository *repo, git_config *config", - "args": [ - { - "comment": "A repository object", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "A Config object", - "name": "config", - "type": "git_config *" - } - ], - "comments": "

This configuration file will be used for all configuration\nqueries involving this repository.

\n\n

The repository will keep a reference to the config file;\nthe user must still free the config after setting it\nto the repository, or it will leak.

\n", - "description": "

Set the configuration file for this repository

\n", - "file": "sys/repository.h", - "group": "repository", - "line": 75, - "lineto": 75, - "return": { - "type": "void" - }, - "sig": "git_repository *::git_config *", - "type": "function" - }, - "git_repository_set_head": { - "argline": "git_repository* repo,\n\tconst char* refname", - "args": [ - { - "comment": "Repository pointer", - "name": "repo", - "type": "git_repository*" - }, - { - "comment": "Canonical name of the reference the HEAD should point at", - "name": "refname", - "type": "const char*" - } - ], - "comments": "

If the provided reference points to a Tree or a Blob, the HEAD is\nunaltered and -1 is returned.

\n\n

If the provided reference points to a branch, the HEAD will point\nto that branch, staying attached, or become attached if it isn't yet.\nIf the branch doesn't exist yet, no error will be return. The HEAD\nwill then be attached to an unborn branch.

\n\n

Otherwise, the HEAD will be detached and will directly point to\nthe Commit.

\n", - "description": "

Make the repository HEAD point to the specified reference.

\n", - "file": "repository.h", - "group": "repository", - "line": 576, - "lineto": 578, - "return": { - "comment": "0 on success, or an error code", - "type": "int" - }, - "sig": "git_repository*::const char*", - "type": "function" - }, - "git_repository_set_head_detached": { - "argline": "git_repository* repo,\n\tconst git_oid* commitish", - "args": [ - { - "comment": "Repository pointer", - "name": "repo", - "type": "git_repository*" - }, - { - "comment": "Object id of the Commit the HEAD should point to", - "name": "commitish", - "type": "const git_oid*" - } - ], - "comments": "

If the provided committish cannot be found in the repository, the HEAD\nis unaltered and GIT_ENOTFOUND is returned.

\n\n

If the provided commitish cannot be peeled into a commit, the HEAD\nis unaltered and -1 is returned.

\n\n

Otherwise, the HEAD will eventually be detached and will directly point to\nthe peeled Commit.

\n", - "description": "

Make the repository HEAD directly point to the Commit.

\n", - "file": "repository.h", - "group": "repository", - "line": 596, - "lineto": 598, - "return": { - "comment": "0 on success, or an error code", - "type": "int" - }, - "sig": "git_repository*::const git_oid*", - "type": "function" - }, - "git_repository_set_index": { - "argline": "git_repository *repo, git_index *index", - "args": [ - { - "comment": "A repository object", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "An index object", - "name": "index", - "type": "git_index *" - } - ], - "comments": "

This index will be used for all index-related operations\ninvolving this repository.

\n\n

The repository will keep a reference to the index file;\nthe user must still free the index after setting it\nto the repository, or it will leak.

\n", - "description": "

Set the index file for this repository

\n", - "file": "sys/repository.h", - "group": "repository", - "line": 120, - "lineto": 120, - "return": { - "type": "void" - }, - "sig": "git_repository *::git_index *", - "type": "function" - }, - "git_repository_set_namespace": { - "argline": "git_repository *repo, const char *nmspace", - "args": [ - { - "comment": "The repo", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "The namespace. This should not include the refs folder, e.g. to namespace all references under `refs/namespaces/foo/`, use `foo` as the namespace.", - "name": "nmspace", - "type": "const char *" - } - ], - "comments": "

This namespace affects all reference operations for the repo.\nSee man gitnamespaces

\n", - "description": "

Sets the active namespace for this Git Repository

\n", - "file": "repository.h", - "group": "repository", - "line": 654, - "lineto": 654, - "return": { - "comment": "0 on success, -1 on error", - "type": "int" - }, - "sig": "git_repository *::const char *", - "type": "function" - }, - "git_repository_set_odb": { - "argline": "git_repository *repo, git_odb *odb", - "args": [ - { - "comment": "A repository object", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "An ODB object", - "name": "odb", - "type": "git_odb *" - } - ], - "comments": "

The ODB will be used for all object-related operations\ninvolving this repository.

\n\n

The repository will keep a reference to the ODB; the user\nmust still free the ODB object after setting it to the\nrepository, or it will leak.

\n", - "description": "

Set the Object Database for this repository

\n", - "file": "sys/repository.h", - "group": "repository", - "line": 90, - "lineto": 90, - "return": { - "type": "void" - }, - "sig": "git_repository *::git_odb *", - "type": "function" - }, - "git_repository_set_refdb": { - "argline": "git_repository *repo, git_refdb *refdb", - "args": [ - { - "comment": "A repository object", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "An refdb object", - "name": "refdb", - "type": "git_refdb *" - } - ], - "comments": "

The refdb will be used for all reference related operations\ninvolving this repository.

\n\n

The repository will keep a reference to the refdb; the user\nmust still free the refdb object after setting it to the\nrepository, or it will leak.

\n", - "description": "

Set the Reference Database Backend for this repository

\n", - "file": "sys/repository.h", - "group": "repository", - "line": 105, - "lineto": 105, - "return": { - "type": "void" - }, - "sig": "git_repository *::git_refdb *", - "type": "function" - }, - "git_repository_set_workdir": { - "argline": "git_repository *repo, const char *workdir, int update_gitlink", - "args": [ - { - "comment": "A repository object", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "The path to a working directory", - "name": "workdir", - "type": "const char *" - }, - { - "comment": "Create/update gitlink in workdir and set config \"core.worktree\" (if workdir is not the parent of the .git directory)", - "name": "update_gitlink", - "type": "int" - } - ], - "comments": "

The working directory doesn't need to be the same one\nthat contains the .git folder for this repository.

\n\n

If this repository is bare, setting its working directory\nwill turn it into a normal repository, capable of performing\nall the common workdir operations (checkout, status, index\nmanipulation, etc).

\n", - "description": "

Set the path to the working directory for this repository

\n", - "file": "repository.h", - "group": "repository", - "line": 380, - "lineto": 381, - "return": { - "comment": "0, or an error code", - "type": "int" - }, - "sig": "git_repository *::const char *::int", - "type": "function" - }, - "git_repository_state": { - "argline": "git_repository *repo", - "args": [ - { - "comment": "Repository pointer", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "", - "description": "

Determines the status of a git repository - ie, whether an operation\n(merge, cherry-pick, etc) is in progress.

\n", - "file": "repository.h", - "group": "repository", - "line": 640, - "lineto": 640, - "return": { - "comment": "The state of the repository", - "type": "int" - }, - "sig": "git_repository *", - "type": "function" - }, - "git_repository_workdir": { - "argline": "git_repository *repo", - "args": [ - { - "comment": "A repository object", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

If the repository is bare, this function will always return\nNULL.

\n", - "description": "

Get the path of the working directory for this repository

\n", - "examples": { - "init.c": [ - "ex/v0.20.0/init.html#git_repository_workdir-8" - ] - }, - "file": "repository.h", - "group": "repository", - "line": 361, - "lineto": 361, - "return": { - "comment": "the path to the working dir, if it exists", - "type": "const char *" - }, - "sig": "git_repository *", - "type": "function" - }, - "git_repository_wrap_odb": { - "argline": "git_repository **out, git_odb *odb", - "args": [ - { - "comment": "pointer to the repo", - "name": "out", - "type": "git_repository **" - }, - { - "comment": "the object database to wrap", - "name": "odb", - "type": "git_odb *" - } - ], - "comments": "

Create a repository object to wrap an object database to be used\nwith the API when all you have is an object database. This doesn't\nhave any paths associated with it, so use with care.

\n", - "description": "

Create a "fake" repository to wrap an object database

\n", - "file": "repository.h", - "group": "repository", - "line": 49, - "lineto": 49, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_repository **::git_odb *", - "type": "function" - }, - "git_reset": { - "argline": "git_repository *repo, git_object *target, git_reset_t reset_type", - "args": [ - { - "comment": "Repository where to perform the reset operation.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "Committish to which the Head should be moved to. This object must belong to the given `repo` and can either be a git_commit or a git_tag. When a git_tag is being passed, it should be dereferencable to a git_commit which oid will be used as the target of the branch.", - "name": "target", - "type": "git_object *" - }, - { - "comment": "Kind of reset operation to perform.", - "name": "reset_type", - "type": "git_reset_t" - } - ], - "comments": "

SOFT reset means the Head will be moved to the commit.

\n\n

MIXED reset will trigger a SOFT reset, plus the index will be replaced\nwith the content of the commit tree.

\n\n

HARD reset will trigger a MIXED reset and the working directory will be\nreplaced with the content of the index. (Untracked and ignored files\nwill be left alone, however.)

\n\n

TODO: Implement remaining kinds of resets.

\n", - "description": "

Sets the current head to the specified commit oid and optionally\nresets the index and working tree to match.

\n", - "file": "reset.h", - "group": "reset", - "line": 53, - "lineto": 54, - "return": { - "comment": "0 on success or an error code", - "type": "int" - }, - "sig": "git_repository *::git_object *::git_reset_t", - "type": "function" - }, - "git_reset_default": { - "argline": "git_repository *repo,\n\tgit_object *target,\n\tgit_strarray* pathspecs", - "args": [ - { - "comment": "Repository where to perform the reset operation.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "The committish which content will be used to reset the content of the index.", - "name": "target", - "type": "git_object *" - }, - { - "comment": "List of pathspecs to operate on.", - "name": "pathspecs", - "type": "git_strarray*" - } - ], - "comments": "

The scope of the updated entries is determined by the paths\nbeing passed in the pathspec parameters.

\n\n

Passing a NULL target will result in removing\nentries in the index matching the provided pathspecs.

\n", - "description": "

Updates some entries in the index from the target commit tree.

\n", - "file": "reset.h", - "group": "reset", - "line": 74, - "lineto": 77, - "return": { - "comment": "0 on success or an error code < 0", - "type": "int" - }, - "sig": "git_repository *::git_object *::git_strarray*", - "type": "function" - }, - "git_revparse": { - "argline": "git_revspec *revspec,\n\tgit_repository *repo,\n\tconst char *spec", - "args": [ - { - "comment": "Pointer to an user-allocated git_revspec struct where the result of the rev-parse will be stored", - "name": "revspec", - "type": "git_revspec *" - }, - { - "comment": "the repository to search in", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "the rev-parse spec to parse", - "name": "spec", - "type": "const char *" - } - ], - "comments": "

See man gitrevisions or\nhttp://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for\ninformation on the syntax accepted.

\n", - "description": "

Parse a revision string for from, to, and intent.

\n", - "examples": { - "blame.c": [ - "ex/v0.20.0/blame.html#git_revparse-25" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_revparse-43" - ], - "rev-parse.c": [ - "ex/v0.20.0/rev-parse.html#git_revparse-16", - "ex/v0.20.0/rev-parse.html#git_revparse-17" - ] - }, - "file": "revparse.h", - "group": "revparse", - "line": 105, - "lineto": 108, - "return": { - "comment": "0 on success, GIT_INVALIDSPEC, GIT_ENOTFOUND, GIT_EAMBIGUOUS or an error code", - "type": "int" - }, - "sig": "git_revspec *::git_repository *::const char *", - "type": "function" - }, - "git_revparse_ext": { - "argline": "git_object **object_out,\n\tgit_reference **reference_out,\n\tgit_repository *repo,\n\tconst char *spec", - "args": [ - { - "comment": "pointer to output object", - "name": "object_out", - "type": "git_object **" - }, - { - "comment": "pointer to output reference or NULL", - "name": "reference_out", - "type": "git_reference **" - }, - { - "comment": "the repository to search in", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "the textual specification for an object", - "name": "spec", - "type": "const char *" - } - ], - "comments": "

See man gitrevisions, or\nhttp://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for\ninformation on the syntax accepted.

\n\n

In some cases (@{<-n>} or <branchname>@{upstream}), the expression may\npoint to an intermediate reference. When such expressions are being passed\nin, reference_out will be valued as well.

\n\n

The returned object should be released with git_object_free and the\nreturned reference with git_reference_free when no longer needed.

\n", - "description": "

Find a single object and intermediate reference by a revision string.

\n", - "file": "revparse.h", - "group": "revparse", - "line": 61, - "lineto": 65, - "return": { - "comment": "0 on success, GIT_ENOTFOUND, GIT_EAMBIGUOUS, GIT_EINVALIDSPEC or an error code", - "type": "int" - }, - "sig": "git_object **::git_reference **::git_repository *::const char *", - "type": "function" - }, - "git_revparse_single": { - "argline": "git_object **out, git_repository *repo, const char *spec", - "args": [ - { - "comment": "pointer to output object", - "name": "out", - "type": "git_object **" - }, - { - "comment": "the repository to search in", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "the textual specification for an object", - "name": "spec", - "type": "const char *" - } - ], - "comments": "

See man gitrevisions, or\nhttp://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for\ninformation on the syntax accepted.

\n\n

The returned object should be released with git_object_free when no\nlonger needed.

\n", - "description": "

Find a single object, as specified by a revision string.

\n", - "examples": { - "blame.c": [ - "ex/v0.20.0/blame.html#git_revparse_single-24" - ], - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_revparse_single-32" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_revparse_single-42" - ] - }, - "file": "revparse.h", - "group": "revparse", - "line": 37, - "lineto": 38, - "return": { - "comment": "0 on success, GIT_ENOTFOUND, GIT_EAMBIGUOUS, GIT_EINVALIDSPEC or an error code", - "type": "int" - }, - "sig": "git_object **::git_repository *::const char *", - "type": "function" - }, - "git_revwalk_free": { - "argline": "git_revwalk *walk", - "args": [ - { - "comment": "traversal handle to close. If NULL nothing occurs.", - "name": "walk", - "type": "git_revwalk *" - } - ], - "comments": "", - "description": "

Free a revision walker previously allocated.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_revwalk_free-65" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_revwalk_free-52" - ] - }, - "file": "revwalk.h", - "group": "revwalk", - "line": 247, - "lineto": 247, - "return": { - "type": "void" - }, - "sig": "git_revwalk *", - "type": "function" - }, - "git_revwalk_hide": { - "argline": "git_revwalk *walk, const git_oid *commit_id", - "args": [ - { - "comment": "the walker being used for the traversal.", - "name": "walk", - "type": "git_revwalk *" - }, - { - "comment": "the oid of commit that will be ignored during the traversal", - "name": "commit_id", - "type": "const git_oid *" - } - ], - "comments": "

The given OID must belong to a commit on the walked\nrepository.

\n\n

The resolved commit and all its parents will be hidden from the\noutput on the revision walk.

\n", - "description": "

Mark a commit (and its ancestors) uninteresting for the output.

\n", - "examples": { - "log.c": [ - "ex/v0.20.0/log.html#git_revwalk_hide-48" - ] - }, - "file": "revwalk.h", - "group": "revwalk", - "line": 140, - "lineto": 140, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_revwalk *::const git_oid *", - "type": "function" - }, - "git_revwalk_hide_glob": { - "argline": "git_revwalk *walk, const char *glob", - "args": [ - { - "comment": "the walker being used for the traversal", - "name": "walk", - "type": "git_revwalk *" - }, - { - "comment": "the glob pattern references should match", - "name": "glob", - "type": "const char *" - } - ], - "comments": "

The OIDs pointed to by the references that match the given glob\npattern and their ancestors will be hidden from the output on the\nrevision walk.

\n\n

A leading 'refs/' is implied if not present as well as a trailing\n'/ ' if the glob lacks '?', '' or '['.

\n", - "description": "

Hide matching references.

\n", - "file": "revwalk.h", - "group": "revwalk", - "line": 156, - "lineto": 156, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_revwalk *::const char *", - "type": "function" - }, - "git_revwalk_hide_head": { - "argline": "git_revwalk *walk", - "args": [ - { - "comment": "the walker being used for the traversal", - "name": "walk", - "type": "git_revwalk *" - } - ], - "comments": "", - "description": "

Hide the repository's HEAD

\n", - "file": "revwalk.h", - "group": "revwalk", - "line": 164, - "lineto": 164, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_revwalk *", - "type": "function" - }, - "git_revwalk_hide_ref": { - "argline": "git_revwalk *walk, const char *refname", - "args": [ - { - "comment": "the walker being used for the traversal", - "name": "walk", - "type": "git_revwalk *" - }, - { - "comment": "the reference to hide", - "name": "refname", - "type": "const char *" - } - ], - "comments": "

The reference must point to a commit.

\n", - "description": "

Hide the OID pointed to by a reference

\n", - "file": "revwalk.h", - "group": "revwalk", - "line": 186, - "lineto": 186, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_revwalk *::const char *", - "type": "function" - }, - "git_revwalk_new": { - "argline": "git_revwalk **out, git_repository *repo", - "args": [ - { - "comment": "pointer to the new revision walker", - "name": "out", - "type": "git_revwalk **" - }, - { - "comment": "the repo to walk through", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

This revision walker uses a custom memory pool and an internal\ncommit cache, so it is relatively expensive to allocate.

\n\n

For maximum performance, this revision walker should be\nreused for different walks.

\n\n

This revision walker is not thread safe: it may only be\nused to walk a repository on a single thread; however,\nit is possible to have several revision walkers in\nseveral different threads walking the same repository.

\n", - "description": "

Allocate a new revision walker to iterate through a repo.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_revwalk_new-61" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_revwalk_new-44", - "ex/v0.20.0/log.html#git_revwalk_new-45" - ] - }, - "file": "revwalk.h", - "group": "revwalk", - "line": 70, - "lineto": 70, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_revwalk **::git_repository *", - "type": "function" - }, - "git_revwalk_next": { - "argline": "git_oid *out, git_revwalk *walk", - "args": [ - { - "comment": "Pointer where to store the oid of the next commit", - "name": "out", - "type": "git_oid *" - }, - { - "comment": "the walker to pop the commit from.", - "name": "walk", - "type": "git_revwalk *" - } - ], - "comments": "

The initial call to this method is not blocking when\niterating through a repo with a time-sorting mode.

\n\n

Iterating with Topological or inverted modes makes the initial\ncall blocking to preprocess the commit list, but this block should be\nmostly unnoticeable on most repositories (topological preprocessing\ntimes at 0.3s on the git.git repo).

\n\n

The revision walker is reset when the walk is over.

\n", - "description": "

Get the next commit from the revision walk.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_revwalk_next-63" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_revwalk_next-49" - ] - }, - "file": "revwalk.h", - "group": "revwalk", - "line": 206, - "lineto": 206, - "return": { - "comment": "0 if the next commit was found; GIT_ITEROVER if there are no commits left to iterate", - "type": "int" - }, - "sig": "git_oid *::git_revwalk *", - "type": "function" - }, - "git_revwalk_push": { - "argline": "git_revwalk *walk, const git_oid *id", - "args": [ - { - "comment": "the walker being used for the traversal.", - "name": "walk", - "type": "git_revwalk *" - }, - { - "comment": "the oid of the commit to start from.", - "name": "id", - "type": "const git_oid *" - } - ], - "comments": "

The given OID must belong to a commit on the walked\nrepository.

\n\n

The given commit will be used as one of the roots\nwhen starting the revision walk. At least one commit\nmust be pushed onto the walker before a walk can\nbe started.

\n", - "description": "

Mark a commit to start traversal from.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_revwalk_push-62" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_revwalk_push-46" - ] - }, - "file": "revwalk.h", - "group": "revwalk", - "line": 102, - "lineto": 102, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_revwalk *::const git_oid *", - "type": "function" - }, - "git_revwalk_push_glob": { - "argline": "git_revwalk *walk, const char *glob", - "args": [ - { - "comment": "the walker being used for the traversal", - "name": "walk", - "type": "git_revwalk *" - }, - { - "comment": "the glob pattern references should match", - "name": "glob", - "type": "const char *" - } - ], - "comments": "

The OIDs pointed to by the references that match the given glob\npattern will be pushed to the revision walker.

\n\n

A leading 'refs/' is implied if not present as well as a trailing\n'/ ' if the glob lacks '?', '' or '['.

\n", - "description": "

Push matching references

\n", - "file": "revwalk.h", - "group": "revwalk", - "line": 117, - "lineto": 117, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_revwalk *::const char *", - "type": "function" - }, - "git_revwalk_push_head": { - "argline": "git_revwalk *walk", - "args": [ - { - "comment": "the walker being used for the traversal", - "name": "walk", - "type": "git_revwalk *" - } - ], - "comments": "", - "description": "

Push the repository's HEAD

\n", - "examples": { - "log.c": [ - "ex/v0.20.0/log.html#git_revwalk_push_head-47" - ] - }, - "file": "revwalk.h", - "group": "revwalk", - "line": 125, - "lineto": 125, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_revwalk *", - "type": "function" - }, - "git_revwalk_push_range": { - "argline": "git_revwalk *walk, const char *range", - "args": [ - { - "comment": "the walker being used for the traversal", - "name": "walk", - "type": "git_revwalk *" - }, - { - "comment": "the range", - "name": "range", - "type": "const char *" - } - ], - "comments": "

The range should be of the form\n ..\nwhere each is in the form accepted by 'git_revparse_single'.\nThe left-hand commit will be hidden and the right-hand commit pushed.

\n", - "description": "

Push and hide the respective endpoints of the given range.

\n", - "file": "revwalk.h", - "group": "revwalk", - "line": 232, - "lineto": 232, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_revwalk *::const char *", - "type": "function" - }, - "git_revwalk_push_ref": { - "argline": "git_revwalk *walk, const char *refname", - "args": [ - { - "comment": "the walker being used for the traversal", - "name": "walk", - "type": "git_revwalk *" - }, - { - "comment": "the reference to push", - "name": "refname", - "type": "const char *" - } - ], - "comments": "

The reference must point to a commit.

\n", - "description": "

Push the OID pointed to by a reference

\n", - "file": "revwalk.h", - "group": "revwalk", - "line": 175, - "lineto": 175, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_revwalk *::const char *", - "type": "function" - }, - "git_revwalk_repository": { - "argline": "git_revwalk *walk", - "args": [ - { - "comment": "the revision walker", - "name": "walk", - "type": "git_revwalk *" - } - ], - "comments": "", - "description": "

Return the repository on which this walker\nis operating.

\n", - "file": "revwalk.h", - "group": "revwalk", - "line": 256, - "lineto": 256, - "return": { - "comment": "the repository being walked", - "type": "git_repository *" - }, - "sig": "git_revwalk *", - "type": "function" - }, - "git_revwalk_reset": { - "argline": "git_revwalk *walker", - "args": [ - { - "comment": "handle to reset.", - "name": "walker", - "type": "git_revwalk *" - } - ], - "comments": "

This will clear all the pushed and hidden commits, and\nleave the walker in a blank state (just like at\ncreation) ready to receive new commit pushes and\nstart a new walk.

\n\n

The revision walk is automatically reset when a walk\nis over.

\n", - "description": "

Reset the revision walker for reuse.

\n", - "file": "revwalk.h", - "group": "revwalk", - "line": 85, - "lineto": 85, - "return": { - "type": "void" - }, - "sig": "git_revwalk *", - "type": "function" - }, - "git_revwalk_simplify_first_parent": { - "argline": "git_revwalk *walk", - "args": [ - { - "name": "walk", - "type": "git_revwalk *" - } - ], - "comments": "

No parents other than the first for each commit will be enqueued.

\n", - "description": "

Simplify the history by first-parent

\n", - "file": "revwalk.h", - "group": "revwalk", - "line": 239, - "lineto": 239, - "return": { - "type": "void" - }, - "sig": "git_revwalk *", - "type": "function" - }, - "git_revwalk_sorting": { - "argline": "git_revwalk *walk, unsigned int sort_mode", - "args": [ - { - "comment": "the walker being used for the traversal.", - "name": "walk", - "type": "git_revwalk *" - }, - { - "comment": "combination of GIT_SORT_XXX flags", - "name": "sort_mode", - "type": "unsigned int" - } - ], - "comments": "

Changing the sorting mode resets the walker.

\n", - "description": "

Change the sorting mode when iterating through the\nrepository's contents.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_revwalk_sorting-64" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_revwalk_sorting-50", - "ex/v0.20.0/log.html#git_revwalk_sorting-51" - ] - }, - "file": "revwalk.h", - "group": "revwalk", - "line": 217, - "lineto": 217, - "return": { - "type": "void" - }, - "sig": "git_revwalk *::unsigned int", - "type": "function" - }, - "git_signature_default": { - "argline": "git_signature **out, git_repository *repo", - "args": [ - { - "comment": "new signature", - "name": "out", - "type": "git_signature **" - }, - { - "comment": "repository pointer", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

This looks up the user.name and user.email from the configuration and\nuses the current time as the timestamp, and creates a new signature\nbased on that information. It will return GIT_ENOTFOUND if either the\nuser.name or user.email are not set.

\n", - "description": "

Create a new action signature with default user and now timestamp.

\n", - "examples": { - "init.c": [ - "ex/v0.20.0/init.html#git_signature_default-10" - ] - }, - "file": "signature.h", - "group": "signature", - "line": 63, - "lineto": 63, - "return": { - "comment": "0 on success, GIT_ENOTFOUND if config is missing, or error code", - "type": "int" - }, - "sig": "git_signature **::git_repository *", - "type": "function" - }, - "git_signature_dup": { - "argline": "const git_signature *sig", - "args": [ - { - "comment": "signature to duplicated", - "name": "sig", - "type": "const git_signature *" - } - ], - "comments": "

Call git_signature_free() to free the data.

\n", - "description": "

Create a copy of an existing signature. All internal strings are also\nduplicated.

\n", - "file": "signature.h", - "group": "signature", - "line": 74, - "lineto": 74, - "return": { - "comment": "a copy of sig, NULL on out of memory", - "type": "git_signature *" - }, - "sig": "const git_signature *", - "type": "function" - }, - "git_signature_free": { - "argline": "git_signature *sig", - "args": [ - { - "comment": "signature to free", - "name": "sig", - "type": "git_signature *" - } - ], - "comments": "

Because the signature is not an opaque structure, it is legal to free it\nmanually, but be sure to free the "name" and "email" strings in addition\nto the structure itself.

\n", - "description": "

Free an existing signature.

\n", - "examples": { - "init.c": [ - "ex/v0.20.0/init.html#git_signature_free-11" - ] - }, - "file": "signature.h", - "group": "signature", - "line": 85, - "lineto": 85, - "return": { - "type": "void" - }, - "sig": "git_signature *", - "type": "function" - }, - "git_signature_new": { - "argline": "git_signature **out, const char *name, const char *email, git_time_t time, int offset", - "args": [ - { - "comment": "new signature, in case of error NULL", - "name": "out", - "type": "git_signature **" - }, - { - "comment": "name of the person", - "name": "name", - "type": "const char *" - }, - { - "comment": "email of the person", - "name": "email", - "type": "const char *" - }, - { - "comment": "time when the action happened", - "name": "time", - "type": "git_time_t" - }, - { - "comment": "timezone offset in minutes for the time", - "name": "offset", - "type": "int" - } - ], - "comments": "

Call git_signature_free() to free the data.

\n\n

Note: angle brackets ('<' and '>') characters are not allowed\nto be used in either the name or the email parameter.

\n", - "description": "

Create a new action signature.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_signature_new-66", - "ex/v0.20.0/general.html#git_signature_new-67" - ] - }, - "file": "signature.h", - "group": "signature", - "line": 37, - "lineto": 37, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_signature **::const char *::const char *::git_time_t::int", - "type": "function" - }, - "git_signature_now": { - "argline": "git_signature **out, const char *name, const char *email", - "args": [ - { - "comment": "new signature, in case of error NULL", - "name": "out", - "type": "git_signature **" - }, - { - "comment": "name of the person", - "name": "name", - "type": "const char *" - }, - { - "comment": "email of the person", - "name": "email", - "type": "const char *" - } - ], - "comments": "

Call git_signature_free() to free the data.

\n", - "description": "

Create a new action signature with a timestamp of 'now'.

\n", - "file": "signature.h", - "group": "signature", - "line": 49, - "lineto": 49, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_signature **::const char *::const char *", - "type": "function" - }, - "git_smart_subtransport_git": { - "argline": "git_smart_subtransport **out,\n\tgit_transport* owner", - "args": [ - { - "comment": "The newly created subtransport", - "name": "out", - "type": "git_smart_subtransport **" - }, - { - "comment": "The smart transport to own this subtransport", - "name": "owner", - "type": "git_transport*" - } - ], - "comments": "", - "description": "

Create an instance of the git subtransport.

\n", - "file": "transport.h", - "group": "smart", - "line": 467, - "lineto": 469, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_smart_subtransport **::git_transport*", - "type": "function" - }, - "git_smart_subtransport_http": { - "argline": "git_smart_subtransport **out,\n\tgit_transport* owner", - "args": [ - { - "comment": "The newly created subtransport", - "name": "out", - "type": "git_smart_subtransport **" - }, - { - "comment": "The smart transport to own this subtransport", - "name": "owner", - "type": "git_transport*" - } - ], - "comments": "", - "description": "

Create an instance of the http subtransport. This subtransport\nalso supports https. On Win32, this subtransport may be implemented\nusing the WinHTTP library.

\n", - "file": "transport.h", - "group": "smart", - "line": 456, - "lineto": 458, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_smart_subtransport **::git_transport*", - "type": "function" - }, - "git_smart_subtransport_ssh": { - "argline": "git_smart_subtransport **out,\n\tgit_transport* owner", - "args": [ - { - "comment": "The newly created subtransport", - "name": "out", - "type": "git_smart_subtransport **" - }, - { - "comment": "The smart transport to own this subtransport", - "name": "owner", - "type": "git_transport*" - } - ], - "comments": "", - "description": "

Create an instance of the ssh subtransport.

\n", - "file": "transport.h", - "group": "smart", - "line": 478, - "lineto": 484, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_smart_subtransport **::git_transport*", - "type": "function" - }, - "git_stash_drop": { - "argline": "git_repository *repo,\n\tsize_t index", - "args": [ - { - "comment": "The owning repository.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "The position within the stash list. 0 points to the most recent stashed state.", - "name": "index", - "type": "size_t" - } - ], - "comments": "", - "description": "

Remove a single stashed state from the stash list.

\n", - "file": "stash.h", - "group": "stash", - "line": 114, - "lineto": 116, - "return": { - "comment": "0 on success, or error code", - "type": "int" - }, - "sig": "git_repository *::size_t", - "type": "function" - }, - "git_stash_foreach": { - "argline": "git_repository *repo,\n\tgit_stash_cb callback,\n\tvoid *payload", - "args": [ - { - "comment": "Repository where to find the stash.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "Callback to invoke per found stashed state. The most recent stash state will be enumerated first.", - "name": "callback", - "type": "git_stash_cb" - }, - { - "comment": "Extra parameter to callback function.", - "name": "payload", - "type": "void *" - } - ], - "comments": "

If the callback returns a non-zero value, this will stop looping.

\n", - "description": "

Loop over all the stashed states and issue a callback for each one.

\n", - "file": "stash.h", - "group": "stash", - "line": 99, - "lineto": 102, - "return": { - "comment": "0 on success, GIT_EUSER on non-zero callback, or error code", - "type": "int" - }, - "sig": "git_repository *::git_stash_cb::void *", - "type": "function" - }, - "git_stash_save": { - "argline": "git_oid *out,\n\tgit_repository *repo,\n\tconst git_signature *stasher,\n\tconst char *message,\n\tunsigned int flags", - "args": [ - { - "comment": "Object id of the commit containing the stashed state. This commit is also the target of the direct reference refs/stash.", - "name": "out", - "type": "git_oid *" - }, - { - "comment": "The owning repository.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "The identity of the person performing the stashing.", - "name": "stasher", - "type": "const git_signature *" - }, - { - "comment": "Optional description along with the stashed state.", - "name": "message", - "type": "const char *" - }, - { - "comment": "Flags to control the stashing process. (see GIT_STASH_* above)", - "name": "flags", - "type": "unsigned int" - } - ], - "comments": "", - "description": "

Save the local modifications to a new stash.

\n", - "file": "stash.h", - "group": "stash", - "line": 57, - "lineto": 62, - "return": { - "comment": "0 on success, GIT_ENOTFOUND where there's nothing to stash, or error code.", - "type": "int" - }, - "sig": "git_oid *::git_repository *::const git_signature *::const char *::unsigned int", - "type": "function" - }, - "git_status_byindex": { - "argline": "git_status_list *statuslist,\n\tsize_t idx", - "args": [ - { - "comment": "Existing status list object", - "name": "statuslist", - "type": "git_status_list *" - }, - { - "comment": "Position of the entry", - "name": "idx", - "type": "size_t" - } - ], - "comments": "

The entry is not modifiable and should not be freed.

\n", - "description": "

Get a pointer to one of the entries in the status list.

\n", - "examples": { - "status.c": [ - "ex/v0.20.0/status.html#git_status_byindex-14", - "ex/v0.20.0/status.html#git_status_byindex-15", - "ex/v0.20.0/status.html#git_status_byindex-16", - "ex/v0.20.0/status.html#git_status_byindex-17", - "ex/v0.20.0/status.html#git_status_byindex-18", - "ex/v0.20.0/status.html#git_status_byindex-19" - ] - }, - "file": "status.h", - "group": "status", - "line": 287, - "lineto": 289, - "return": { - "comment": "Pointer to the entry; NULL if out of bounds", - "type": "const git_status_entry *" - }, - "sig": "git_status_list *::size_t", - "type": "function" - }, - "git_status_file": { - "argline": "unsigned int *status_flags,\n\tgit_repository *repo,\n\tconst char *path", - "args": [ - { - "comment": "Output combination of git_status_t values for file", - "name": "status_flags", - "type": "unsigned int *" - }, - { - "comment": "A repository object", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "The file to retrieve status for relative to the repo workdir", - "name": "path", - "type": "const char *" - } - ], - "comments": "

This is not quite the same as calling git_status_foreach_ext() with\nthe pathspec set to the specified path.

\n", - "description": "

Get file status for a single file.

\n", - "file": "status.h", - "group": "status", - "line": 251, - "lineto": 254, - "return": { - "comment": "0 on success, GIT_ENOTFOUND if the file is not found in the HEAD, index, and work tree, GIT_EAMBIGUOUS if `path` matches multiple files or if it refers to a folder, and -1 on other errors.", - "type": "int" - }, - "sig": "unsigned int *::git_repository *::const char *", - "type": "function" - }, - "git_status_foreach": { - "argline": "git_repository *repo,\n\tgit_status_cb callback,\n\tvoid *payload", - "args": [ - { - "comment": "A repository object", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "The function to call on each file", - "name": "callback", - "type": "git_status_cb" - }, - { - "comment": "Pointer to pass through to callback function", - "name": "payload", - "type": "void *" - } - ], - "comments": "

The callback is passed the path of the file, the status (a combination of\nthe git_status_t values above) and the payload data pointer passed\ninto this function.

\n\n

If the callback returns a non-zero value, this function will stop looping\nand return GIT_EUSER.

\n", - "description": "

Gather file statuses and run a callback for each one.

\n", - "examples": { - "status.c": [ - "ex/v0.20.0/status.html#git_status_foreach-8" - ] - }, - "file": "status.h", - "group": "status", - "line": 213, - "lineto": 216, - "return": { - "comment": "0 on success, GIT_EUSER on non-zero callback, or error code", - "type": "int" - }, - "sig": "git_repository *::git_status_cb::void *", - "type": "function" - }, - "git_status_foreach_ext": { - "argline": "git_repository *repo,\n\tconst git_status_options *opts,\n\tgit_status_cb callback,\n\tvoid *payload", - "args": [ - { - "comment": "Repository object", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "Status options structure", - "name": "opts", - "type": "const git_status_options *" - }, - { - "comment": "The function to call on each file", - "name": "callback", - "type": "git_status_cb" - }, - { - "comment": "Pointer to pass through to callback function", - "name": "payload", - "type": "void *" - } - ], - "comments": "

This is an extended version of the git_status_foreach() API that\nallows for more granular control over which paths will be processed and\nin what order. See the git_status_options structure for details\nabout the additional controls that this makes available.

\n", - "description": "

Gather file status information and run callbacks as requested.

\n", - "examples": { - "status.c": [ - "ex/v0.20.0/status.html#git_status_foreach_ext-9" - ] - }, - "file": "status.h", - "group": "status", - "line": 232, - "lineto": 236, - "return": { - "comment": "0 on success, GIT_EUSER on non-zero callback, or error code", - "type": "int" - }, - "sig": "git_repository *::const git_status_options *::git_status_cb::void *", - "type": "function" - }, - "git_status_list_entrycount": { - "argline": "git_status_list *statuslist", - "args": [ - { - "comment": "Existing status list object", - "name": "statuslist", - "type": "git_status_list *" - } - ], - "comments": "", - "description": "

Gets the count of status entries in this list.

\n", - "examples": { - "status.c": [ - "ex/v0.20.0/status.html#git_status_list_entrycount-12", - "ex/v0.20.0/status.html#git_status_list_entrycount-13" - ] - }, - "file": "status.h", - "group": "status", - "line": 275, - "lineto": 276, - "return": { - "comment": "the number of status entries", - "type": "size_t" - }, - "sig": "git_status_list *", - "type": "function" - }, - "git_status_list_free": { - "argline": "git_status_list *statuslist", - "args": [ - { - "comment": "Existing status list object", - "name": "statuslist", - "type": "git_status_list *" - } - ], - "comments": "", - "description": "

Free an existing status list

\n", - "examples": { - "status.c": [ - "ex/v0.20.0/status.html#git_status_list_free-20" - ] - }, - "file": "status.h", - "group": "status", - "line": 296, - "lineto": 297, - "return": { - "type": "void" - }, - "sig": "git_status_list *", - "type": "function" - }, - "git_status_list_new": { - "argline": "git_status_list **out,\n\tgit_repository *repo,\n\tconst git_status_options *opts", - "args": [ - { - "comment": "Pointer to store the status results in", - "name": "out", - "type": "git_status_list **" - }, - { - "comment": "Repository object", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "Status options structure", - "name": "opts", - "type": "const git_status_options *" - } - ], - "comments": "", - "description": "

Gather file status information and populate the git_status_list.

\n", - "examples": { - "status.c": [ - "ex/v0.20.0/status.html#git_status_list_new-10", - "ex/v0.20.0/status.html#git_status_list_new-11" - ] - }, - "file": "status.h", - "group": "status", - "line": 264, - "lineto": 267, - "return": { - "comment": "0 on success or error code", - "type": "int" - }, - "sig": "git_status_list **::git_repository *::const git_status_options *", - "type": "function" - }, - "git_status_should_ignore": { - "argline": "int *ignored,\n\tgit_repository *repo,\n\tconst char *path", - "args": [ - { - "comment": "Boolean returning 0 if the file is not ignored, 1 if it is", - "name": "ignored", - "type": "int *" - }, - { - "comment": "A repository object", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "The file to check ignores for, rooted at the repo's workdir.", - "name": "path", - "type": "const char *" - } - ], - "comments": "

This function checks the ignore rules to see if they would apply to the\ngiven file. This indicates if the file would be ignored regardless of\nwhether the file is already in the index or committed to the repository.

\n\n

One way to think of this is if you were to do "git add ." on the\ndirectory containing the file, would it be added or not?

\n", - "description": "

Test if the ignore rules apply to a given file.

\n", - "file": "status.h", - "group": "status", - "line": 315, - "lineto": 318, - "return": { - "comment": "0 if ignore rules could be processed for the file (regardless of whether it exists or not), or an error < 0 if they could not.", - "type": "int" - }, - "sig": "int *::git_repository *::const char *", - "type": "function" - }, - "git_strarray_copy": { - "argline": "git_strarray *tgt, const git_strarray *src", - "args": [ - { - "comment": "target", - "name": "tgt", - "type": "git_strarray *" - }, - { - "comment": "source", - "name": "src", - "type": "const git_strarray *" - } - ], - "comments": "

Note: target is overwritten and hence should be empty, otherwise its\ncontents are leaked. Call git_strarray_free() if necessary.

\n", - "description": "

Copy a string array object from source to target.

\n", - "file": "strarray.h", - "group": "strarray", - "line": 53, - "lineto": 53, - "return": { - "comment": "0 on success, < 0 on allocation failure", - "type": "int" - }, - "sig": "git_strarray *::const git_strarray *", - "type": "function" - }, - "git_strarray_free": { - "argline": "git_strarray *array", - "args": [ - { - "comment": "git_strarray from which to free string data", - "name": "array", - "type": "git_strarray *" - } - ], - "comments": "

This method should be called on git_strarray objects where the strings\narray is allocated and contains allocated strings, such as what you\nwould get from git_strarray_copy(). Not doing so, will result in a\nmemory leak.

\n\n

This does not free the git_strarray itself, since the library will\nnever allocate that object directly itself (it is more commonly embedded\ninside another struct or created on the stack).

\n", - "description": "

Close a string array object

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_strarray_free-68" - ] - }, - "file": "strarray.h", - "group": "strarray", - "line": 41, - "lineto": 41, - "return": { - "type": "void" - }, - "sig": "git_strarray *", - "type": "function" - }, - "git_submodule_add_finalize": { - "argline": "git_submodule *submodule", - "args": [ - { - "comment": "The submodule to finish adding.", - "name": "submodule", - "type": "git_submodule *" - } - ], - "comments": "

This should be called on a submodule once you have called add setup\nand done the clone of the submodule. This adds the .gitmodules file\nand the newly cloned submodule to the index to be ready to be committed\n(but doesn't actually do the commit).

\n", - "description": "

Resolve the setup of a new git submodule.

\n", - "file": "submodule.h", - "group": "submodule", - "line": 203, - "lineto": 203, - "return": { - "type": "int" - }, - "sig": "git_submodule *", - "type": "function" - }, - "git_submodule_add_setup": { - "argline": "git_submodule **submodule,\n\tgit_repository *repo,\n\tconst char *url,\n\tconst char *path,\n\tint use_gitlink", - "args": [ - { - "comment": "The newly created submodule ready to open for clone", - "name": "submodule", - "type": "git_submodule **" - }, - { - "comment": "Superproject repository to contain the new submodule", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "URL for the submodules remote", - "name": "url", - "type": "const char *" - }, - { - "comment": "Path at which the submodule should be created", - "name": "path", - "type": "const char *" - }, - { - "comment": "Should workdir contain a gitlink to the repo in .git/modules vs. repo directly in workdir.", - "name": "use_gitlink", - "type": "int" - } - ], - "comments": "

This does "git submodule add" up to the fetch and checkout of the\nsubmodule contents. It preps a new submodule, creates an entry in\n.gitmodules and creates an empty initialized repository either at the\ngiven path in the working directory or in .git/modules with a gitlink\nfrom the working directory to the new repo.

\n\n

To fully emulate "git submodule add" call this function, then open the\nsubmodule repo and perform the clone step as needed. Lastly, call\ngit_submodule_add_finalize() to wrap up adding the new submodule and\n.gitmodules to the index to be ready to commit.

\n", - "description": "

Set up a new git submodule for checkout.

\n", - "file": "submodule.h", - "group": "submodule", - "line": 186, - "lineto": 191, - "return": { - "comment": "0 on success, GIT_EEXISTS if submodule already exists, -1 on other errors.", - "type": "int" - }, - "sig": "git_submodule **::git_repository *::const char *::const char *::int", - "type": "function" - }, - "git_submodule_add_to_index": { - "argline": "git_submodule *submodule,\n\tint write_index", - "args": [ - { - "comment": "The submodule to add to the index", - "name": "submodule", - "type": "git_submodule *" - }, - { - "comment": "Boolean if this should immediately write the index file. If you pass this as false, you will have to get the git_index and explicitly call `git_index_write()` on it to save the change.", - "name": "write_index", - "type": "int" - } - ], - "comments": "", - "description": "

Add current submodule HEAD commit to index of superproject.

\n", - "file": "submodule.h", - "group": "submodule", - "line": 215, - "lineto": 217, - "return": { - "comment": "0 on success, <0 on failure", - "type": "int" - }, - "sig": "git_submodule *::int", - "type": "function" - }, - "git_submodule_fetch_recurse_submodules": { - "argline": "git_submodule *submodule", - "args": [ - { - "name": "submodule", - "type": "git_submodule *" - } - ], - "comments": "

This accesses the submodule..fetchRecurseSubmodules value for\nthe submodule that controls fetching behavior for the submodule.

\n\n

Note that at this time, libgit2 does not honor this setting and the\nfetch functionality current ignores submodules.

\n", - "description": "

Read the fetchRecurseSubmodules rule for a submodule.

\n", - "file": "submodule.h", - "group": "submodule", - "line": 413, - "lineto": 414, - "return": { - "comment": "0 if fetchRecurseSubmodules is false, 1 if true", - "type": "int" - }, - "sig": "git_submodule *", - "type": "function" - }, - "git_submodule_foreach": { - "argline": "git_repository *repo,\n\tint (*callback)(git_submodule *sm, const char *name, void *payload),\n\tvoid *payload", - "args": [ - { - "comment": "The repository", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "Function to be called with the name of each submodule. Return a non-zero value to terminate the iteration.", - "name": "callback", - "type": "int (*)(git_submodule *sm, const char *name, void *payload)" - }, - { - "comment": "Extra data to pass to callback", - "name": "payload", - "type": "void *" - } - ], - "comments": "

See the note on git_submodule above. This iterates over the tracked\nsubmodules as decribed therein.

\n\n

If you are concerned about items in the working directory that look like\nsubmodules but are not tracked, the diff API will generate a diff record\nfor workdir items that look like submodules but are not tracked, showing\nthem as added in the workdir. Also, the status API will treat the entire\nsubdirectory of a contained git repo as a single GIT_STATUS_WT_NEW item.

\n", - "description": "

Iterate over all tracked submodules of a repository.

\n", - "file": "submodule.h", - "group": "submodule", - "line": 158, - "lineto": 161, - "return": { - "comment": "0 on success, -1 on error, or non-zero return value of callback", - "type": "int" - }, - "sig": "git_repository *::int (*)(git_submodule *sm, const char *name, void *payload)::void *", - "type": "function" - }, - "git_submodule_head_id": { - "argline": "git_submodule *submodule", - "args": [ - { - "comment": "Pointer to submodule object", - "name": "submodule", - "type": "git_submodule *" - } - ], - "comments": "", - "description": "

Get the OID for the submodule in the current HEAD tree.

\n", - "file": "submodule.h", - "group": "submodule", - "line": 303, - "lineto": 303, - "return": { - "comment": "Pointer to git_oid or NULL if submodule is not in the HEAD.", - "type": "const git_oid *" - }, - "sig": "git_submodule *", - "type": "function" - }, - "git_submodule_ignore": { - "argline": "git_submodule *submodule", - "args": [ - { - "comment": "The submodule to check", - "name": "submodule", - "type": "git_submodule *" - } - ], - "comments": "

These values control the behavior of git_submodule_status() for this\nsubmodule. There are four ignore values:

\n\n\n\n

plus the special GIT_SUBMODULE_IGNORE_RESET which can be used with\ngit_submodule_set_ignore() to revert to the on-disk setting.

\n", - "description": "

Get the ignore rule that will be used for the submodule.

\n", - "file": "submodule.h", - "group": "submodule", - "line": 344, - "lineto": 345, - "return": { - "comment": "The current git_submodule_ignore_t valyue what will be used for this submodule.", - "type": "git_submodule_ignore_t" - }, - "sig": "git_submodule *", - "type": "function" - }, - "git_submodule_index_id": { - "argline": "git_submodule *submodule", - "args": [ - { - "comment": "Pointer to submodule object", - "name": "submodule", - "type": "git_submodule *" - } - ], - "comments": "", - "description": "

Get the OID for the submodule in the index.

\n", - "file": "submodule.h", - "group": "submodule", - "line": 295, - "lineto": 295, - "return": { - "comment": "Pointer to git_oid or NULL if submodule is not in index.", - "type": "const git_oid *" - }, - "sig": "git_submodule *", - "type": "function" - }, - "git_submodule_init": { - "argline": "git_submodule *submodule, int overwrite", - "args": [ - { - "comment": "The submodule to write into the superproject config", - "name": "submodule", - "type": "git_submodule *" - }, - { - "comment": "By default, existing entries will not be overwritten, but setting this to true forces them to be updated.", - "name": "overwrite", - "type": "int" - } - ], - "comments": "

Just like "git submodule init", this copies information about the\nsubmodule into ".git/config". You can use the accessor functions\nabove to alter the in-memory git_submodule object and control what\nis written to the config, overriding what is in .gitmodules.

\n", - "description": "

Copy submodule info into ".git/config" file.

\n", - "file": "submodule.h", - "group": "submodule", - "line": 444, - "lineto": 444, - "return": { - "comment": "0 on success, <0 on failure.", - "type": "int" - }, - "sig": "git_submodule *::int", - "type": "function" - }, - "git_submodule_location": { - "argline": "unsigned int *location_status,\n\tgit_submodule *submodule", - "args": [ - { - "comment": "Combination of first four `GIT_SUBMODULE_STATUS` flags", - "name": "location_status", - "type": "unsigned int *" - }, - { - "comment": "Submodule for which to get status", - "name": "submodule", - "type": "git_submodule *" - } - ], - "comments": "

This is a bit like a very lightweight version of git_submodule_status.\nIt just returns a made of the first four submodule status values (i.e.\nthe ones like GIT_SUBMODULE_STATUS_IN_HEAD, etc) that tell you where the\nsubmodule data comes from (i.e. the HEAD commit, gitmodules file, etc.).\nThis can be useful if you want to know if the submodule is present in the\nworking directory at this point in time, etc.

\n", - "description": "

Get the locations of submodule information.

\n", - "file": "submodule.h", - "group": "submodule", - "line": 518, - "lineto": 520, - "return": { - "comment": "0 on success, <0 on error", - "type": "int" - }, - "sig": "unsigned int *::git_submodule *", - "type": "function" - }, - "git_submodule_lookup": { - "argline": "git_submodule **submodule,\n\tgit_repository *repo,\n\tconst char *name", - "args": [ - { - "comment": "Pointer to submodule description object pointer..", - "name": "submodule", - "type": "git_submodule **" - }, - { - "comment": "The repository.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "The name of the submodule. Trailing slashes will be ignored.", - "name": "name", - "type": "const char *" - } - ], - "comments": "

Given either the submodule name or path (they are usually the same), this\nreturns a structure describing the submodule.

\n\n

There are two expected error scenarios:

\n\n\n\n

The submodule object is owned by the containing repo and will be freed\nwhen the repo is freed. The caller need not free the submodule.

\n", - "description": "

Lookup submodule information by name or path.

\n", - "examples": { - "status.c": [ - "ex/v0.20.0/status.html#git_submodule_lookup-21" - ] - }, - "file": "submodule.h", - "group": "submodule", - "line": 135, - "lineto": 138, - "return": { - "comment": "0 on success, GIT_ENOTFOUND if submodule does not exist, GIT_EEXISTS if submodule exists in working directory only, -1 on other errors.", - "type": "int" - }, - "sig": "git_submodule **::git_repository *::const char *", - "type": "function" - }, - "git_submodule_name": { - "argline": "git_submodule *submodule", - "args": [ - { - "comment": "Pointer to submodule object", - "name": "submodule", - "type": "git_submodule *" - } - ], - "comments": "", - "description": "

Get the name of submodule.

\n", - "file": "submodule.h", - "group": "submodule", - "line": 252, - "lineto": 252, - "return": { - "comment": "Pointer to the submodule name", - "type": "const char *" - }, - "sig": "git_submodule *", - "type": "function" - }, - "git_submodule_open": { - "argline": "git_repository **repo,\n\tgit_submodule *submodule", - "args": [ - { - "comment": "Pointer to the submodule repo which was opened", - "name": "repo", - "type": "git_repository **" - }, - { - "comment": "Submodule to be opened", - "name": "submodule", - "type": "git_submodule *" - } - ], - "comments": "

This is a newly opened repository object. The caller is responsible for\ncalling git_repository_free() on it when done. Multiple calls to this\nfunction will return distinct git_repository objects. This will only\nwork if the submodule is checked out into the working directory.

\n", - "description": "

Open the repository for a submodule.

\n", - "file": "submodule.h", - "group": "submodule", - "line": 468, - "lineto": 470, - "return": { - "comment": "0 on success, <0 if submodule repo could not be opened.", - "type": "int" - }, - "sig": "git_repository **::git_submodule *", - "type": "function" - }, - "git_submodule_owner": { - "argline": "git_submodule *submodule", - "args": [ - { - "comment": "Pointer to submodule object", - "name": "submodule", - "type": "git_submodule *" - } - ], - "comments": "

This returns a pointer to the repository that contains the submodule.\nThis is a just a reference to the repository that was passed to the\noriginal git_submodule_lookup() call, so if that repository has been\nfreed, then this may be a dangling reference.

\n", - "description": "

Get the containing repository for a submodule.

\n", - "file": "submodule.h", - "group": "submodule", - "line": 244, - "lineto": 244, - "return": { - "comment": "Pointer to `git_repository`", - "type": "git_repository *" - }, - "sig": "git_submodule *", - "type": "function" - }, - "git_submodule_path": { - "argline": "git_submodule *submodule", - "args": [ - { - "comment": "Pointer to submodule object", - "name": "submodule", - "type": "git_submodule *" - } - ], - "comments": "

The path is almost always the same as the submodule name, but the\ntwo are actually not required to match.

\n", - "description": "

Get the path to the submodule.

\n", - "file": "submodule.h", - "group": "submodule", - "line": 263, - "lineto": 263, - "return": { - "comment": "Pointer to the submodule path", - "type": "const char *" - }, - "sig": "git_submodule *", - "type": "function" - }, - "git_submodule_reload": { - "argline": "git_submodule *submodule", - "args": [ - { - "name": "submodule", - "type": "git_submodule *" - } - ], - "comments": "

Call this to reread cached submodule information for this submodule if\nyou have reason to believe that it has changed.

\n", - "description": "

Reread submodule info from config, index, and HEAD.

\n", - "file": "submodule.h", - "group": "submodule", - "line": 478, - "lineto": 478, - "return": { - "type": "int" - }, - "sig": "git_submodule *", - "type": "function" - }, - "git_submodule_reload_all": { - "argline": "git_repository *repo", - "args": [ - { - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

Call this to reload all cached submodule information for the repo.

\n", - "description": "

Reread all submodule info.

\n", - "file": "submodule.h", - "group": "submodule", - "line": 485, - "lineto": 485, - "return": { - "type": "int" - }, - "sig": "git_repository *", - "type": "function" - }, - "git_submodule_save": { - "argline": "git_submodule *submodule", - "args": [ - { - "comment": "The submodule to write.", - "name": "submodule", - "type": "git_submodule *" - } - ], - "comments": "

This commits any in-memory changes to the submodule to the gitmodules\nfile on disk. You may also be interested in git_submodule_init() which\nwrites submodule info to ".git/config" (which is better for local changes\nto submodule settings) and/or git_submodule_sync() which writes\nsettings about remotes to the actual submodule repository.

\n", - "description": "

Write submodule settings to .gitmodules file.

\n", - "file": "submodule.h", - "group": "submodule", - "line": 231, - "lineto": 231, - "return": { - "comment": "0 on success, <0 on failure.", - "type": "int" - }, - "sig": "git_submodule *", - "type": "function" - }, - "git_submodule_set_fetch_recurse_submodules": { - "argline": "git_submodule *submodule,\n\tint fetch_recurse_submodules", - "args": [ - { - "comment": "The submodule to modify", - "name": "submodule", - "type": "git_submodule *" - }, - { - "comment": "Boolean value", - "name": "fetch_recurse_submodules", - "type": "int" - } - ], - "comments": "

This sets the submodule..fetchRecurseSubmodules value for\nthe submodule. You should call git_submodule_save() if you want\nto persist the new value.

\n", - "description": "

Set the fetchRecurseSubmodules rule for a submodule.

\n", - "file": "submodule.h", - "group": "submodule", - "line": 427, - "lineto": 429, - "return": { - "comment": "old value for fetchRecurseSubmodules", - "type": "int" - }, - "sig": "git_submodule *::int", - "type": "function" - }, - "git_submodule_set_ignore": { - "argline": "git_submodule *submodule,\n\tgit_submodule_ignore_t ignore", - "args": [ - { - "comment": "The submodule to update", - "name": "submodule", - "type": "git_submodule *" - }, - { - "comment": "The new value for the ignore rule", - "name": "ignore", - "type": "git_submodule_ignore_t" - } - ], - "comments": "

This sets the in-memory ignore rule for the submodule which will\ncontrol the behavior of git_submodule_status().

\n\n

To make changes persistent, call git_submodule_save() to write the\nvalue to disk (in the ".gitmodules" and ".git/config" files).

\n\n

Call with GIT_SUBMODULE_IGNORE_RESET or call git_submodule_reload()\nto revert the in-memory rule to the value that is on disk.

\n", - "description": "

Set the ignore rule for the submodule.

\n", - "file": "submodule.h", - "group": "submodule", - "line": 363, - "lineto": 365, - "return": { - "comment": "old value for ignore", - "type": "git_submodule_ignore_t" - }, - "sig": "git_submodule *::git_submodule_ignore_t", - "type": "function" - }, - "git_submodule_set_update": { - "argline": "git_submodule *submodule,\n\tgit_submodule_update_t update", - "args": [ - { - "comment": "The submodule to update", - "name": "submodule", - "type": "git_submodule *" - }, - { - "comment": "The new value to use", - "name": "update", - "type": "git_submodule_update_t" - } - ], - "comments": "

The initial value comes from the ".git/config" setting of\nsubmodule.$name.update for this submodule (which is initialized from\nthe ".gitmodules" file). Using this function sets the update rule in\nmemory for the submodule. Call git_submodule_save() to write out the\nnew update rule.

\n\n

Calling this again with GIT_SUBMODULE_UPDATE_RESET or calling\ngit_submodule_reload() will revert the rule to the on disk value.

\n", - "description": "

Set the update rule for the submodule.

\n", - "file": "submodule.h", - "group": "submodule", - "line": 398, - "lineto": 400, - "return": { - "comment": "old value for update", - "type": "git_submodule_update_t" - }, - "sig": "git_submodule *::git_submodule_update_t", - "type": "function" - }, - "git_submodule_set_url": { - "argline": "git_submodule *submodule, const char *url", - "args": [ - { - "comment": "Pointer to the submodule object", - "name": "submodule", - "type": "git_submodule *" - }, - { - "comment": "URL that should be used for the submodule", - "name": "url", - "type": "const char *" - } - ], - "comments": "

This sets the URL in memory for the submodule. This will be used for\nany following submodule actions while this submodule data is in memory.

\n\n

After calling this, you may wish to call git_submodule_save() to write\nthe changes back to the ".gitmodules" file and git_submodule_sync() to\nwrite the changes to the checked out submodule repository.

\n", - "description": "

Set the URL for the submodule.

\n", - "file": "submodule.h", - "group": "submodule", - "line": 287, - "lineto": 287, - "return": { - "comment": "0 on success, <0 on failure", - "type": "int" - }, - "sig": "git_submodule *::const char *", - "type": "function" - }, - "git_submodule_status": { - "argline": "unsigned int *status,\n\tgit_submodule *submodule", - "args": [ - { - "comment": "Combination of `GIT_SUBMODULE_STATUS` flags", - "name": "status", - "type": "unsigned int *" - }, - { - "comment": "Submodule for which to get status", - "name": "submodule", - "type": "git_submodule *" - } - ], - "comments": "

This looks at a submodule and tries to determine the status. It\nwill return a combination of the GIT_SUBMODULE_STATUS values above.\nHow deeply it examines the working directory to do this will depend\non the git_submodule_ignore_t value for the submodule - which can be\nset either temporarily or permanently with git_submodule_set_ignore().

\n", - "description": "

Get the status for a submodule.

\n", - "examples": { - "status.c": [ - "ex/v0.20.0/status.html#git_submodule_status-22" - ] - }, - "file": "submodule.h", - "group": "submodule", - "line": 500, - "lineto": 502, - "return": { - "comment": "0 on success, <0 on error", - "type": "int" - }, - "sig": "unsigned int *::git_submodule *", - "type": "function" - }, - "git_submodule_sync": { - "argline": "git_submodule *submodule", - "args": [ - { - "name": "submodule", - "type": "git_submodule *" - } - ], - "comments": "

This copies the information about the submodules URL into the checked out\nsubmodule config, acting like "git submodule sync". This is useful if\nyou have altered the URL for the submodule (or it has been altered by a\nfetch of upstream changes) and you need to update your local repo.

\n", - "description": "

Copy submodule remote info into submodule repo.

\n", - "file": "submodule.h", - "group": "submodule", - "line": 454, - "lineto": 454, - "return": { - "type": "int" - }, - "sig": "git_submodule *", - "type": "function" - }, - "git_submodule_update": { - "argline": "git_submodule *submodule", - "args": [ - { - "comment": "The submodule to check", - "name": "submodule", - "type": "git_submodule *" - } - ], - "comments": "

This value controls the behavior of the git submodule update command.\nThere are four useful values documented with git_submodule_update_t\nplus the GIT_SUBMODULE_UPDATE_RESET which can be used to revert to\nthe on-disk setting.

\n", - "description": "

Get the update rule that will be used for the submodule.

\n", - "file": "submodule.h", - "group": "submodule", - "line": 379, - "lineto": 380, - "return": { - "comment": "The current git_submodule_update_t value that will be used for this submodule.", - "type": "git_submodule_update_t" - }, - "sig": "git_submodule *", - "type": "function" - }, - "git_submodule_url": { - "argline": "git_submodule *submodule", - "args": [ - { - "comment": "Pointer to submodule object", - "name": "submodule", - "type": "git_submodule *" - } - ], - "comments": "", - "description": "

Get the URL for the submodule.

\n", - "file": "submodule.h", - "group": "submodule", - "line": 271, - "lineto": 271, - "return": { - "comment": "Pointer to the submodule url", - "type": "const char *" - }, - "sig": "git_submodule *", - "type": "function" - }, - "git_submodule_wd_id": { - "argline": "git_submodule *submodule", - "args": [ - { - "comment": "Pointer to submodule object", - "name": "submodule", - "type": "git_submodule *" - } - ], - "comments": "

This returns the OID that corresponds to looking up 'HEAD' in the checked\nout submodule. If there are pending changes in the index or anything\nelse, this won't notice that. You should call git_submodule_status()\nfor a more complete picture about the state of the working directory.

\n", - "description": "

Get the OID for the submodule in the current working directory.

\n", - "file": "submodule.h", - "group": "submodule", - "line": 316, - "lineto": 316, - "return": { - "comment": "Pointer to git_oid or NULL if submodule is not checked out.", - "type": "const git_oid *" - }, - "sig": "git_submodule *", - "type": "function" - }, - "git_tag_annotation_create": { - "argline": "git_oid *oid,\n\tgit_repository *repo,\n\tconst char *tag_name,\n\tconst git_object *target,\n\tconst git_signature *tagger,\n\tconst char *message", - "args": [ - { - "comment": "Pointer where to store the OID of the newly created tag", - "name": "oid", - "type": "git_oid *" - }, - { - "comment": "Repository where to store the tag", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "Name for the tag", - "name": "tag_name", - "type": "const char *" - }, - { - "comment": "Object to which this tag points. This object must belong to the given `repo`.", - "name": "target", - "type": "const git_object *" - }, - { - "comment": "Signature of the tagger for this tag, and of the tagging time", - "name": "tagger", - "type": "const git_signature *" - }, - { - "comment": "Full message for this tag", - "name": "message", - "type": "const char *" - } - ], - "comments": "

The message will not be cleaned up. This can be achieved\nthrough git_message_prettify().

\n", - "description": "

Create a new tag in the object database pointing to a git_object

\n", - "file": "tag.h", - "group": "tag", - "line": 203, - "lineto": 209, - "return": { - "comment": "0 on success or an error code", - "type": "int" - }, - "sig": "git_oid *::git_repository *::const char *::const git_object *::const git_signature *::const char *", - "type": "function" - }, - "git_tag_create": { - "argline": "git_oid *oid,\n\tgit_repository *repo,\n\tconst char *tag_name,\n\tconst git_object *target,\n\tconst git_signature *tagger,\n\tconst char *message,\n\tint force", - "args": [ - { - "comment": "Pointer where to store the OID of the newly created tag. If the tag already exists, this parameter will be the oid of the existing tag, and the function will return a GIT_EEXISTS error code.", - "name": "oid", - "type": "git_oid *" - }, - { - "comment": "Repository where to store the tag", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "Name for the tag; this name is validated for consistency. It should also not conflict with an already existing tag name", - "name": "tag_name", - "type": "const char *" - }, - { - "comment": "Object to which this tag points. This object must belong to the given `repo`.", - "name": "target", - "type": "const git_object *" - }, - { - "comment": "Signature of the tagger for this tag, and of the tagging time", - "name": "tagger", - "type": "const git_signature *" - }, - { - "comment": "Full message for this tag", - "name": "message", - "type": "const char *" - }, - { - "comment": "Overwrite existing references", - "name": "force", - "type": "int" - } - ], - "comments": "

A new reference will also be created pointing to\nthis tag object. If force is true and a reference\nalready exists with the given name, it'll be replaced.

\n\n

The message will not be cleaned up. This can be achieved\nthrough git_message_prettify().

\n\n

The tag name will be checked for validity. You must avoid\nthe characters '~', '^', ':', '\\', '?', '[', and '*', and the\nsequences ".." and "@{" which have special meaning to revparse.

\n", - "description": "

Create a new tag in the repository from an object

\n", - "file": "tag.h", - "group": "tag", - "line": 171, - "lineto": 178, - "return": { - "comment": "0 on success, GIT_EINVALIDSPEC or an error code A tag object is written to the ODB, and a proper reference is written in the /refs/tags folder, pointing to it", - "type": "int" - }, - "sig": "git_oid *::git_repository *::const char *::const git_object *::const git_signature *::const char *::int", - "type": "function" - }, - "git_tag_create_frombuffer": { - "argline": "git_oid *oid,\n\tgit_repository *repo,\n\tconst char *buffer,\n\tint force", - "args": [ - { - "comment": "Pointer where to store the OID of the newly created tag", - "name": "oid", - "type": "git_oid *" - }, - { - "comment": "Repository where to store the tag", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "Raw tag data", - "name": "buffer", - "type": "const char *" - }, - { - "comment": "Overwrite existing tags", - "name": "force", - "type": "int" - } - ], - "comments": "", - "description": "

Create a new tag in the repository from a buffer

\n", - "file": "tag.h", - "group": "tag", - "line": 220, - "lineto": 224, - "return": { - "comment": "0 on success; error code otherwise", - "type": "int" - }, - "sig": "git_oid *::git_repository *::const char *::int", - "type": "function" - }, - "git_tag_create_lightweight": { - "argline": "git_oid *oid,\n\tgit_repository *repo,\n\tconst char *tag_name,\n\tconst git_object *target,\n\tint force", - "args": [ - { - "comment": "Pointer where to store the OID of the provided target object. If the tag already exists, this parameter will be filled with the oid of the existing pointed object and the function will return a GIT_EEXISTS error code.", - "name": "oid", - "type": "git_oid *" - }, - { - "comment": "Repository where to store the lightweight tag", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "Name for the tag; this name is validated for consistency. It should also not conflict with an already existing tag name", - "name": "tag_name", - "type": "const char *" - }, - { - "comment": "Object to which this tag points. This object must belong to the given `repo`.", - "name": "target", - "type": "const git_object *" - }, - { - "comment": "Overwrite existing references", - "name": "force", - "type": "int" - } - ], - "comments": "

A new direct reference will be created pointing to\nthis target object. If force is true and a reference\nalready exists with the given name, it'll be replaced.

\n\n

The tag name will be checked for validity.\nSee git_tag_create() for rules about valid names.

\n", - "description": "

Create a new lightweight tag pointing at a target object

\n", - "file": "tag.h", - "group": "tag", - "line": 256, - "lineto": 261, - "return": { - "comment": "0 on success, GIT_EINVALIDSPEC or an error code A proper reference is written in the /refs/tags folder, pointing to the provided target object", - "type": "int" - }, - "sig": "git_oid *::git_repository *::const char *::const git_object *::int", - "type": "function" - }, - "git_tag_delete": { - "argline": "git_repository *repo,\n\tconst char *tag_name", - "args": [ - { - "comment": "Repository where lives the tag", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "Name of the tag to be deleted; this name is validated for consistency.", - "name": "tag_name", - "type": "const char *" - } - ], - "comments": "

The tag name will be checked for validity.\nSee git_tag_create() for rules about valid names.

\n", - "description": "

Delete an existing tag reference.

\n", - "file": "tag.h", - "group": "tag", - "line": 276, - "lineto": 278, - "return": { - "comment": "0 on success, GIT_EINVALIDSPEC or an error code", - "type": "int" - }, - "sig": "git_repository *::const char *", - "type": "function" - }, - "git_tag_foreach": { - "argline": "git_repository *repo,\n\tgit_tag_foreach_cb callback,\n\tvoid *payload", - "args": [ - { - "comment": "Repository", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "Callback function", - "name": "callback", - "type": "git_tag_foreach_cb" - }, - { - "comment": "Pointer to callback data (optional)", - "name": "payload", - "type": "void *" - } - ], - "comments": "", - "description": "

Call callback `cb' for each tag in the repository

\n", - "file": "tag.h", - "group": "tag", - "line": 330, - "lineto": 333, - "return": { - "type": "int" - }, - "sig": "git_repository *::git_tag_foreach_cb::void *", - "type": "function" - }, - "git_tag_free": { - "argline": "git_tag *tag", - "args": [ - { - "comment": "the tag to close", - "name": "tag", - "type": "git_tag *" - } - ], - "comments": "

You can no longer use the git_tag pointer after this call.

\n\n

IMPORTANT: You MUST call this method when you are through with a tag to\nrelease memory. Failure to do so will cause a memory leak.

\n", - "description": "

Close an open tag

\n", - "file": "tag.h", - "group": "tag", - "line": 61, - "lineto": 61, - "return": { - "type": "void" - }, - "sig": "git_tag *", - "type": "function" - }, - "git_tag_id": { - "argline": "const git_tag *tag", - "args": [ - { - "comment": "a previously loaded tag.", - "name": "tag", - "type": "const git_tag *" - } - ], - "comments": "", - "description": "

Get the id of a tag.

\n", - "file": "tag.h", - "group": "tag", - "line": 69, - "lineto": 69, - "return": { - "comment": "object identity for the tag.", - "type": "const git_oid *" - }, - "sig": "const git_tag *", - "type": "function" - }, - "git_tag_list": { - "argline": "git_strarray *tag_names,\n\tgit_repository *repo", - "args": [ - { - "comment": "Pointer to a git_strarray structure where the tag names will be stored", - "name": "tag_names", - "type": "git_strarray *" - }, - { - "comment": "Repository where to find the tags", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

The string array will be filled with the names of the\nmatching tags; these values are owned by the user and\nshould be free'd manually when no longer needed, using\ngit_strarray_free.

\n", - "description": "

Fill a list with all the tags in the Repository

\n", - "file": "tag.h", - "group": "tag", - "line": 293, - "lineto": 295, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_strarray *::git_repository *", - "type": "function" - }, - "git_tag_list_match": { - "argline": "git_strarray *tag_names,\n\tconst char *pattern,\n\tgit_repository *repo", - "args": [ - { - "comment": "Pointer to a git_strarray structure where the tag names will be stored", - "name": "tag_names", - "type": "git_strarray *" - }, - { - "comment": "Standard fnmatch pattern", - "name": "pattern", - "type": "const char *" - }, - { - "comment": "Repository where to find the tags", - "name": "repo", - "type": "git_repository *" - } - ], - "comments": "

If an empty pattern is provided, all the tags\nwill be returned.

\n\n

The string array will be filled with the names of the\nmatching tags; these values are owned by the user and\nshould be free'd manually when no longer needed, using\ngit_strarray_free.

\n", - "description": "

Fill a list with all the tags in the Repository\nwhich name match a defined pattern

\n", - "file": "tag.h", - "group": "tag", - "line": 315, - "lineto": 321, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_strarray *::const char *::git_repository *", - "type": "function" - }, - "git_tag_lookup": { - "argline": "git_tag **out, git_repository *repo, const git_oid *id", - "args": [ - { - "comment": "pointer to the looked up tag", - "name": "out", - "type": "git_tag **" - }, - { - "comment": "the repo to use when locating the tag.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "identity of the tag to locate.", - "name": "id", - "type": "const git_oid *" - } - ], - "comments": "", - "description": "

Lookup a tag object from the repository.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_tag_lookup-69" - ] - }, - "file": "tag.h", - "group": "tag", - "line": 33, - "lineto": 34, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_tag **::git_repository *::const git_oid *", - "type": "function" - }, - "git_tag_lookup_prefix": { - "argline": "git_tag **out, git_repository *repo, const git_oid *id, size_t len", - "args": [ - { - "comment": "pointer to the looked up tag", - "name": "out", - "type": "git_tag **" - }, - { - "comment": "the repo to use when locating the tag.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "identity of the tag to locate.", - "name": "id", - "type": "const git_oid *" - }, - { - "comment": "the length of the short identifier", - "name": "len", - "type": "size_t" - } - ], - "comments": "

@see git_object_lookup_prefix

\n", - "description": "

Lookup a tag object from the repository,\ngiven a prefix of its identifier (short id).

\n", - "file": "tag.h", - "group": "tag", - "line": 48, - "lineto": 49, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_tag **::git_repository *::const git_oid *::size_t", - "type": "function" - }, - "git_tag_message": { - "argline": "const git_tag *tag", - "args": [ - { - "comment": "a previously loaded tag.", - "name": "tag", - "type": "const git_tag *" - } - ], - "comments": "", - "description": "

Get the message of a tag

\n", - "examples": { - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_tag_message-37", - "ex/v0.20.0/cat-file.html#git_tag_message-38" - ], - "general.c": [ - "ex/v0.20.0/general.html#git_tag_message-73" - ] - }, - "file": "tag.h", - "group": "tag", - "line": 129, - "lineto": 129, - "return": { - "comment": "message of the tag or NULL when unspecified", - "type": "const char *" - }, - "sig": "const git_tag *", - "type": "function" - }, - "git_tag_name": { - "argline": "const git_tag *tag", - "args": [ - { - "comment": "a previously loaded tag.", - "name": "tag", - "type": "const git_tag *" - } - ], - "comments": "", - "description": "

Get the name of a tag

\n", - "examples": { - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_tag_name-35" - ], - "general.c": [ - "ex/v0.20.0/general.html#git_tag_name-72" - ] - }, - "file": "tag.h", - "group": "tag", - "line": 113, - "lineto": 113, - "return": { - "comment": "name of the tag", - "type": "const char *" - }, - "sig": "const git_tag *", - "type": "function" - }, - "git_tag_owner": { - "argline": "const git_tag *tag", - "args": [ - { - "comment": "A previously loaded tag.", - "name": "tag", - "type": "const git_tag *" - } - ], - "comments": "", - "description": "

Get the repository that contains the tag.

\n", - "file": "tag.h", - "group": "tag", - "line": 77, - "lineto": 77, - "return": { - "comment": "Repository that contains this tag.", - "type": "git_repository *" - }, - "sig": "const git_tag *", - "type": "function" - }, - "git_tag_peel": { - "argline": "git_object **tag_target_out,\n\tconst git_tag *tag", - "args": [ - { - "comment": "Pointer to the peeled git_object", - "name": "tag_target_out", - "type": "git_object **" - }, - { - "comment": "_target_out Pointer to the peeled git_object", - "name": "tag", - "type": "const git_tag *" - } - ], - "comments": "

The retrieved tag_target object is owned by the repository\nand should be closed with the git_object_free method.

\n", - "description": "

Recursively peel a tag until a non tag git_object is found

\n", - "file": "tag.h", - "group": "tag", - "line": 346, - "lineto": 348, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_object **::const git_tag *", - "type": "function" - }, - "git_tag_tagger": { - "argline": "const git_tag *tag", - "args": [ - { - "comment": "a previously loaded tag.", - "name": "tag", - "type": "const git_tag *" - } - ], - "comments": "", - "description": "

Get the tagger (author) of a tag

\n", - "examples": { - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_tag_tagger-36" - ] - }, - "file": "tag.h", - "group": "tag", - "line": 121, - "lineto": 121, - "return": { - "comment": "reference to the tag's author or NULL when unspecified", - "type": "const git_signature *" - }, - "sig": "const git_tag *", - "type": "function" - }, - "git_tag_target": { - "argline": "git_object **target_out, const git_tag *tag", - "args": [ - { - "comment": "pointer where to store the target", - "name": "target_out", - "type": "git_object **" - }, - { - "comment": "a previously loaded tag.", - "name": "tag", - "type": "const git_tag *" - } - ], - "comments": "

This method performs a repository lookup for the\ngiven object and returns it

\n", - "description": "

Get the tagged object of a tag

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_tag_target-70" - ] - }, - "file": "tag.h", - "group": "tag", - "line": 89, - "lineto": 89, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_object **::const git_tag *", - "type": "function" - }, - "git_tag_target_id": { - "argline": "const git_tag *tag", - "args": [ - { - "comment": "a previously loaded tag.", - "name": "tag", - "type": "const git_tag *" - } - ], - "comments": "", - "description": "

Get the OID of the tagged object of a tag

\n", - "examples": { - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_tag_target_id-33" - ] - }, - "file": "tag.h", - "group": "tag", - "line": 97, - "lineto": 97, - "return": { - "comment": "pointer to the OID", - "type": "const git_oid *" - }, - "sig": "const git_tag *", - "type": "function" - }, - "git_tag_target_type": { - "argline": "const git_tag *tag", - "args": [ - { - "comment": "a previously loaded tag.", - "name": "tag", - "type": "const git_tag *" - } - ], - "comments": "", - "description": "

Get the type of a tag's tagged object

\n", - "examples": { - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_tag_target_type-34" - ], - "general.c": [ - "ex/v0.20.0/general.html#git_tag_target_type-71" - ] - }, - "file": "tag.h", - "group": "tag", - "line": 105, - "lineto": 105, - "return": { - "comment": "type of the tagged object", - "type": "git_otype" - }, - "sig": "const git_tag *", - "type": "function" - }, - "git_threads_init": { - "argline": "void", - "args": [], - "comments": "

If libgit2 has been built with GIT_THREADS\non, this function must be called once before\nany other library functions.

\n\n

If libgit2 has been built without GIT_THREADS\nsupport, this function is a no-op.

\n", - "description": "

Init the threading system.

\n", - "examples": { - "blame.c": [ - "ex/v0.20.0/blame.html#git_threads_init-26" - ], - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_threads_init-39" - ], - "diff.c": [ - "ex/v0.20.0/diff.html#git_threads_init-11" - ], - "init.c": [ - "ex/v0.20.0/init.html#git_threads_init-12" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_threads_init-53" - ], - "network/git2.c": [ - "ex/v0.20.0/network/git2.html#git_threads_init-5" - ], - "rev-parse.c": [ - "ex/v0.20.0/rev-parse.html#git_threads_init-18" - ], - "status.c": [ - "ex/v0.20.0/status.html#git_threads_init-23" - ] - }, - "file": "threads.h", - "group": "threads", - "line": 33, - "lineto": 33, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "", - "type": "function" - }, - "git_threads_shutdown": { - "argline": "void", - "args": [], - "comments": "

If libgit2 has been built with GIT_THREADS\non, this function must be called before shutting\ndown the library.

\n\n

If libgit2 has been built without GIT_THREADS\nsupport, this function is a no-op.

\n", - "description": "

Shutdown the threading system.

\n", - "examples": { - "blame.c": [ - "ex/v0.20.0/blame.html#git_threads_shutdown-27" - ], - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_threads_shutdown-40" - ], - "diff.c": [ - "ex/v0.20.0/diff.html#git_threads_shutdown-12" - ], - "init.c": [ - "ex/v0.20.0/init.html#git_threads_shutdown-13" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_threads_shutdown-54" - ], - "rev-parse.c": [ - "ex/v0.20.0/rev-parse.html#git_threads_shutdown-19" - ], - "status.c": [ - "ex/v0.20.0/status.html#git_threads_shutdown-24" - ] - }, - "file": "threads.h", - "group": "threads", - "line": 45, - "lineto": 45, - "return": { - "type": "void" - }, - "sig": "", - "type": "function" - }, - "git_trace_set": { - "argline": "git_trace_level_t level, git_trace_callback cb", - "args": [ - { - "comment": "Level to set tracing to", - "name": "level", - "type": "git_trace_level_t" - }, - { - "comment": "Function to call with trace data", - "name": "cb", - "type": "git_trace_callback" - } - ], - "comments": "", - "description": "

Sets the system tracing configuration to the specified level with the\nspecified callback. When system events occur at a level equal to, or\nlower than, the given level they will be reported to the given callback.

\n", - "file": "trace.h", - "group": "trace", - "line": 63, - "lineto": 63, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_trace_level_t::git_trace_callback", - "type": "function" - }, - "git_transport_dummy": { - "argline": "git_transport **out,\n\tgit_remote *owner,\n\t void *payload", - "args": [ - { - "comment": "The newly created transport (out)", - "name": "out", - "type": "git_transport **" - }, - { - "comment": "The git_remote which will own this transport", - "name": "owner", - "type": "git_remote *" - }, - { - "comment": "You must pass NULL for this parameter.", - "name": "payload", - "type": "void *" - } - ], - "comments": "", - "description": "

Create an instance of the dummy transport.

\n", - "file": "transport.h", - "group": "transport", - "line": 330, - "lineto": 333, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_transport **::git_remote *::void *", - "type": "function" - }, - "git_transport_local": { - "argline": "git_transport **out,\n\tgit_remote *owner,\n\t void *payload", - "args": [ - { - "comment": "The newly created transport (out)", - "name": "out", - "type": "git_transport **" - }, - { - "comment": "The git_remote which will own this transport", - "name": "owner", - "type": "git_remote *" - }, - { - "comment": "You must pass NULL for this parameter.", - "name": "payload", - "type": "void *" - } - ], - "comments": "", - "description": "

Create an instance of the local transport.

\n", - "file": "transport.h", - "group": "transport", - "line": 343, - "lineto": 346, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_transport **::git_remote *::void *", - "type": "function" - }, - "git_transport_new": { - "argline": "git_transport **out, git_remote *owner, const char *url", - "args": [ - { - "comment": "The newly created transport (out)", - "name": "out", - "type": "git_transport **" - }, - { - "comment": "The git_remote which will own this transport", - "name": "owner", - "type": "git_remote *" - }, - { - "comment": "The URL to connect to", - "name": "url", - "type": "const char *" - } - ], - "comments": "", - "description": "

Function to use to create a transport from a URL. The transport database\nis scanned to find a transport that implements the scheme of the URI (i.e.\ngit:// or http://) and a transport object is returned to the caller.

\n", - "file": "transport.h", - "group": "transport", - "line": 280, - "lineto": 283, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_transport **::git_remote *::const char *", - "type": "function" - }, - "git_transport_register": { - "argline": "const char *prefix,\n\tunsigned priority,\n\tgit_transport_cb cb,\n\tvoid *param", - "args": [ - { - "comment": "The scheme (ending in \"://\") to match, i.e. \"git://\"", - "name": "prefix", - "type": "const char *" - }, - { - "comment": "The priority of this transport relative to others with the same prefix. Built-in transports have a priority of 1.", - "name": "priority", - "type": "unsigned" - }, - { - "comment": "The callback used to create an instance of the transport", - "name": "cb", - "type": "git_transport_cb" - }, - { - "comment": "A fixed parameter to pass to cb at creation time", - "name": "param", - "type": "void *" - } - ], - "comments": "

The caller is responsible for synchronizing calls to git_transport_register\nand git_transport_unregister with other calls to the library that\ninstantiate transports.

\n", - "description": "

Add a custom transport definition, to be used in addition to the built-in\nset of transports that come with libgit2.

\n", - "file": "transport.h", - "group": "transport", - "line": 300, - "lineto": 304, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "const char *::unsigned::git_transport_cb::void *", - "type": "function" - }, - "git_transport_smart": { - "argline": "git_transport **out,\n\tgit_remote *owner,\n\t void *payload", - "args": [ - { - "comment": "The newly created transport (out)", - "name": "out", - "type": "git_transport **" - }, - { - "comment": "The git_remote which will own this transport", - "name": "owner", - "type": "git_remote *" - }, - { - "comment": "A pointer to a git_smart_subtransport_definition", - "name": "payload", - "type": "void *" - } - ], - "comments": "", - "description": "

Create an instance of the smart transport.

\n", - "file": "transport.h", - "group": "transport", - "line": 356, - "lineto": 445, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_transport **::git_remote *::void *", - "type": "function" - }, - "git_transport_unregister": { - "argline": "const char *prefix,\n\tunsigned priority", - "args": [ - { - "comment": "From the previous call to git_transport_register", - "name": "prefix", - "type": "const char *" - }, - { - "comment": "From the previous call to git_transport_register", - "name": "priority", - "type": "unsigned" - } - ], - "comments": "", - "description": "

Unregister a custom transport definition which was previously registered\n with git_transport_register.

\n", - "file": "transport.h", - "group": "transport", - "line": 315, - "lineto": 320, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "const char *::unsigned", - "type": "function" - }, - "git_tree_entry_byindex": { - "argline": "const git_tree *tree, size_t idx", - "args": [ - { - "comment": "a previously loaded tree.", - "name": "tree", - "type": "const git_tree *" - }, - { - "comment": "the position in the entry list", - "name": "idx", - "type": "size_t" - } - ], - "comments": "

This returns a git_tree_entry that is owned by the git_tree. You don't\nhave to free it, but you must not use it after the git_tree is released.

\n", - "description": "

Lookup a tree entry by its position in the tree

\n", - "examples": { - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_tree_entry_byindex-42" - ], - "general.c": [ - "ex/v0.20.0/general.html#git_tree_entry_byindex-78" - ] - }, - "file": "tree.h", - "group": "tree", - "line": 112, - "lineto": 113, - "return": { - "comment": "the tree entry; NULL if not found", - "type": "const git_tree_entry *" - }, - "sig": "const git_tree *::size_t", - "type": "function" - }, - "git_tree_entry_byname": { - "argline": "const git_tree *tree, const char *filename", - "args": [ - { - "comment": "a previously loaded tree.", - "name": "tree", - "type": "const git_tree *" - }, - { - "comment": "the filename of the desired entry", - "name": "filename", - "type": "const char *" - } - ], - "comments": "

This returns a git_tree_entry that is owned by the git_tree. You don't\nhave to free it, but you must not use it after the git_tree is released.

\n", - "description": "

Lookup a tree entry by its filename

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_tree_entry_byname-77" - ] - }, - "file": "tree.h", - "group": "tree", - "line": 99, - "lineto": 100, - "return": { - "comment": "the tree entry; NULL if not found", - "type": "const git_tree_entry *" - }, - "sig": "const git_tree *::const char *", - "type": "function" - }, - "git_tree_entry_byoid": { - "argline": "const git_tree *tree, const git_oid *oid", - "args": [ - { - "comment": "a previously loaded tree.", - "name": "tree", - "type": "const git_tree *" - }, - { - "comment": "the sha being looked for", - "name": "oid", - "type": "const git_oid *" - } - ], - "comments": "

This returns a git_tree_entry that is owned by the git_tree. You don't\nhave to free it, but you must not use it after the git_tree is released.

\n\n

Warning: this must examine every entry in the tree, so it is not fast.

\n", - "description": "

Lookup a tree entry by SHA value.

\n", - "file": "tree.h", - "group": "tree", - "line": 127, - "lineto": 128, - "return": { - "comment": "the tree entry; NULL if not found", - "type": "const git_tree_entry *" - }, - "sig": "const git_tree *::const git_oid *", - "type": "function" - }, - "git_tree_entry_bypath": { - "argline": "git_tree_entry **out,\n\tconst git_tree *root,\n\tconst char *path", - "args": [ - { - "comment": "Pointer where to store the tree entry", - "name": "out", - "type": "git_tree_entry **" - }, - { - "comment": "Previously loaded tree which is the root of the relative path", - "name": "root", - "type": "const git_tree *" - }, - { - "comment": "Path to the contained entry", - "name": "path", - "type": "const char *" - } - ], - "comments": "

Unlike the other lookup functions, the returned tree entry is owned by\nthe user and must be freed explicitly with git_tree_entry_free().

\n", - "description": "

Retrieve a tree entry contained in a tree or in any of its subtrees,\ngiven its relative path.

\n", - "file": "tree.h", - "group": "tree", - "line": 142, - "lineto": 145, - "return": { - "comment": "0 on success; GIT_ENOTFOUND if the path does not exist", - "type": "int" - }, - "sig": "git_tree_entry **::const git_tree *::const char *", - "type": "function" - }, - "git_tree_entry_cmp": { - "argline": "const git_tree_entry *e1, const git_tree_entry *e2", - "args": [ - { - "comment": "first tree entry", - "name": "e1", - "type": "const git_tree_entry *" - }, - { - "comment": "second tree entry", - "name": "e2", - "type": "const git_tree_entry *" - } - ], - "comments": "", - "description": "

Compare two tree entries

\n", - "file": "tree.h", - "group": "tree", - "line": 219, - "lineto": 219, - "return": { - "comment": "<0 if e1 is before e2, 0 if e1 == e2, >0 if e1 is after e2", - "type": "int" - }, - "sig": "const git_tree_entry *::const git_tree_entry *", - "type": "function" - }, - "git_tree_entry_dup": { - "argline": "const git_tree_entry *entry", - "args": [ - { - "comment": "A tree entry to duplicate", - "name": "entry", - "type": "const git_tree_entry *" - } - ], - "comments": "

Create a copy of a tree entry. The returned copy is owned by the user,\nand must be freed explicitly with git_tree_entry_free().

\n", - "description": "

Duplicate a tree entry

\n", - "file": "tree.h", - "group": "tree", - "line": 156, - "lineto": 156, - "return": { - "comment": "a copy of the original entry or NULL on error (alloc failure)", - "type": "git_tree_entry *" - }, - "sig": "const git_tree_entry *", - "type": "function" - }, - "git_tree_entry_filemode": { - "argline": "const git_tree_entry *entry", - "args": [ - { - "comment": "a tree entry", - "name": "entry", - "type": "const git_tree_entry *" - } - ], - "comments": "", - "description": "

Get the UNIX file attributes of a tree entry

\n", - "examples": { - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_tree_entry_filemode-46" - ] - }, - "file": "tree.h", - "group": "tree", - "line": 199, - "lineto": 199, - "return": { - "comment": "filemode as an integer", - "type": "git_filemode_t" - }, - "sig": "const git_tree_entry *", - "type": "function" - }, - "git_tree_entry_filemode_raw": { - "argline": "const git_tree_entry *entry", - "args": [ - { - "comment": "a tree entry", - "name": "entry", - "type": "const git_tree_entry *" - } - ], - "comments": "

This function does not perform any normalization and is only useful\nif you need to be able to recreate the original tree object.

\n", - "description": "

Get the raw UNIX file attributes of a tree entry

\n", - "file": "tree.h", - "group": "tree", - "line": 210, - "lineto": 210, - "return": { - "comment": "filemode as an integer", - "type": "git_filemode_t" - }, - "sig": "const git_tree_entry *", - "type": "function" - }, - "git_tree_entry_free": { - "argline": "git_tree_entry *entry", - "args": [ - { - "comment": "The entry to free", - "name": "entry", - "type": "git_tree_entry *" - } - ], - "comments": "

IMPORTANT: This function is only needed for tree entries owned by the\nuser, such as the ones returned by git_tree_entry_dup() or\ngit_tree_entry_bypath().

\n", - "description": "

Free a user-owned tree entry

\n", - "file": "tree.h", - "group": "tree", - "line": 167, - "lineto": 167, - "return": { - "type": "void" - }, - "sig": "git_tree_entry *", - "type": "function" - }, - "git_tree_entry_id": { - "argline": "const git_tree_entry *entry", - "args": [ - { - "comment": "a tree entry", - "name": "entry", - "type": "const git_tree_entry *" - } - ], - "comments": "", - "description": "

Get the id of the object pointed by the entry

\n", - "examples": { - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_tree_entry_id-44" - ] - }, - "file": "tree.h", - "group": "tree", - "line": 183, - "lineto": 183, - "return": { - "comment": "the oid of the object", - "type": "const git_oid *" - }, - "sig": "const git_tree_entry *", - "type": "function" - }, - "git_tree_entry_name": { - "argline": "const git_tree_entry *entry", - "args": [ - { - "comment": "a tree entry", - "name": "entry", - "type": "const git_tree_entry *" - } - ], - "comments": "", - "description": "

Get the filename of a tree entry

\n", - "examples": { - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_tree_entry_name-43" - ], - "general.c": [ - "ex/v0.20.0/general.html#git_tree_entry_name-79", - "ex/v0.20.0/general.html#git_tree_entry_name-80" - ] - }, - "file": "tree.h", - "group": "tree", - "line": 175, - "lineto": 175, - "return": { - "comment": "the name of the file", - "type": "const char *" - }, - "sig": "const git_tree_entry *", - "type": "function" - }, - "git_tree_entry_to_object": { - "argline": "git_object **object_out,\n\tgit_repository *repo,\n\tconst git_tree_entry *entry", - "args": [ - { - "comment": "pointer to the converted object", - "name": "object_out", - "type": "git_object **" - }, - { - "comment": "repository where to lookup the pointed object", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "a tree entry", - "name": "entry", - "type": "const git_tree_entry *" - } - ], - "comments": "

You must call git_object_free() on the object when you are done with it.

\n", - "description": "

Convert a tree entry to the git_object it points to.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_tree_entry_to_object-81" - ] - }, - "file": "tree.h", - "group": "tree", - "line": 231, - "lineto": 234, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_object **::git_repository *::const git_tree_entry *", - "type": "function" - }, - "git_tree_entry_type": { - "argline": "const git_tree_entry *entry", - "args": [ - { - "comment": "a tree entry", - "name": "entry", - "type": "const git_tree_entry *" - } - ], - "comments": "", - "description": "

Get the type of the object pointed by the entry

\n", - "examples": { - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_tree_entry_type-45" - ] - }, - "file": "tree.h", - "group": "tree", - "line": 191, - "lineto": 191, - "return": { - "comment": "the type of the pointed object", - "type": "git_otype" - }, - "sig": "const git_tree_entry *", - "type": "function" - }, - "git_tree_entrycount": { - "argline": "const git_tree *tree", - "args": [ - { - "comment": "a previously loaded tree.", - "name": "tree", - "type": "const git_tree *" - } - ], - "comments": "", - "description": "

Get the number of entries listed in a tree

\n", - "examples": { - "cat-file.c": [ - "ex/v0.20.0/cat-file.html#git_tree_entrycount-41" - ], - "general.c": [ - "ex/v0.20.0/general.html#git_tree_entrycount-76" - ] - }, - "file": "tree.h", - "group": "tree", - "line": 87, - "lineto": 87, - "return": { - "comment": "the number of entries in the tree", - "type": "size_t" - }, - "sig": "const git_tree *", - "type": "function" - }, - "git_tree_free": { - "argline": "git_tree *tree", - "args": [ - { - "comment": "The tree to close", - "name": "tree", - "type": "git_tree *" - } - ], - "comments": "

You can no longer use the git_tree pointer after this call.

\n\n

IMPORTANT: You MUST call this method when you stop using a tree to\nrelease memory. Failure to do so will cause a memory leak.

\n", - "description": "

Close an open tree

\n", - "examples": { - "diff.c": [ - "ex/v0.20.0/diff.html#git_tree_free-13", - "ex/v0.20.0/diff.html#git_tree_free-14" - ], - "init.c": [ - "ex/v0.20.0/init.html#git_tree_free-15" - ], - "log.c": [ - "ex/v0.20.0/log.html#git_tree_free-55", - "ex/v0.20.0/log.html#git_tree_free-56", - "ex/v0.20.0/log.html#git_tree_free-57", - "ex/v0.20.0/log.html#git_tree_free-58", - "ex/v0.20.0/log.html#git_tree_free-59" - ] - }, - "file": "tree.h", - "group": "tree", - "line": 63, - "lineto": 63, - "return": { - "type": "void" - }, - "sig": "git_tree *", - "type": "function" - }, - "git_tree_id": { - "argline": "const git_tree *tree", - "args": [ - { - "comment": "a previously loaded tree.", - "name": "tree", - "type": "const git_tree *" - } - ], - "comments": "", - "description": "

Get the id of a tree.

\n", - "file": "tree.h", - "group": "tree", - "line": 71, - "lineto": 71, - "return": { - "comment": "object identity for the tree.", - "type": "const git_oid *" - }, - "sig": "const git_tree *", - "type": "function" - }, - "git_tree_lookup": { - "argline": "git_tree **out, git_repository *repo, const git_oid *id", - "args": [ - { - "comment": "Pointer to the looked up tree", - "name": "out", - "type": "git_tree **" - }, - { - "comment": "The repo to use when locating the tree.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "Identity of the tree to locate.", - "name": "id", - "type": "const git_oid *" - } - ], - "comments": "", - "description": "

Lookup a tree object from the repository.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#git_tree_lookup-74", - "ex/v0.20.0/general.html#git_tree_lookup-75" - ], - "init.c": [ - "ex/v0.20.0/init.html#git_tree_lookup-14" - ] - }, - "file": "tree.h", - "group": "tree", - "line": 32, - "lineto": 33, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_tree **::git_repository *::const git_oid *", - "type": "function" - }, - "git_tree_lookup_prefix": { - "argline": "git_tree **out,\n\tgit_repository *repo,\n\tconst git_oid *id,\n\tsize_t len", - "args": [ - { - "comment": "pointer to the looked up tree", - "name": "out", - "type": "git_tree **" - }, - { - "comment": "the repo to use when locating the tree.", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "identity of the tree to locate.", - "name": "id", - "type": "const git_oid *" - }, - { - "comment": "the length of the short identifier", - "name": "len", - "type": "size_t" - } - ], - "comments": "

@see git_object_lookup_prefix

\n", - "description": "

Lookup a tree object from the repository,\ngiven a prefix of its identifier (short id).

\n", - "file": "tree.h", - "group": "tree", - "line": 47, - "lineto": 51, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_tree **::git_repository *::const git_oid *::size_t", - "type": "function" - }, - "git_tree_owner": { - "argline": "const git_tree *tree", - "args": [ - { - "comment": "A previously loaded tree.", - "name": "tree", - "type": "const git_tree *" - } - ], - "comments": "", - "description": "

Get the repository that contains the tree.

\n", - "file": "tree.h", - "group": "tree", - "line": 79, - "lineto": 79, - "return": { - "comment": "Repository that contains this tree.", - "type": "git_repository *" - }, - "sig": "const git_tree *", - "type": "function" - }, - "git_tree_walk": { - "argline": "const git_tree *tree,\n\tgit_treewalk_mode mode,\n\tgit_treewalk_cb callback,\n\tvoid *payload", - "args": [ - { - "comment": "The tree to walk", - "name": "tree", - "type": "const git_tree *" - }, - { - "comment": "Traversal mode (pre or post-order)", - "name": "mode", - "type": "git_treewalk_mode" - }, - { - "comment": "Function to call on each tree entry", - "name": "callback", - "type": "git_treewalk_cb" - }, - { - "comment": "Opaque pointer to be passed on each callback", - "name": "payload", - "type": "void *" - } - ], - "comments": "

The entries will be traversed in the specified order, children subtrees\nwill be automatically loaded as required, and the callback will be\ncalled once per entry with the current (relative) root for the entry and\nthe entry data itself.

\n\n

If the callback returns a positive value, the passed entry will be\nskipped on the traversal (in pre mode). A negative value stops the walk.

\n", - "description": "

Traverse the entries in a tree and its subtrees in post or pre order.

\n", - "file": "tree.h", - "group": "tree", - "line": 396, - "lineto": 400, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "const git_tree *::git_treewalk_mode::git_treewalk_cb::void *", - "type": "function" - }, - "git_treebuilder_clear": { - "argline": "git_treebuilder *bld", - "args": [ - { - "comment": "Builder to clear", - "name": "bld", - "type": "git_treebuilder *" - } - ], - "comments": "", - "description": "

Clear all the entires in the builder

\n", - "file": "tree.h", - "group": "treebuilder", - "line": 260, - "lineto": 260, - "return": { - "type": "void" - }, - "sig": "git_treebuilder *", - "type": "function" - }, - "git_treebuilder_create": { - "argline": "git_treebuilder **out, const git_tree *source", - "args": [ - { - "comment": "Pointer where to store the tree builder", - "name": "out", - "type": "git_treebuilder **" - }, - { - "comment": "Source tree to initialize the builder (optional)", - "name": "source", - "type": "const git_tree *" - } - ], - "comments": "

The tree builder can be used to create or modify trees in memory and\nwrite them as tree objects to the database.

\n\n

If the source parameter is not NULL, the tree builder will be\ninitialized with the entries of the given tree.

\n\n

If the source parameter is NULL, the tree builder will start with no\nentries and will have to be filled manually.

\n", - "description": "

Create a new tree builder.

\n", - "file": "tree.h", - "group": "treebuilder", - "line": 252, - "lineto": 253, - "return": { - "comment": "0 on success; error code otherwise", - "type": "int" - }, - "sig": "git_treebuilder **::const git_tree *", - "type": "function" - }, - "git_treebuilder_entrycount": { - "argline": "git_treebuilder *bld", - "args": [ - { - "comment": "a previously loaded treebuilder.", - "name": "bld", - "type": "git_treebuilder *" - } - ], - "comments": "", - "description": "

Get the number of entries listed in a treebuilder

\n", - "file": "tree.h", - "group": "treebuilder", - "line": 268, - "lineto": 268, - "return": { - "comment": "the number of entries in the treebuilder", - "type": "unsigned int" - }, - "sig": "git_treebuilder *", - "type": "function" - }, - "git_treebuilder_filter": { - "argline": "git_treebuilder *bld,\n\tgit_treebuilder_filter_cb filter,\n\tvoid *payload", - "args": [ - { - "comment": "Tree builder", - "name": "bld", - "type": "git_treebuilder *" - }, - { - "comment": "Callback to filter entries", - "name": "filter", - "type": "git_treebuilder_filter_cb" - }, - { - "comment": "Extra data to pass to filter", - "name": "payload", - "type": "void *" - } - ], - "comments": "

The filter callback will be called for each entry in the tree with a\npointer to the entry and the provided payload; if the callback returns\nnon-zero, the entry will be filtered (removed from the builder).

\n", - "description": "

Filter the entries in the tree

\n", - "file": "tree.h", - "group": "treebuilder", - "line": 349, - "lineto": 352, - "return": { - "type": "void" - }, - "sig": "git_treebuilder *::git_treebuilder_filter_cb::void *", - "type": "function" - }, - "git_treebuilder_free": { - "argline": "git_treebuilder *bld", - "args": [ - { - "comment": "Builder to free", - "name": "bld", - "type": "git_treebuilder *" - } - ], - "comments": "

This will clear all the entries and free to builder.\nFailing to free the builder after you're done using it\nwill result in a memory leak

\n", - "description": "

Free a tree builder

\n", - "file": "tree.h", - "group": "treebuilder", - "line": 279, - "lineto": 279, - "return": { - "type": "void" - }, - "sig": "git_treebuilder *", - "type": "function" - }, - "git_treebuilder_get": { - "argline": "git_treebuilder *bld, const char *filename", - "args": [ - { - "comment": "Tree builder", - "name": "bld", - "type": "git_treebuilder *" - }, - { - "comment": "Name of the entry", - "name": "filename", - "type": "const char *" - } - ], - "comments": "

The returned entry is owned by the builder and should\nnot be freed manually.

\n", - "description": "

Get an entry from the builder from its filename

\n", - "file": "tree.h", - "group": "treebuilder", - "line": 291, - "lineto": 292, - "return": { - "comment": "pointer to the entry; NULL if not found", - "type": "const git_tree_entry *" - }, - "sig": "git_treebuilder *::const char *", - "type": "function" - }, - "git_treebuilder_insert": { - "argline": "const git_tree_entry **out,\n\tgit_treebuilder *bld,\n\tconst char *filename,\n\tconst git_oid *id,\n\tgit_filemode_t filemode", - "args": [ - { - "comment": "Pointer to store the entry (optional)", - "name": "out", - "type": "const git_tree_entry **" - }, - { - "comment": "Tree builder", - "name": "bld", - "type": "git_treebuilder *" - }, - { - "comment": "Filename of the entry", - "name": "filename", - "type": "const char *" - }, - { - "comment": "SHA1 oid of the entry", - "name": "id", - "type": "const git_oid *" - }, - { - "comment": "Folder attributes of the entry. This parameter must be valued with one of the following entries: 0040000, 0100644, 0100755, 0120000 or 0160000.", - "name": "filemode", - "type": "git_filemode_t" - } - ], - "comments": "

Insert a new entry for filename in the builder with the\ngiven attributes.

\n\n

If an entry named filename already exists, its attributes\nwill be updated with the given ones.

\n\n

The optional pointer out can be used to retrieve a pointer to\nthe newly created/updated entry. Pass NULL if you do not need it.

\n\n

No attempt is being made to ensure that the provided oid points\nto an existing git object in the object database, nor that the\nattributes make sense regarding the type of the pointed at object.

\n", - "description": "

Add or update an entry to the builder

\n", - "file": "tree.h", - "group": "treebuilder", - "line": 319, - "lineto": 324, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "const git_tree_entry **::git_treebuilder *::const char *::const git_oid *::git_filemode_t", - "type": "function" - }, - "git_treebuilder_remove": { - "argline": "git_treebuilder *bld, const char *filename", - "args": [ - { - "comment": "Tree builder", - "name": "bld", - "type": "git_treebuilder *" - }, - { - "comment": "Filename of the entry to remove", - "name": "filename", - "type": "const char *" - } - ], - "comments": "", - "description": "

Remove an entry from the builder by its filename

\n", - "file": "tree.h", - "group": "treebuilder", - "line": 332, - "lineto": 336, - "return": { - "type": "int" - }, - "sig": "git_treebuilder *::const char *", - "type": "function" - }, - "git_treebuilder_write": { - "argline": "git_oid *id, git_repository *repo, git_treebuilder *bld", - "args": [ - { - "comment": "Pointer to store the OID of the newly written tree", - "name": "id", - "type": "git_oid *" - }, - { - "comment": "Repository in which to store the object", - "name": "repo", - "type": "git_repository *" - }, - { - "comment": "Tree builder to write", - "name": "bld", - "type": "git_treebuilder *" - } - ], - "comments": "

The tree builder will be written to the given repo, and its\nidentifying SHA1 hash will be stored in the id pointer.

\n", - "description": "

Write the contents of the tree builder as a tree object

\n", - "file": "tree.h", - "group": "treebuilder", - "line": 365, - "lineto": 366, - "return": { - "comment": "0 or an error code", - "type": "int" - }, - "sig": "git_oid *::git_repository *::git_treebuilder *", - "type": "function" - }, - "giterr_clear": { - "argline": "void", - "args": [], - "comments": "", - "description": "

Clear the last library error that occurred for this thread.

\n", - "file": "errors.h", - "group": "giterr", - "line": 87, - "lineto": 87, - "return": { - "type": "void" - }, - "sig": "", - "type": "function" - }, - "giterr_detach": { - "argline": "git_error *cpy", - "args": [ - { - "name": "cpy", - "type": "git_error *" - } - ], - "comments": "

This copies the last error into the given git_error struct\nand returns 0 if the copy was successful, leaving the error \ncleared as if giterr_clear had been called.

\n\n

If there was no existing error in the library, -1 will be returned\nand the contents of cpy will be left unmodified.

\n", - "description": "

Get the last error data and clear it.

\n", - "file": "errors.h", - "group": "giterr", - "line": 99, - "lineto": 99, - "return": { - "type": "int" - }, - "sig": "git_error *", - "type": "function" - }, - "giterr_last": { - "argline": "void", - "args": [], - "comments": "", - "description": "

Return the last git_error object that was generated for the\ncurrent thread or NULL if no error has occurred.

\n", - "examples": { - "general.c": [ - "ex/v0.20.0/general.html#giterr_last-27" - ], - "network/clone.c": [ - "ex/v0.20.0/network/clone.html#giterr_last-2" - ], - "network/git2.c": [ - "ex/v0.20.0/network/git2.html#giterr_last-1", - "ex/v0.20.0/network/git2.html#giterr_last-2" - ] - }, - "file": "errors.h", - "group": "giterr", - "line": 82, - "lineto": 82, - "return": { - "comment": "A git_error object.", - "type": "const git_error *" - }, - "sig": "", - "type": "function" - }, - "giterr_set_oom": { - "argline": "void", - "args": [], - "comments": "

The normal giterr_set_str() function attempts to strdup() the string\nthat is passed in. This is not a good idea when the error in question\nis a memory allocation failure. That circumstance has a special setter\nfunction that sets the error string to a known and statically allocated\ninternal value.

\n", - "description": "

Set the error message to a special value for memory allocation failure.

\n", - "file": "errors.h", - "group": "giterr", - "line": 133, - "lineto": 133, - "return": { - "type": "void" - }, - "sig": "", - "type": "function" - }, - "giterr_set_str": { - "argline": "int error_class, const char *string", - "args": [ - { - "comment": "One of the `git_error_t` enum above describing the general subsystem that is responsible for the error.", - "name": "error_class", - "type": "int" - }, - { - "comment": "The formatted error message to keep", - "name": "string", - "type": "const char *" - } - ], - "comments": "

This function is public so that custom ODB backends and the like can\nrelay an error message through libgit2. Most regular users of libgit2\nwill never need to call this function -- actually, calling it in most\ncircumstances (for example, calling from within a callback function)\nwill just end up having the value overwritten by libgit2 internals.

\n\n

This error message is stored in thread-local storage and only applies\nto the particular thread that this libgit2 call is made from.

\n\n

NOTE: Passing the error_class as GITERR_OS has a special behavior: we\nattempt to append the system default error message for the last OS error\nthat occurred and then clear the last error. The specific implementation\nof looking up and clearing this last OS error will vary by platform.

\n", - "description": "

Set the error message string for this thread.

\n", - "file": "errors.h", - "group": "giterr", - "line": 122, - "lineto": 122, - "return": { - "type": "void" - }, - "sig": "int::const char *", - "type": "function" - } - }, - "globals": { - "GIT_ATTR_CHECK_NO_SYSTEM": { - "comments": "

Check attribute flags: Using the system attributes file.

\n\n

Normally, attribute checks include looking in the /etc (or system\nequivalent) directory for a gitattributes file. Passing this\nflag will cause attribute checks to ignore that file.

\n", - "file": "attr.h", - "line": 125, - "value": "(1 << 2)" - }, - "GIT_ATTR_FALSE(attr)": { - "comments": "

GIT_ATTR_FALSE checks if an attribute is set off. In core git\nparlance, this is the value for attributes that are "Unset" (not to\nbe confused with values that a "Unspecified").

\n\n

For example, if the attribute file contains:

\n\n

*.h -foo

\n\n

Then for file zyx.h looking up attribute "foo" gives a value for\nwhich GIT_ATTR_FALSE(value) is true.

\n", - "file": "attr.h", - "line": 47, - "value": "(git_attr_value(attr) == GIT_ATTR_FALSE_T)" - }, - "GIT_ATTR_HAS_VALUE(attr)": { - "comments": "

GIT_ATTR_HAS_VALUE checks if an attribute is set to a value (as\nopposed to TRUE, FALSE or UNSPECIFIED). This would be the case if\nfor a file with something like:

\n\n

*.txt eol=lf

\n\n

Given this, looking up "eol" for onefile.txt will give back the\nstring "lf" and GIT_ATTR_SET_TO_VALUE(attr) will return true.

\n", - "file": "attr.h", - "line": 77, - "value": "(git_attr_value(attr) == GIT_ATTR_VALUE_T)" - }, - "GIT_ATTR_TRUE(attr)": { - "comments": "

GIT_ATTR_TRUE checks if an attribute is set on. In core git\nparlance, this the value for "Set" attributes.

\n\n

For example, if the attribute file contains:

\n\n

*.c foo

\n\n

Then for file xyz.c looking up attribute "foo" gives a value for\nwhich GIT_ATTR_TRUE(value) is true.

\n", - "file": "attr.h", - "line": 33, - "value": "(git_attr_value(attr) == GIT_ATTR_TRUE_T)" - }, - "GIT_ATTR_UNSPECIFIED(attr)": { - "comments": "

GIT_ATTR_UNSPECIFIED checks if an attribute is unspecified. This\nmay be due to the attribute not being mentioned at all or because\nthe attribute was explicitly set unspecified via the ! operator.

\n\n

For example, if the attribute file contains:

\n\n

*.c foo\n *.h -foo\n onefile.c !foo

\n\n

Then for onefile.c looking up attribute "foo" yields a value with\nGIT_ATTR_UNSPECIFIED(value) of true. Also, looking up "foo" on\nfile onefile.rb or looking up "bar" on any file will all give\nGIT_ATTR_UNSPECIFIED(value) of true.

\n", - "file": "attr.h", - "line": 65, - "value": "(git_attr_value(attr) == GIT_ATTR_UNSPECIFIED_T)" - }, - "GIT_BEGIN_DECL": { - "comments": "

Start declarations in C mode

\n", - "file": "common.h", - "line": 24, - "value": "" - }, - "GIT_BUF_INIT_CONST(STR,LEN)": { - "comments": "

Static initializer for git_buf from static buffer

\n", - "file": "buffer.h", - "line": 60, - "value": "{ (char *)(STR), 0, (size_t)(LEN) }" - }, - "GIT_END_DECL": { - "comments": "

End declarations in C mode

\n", - "file": "common.h", - "line": 26, - "value": "" - }, - "GIT_EXTERN(type)": { - "comments": "

Declare a public function exported for application use.

\n", - "file": "common.h", - "line": 30, - "value": "extern __attribute__((visibility(\"default\"))) type" - }, - "GIT_FILTER_CRLF_PRIORITY": { - "comments": "

This is priority that the internal CRLF filter will be registered with

\n", - "file": "sys/filter.h", - "line": 35, - "value": "0" - }, - "GIT_FILTER_DRIVER_PRIORITY": { - "comments": "

This is priority to use with a custom filter to imitate a core Git\nfilter driver, so that it will be run last on checkout and first on\ncheckin. You do not have to use this, but it helps compatibility.

\n", - "file": "sys/filter.h", - "line": 47, - "value": "200" - }, - "GIT_FILTER_IDENT_PRIORITY": { - "comments": "

This is priority that the internal ident filter will be registered with

\n", - "file": "sys/filter.h", - "line": 40, - "value": "100" - }, - "GIT_FORMAT_PRINTF(a,b)": { - "comments": "

Declare a function's takes printf style arguments.

\n", - "file": "common.h", - "line": 48, - "value": "__attribute__((format (printf, a, b)))" - }, - "GIT_INDEX_STAGE_ANY": { - "comments": "

Match any index stage.

\n\n

Some index APIs take a stage to match; pass this value to match\nany entry matching the path regardless of stage.

\n", - "file": "index.h", - "line": 147, - "value": "-1" - }, - "GIT_INLINE(type)": { - "comments": "

Declare a function as always inlined.

\n", - "file": "common.h", - "line": 41, - "value": "static __inline type" - }, - "GIT_OID_HEXSZ": { - "comments": "

Size (in bytes) of a hex formatted oid

\n", - "file": "oid.h", - "line": 26, - "value": "(GIT_OID_RAWSZ * 2)" - }, - "GIT_OID_HEX_ZERO": { - "comments": "

The string representation of the null object ID.

\n", - "file": "common.h", - "line": 91, - "value": "\"0000000000000000000000000000000000000000\"" - }, - "GIT_OID_MINPREFIXLEN": { - "comments": "

Minimum length (in number of hex characters,\ni.e. packets of 4 bits) of an oid prefix

\n", - "file": "oid.h", - "line": 30, - "value": "4" - }, - "GIT_OID_RAWSZ": { - "comments": "

Size (in bytes) of a raw/binary oid

\n", - "file": "oid.h", - "line": 23, - "value": "20" - }, - "GIT_PATH_LIST_SEPARATOR": { - "comments": "

The separator used in path list strings (ie like in the PATH\nenvironment variable). A semi-colon ";" is used on Windows, and\na colon ":" for all other systems.

\n", - "file": "common.h", - "line": 77, - "value": "';'" - }, - "GIT_PATH_MAX": { - "comments": "

The maximum length of a valid git path.

\n", - "file": "common.h", - "line": 86, - "value": "4096" - }, - "GIT_SORT_NONE": { - "comments": "

Sort the repository contents in no particular ordering;\nthis sorting is arbitrary, implementation-specific\nand subject to change at any time.\nThis is the default sorting for new walkers.

\n", - "file": "revwalk.h", - "line": 29, - "value": "(0)" - }, - "GIT_SORT_REVERSE": { - "comments": "

Iterate through the repository contents in reverse\norder; this sorting mode can be combined with\nany of the above.

\n", - "file": "revwalk.h", - "line": 50, - "value": "(1 << 2)" - }, - "GIT_SORT_TIME": { - "comments": "

Sort the repository contents by commit time;\nthis sorting mode can be combined with\ntopological sorting.

\n", - "file": "revwalk.h", - "line": 43, - "value": "(1 << 1)" - }, - "GIT_SORT_TOPOLOGICAL": { - "comments": "

Sort the repository contents in topological order\n(parents before children); this sorting mode\ncan be combined with time sorting.

\n", - "file": "revwalk.h", - "line": 36, - "value": "(1 << 0)" - } - }, - "groups": [ - [ - "attr", - [ - "git_attr_add_macro", - "git_attr_cache_flush", - "git_attr_foreach", - "git_attr_get", - "git_attr_get_many" - ] - ], - [ - "blame", - [ - "git_blame_buffer", - "git_blame_file", - "git_blame_free", - "git_blame_get_hunk_byindex", - "git_blame_get_hunk_byline", - "git_blame_get_hunk_count" - ] - ], - [ - "blob", - [ - "git_blob_create_frombuffer", - "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_lookup_prefix", - "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_remote_name", - "git_branch_set_upstream", - "git_branch_upstream", - "git_branch_upstream_name" - ] - ], - [ - "buf", - [ - "git_buf_free", - "git_buf_grow", - "git_buf_set" - ] - ], - [ - "checkout", - [ - "git_checkout_head", - "git_checkout_index", - "git_checkout_tree" - ] - ], - [ - "clone", - [ - "git_clone", - "git_clone_into" - ] - ], - [ - "commit", - [ - "git_commit_author", - "git_commit_committer", - "git_commit_create", - "git_commit_create_from_oids", - "git_commit_create_v", - "git_commit_free", - "git_commit_id", - "git_commit_lookup", - "git_commit_lookup_prefix", - "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_time", - "git_commit_time_offset", - "git_commit_tree", - "git_commit_tree_id" - ] - ], - [ - "config", - [ - "git_config_add_backend", - "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_mapped", - "git_config_get_multivar_foreach", - "git_config_get_string", - "git_config_iterator_free", - "git_config_iterator_glob_new", - "git_config_iterator_new", - "git_config_lookup_map_value", - "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" - ] - ], - [ - "cred", - [ - "git_cred_default_new", - "git_cred_has_username", - "git_cred_ssh_custom_new", - "git_cred_ssh_key_new", - "git_cred_userpass", - "git_cred_userpass_plaintext_new" - ] - ], - [ - "diff", - [ - "git_diff_blob_to_buffer", - "git_diff_blobs", - "git_diff_find_similar", - "git_diff_foreach", - "git_diff_free", - "git_diff_get_delta", - "git_diff_index_to_workdir", - "git_diff_is_sorted_icase", - "git_diff_merge", - "git_diff_num_deltas", - "git_diff_num_deltas_of_type", - "git_diff_options_init", - "git_diff_print", - "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_length", - "git_filter_list_load", - "git_filter_list_new", - "git_filter_list_push", - "git_filter_lookup", - "git_filter_register", - "git_filter_source_filemode", - "git_filter_source_id", - "git_filter_source_mode", - "git_filter_source_path", - "git_filter_source_repo", - "git_filter_unregister" - ] - ], - [ - "giterr", - [ - "giterr_clear", - "giterr_detach", - "giterr_last", - "giterr_set_oom", - "giterr_set_str" - ] - ], - [ - "graph", - [ - "git_graph_ahead_behind" - ] - ], - [ - "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_entrycount", - "git_index_find", - "git_index_free", - "git_index_get_byindex", - "git_index_get_bypath", - "git_index_has_conflicts", - "git_index_name_add", - "git_index_name_clear", - "git_index_name_entrycount", - "git_index_name_get_byindex", - "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_reuc_add", - "git_index_reuc_clear", - "git_index_reuc_entrycount", - "git_index_reuc_find", - "git_index_reuc_get_byindex", - "git_index_reuc_get_bypath", - "git_index_reuc_remove", - "git_index_set_caps", - "git_index_update_all", - "git_index_write", - "git_index_write_tree", - "git_index_write_tree_to" - ] - ], - [ - "indexer", - [ - "git_indexer_append", - "git_indexer_commit", - "git_indexer_free", - "git_indexer_hash", - "git_indexer_new" - ] - ], - [ - "libgit2", - [ - "git_libgit2_capabilities", - "git_libgit2_opts", - "git_libgit2_version" - ] - ], - [ - "merge", - [ - "git_merge", - "git_merge_base", - "git_merge_base_many", - "git_merge_head_free", - "git_merge_head_from_fetchhead", - "git_merge_head_from_oid", - "git_merge_head_from_ref", - "git_merge_result_fastforward_oid", - "git_merge_result_is_fastforward", - "git_merge_result_is_uptodate", - "git_merge_trees" - ] - ], - [ - "message", - [ - "git_message_prettify" - ] - ], - [ - "note", - [ - "git_note_create", - "git_note_default_ref", - "git_note_foreach", - "git_note_free", - "git_note_iterator_free", - "git_note_iterator_new", - "git_note_message", - "git_note_next", - "git_note_oid", - "git_note_read", - "git_note_remove" - ] - ], - [ - "object", - [ - "git_object__size", - "git_object_dup", - "git_object_free", - "git_object_id", - "git_object_lookup", - "git_object_lookup_bypath", - "git_object_lookup_prefix", - "git_object_owner", - "git_object_peel", - "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_get_backend", - "git_odb_hash", - "git_odb_hashfile", - "git_odb_new", - "git_odb_num_backends", - "git_odb_object_data", - "git_odb_object_dup", - "git_odb_object_free", - "git_odb_object_id", - "git_odb_object_size", - "git_odb_object_type", - "git_odb_open", - "git_odb_open_rstream", - "git_odb_open_wstream", - "git_odb_read", - "git_odb_read_header", - "git_odb_read_prefix", - "git_odb_refresh", - "git_odb_stream_finalize_write", - "git_odb_stream_free", - "git_odb_stream_read", - "git_odb_stream_write", - "git_odb_write", - "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_fromstrn", - "git_oid_fromstrp", - "git_oid_iszero", - "git_oid_ncmp", - "git_oid_nfmt", - "git_oid_pathfmt", - "git_oid_shorten_add", - "git_oid_shorten_free", - "git_oid_shorten_new", - "git_oid_strcmp", - "git_oid_streq", - "git_oid_tostr" - ] - ], - [ - "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_blob_and_buffer", - "git_patch_from_blobs", - "git_patch_from_diff", - "git_patch_get_delta", - "git_patch_get_hunk", - "git_patch_get_line_in_hunk", - "git_patch_line_stats", - "git_patch_num_hunks", - "git_patch_num_lines_in_hunk", - "git_patch_print", - "git_patch_size", - "git_patch_to_str" - ] - ], - [ - "pathspec", - [ - "git_pathspec_free", - "git_pathspec_match_diff", - "git_pathspec_match_index", - "git_pathspec_match_list_diff_entry", - "git_pathspec_match_list_entry", - "git_pathspec_match_list_entrycount", - "git_pathspec_match_list_failed_entry", - "git_pathspec_match_list_failed_entrycount", - "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_new", - "git_push_set_callbacks", - "git_push_set_options", - "git_push_status_foreach", - "git_push_unpack_ok", - "git_push_update_tips" - ] - ], - [ - "refdb", - [ - "git_refdb_backend_fs", - "git_refdb_compress", - "git_refdb_free", - "git_refdb_new", - "git_refdb_open", - "git_refdb_set_backend" - ] - ], - [ - "reference", - [ - "git_reference__alloc", - "git_reference__alloc_symbolic", - "git_reference_cmp", - "git_reference_create", - "git_reference_delete", - "git_reference_dwim", - "git_reference_foreach", - "git_reference_foreach_glob", - "git_reference_free", - "git_reference_has_log", - "git_reference_is_branch", - "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_normalize_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_set_target", - "git_reference_symbolic_target", - "git_reference_target", - "git_reference_target_peel", - "git_reference_type" - ] - ], - [ - "reflog", - [ - "git_reflog_append", - "git_reflog_append_to", - "git_reflog_delete", - "git_reflog_drop", - "git_reflog_entry_byindex", - "git_reflog_entry_committer", - "git_reflog_entry_id_new", - "git_reflog_entry_id_old", - "git_reflog_entry_message", - "git_reflog_entrycount", - "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_inmemory", - "git_remote_create_with_fetchspec", - "git_remote_disconnect", - "git_remote_download", - "git_remote_fetch", - "git_remote_free", - "git_remote_get_fetch_refspecs", - "git_remote_get_push_refspecs", - "git_remote_get_refspec", - "git_remote_is_valid_name", - "git_remote_list", - "git_remote_load", - "git_remote_ls", - "git_remote_name", - "git_remote_owner", - "git_remote_pushurl", - "git_remote_refspec_count", - "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__cleanup", - "git_repository_config", - "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_is_bare", - "git_repository_is_empty", - "git_repository_is_shallow", - "git_repository_merge_cleanup", - "git_repository_mergehead_foreach", - "git_repository_message", - "git_repository_message_remove", - "git_repository_new", - "git_repository_odb", - "git_repository_open", - "git_repository_open_bare", - "git_repository_open_ext", - "git_repository_path", - "git_repository_refdb", - "git_repository_reinit_filesystem", - "git_repository_set_config", - "git_repository_set_head", - "git_repository_set_head_detached", - "git_repository_set_index", - "git_repository_set_namespace", - "git_repository_set_odb", - "git_repository_set_refdb", - "git_repository_set_workdir", - "git_repository_state", - "git_repository_workdir", - "git_repository_wrap_odb" - ] - ], - [ - "reset", - [ - "git_reset", - "git_reset_default" - ] - ], - [ - "revparse", - [ - "git_revparse", - "git_revparse_ext", - "git_revparse_single" - ] - ], - [ - "revwalk", - [ - "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_drop", - "git_stash_foreach", - "git_stash_save" - ] - ], - [ - "status", - [ - "git_status_byindex", - "git_status_file", - "git_status_foreach", - "git_status_foreach_ext", - "git_status_list_entrycount", - "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_fetch_recurse_submodules", - "git_submodule_foreach", - "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_lookup_prefix", - "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_local", - "git_transport_new", - "git_transport_register", - "git_transport_smart", - "git_transport_unregister" - ] - ], - [ - "tree", - [ - "git_tree_entry_byindex", - "git_tree_entry_byname", - "git_tree_entry_byoid", - "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_entrycount", - "git_tree_free", - "git_tree_id", - "git_tree_lookup", - "git_tree_lookup_prefix", - "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" - ] - ] - ], - "prefix": "include/git2", - "types": [ - [ - "GIT_ATTR_CHECK", - { - "block": "GIT_ATTR_CHECK_FILE_THEN_INDEX\nGIT_ATTR_CHECK_INDEX_THEN_FILE\nGIT_ATTR_CHECK_INDEX_ONLY", - "comments": "

Check attribute flags: Reading values from index and working directory.

\n\n

When checking attributes, it is possible to check attribute files\nin both the working directory (if there is one) and the index (if\nthere is one). You can explicitly choose where to check and in\nwhich order using the following flags.

\n\n

Core git usually checks the working directory then the index,\nexcept during a checkout when it checks the index first. It will\nuse index only for creating archives or for a bare repo (if an\nindex has been specified for the bare repo).

\n", - "decl": [ - "GIT_ATTR_CHECK_FILE_THEN_INDEX", - "GIT_ATTR_CHECK_INDEX_THEN_FILE", - "GIT_ATTR_CHECK_INDEX_ONLY" - ], - "file": "attr.h", - "line": 114, - "lineto": 116, - "sections": [ - [ - "

Check attribute flags: Reading values from index and working directory.

\n\n

When checking attributes, it is possible to check attribute files\nin both the working directory (if there is one) and the index (if\nthere is one). You can explicitly choose where to check and in\nwhich order using the following flags.

\n\n

Core git usually checks the working directory then the index,\nexcept during a checkout when it checks the index first. It will\nuse index only for creating archives or for a bare repo (if an\nindex has been specified for the bare repo).

\n", - [ - "GIT_ATTR_CHECK_FILE_THEN_INDEX", - "GIT_ATTR_CHECK_INDEX_THEN_FILE", - "GIT_ATTR_CHECK_INDEX_ONLY" - ] - ] - ], - "tdef": null, - "type": "enum", - "used": { - "needs": [], - "returns": [] - } - } - ], - [ - "GIT_IDXENTRY", - { - "block": "GIT_IDXENTRY_NAMEMASK\nGIT_IDXENTRY_STAGEMASK\nGIT_IDXENTRY_EXTENDED\nGIT_IDXENTRY_VALID\nGIT_IDXENTRY_STAGESHIFT\nGIT_IDXENTRY_STAGE\nGIT_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", - "comments": "

Bitmasks for in-memory only fields of git_index_entry's flags_extended

\n\n

These bitmasks match the other fields in the git_index_entry\nflags_extended value that are only used in-memory by libgit2. You\ncan use them to interpret the data in the flags_extended.

\n", - "decl": [ - "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" - ], - "file": "index.h", - "line": 108, - "lineto": 119, - "sections": [ - [ - "

Bitmasks for on-disk fields of git_index_entry's flags

\n\n

These bitmasks match the four fields in the git_index_entry flags\nvalue both in memory and on disk. You can use them to interpret the\ndata in the flags.

\n", - [ - "GIT_IDXENTRY_NAMEMASK", - "GIT_IDXENTRY_STAGEMASK", - "GIT_IDXENTRY_EXTENDED", - "GIT_IDXENTRY_VALID", - "GIT_IDXENTRY_STAGESHIFT", - "GIT_IDXENTRY_STAGE" - ] - ], - [ - "

Bitmasks for on-disk fields of git_index_entry's flags_extended

\n\n

In memory, the flags_extended fields are divided into two parts: the\nfields that are read from and written to disk, and other fields that\nin-memory only and used by libgit2. Only the flags in\nGIT_IDXENTRY_EXTENDED_FLAGS will get saved on-disk.

\n\n

These bitmasks match the three fields in the git_index_entry\nflags_extended value that belong on disk. You can use them to\ninterpret the data in the flags_extended.

\n", - [ - "GIT_IDXENTRY_INTENT_TO_ADD", - "GIT_IDXENTRY_SKIP_WORKTREE", - "GIT_IDXENTRY_EXTENDED2", - "GIT_IDXENTRY_EXTENDED_FLAGS" - ] - ], - [ - "

Bitmasks for in-memory only fields of git_index_entry's flags_extended

\n\n

These bitmasks match the other fields in the git_index_entry\nflags_extended value that are only used in-memory by libgit2. You\ncan use them to interpret the data in the flags_extended.

\n", - [ - "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" - ] - ] - ], - "tdef": null, - "type": "enum", - "used": { - "needs": [], - "returns": [] - } - } - ], - [ - "git_blame_hunk", - { - "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", - "comments": "

Structure that represents a blame hunk.

\n\n\n", - "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" - ], - "file": "blame.h", - "line": 101, - "lineto": 118, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [], - "returns": [ - "git_blame_get_hunk_byindex", - "git_blame_get_hunk_byline" - ] - }, - "value": "git_blame_hunk" - } - ], - [ - "git_blame_options", - { - "block": "unsigned int version\nuint32_t flags\nuint16_t min_match_characters\ngit_oid newest_commit\ngit_oid oldest_commit\nuint32_t min_line\nuint32_t max_line", - "comments": "

Blame options structure

\n\n

Use zeros to indicate default settings. It's easiest to use the\nGIT_BLAME_OPTIONS_INIT macro:\n git_blame_options opts = GIT_BLAME_OPTIONS_INIT;

\n\n\n", - "decl": [ - "unsigned int version", - "uint32_t flags", - "uint16_t min_match_characters", - "git_oid newest_commit", - "git_oid oldest_commit", - "uint32_t min_line", - "uint32_t max_line" - ], - "file": "blame.h", - "line": 67, - "lineto": 79, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_blame_file" - ], - "returns": [] - }, - "value": "git_blame_options" - } - ], - [ - "git_blob", - { - "block": "", - "comments": "

In-memory representation of a blob object.

\n", - "decl": "", - "file": "types.h", - "line": 117, - "lineto": 117, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_blob_filtered_content", - "git_blob_free", - "git_blob_id", - "git_blob_is_binary", - "git_blob_lookup", - "git_blob_lookup_prefix", - "git_blob_owner", - "git_blob_rawcontent", - "git_blob_rawsize", - "git_diff_blob_to_buffer", - "git_diff_blobs", - "git_filter_list_apply_to_blob", - "git_filter_list_load", - "git_patch_from_blob_and_buffer", - "git_patch_from_blobs" - ], - "returns": [] - }, - "value": "git_blob" - } - ], - [ - "git_branch_iterator", - { - "block": "", - "comments": "

Iterator type for branches

\n", - "decl": "", - "file": "branch.h", - "line": 70, - "lineto": 70, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_branch_iterator_free", - "git_branch_iterator_new", - "git_branch_next" - ], - "returns": [] - }, - "value": "git_branch_iterator" - } - ], - [ - "git_branch_t", - { - "block": "GIT_BRANCH_LOCAL\nGIT_BRANCH_REMOTE", - "comments": "

Basic type of any Git branch.

\n", - "decl": [ - "GIT_BRANCH_LOCAL", - "GIT_BRANCH_REMOTE" - ], - "file": "types.h", - "line": 193, - "lineto": 196, - "sections": [ - [ - "

Basic type of any Git branch.

\n", - [ - "GIT_BRANCH_LOCAL", - "GIT_BRANCH_REMOTE" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [ - "git_branch_iterator_new", - "git_branch_lookup", - "git_branch_next" - ], - "returns": [] - } - } - ], - [ - "git_buf", - { - "block": "char *ptr\nsize_t asize, size", - "comments": "

A data buffer for exporting data from libgit2

\n\n

Sometimes libgit2 wants to return an allocated data buffer to the\ncaller and have the caller take responsibility for freeing that memory.\nThis can be awkward if the caller does not have easy access to the same\nallocation functions that libgit2 is using. In those cases, libgit2\nwill fill in a git_buf and the caller can use git_buf_free() to\nrelease it when they are done.

\n\n

A git_buf may also be used for the caller to pass in a reference to\na block of memory they hold. In this case, libgit2 will not resize or\nfree the memory, but will read from it as needed.

\n\n

A git_buf is a public structure with three fields:

\n\n\n\n

Some APIs may occasionally do something slightly unusual with a buffer,\nsuch as setting ptr to a value that was passed in by the user. In\nthose cases, the behavior will be clearly documented by the API.

\n", - "decl": [ - "char *ptr", - "size_t asize, size" - ], - "file": "buffer.h", - "line": 52, - "lineto": 55, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_blob_filtered_content", - "git_buf_free", - "git_buf_grow", - "git_buf_set", - "git_filter_list_apply_to_blob", - "git_filter_list_apply_to_data", - "git_filter_list_apply_to_file" - ], - "returns": [] - }, - "value": "git_buf" - } - ], - [ - "git_cap_t", - { - "block": "GIT_CAP_THREADS\nGIT_CAP_HTTPS\nGIT_CAP_SSH", - "comments": "

Combinations of these values describe the capabilities of libgit2.

\n", - "decl": [ - "GIT_CAP_THREADS", - "GIT_CAP_HTTPS", - "GIT_CAP_SSH" - ], - "file": "common.h", - "line": 106, - "lineto": 110, - "sections": [ - [ - "

Combinations of these values describe the capabilities of libgit2.

\n", - [ - "GIT_CAP_THREADS", - "GIT_CAP_HTTPS", - "GIT_CAP_SSH" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [], - "returns": [] - } - } - ], - [ - "git_checkout_notify_cb", - { - "comments": "

Checkout notification callback function

\n", - "decl": "int (*git_checkout_notify_cb)(\n\tgit_checkout_notify_t why,\n\tconst char *path,\n\tconst git_diff_file *baseline,\n\tconst git_diff_file *target,\n\tconst git_diff_file *workdir,\n\tvoid *payload)", - "file": "checkout.h", - "line": 191, - "lineto": 197, - "type": "function pointer", - "used": { - "needs": [], - "returns": [] - }, - "value": "git_checkout_notify_cb" - } - ], - [ - "git_checkout_notify_t", - { - "block": "GIT_CHECKOUT_NOTIFY_NONE\nGIT_CHECKOUT_NOTIFY_CONFLICT\nGIT_CHECKOUT_NOTIFY_DIRTY\nGIT_CHECKOUT_NOTIFY_UPDATED\nGIT_CHECKOUT_NOTIFY_UNTRACKED\nGIT_CHECKOUT_NOTIFY_IGNORED\nGIT_CHECKOUT_NOTIFY_ALL", - "comments": "

Checkout notification flags

\n\n

Checkout will invoke an options notification callback (notify_cb) for\ncertain cases - you pick which ones via notify_flags:

\n\n\n\n

Returning a non-zero value from this callback will cancel the checkout.\nNotification callbacks are made prior to modifying any files on disk.

\n", - "decl": [ - "GIT_CHECKOUT_NOTIFY_NONE", - "GIT_CHECKOUT_NOTIFY_CONFLICT", - "GIT_CHECKOUT_NOTIFY_DIRTY", - "GIT_CHECKOUT_NOTIFY_UPDATED", - "GIT_CHECKOUT_NOTIFY_UNTRACKED", - "GIT_CHECKOUT_NOTIFY_IGNORED", - "GIT_CHECKOUT_NOTIFY_ALL" - ], - "file": "checkout.h", - "line": 179, - "lineto": 188, - "sections": [ - [ - "

Checkout notification flags

\n\n

Checkout will invoke an options notification callback (notify_cb) for\ncertain cases - you pick which ones via notify_flags:

\n\n\n\n

Returning a non-zero value from this callback will cancel the checkout.\nNotification callbacks are made prior to modifying any files on disk.

\n", - [ - "GIT_CHECKOUT_NOTIFY_NONE", - "GIT_CHECKOUT_NOTIFY_CONFLICT", - "GIT_CHECKOUT_NOTIFY_DIRTY", - "GIT_CHECKOUT_NOTIFY_UPDATED", - "GIT_CHECKOUT_NOTIFY_UNTRACKED", - "GIT_CHECKOUT_NOTIFY_IGNORED", - "GIT_CHECKOUT_NOTIFY_ALL" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [], - "returns": [] - } - } - ], - [ - "git_checkout_opts", - { - "block": "unsigned int version\nunsigned int checkout_strategy\nint disable_filters\nunsigned int dir_mode\nunsigned int file_mode\nint file_open_flags\nunsigned int notify_flags\ngit_checkout_notify_cb notify_cb\nvoid *notify_payload\ngit_checkout_progress_cb progress_cb\nvoid *progress_payload\ngit_strarray paths\ngit_tree *baseline\nconst char *target_directory\nconst char *our_label\nconst char *their_label", - "comments": "

Checkout options structure

\n\n

Zero out for defaults. Initialize with GIT_CHECKOUT_OPTS_INIT macro to\ncorrectly set the version field. E.g.

\n\n
git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;\n
\n", - "decl": [ - "unsigned int version", - "unsigned int checkout_strategy", - "int disable_filters", - "unsigned int dir_mode", - "unsigned int file_mode", - "int file_open_flags", - "unsigned int notify_flags", - "git_checkout_notify_cb notify_cb", - "void *notify_payload", - "git_checkout_progress_cb progress_cb", - "void *progress_payload", - "git_strarray paths", - "git_tree *baseline", - "const char *target_directory", - "const char *our_label", - "const char *their_label" - ], - "file": "checkout.h", - "line": 214, - "lineto": 244, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_checkout_head", - "git_checkout_index", - "git_checkout_tree", - "git_clone_into" - ], - "returns": [] - }, - "value": "git_checkout_opts" - } - ], - [ - "git_checkout_progress_cb", - { - "comments": "

Checkout progress notification function

\n", - "decl": "void (*git_checkout_progress_cb)(\n\tconst char *path,\n\tsize_t completed_steps,\n\tsize_t total_steps,\n\tvoid *payload)", - "file": "checkout.h", - "line": 200, - "lineto": 204, - "type": "function pointer", - "used": { - "needs": [], - "returns": [] - }, - "value": "git_checkout_progress_cb" - } - ], - [ - "git_clone_options", - { - "block": "unsigned int version\ngit_checkout_opts checkout_opts\ngit_remote_callbacks remote_callbacks\nint bare\nint ignore_cert_errors\nconst char *remote_name\nconst char* checkout_branch", - "comments": "

Clone options structure

\n\n

Use zeros to indicate default settings. It's easiest to use the\nGIT_CLONE_OPTIONS_INIT macro:

\n\n
git_clone_options opts = GIT_CLONE_OPTIONS_INIT;\n
\n\n\n\n

** "origin" remote options: **\n- remote_name is the name given to the "origin" remote. The default is\n "origin".\n- checkout_branch gives the name of the branch to checkout. NULL means\n use the remote's HEAD.

\n", - "decl": [ - "unsigned int version", - "git_checkout_opts checkout_opts", - "git_remote_callbacks remote_callbacks", - "int bare", - "int ignore_cert_errors", - "const char *remote_name", - "const char* checkout_branch" - ], - "file": "clone.h", - "line": 47, - "lineto": 60, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_clone" - ], - "returns": [] - }, - "value": "git_clone_options" - } - ], - [ - "git_commit", - { - "block": "", - "comments": "

Parsed representation of a commit object.

\n", - "decl": "", - "file": "types.h", - "line": 120, - "lineto": 120, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_branch_create", - "git_commit_author", - "git_commit_committer", - "git_commit_create", - "git_commit_free", - "git_commit_id", - "git_commit_lookup", - "git_commit_lookup_prefix", - "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_time", - "git_commit_time_offset", - "git_commit_tree", - "git_commit_tree_id" - ], - "returns": [] - }, - "value": "git_commit" - } - ], - [ - "git_config", - { - "block": "", - "comments": "

Memory representation of a set of config files

\n", - "decl": "", - "file": "types.h", - "line": 138, - "lineto": 138, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_config_add_backend", - "git_config_add_file_ondisk", - "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_mapped", - "git_config_get_multivar_foreach", - "git_config_get_string", - "git_config_iterator_glob_new", - "git_config_iterator_new", - "git_config_multivar_iterator_new", - "git_config_new", - "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_repository_config", - "git_repository_set_config" - ], - "returns": [] - }, - "value": "git_config" - } - ], - [ - "git_config_backend", - { - "block": "", - "comments": "

Interface to access a configuration file

\n", - "decl": "", - "file": "types.h", - "line": 141, - "lineto": 141, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_config_add_backend", - "git_config_backend_foreach_match" - ], - "returns": [] - }, - "value": "git_config_backend" - } - ], - [ - "git_config_iterator", - { - "block": "git_config_backend *backend\nunsigned int flags\nint (*next)(git_config_entry **entry, git_config_iterator *iter)\nvoid (*free)(git_config_iterator *iter)", - "comments": "

Every iterator must have this struct as its first element, so the\nAPI can talk to it. You'd define your iterator as

\n\n
struct my_iterator {\n        git_config_iterator parent;\n        ...\n}\n
\n\n

and assign iter->parent.backend to your git_config_backend.

\n", - "decl": [ - "git_config_backend *backend", - "unsigned int flags", - "int (*next)(git_config_entry **entry, git_config_iterator *iter)", - "void (*free)(git_config_iterator *iter)" - ], - "file": "sys/config.h", - "line": 34, - "lineto": 43, - "tdef": null, - "type": "struct", - "used": { - "needs": [ - "git_config_iterator_free", - "git_config_iterator_glob_new", - "git_config_iterator_new", - "git_config_multivar_iterator_new", - "git_config_next" - ], - "returns": [] - }, - "value": "git_config_iterator" - } - ], - [ - "git_cred_acquire_cb", - { - "comments": "

Signature of a function which acquires a credential object.

\n\n\n", - "decl": "int (*git_cred_acquire_cb)(\n\tgit_cred **cred,\n\tconst char *url,\n\tconst char *username_from_url,\n\tunsigned int allowed_types,\n\tvoid *payload)", - "file": "transport.h", - "line": 178, - "lineto": 268, - "type": "function pointer", - "used": { - "needs": [], - "returns": [] - }, - "value": "git_cred_acquire_cb" - } - ], - [ - "git_cred_default", - { - "block": "", - "comments": "

A key for NTLM/Kerberos "default" credentials

\n", - "decl": "", - "file": "transport.h", - "line": 91, - "lineto": 91, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [], - "returns": [] - }, - "value": "git_cred_default" - } - ], - [ - "git_cred_ssh_custom", - { - "block": "git_cred parent\nchar *username\nchar *publickey\nsize_t publickey_len\nvoid *sign_callback\nvoid *sign_data", - "comments": "

A key with a custom signature function

\n", - "decl": [ - "git_cred parent", - "char *username", - "char *publickey", - "size_t publickey_len", - "void *sign_callback", - "void *sign_data" - ], - "file": "transport.h", - "line": 81, - "lineto": 88, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [], - "returns": [] - }, - "value": "git_cred_ssh_custom" - } - ], - [ - "git_cred_ssh_key", - { - "block": "git_cred parent\nchar *username\nchar *publickey\nchar *privatekey\nchar *passphrase", - "comments": "

A ssh key from disk

\n", - "decl": [ - "git_cred parent", - "char *username", - "char *publickey", - "char *privatekey", - "char *passphrase" - ], - "file": "transport.h", - "line": 70, - "lineto": 76, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [], - "returns": [] - }, - "value": "git_cred_ssh_key" - } - ], - [ - "git_cred_userpass_payload", - { - "block": "char *username\nchar *password", - "comments": "

Payload for git_cred_stock_userpass_plaintext.

\n", - "decl": [ - "char *username", - "char *password" - ], - "file": "cred_helpers.h", - "line": 24, - "lineto": 27, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [], - "returns": [] - }, - "value": "git_cred_userpass_payload" - } - ], - [ - "git_cred_userpass_plaintext", - { - "block": "git_cred parent\nchar *username\nchar *password", - "comments": "

A plaintext username and password

\n", - "decl": [ - "git_cred parent", - "char *username", - "char *password" - ], - "file": "transport.h", - "line": 55, - "lineto": 65, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [], - "returns": [] - }, - "value": "git_cred_userpass_plaintext" - } - ], - [ - "git_credtype_t", - { - "block": "GIT_CREDTYPE_USERPASS_PLAINTEXT\nGIT_CREDTYPE_SSH_KEY\nGIT_CREDTYPE_SSH_CUSTOM\nGIT_CREDTYPE_DEFAULT", - "comments": "

Authentication type requested

\n", - "decl": [ - "GIT_CREDTYPE_USERPASS_PLAINTEXT", - "GIT_CREDTYPE_SSH_KEY", - "GIT_CREDTYPE_SSH_CUSTOM", - "GIT_CREDTYPE_DEFAULT" - ], - "file": "transport.h", - "line": 32, - "lineto": 52, - "sections": [ - [ - "

Authentication type requested

\n", - [ - "GIT_CREDTYPE_USERPASS_PLAINTEXT", - "GIT_CREDTYPE_SSH_KEY", - "GIT_CREDTYPE_SSH_CUSTOM", - "GIT_CREDTYPE_DEFAULT" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [], - "returns": [] - } - } - ], - [ - "git_delta_t", - { - "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", - "comments": "

What type of change is described by a git_diff_delta?

\n\n

GIT_DELTA_RENAMED and GIT_DELTA_COPIED will only show up if you run\ngit_diff_find_similar() on the diff object.

\n\n

GIT_DELTA_TYPECHANGE only shows up given GIT_DIFF_INCLUDE_TYPECHANGE\nin the option flags (otherwise type changes will be split into ADDED /\nDELETED pairs).

\n", - "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" - ], - "file": "diff.h", - "line": 219, - "lineto": 229, - "sections": [ - [ - "

What type of change is described by a git_diff_delta?

\n\n

GIT_DELTA_RENAMED and GIT_DELTA_COPIED will only show up if you run\ngit_diff_find_similar() on the diff object.

\n\n

GIT_DELTA_TYPECHANGE only shows up given GIT_DIFF_INCLUDE_TYPECHANGE\nin the option flags (otherwise type changes will be split into ADDED /\nDELETED pairs).

\n", - [ - "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" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [ - "git_diff_num_deltas_of_type", - "git_diff_status_char" - ], - "returns": [] - } - } - ], - [ - "git_diff", - { - "block": "", - "comments": "

The diff object that contains all individual file deltas.

\n\n

This is an opaque structure which will be allocated by one of the diff\ngenerator functions below (such as git_diff_tree_to_tree). You are\nresponsible for releasing the object memory when done, using the\ngit_diff_free() function.

\n", - "decl": "", - "file": "diff.h", - "line": 193, - "lineto": 193, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_diff_find_similar", - "git_diff_foreach", - "git_diff_free", - "git_diff_get_delta", - "git_diff_index_to_workdir", - "git_diff_is_sorted_icase", - "git_diff_merge", - "git_diff_num_deltas", - "git_diff_num_deltas_of_type", - "git_diff_print", - "git_diff_tree_to_index", - "git_diff_tree_to_tree", - "git_diff_tree_to_workdir", - "git_diff_tree_to_workdir_with_index", - "git_patch_from_diff", - "git_pathspec_match_diff" - ], - "returns": [] - }, - "value": "git_diff" - } - ], - [ - "git_diff_delta", - { - "block": "git_delta_t status\nuint32_t flags\nuint16_t similarity\nuint16_t nfiles\ngit_diff_file old_file\ngit_diff_file new_file", - "comments": "

Description of changes to one entry.

\n\n

When iterating over a diff, this will be passed to most callbacks and\nyou can use the contents to understand exactly what has changed.

\n\n

The old_file represents the "from" side of the diff and the new_file\nrepresents to "to" side of the diff. What those means depend on the\nfunction that was used to generate the diff and will be documented below.\nYou can also use the GIT_DIFF_REVERSE flag to flip it around.

\n\n

Although the two sides of the delta are named "old_file" and "new_file",\nthey actually may correspond to entries that represent a file, a symbolic\nlink, a submodule commit id, or even a tree (if you are tracking type\nchanges or ignored/untracked directories).

\n\n

Under some circumstances, in the name of efficiency, not all fields will\nbe filled in, but we generally try to fill in as much as possible. One\nexample is that the "flags" field may not have either the BINARY or the\nNOT_BINARY flag set to avoid examining file contents if you do not pass\nin hunk and/or line callbacks to the diff foreach iteration function. It\nwill just use the git attributes for those files.

\n\n

The similarity score is zero unless you call git_diff_find_similar()\nwhich does a similarity analysis of files in the diff. Use that\nfunction to do rename and copy detection, and to split heavily modified\nfiles in add/delete pairs. After that call, deltas with a status of\nGIT_DELTA_RENAMED or GIT_DELTA_COPIED will have a similarity score\nbetween 0 and 100 indicating how similar the old and new sides are.

\n\n

If you ask git_diff_find_similar to find heavily modified files to\nbreak, but to not actually break the records, then GIT_DELTA_MODIFIED\nrecords may have a non-zero similarity score if the self-similarity is\nbelow the split threshold. To display this value like core Git, invert\nthe score (a la printf("M%03d", 100 - delta->similarity)).

\n", - "decl": [ - "git_delta_t status", - "uint32_t flags", - "uint16_t similarity", - "uint16_t nfiles", - "git_diff_file old_file", - "git_diff_file new_file" - ], - "file": "diff.h", - "line": 296, - "lineto": 303, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [], - "returns": [ - "git_diff_get_delta", - "git_patch_get_delta", - "git_pathspec_match_list_diff_entry" - ] - }, - "value": "git_diff_delta" - } - ], - [ - "git_diff_file", - { - "block": "git_oid oid\nconst char *path\ngit_off_t size\nuint32_t flags\nuint16_t mode", - "comments": "

Description of one side of a delta.

\n\n

Although this is called a "file", it could represent a file, a symbolic\nlink, a submodule commit id, or even a tree (although that only if you\nare tracking type changes or ignored/untracked directories).

\n\n

The oid is the git_oid of the item. If the entry represents an\nabsent side of a diff (e.g. the old_file of a GIT_DELTA_ADDED delta),\nthen the oid will be zeroes.

\n\n

path is the NUL-terminated path to the entry relative to the working\ndirectory of the repository.

\n\n

size is the size of the entry in bytes.

\n\n

flags is a combination of the git_diff_flag_t types

\n\n

mode is, roughly, the stat() st_mode value for the item. This will\nbe restricted to one of the git_filemode_t values.

\n", - "decl": [ - "git_oid oid", - "const char *path", - "git_off_t size", - "uint32_t flags", - "uint16_t mode" - ], - "file": "diff.h", - "line": 252, - "lineto": 258, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [], - "returns": [] - }, - "value": "git_diff_file" - } - ], - [ - "git_diff_file_cb", - { - "comments": "

When iterating over a diff, callback that will be made per file.

\n\n

@param delta A pointer to the delta data for the file\n@param progress Goes from 0 to 1 over the diff\n@param payload User-specified pointer from foreach function

\n", - "decl": "int (*git_diff_file_cb)(\n\tconst git_diff_delta *delta,\n\tfloat progress,\n\tvoid *payload)", - "file": "diff.h", - "line": 386, - "lineto": 389, - "type": "function pointer", - "used": { - "needs": [ - "git_diff_blob_to_buffer", - "git_diff_blobs", - "git_diff_foreach" - ], - "returns": [] - }, - "value": "git_diff_file_cb" - } - ], - [ - "git_diff_find_options", - { - "block": "unsigned int version\nuint32_t flags\nuint16_t rename_threshold\nuint16_t rename_from_rewrite_threshold\nuint16_t copy_threshold\nuint16_t break_rewrite_threshold\nsize_t rename_limit\ngit_diff_similarity_metric *metric", - "comments": "

Control behavior of rename and copy detection

\n\n

These options mostly mimic parameters that can be passed to git-diff.

\n\n\n\n

The metric option allows you to plug in a custom similarity metric.\nSet it to NULL for the default internal metric which is based on sampling\nhashes of ranges of data in the file. The default metric is a pretty\ngood similarity approximation that should work fairly well for both text\nand binary data, and is pretty fast with fixed memory overhead.

\n", - "decl": [ - "unsigned int version", - "uint32_t flags", - "uint16_t rename_threshold", - "uint16_t rename_from_rewrite_threshold", - "uint16_t copy_threshold", - "uint16_t break_rewrite_threshold", - "size_t rename_limit", - "git_diff_similarity_metric *metric" - ], - "file": "diff.h", - "line": 543, - "lineto": 566, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_diff_find_similar" - ], - "returns": [] - }, - "value": "git_diff_find_options" - } - ], - [ - "git_diff_flag_t", - { - "block": "GIT_DIFF_FLAG_BINARY\nGIT_DIFF_FLAG_NOT_BINARY\nGIT_DIFF_FLAG_VALID_OID", - "comments": "

Flags for the delta object and the file objects on each side.

\n\n

These flags are used for both the flags value of the git_diff_delta\nand the flags for the git_diff_file objects representing the old and\nnew sides of the delta. Values outside of this public range should be\nconsidered reserved for internal or future use.

\n", - "decl": [ - "GIT_DIFF_FLAG_BINARY", - "GIT_DIFF_FLAG_NOT_BINARY", - "GIT_DIFF_FLAG_VALID_OID" - ], - "file": "diff.h", - "line": 203, - "lineto": 207, - "sections": [ - [ - "

Flags for the delta object and the file objects on each side.

\n\n

These flags are used for both the flags value of the git_diff_delta\nand the flags for the git_diff_file objects representing the old and\nnew sides of the delta. Values outside of this public range should be\nconsidered reserved for internal or future use.

\n", - [ - "GIT_DIFF_FLAG_BINARY", - "GIT_DIFF_FLAG_NOT_BINARY", - "GIT_DIFF_FLAG_VALID_OID" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [], - "returns": [] - } - } - ], - [ - "git_diff_format_t", - { - "block": "GIT_DIFF_FORMAT_PATCH\nGIT_DIFF_FORMAT_PATCH_HEADER\nGIT_DIFF_FORMAT_RAW\nGIT_DIFF_FORMAT_NAME_ONLY\nGIT_DIFF_FORMAT_NAME_STATUS", - "comments": "

Possible output formats for diff data

\n", - "decl": [ - "GIT_DIFF_FORMAT_PATCH", - "GIT_DIFF_FORMAT_PATCH_HEADER", - "GIT_DIFF_FORMAT_RAW", - "GIT_DIFF_FORMAT_NAME_ONLY", - "GIT_DIFF_FORMAT_NAME_STATUS" - ], - "file": "diff.h", - "line": 872, - "lineto": 878, - "sections": [ - [ - "

Possible output formats for diff data

\n", - [ - "GIT_DIFF_FORMAT_PATCH", - "GIT_DIFF_FORMAT_PATCH_HEADER", - "GIT_DIFF_FORMAT_RAW", - "GIT_DIFF_FORMAT_NAME_ONLY", - "GIT_DIFF_FORMAT_NAME_STATUS" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [ - "git_diff_print" - ], - "returns": [] - } - } - ], - [ - "git_diff_hunk", - { - "block": "", - "comments": "

Structure describing a hunk of a diff.

\n", - "decl": "", - "file": "diff.h", - "line": 394, - "lineto": 402, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_patch_get_hunk" - ], - "returns": [] - }, - "value": "git_diff_hunk" - } - ], - [ - "git_diff_hunk_cb", - { - "comments": "

When iterating over a diff, callback that will be made per hunk.

\n", - "decl": "int (*git_diff_hunk_cb)(\n\tconst git_diff_delta *delta,\n\tconst git_diff_hunk *hunk,\n\tvoid *payload)", - "file": "diff.h", - "line": 407, - "lineto": 410, - "type": "function pointer", - "used": { - "needs": [ - "git_diff_blob_to_buffer", - "git_diff_blobs", - "git_diff_foreach" - ], - "returns": [] - }, - "value": "git_diff_hunk_cb" - } - ], - [ - "git_diff_line", - { - "block": "", - "comments": "

Structure describing a line (or data span) of a diff.

\n", - "decl": "", - "file": "diff.h", - "line": 442, - "lineto": 451, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_patch_get_line_in_hunk" - ], - "returns": [] - }, - "value": "git_diff_line" - } - ], - [ - "git_diff_line_t", - { - "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", - "comments": "

Line origin constants.

\n\n

These values describe where a line came from and will be passed to\nthe git_diff_line_cb when iterating over a diff. There are some\nspecial origin constants at the end that are used for the text\noutput callbacks to demarcate lines that are actually part of\nthe file or hunk headers.

\n", - "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" - ], - "file": "diff.h", - "line": 421, - "lineto": 437, - "sections": [ - [ - "

Line origin constants.

\n\n

These values describe where a line came from and will be passed to\nthe git_diff_line_cb when iterating over a diff. There are some\nspecial origin constants at the end that are used for the text\noutput callbacks to demarcate lines that are actually part of\nthe file or hunk headers.

\n", - [ - "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" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [], - "returns": [] - } - } - ], - [ - "git_diff_notify_cb", - { - "comments": "

Diff notification callback function.

\n\n

The callback will be called for each file, just before the git_delta_t\ngets inserted into the diff.

\n\n

When the callback:\n- returns < 0, the diff process will be aborted.\n- returns > 0, the delta will not be inserted into the diff, but the\n diff process continues.\n- returns 0, the delta is inserted into the diff, and the diff process\n continues.

\n", - "decl": "int (*git_diff_notify_cb)(\n\tconst git_diff *diff_so_far,\n\tconst git_diff_delta *delta_to_add,\n\tconst char *matched_pathspec,\n\tvoid *payload)", - "file": "diff.h", - "line": 318, - "lineto": 322, - "type": "function pointer", - "used": { - "needs": [], - "returns": [] - }, - "value": "git_diff_notify_cb" - } - ], - [ - "git_diff_options", - { - "block": "unsigned int version\nuint32_t flags\ngit_submodule_ignore_t ignore_submodules\ngit_strarray pathspec\ngit_diff_notify_cb notify_cb\nvoid *notify_payload\nuint16_t context_lines\nuint16_t interhunk_lines\nuint16_t oid_abbrev\ngit_off_t max_size\nconst char *old_prefix\nconst char *new_prefix", - "comments": "

Structure describing options about how the diff should be executed.

\n\n

Setting all values of the structure to zero will yield the default\nvalues. Similarly, passing NULL for the options structure will\ngive the defaults. The default values are marked below.

\n\n\n", - "decl": [ - "unsigned int version", - "uint32_t flags", - "git_submodule_ignore_t ignore_submodules", - "git_strarray pathspec", - "git_diff_notify_cb notify_cb", - "void *notify_payload", - "uint16_t context_lines", - "uint16_t interhunk_lines", - "uint16_t oid_abbrev", - "git_off_t max_size", - "const char *old_prefix", - "const char *new_prefix" - ], - "file": "diff.h", - "line": 349, - "lineto": 377, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_diff_blob_to_buffer", - "git_diff_blobs", - "git_diff_index_to_workdir", - "git_diff_options_init", - "git_diff_tree_to_index", - "git_diff_tree_to_tree", - "git_diff_tree_to_workdir", - "git_diff_tree_to_workdir_with_index", - "git_patch_from_blob_and_buffer", - "git_patch_from_blobs" - ], - "returns": [] - }, - "value": "git_diff_options" - } - ], - [ - "git_diff_similarity_metric", - { - "block": "int (*file_signature)(void **out, const git_diff_file *file, const char *fullpath, void *payload)\nint (*buffer_signature)(void **out, const git_diff_file *file, const char *buf, size_t buflen, void *payload)\nvoid (*free_signature)(void *sig, void *payload)\nint (*similarity)(int *score, void *siga, void *sigb, void *payload)\nvoid *payload", - "comments": "

Pluggable similarity metric

\n", - "decl": [ - "int (*file_signature)(void **out, const git_diff_file *file, const char *fullpath, void *payload)", - "int (*buffer_signature)(void **out, const git_diff_file *file, const char *buf, size_t buflen, void *payload)", - "void (*free_signature)(void *sig, void *payload)", - "int (*similarity)(int *score, void *siga, void *sigb, void *payload)", - "void *payload" - ], - "file": "diff.h", - "line": 511, - "lineto": 521, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [], - "returns": [] - }, - "value": "git_diff_similarity_metric" - } - ], - [ - "git_error_code", - { - "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_PASSTHROUGH\nGIT_ITEROVER", - "comments": "

Generic return codes

\n", - "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_PASSTHROUGH", - "GIT_ITEROVER" - ], - "file": "errors.h", - "line": 22, - "lineto": 45, - "sections": [ - [ - "

Generic return codes

\n", - [ - "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_PASSTHROUGH", - "GIT_ITEROVER" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [], - "returns": [] - } - } - ], - [ - "git_error_t", - { - "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", - "comments": "

Error classes

\n", - "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" - ], - "file": "errors.h", - "line": 48, - "lineto": 74, - "sections": [ - [ - "

Error classes

\n", - [ - "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" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [], - "returns": [] - } - } - ], - [ - "git_filemode_t", - { - "block": "GIT_FILEMODE_NEW\nGIT_FILEMODE_TREE\nGIT_FILEMODE_BLOB\nGIT_FILEMODE_BLOB_EXECUTABLE\nGIT_FILEMODE_LINK\nGIT_FILEMODE_COMMIT", - "comments": "

Valid modes for index and tree entries.

\n", - "decl": [ - "GIT_FILEMODE_NEW", - "GIT_FILEMODE_TREE", - "GIT_FILEMODE_BLOB", - "GIT_FILEMODE_BLOB_EXECUTABLE", - "GIT_FILEMODE_LINK", - "GIT_FILEMODE_COMMIT" - ], - "file": "types.h", - "line": 199, - "lineto": 213, - "sections": [ - [ - "

Valid modes for index and tree entries.

\n", - [ - "GIT_FILEMODE_NEW", - "GIT_FILEMODE_TREE", - "GIT_FILEMODE_BLOB", - "GIT_FILEMODE_BLOB_EXECUTABLE", - "GIT_FILEMODE_LINK", - "GIT_FILEMODE_COMMIT" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [ - "git_treebuilder_insert" - ], - "returns": [] - } - } - ], - [ - "git_filter", - { - "block": "unsigned int version\nconst char *attributes\ngit_filter_init_fn initialize\ngit_filter_shutdown_fn shutdown\ngit_filter_check_fn check\ngit_filter_apply_fn apply\ngit_filter_cleanup_fn cleanup", - "comments": "

Filter structure used to register custom filters.

\n\n

To associate extra data with a filter, allocate extra data and put the\ngit_filter struct at the start of your data buffer, then cast the\nself pointer to your larger structure when your callback is invoked.

\n\n

version should be set to GIT_FILTER_VERSION

\n\n

attributes is a whitespace-separated list of attribute names to check\nfor this filter (e.g. "eol crlf text"). If the attribute name is bare,\nit will be simply loaded and passed to the check callback. If it has\na value (i.e. "name=value"), the attribute must match that value for\nthe filter to be applied.

\n\n

The initialize, shutdown, check, apply, and cleanup callbacks\nare all documented above with the respective function pointer typedefs.

\n", - "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" - ], - "file": "sys/filter.h", - "line": 232, - "lineto": 244, - "tdef": null, - "type": "struct", - "used": { - "needs": [ - "git_filter_list_push", - "git_filter_register" - ], - "returns": [ - "git_filter_lookup" - ] - }, - "value": "git_filter" - } - ], - [ - "git_filter_apply_fn", - { - "comments": "

Callback to actually perform the data filtering

\n\n

Specified as filter.apply, this is the callback that actually filters\ndata. If it successfully writes the output, it should return 0. Like\ncheck, it can return GIT_PASSTHROUGH to indicate that the filter\ndoesn't want to run. Other error codes will stop filter processing and\nreturn to the caller.

\n\n

The payload value will refer to any payload that was set by the\ncheck callback. It may be read from or written to as needed.

\n", - "decl": "int (*git_filter_apply_fn)(\n\tgit_filter *self,\n\tvoid **payload, \n\tgit_buf *to,\n\tconst git_buf *from,\n\tconst git_filter_source *src)", - "file": "sys/filter.h", - "line": 195, - "lineto": 200, - "type": "function pointer", - "used": { - "needs": [], - "returns": [] - }, - "value": "git_filter_apply_fn" - } - ], - [ - "git_filter_check_fn", - { - "comments": "

Callback to decide if a given source needs this filter

\n\n

Specified as filter.check, this is an optional callback that checks\nif filtering is needed for a given source.

\n\n

It should return 0 if the filter should be applied (i.e. success),\nGIT_PASSTHROUGH if the filter should not be applied, or an error code\nto fail out of the filter processing pipeline and return to the caller.

\n\n

The attr_values will be set to the values of any attributes given in\nthe filter definition. See git_filter below for more detail.

\n\n

The payload will be a pointer to a reference payload for the filter.\nThis will start as NULL, but check can assign to this pointer for\nlater use by the apply callback. Note that the value should be heap\nallocated (not stack), so that it doesn't go away before the apply\ncallback can use it. If a filter allocates and assigns a value to the\npayload, it will need a cleanup callback to free the payload.

\n", - "decl": "int (*git_filter_check_fn)(\n\tgit_filter *self,\n\tvoid **payload, \n\tconst git_filter_source *src,\n\tconst char **attr_values)", - "file": "sys/filter.h", - "line": 177, - "lineto": 181, - "type": "function pointer", - "used": { - "needs": [], - "returns": [] - }, - "value": "git_filter_check_fn" - } - ], - [ - "git_filter_cleanup_fn", - { - "comments": "

Callback to clean up after filtering has been applied

\n\n

Specified as filter.cleanup, this is an optional callback invoked\nafter the filter has been applied. If the check or apply callbacks\nallocated a payload to keep per-source filter state, use this\ncallback to free that payload and release resources as required.

\n", - "decl": "void (*git_filter_cleanup_fn)(\n\tgit_filter *self,\n\tvoid *payload)", - "file": "sys/filter.h", - "line": 210, - "lineto": 212, - "type": "function pointer", - "used": { - "needs": [], - "returns": [] - }, - "value": "git_filter_cleanup_fn" - } - ], - [ - "git_filter_init_fn", - { - "comments": "

Initialize callback on filter

\n\n

Specified as filter.initialize, this is an optional callback invoked\nbefore a filter is first used. It will be called once at most.

\n\n

If non-NULL, the filter's initialize callback will be invoked right\nbefore the first use of the filter, so you can defer expensive\ninitialization operations (in case libgit2 is being used in a way that\ndoesn't need the filter).

\n", - "decl": "int (*git_filter_init_fn)(git_filter *self)", - "file": "sys/filter.h", - "line": 144, - "lineto": 144, - "type": "function pointer", - "used": { - "needs": [], - "returns": [] - }, - "value": "git_filter_init_fn" - } - ], - [ - "git_filter_list", - { - "block": "", - "comments": "

List of filters to be applied

\n\n

This represents a list of filters to be applied to a file / blob. You\ncan build the list with one call, apply it with another, and dispose it\nwith a third. In typical usage, there are not many occasions where a\ngit_filter_list is needed directly since the library will generally\nhandle conversions for you, but it can be convenient to be able to\nbuild and apply the list sometimes.

\n", - "decl": "", - "file": "filter.h", - "line": 65, - "lineto": 65, - "tdef": "typedef", - "type": "struct", - "used": { - "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_length", - "git_filter_list_load", - "git_filter_list_new", - "git_filter_list_push" - ], - "returns": [] - }, - "value": "git_filter_list" - } - ], - [ - "git_filter_mode_t", - { - "block": "GIT_FILTER_TO_WORKTREE\nGIT_FILTER_SMUDGE\nGIT_FILTER_TO_ODB\nGIT_FILTER_CLEAN", - "comments": "

Filters are applied in one of two directions: smudging - which is\nexporting a file from the Git object database to the working directory,\nand cleaning - which is importing a file from the working directory to\nthe Git object database. These values control which direction of\nchange is being applied.

\n", - "decl": [ - "GIT_FILTER_TO_WORKTREE", - "GIT_FILTER_SMUDGE", - "GIT_FILTER_TO_ODB", - "GIT_FILTER_CLEAN" - ], - "file": "filter.h", - "line": 31, - "lineto": 36, - "sections": [ - [ - "

Filters are applied in one of two directions: smudging - which is\nexporting a file from the Git object database to the working directory,\nand cleaning - which is importing a file from the working directory to\nthe Git object database. These values control which direction of\nchange is being applied.

\n", - [ - "GIT_FILTER_TO_WORKTREE", - "GIT_FILTER_SMUDGE", - "GIT_FILTER_TO_ODB", - "GIT_FILTER_CLEAN" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [ - "git_filter_list_load", - "git_filter_list_new" - ], - "returns": [] - } - } - ], - [ - "git_filter_shutdown_fn", - { - "comments": "

Shutdown callback on filter

\n\n

Specified as filter.shutdown, this is an optional callback invoked\nwhen the filter is unregistered or when libgit2 is shutting down. It\nwill be called once at most and should release resources as needed.

\n\n

Typically this function will free the git_filter object itself.

\n", - "decl": "void (*git_filter_shutdown_fn)(git_filter *self)", - "file": "sys/filter.h", - "line": 155, - "lineto": 155, - "type": "function pointer", - "used": { - "needs": [], - "returns": [] - }, - "value": "git_filter_shutdown_fn" - } - ], - [ - "git_filter_source", - { - "block": "", - "comments": "

A filter source represents a file/blob to be processed

\n", - "decl": "", - "file": "sys/filter.h", - "line": 92, - "lineto": 92, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_filter_source_filemode", - "git_filter_source_id", - "git_filter_source_mode", - "git_filter_source_path", - "git_filter_source_repo" - ], - "returns": [] - }, - "value": "git_filter_source" - } - ], - [ - "git_headlist_cb", - { - "comments": "

Callback for listing the remote heads

\n", - "decl": "int (*git_headlist_cb)(git_remote_head *rhead, void *payload)", - "file": "net.h", - "line": 49, - "lineto": 49, - "type": "function pointer", - "used": { - "needs": [], - "returns": [] - }, - "value": "git_headlist_cb" - } - ], - [ - "git_index", - { - "block": "", - "comments": "

Memory representation of an index file.

\n", - "decl": "", - "file": "types.h", - "line": 132, - "lineto": 132, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_checkout_index", - "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_new", - "git_index_conflict_remove", - "git_index_entrycount", - "git_index_find", - "git_index_free", - "git_index_get_byindex", - "git_index_get_bypath", - "git_index_has_conflicts", - "git_index_name_add", - "git_index_name_clear", - "git_index_name_entrycount", - "git_index_name_get_byindex", - "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_reuc_add", - "git_index_reuc_clear", - "git_index_reuc_entrycount", - "git_index_reuc_find", - "git_index_reuc_get_byindex", - "git_index_reuc_get_bypath", - "git_index_reuc_remove", - "git_index_set_caps", - "git_index_update_all", - "git_index_write", - "git_index_write_tree", - "git_index_write_tree_to", - "git_merge_trees", - "git_pathspec_match_index", - "git_repository_index", - "git_repository_set_index" - ], - "returns": [] - }, - "value": "git_index" - } - ], - [ - "git_index_add_option_t", - { - "block": "GIT_INDEX_ADD_DEFAULT\nGIT_INDEX_ADD_FORCE\nGIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH\nGIT_INDEX_ADD_CHECK_PATHSPEC", - "comments": "

Flags for APIs that add files matching pathspec

\n", - "decl": [ - "GIT_INDEX_ADD_DEFAULT", - "GIT_INDEX_ADD_FORCE", - "GIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH", - "GIT_INDEX_ADD_CHECK_PATHSPEC" - ], - "file": "index.h", - "line": 134, - "lineto": 139, - "sections": [ - [ - "

Flags for APIs that add files matching pathspec

\n", - [ - "GIT_INDEX_ADD_DEFAULT", - "GIT_INDEX_ADD_FORCE", - "GIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH", - "GIT_INDEX_ADD_CHECK_PATHSPEC" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [], - "returns": [] - } - } - ], - [ - "git_index_conflict_iterator", - { - "block": "", - "comments": "

An interator for conflicts in the index.

\n", - "decl": "", - "file": "types.h", - "line": 135, - "lineto": 135, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_index_conflict_iterator_free", - "git_index_conflict_iterator_new", - "git_index_conflict_next" - ], - "returns": [] - }, - "value": "git_index_conflict_iterator" - } - ], - [ - "git_index_entry", - { - "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 oid\nunsigned short flags\nunsigned short flags_extended\nchar *path", - "comments": "

In-memory representation of a file entry in the index.

\n\n

This is a public structure that represents a file entry in the index.\nThe meaning of the fields corresponds to core Git's documentation (in\n"Documentation/technical/index-format.txt").

\n\n

The flags field consists of a number of bit fields which can be\naccessed via the first set of GIT_IDXENTRY_... bitmasks below. These\nflags are all read from and persisted to disk.

\n\n

The flags_extended field also has a number of bit fields which can be\naccessed via the later GIT_IDXENTRY_... bitmasks below. Some of\nthese flags are read from and written to disk, but some are set aside\nfor in-memory only reference.

\n", - "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 oid", - "unsigned short flags", - "unsigned short flags_extended", - "char *path" - ], - "file": "index.h", - "line": 48, - "lineto": 65, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_index_add", - "git_index_conflict_add", - "git_index_conflict_get", - "git_index_conflict_next", - "git_index_entry_stage" - ], - "returns": [ - "git_index_get_byindex", - "git_index_get_bypath" - ] - }, - "value": "git_index_entry" - } - ], - [ - "git_index_matched_path_cb", - { - "comments": "

Callback for APIs that add/remove/update files matching pathspec

\n", - "decl": "int (*git_index_matched_path_cb)(\n\tconst char *path, const char *matched_pathspec, void *payload)", - "file": "index.h", - "line": 130, - "lineto": 131, - "type": "function pointer", - "used": { - "needs": [ - "git_index_add_all", - "git_index_remove_all", - "git_index_update_all" - ], - "returns": [] - }, - "value": "git_index_matched_path_cb" - } - ], - [ - "git_index_name_entry", - { - "block": "char *ancestor\nchar *ours\nchar *theirs", - "comments": "

Representation of a rename conflict entry in the index.

\n", - "decl": [ - "char *ancestor", - "char *ours", - "char *theirs" - ], - "file": "sys/index.h", - "line": 20, - "lineto": 24, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [], - "returns": [ - "git_index_name_get_byindex" - ] - }, - "value": "git_index_name_entry" - } - ], - [ - "git_index_reuc_entry", - { - "block": "unsigned int mode[3]\ngit_oid oid[3]\nchar *path", - "comments": "

Representation of a resolve undo entry in the index.

\n", - "decl": [ - "unsigned int mode[3]", - "git_oid oid[3]", - "char *path" - ], - "file": "sys/index.h", - "line": 27, - "lineto": 31, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [], - "returns": [ - "git_index_reuc_get_byindex", - "git_index_reuc_get_bypath" - ] - }, - "value": "git_index_reuc_entry" - } - ], - [ - "git_index_time", - { - "block": "git_time_t seconds\nunsigned int nanoseconds", - "comments": "

Time structure used in a git index entry

\n", - "decl": [ - "git_time_t seconds", - "unsigned int nanoseconds" - ], - "file": "index.h", - "line": 26, - "lineto": 30, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [], - "returns": [] - }, - "value": "git_index_time" - } - ], - [ - "git_indexcap_t", - { - "block": "GIT_INDEXCAP_IGNORE_CASE\nGIT_INDEXCAP_NO_FILEMODE\nGIT_INDEXCAP_NO_SYMLINKS\nGIT_INDEXCAP_FROM_OWNER", - "comments": "

Capabilities of system that affect index actions.

\n", - "decl": [ - "GIT_INDEXCAP_IGNORE_CASE", - "GIT_INDEXCAP_NO_FILEMODE", - "GIT_INDEXCAP_NO_SYMLINKS", - "GIT_INDEXCAP_FROM_OWNER" - ], - "file": "index.h", - "line": 122, - "lineto": 127, - "sections": [ - [ - "

Capabilities of system that affect index actions.

\n", - [ - "GIT_INDEXCAP_IGNORE_CASE", - "GIT_INDEXCAP_NO_FILEMODE", - "GIT_INDEXCAP_NO_SYMLINKS", - "GIT_INDEXCAP_FROM_OWNER" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [], - "returns": [] - } - } - ], - [ - "git_merge_automerge_flags", - { - "block": "GIT_MERGE_AUTOMERGE_NORMAL\nGIT_MERGE_AUTOMERGE_NONE\nGIT_MERGE_AUTOMERGE_FAVOR_OURS\nGIT_MERGE_AUTOMERGE_FAVOR_THEIRS", - "comments": "

Automerge options for git_merge_trees_opts.

\n", - "decl": [ - "GIT_MERGE_AUTOMERGE_NORMAL", - "GIT_MERGE_AUTOMERGE_NONE", - "GIT_MERGE_AUTOMERGE_FAVOR_OURS", - "GIT_MERGE_AUTOMERGE_FAVOR_THEIRS" - ], - "file": "merge.h", - "line": 37, - "lineto": 63, - "sections": [ - [ - "

Automerge options for git_merge_trees_opts.

\n", - [ - "GIT_MERGE_AUTOMERGE_NORMAL", - "GIT_MERGE_AUTOMERGE_NONE", - "GIT_MERGE_AUTOMERGE_FAVOR_OURS", - "GIT_MERGE_AUTOMERGE_FAVOR_THEIRS" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [], - "returns": [] - } - } - ], - [ - "git_merge_flags_t", - { - "block": "GIT_MERGE_NO_FASTFORWARD\nGIT_MERGE_FASTFORWARD_ONLY", - "comments": "

Option flags for git_merge.

\n\n

GIT_MERGE_NO_FASTFORWARD - Do not fast-forward.

\n", - "decl": [ - "GIT_MERGE_NO_FASTFORWARD", - "GIT_MERGE_FASTFORWARD_ONLY" - ], - "file": "merge.h", - "line": 73, - "lineto": 88, - "sections": [ - [ - "

Option flags for git_merge.

\n\n

GIT_MERGE_NO_FASTFORWARD - Do not fast-forward.

\n", - [ - "GIT_MERGE_NO_FASTFORWARD", - "GIT_MERGE_FASTFORWARD_ONLY" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [], - "returns": [] - } - } - ], - [ - "git_merge_head", - { - "block": "", - "comments": "

Merge heads, the input to merge

\n", - "decl": "", - "file": "types.h", - "line": 175, - "lineto": 175, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_merge", - "git_merge_head_free", - "git_merge_head_from_fetchhead", - "git_merge_head_from_oid", - "git_merge_head_from_ref" - ], - "returns": [] - }, - "value": "git_merge_head" - } - ], - [ - "git_merge_result", - { - "block": "", - "comments": "

Merge result

\n", - "decl": "", - "file": "types.h", - "line": 178, - "lineto": 178, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_merge", - "git_merge_result_fastforward_oid", - "git_merge_result_is_fastforward", - "git_merge_result_is_uptodate" - ], - "returns": [] - }, - "value": "git_merge_result" - } - ], - [ - "git_merge_tree_flag_t", - { - "block": "GIT_MERGE_TREE_FIND_RENAMES", - "comments": "

Flags for git_merge_tree options. A combination of these flags can be\npassed in via the flags value in the git_merge_tree_opts.

\n", - "decl": [ - "GIT_MERGE_TREE_FIND_RENAMES" - ], - "file": "merge.h", - "line": 29, - "lineto": 32, - "sections": [ - [ - "

Flags for git_merge_tree options. A combination of these flags can be\npassed in via the flags value in the git_merge_tree_opts.

\n", - [ - "GIT_MERGE_TREE_FIND_RENAMES" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [], - "returns": [] - } - } - ], - [ - "git_note", - { - "block": "", - "comments": "

Representation of a git note

\n", - "decl": "", - "file": "types.h", - "line": 150, - "lineto": 150, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_note_free", - "git_note_message", - "git_note_oid", - "git_note_read" - ], - "returns": [] - }, - "value": "git_note" - } - ], - [ - "git_note_foreach_cb", - { - "comments": "

Callback for git_note_foreach.

\n\n

Receives:\n- blob_id: Oid of the blob containing the message\n- annotated_object_id: Oid of the git object being annotated\n- payload: Payload data passed to git_note_foreach

\n", - "decl": "int (*git_note_foreach_cb)(\n\tconst git_oid *blob_id, const git_oid *annotated_object_id, void *payload)", - "file": "notes.h", - "line": 29, - "lineto": 30, - "type": "function pointer", - "used": { - "needs": [ - "git_note_foreach" - ], - "returns": [] - }, - "value": "git_note_foreach_cb" - } - ], - [ - "git_note_iterator", - { - "block": "", - "comments": "

note iterator

\n", - "decl": "", - "file": "notes.h", - "line": 35, - "lineto": 35, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_note_iterator_free", - "git_note_iterator_new", - "git_note_next" - ], - "returns": [] - }, - "value": "git_note_iterator" - } - ], - [ - "git_object", - { - "block": "", - "comments": "

Representation of a generic object in a repository

\n", - "decl": "", - "file": "types.h", - "line": 108, - "lineto": 108, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_checkout_tree", - "git_object_dup", - "git_object_free", - "git_object_id", - "git_object_lookup", - "git_object_lookup_bypath", - "git_object_lookup_prefix", - "git_object_owner", - "git_object_peel", - "git_object_type", - "git_reference_peel", - "git_reset", - "git_reset_default", - "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" - ], - "returns": [] - }, - "value": "git_object" - } - ], - [ - "git_odb", - { - "block": "", - "comments": "

An open object database handle.

\n", - "decl": "", - "file": "types.h", - "line": 81, - "lineto": 81, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_indexer_new", - "git_odb_add_alternate", - "git_odb_add_backend", - "git_odb_add_disk_alternate", - "git_odb_exists", - "git_odb_foreach", - "git_odb_free", - "git_odb_get_backend", - "git_odb_new", - "git_odb_num_backends", - "git_odb_open", - "git_odb_open_rstream", - "git_odb_open_wstream", - "git_odb_read", - "git_odb_read_header", - "git_odb_read_prefix", - "git_odb_refresh", - "git_odb_write", - "git_odb_write_pack", - "git_repository_odb", - "git_repository_set_odb", - "git_repository_wrap_odb" - ], - "returns": [] - }, - "value": "git_odb" - } - ], - [ - "git_odb_backend", - { - "block": "", - "comments": "

A custom backend in an ODB

\n", - "decl": "", - "file": "types.h", - "line": 84, - "lineto": 84, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_odb_add_alternate", - "git_odb_add_backend", - "git_odb_backend_loose", - "git_odb_backend_one_pack", - "git_odb_backend_pack", - "git_odb_get_backend" - ], - "returns": [] - }, - "value": "git_odb_backend" - } - ], - [ - "git_odb_foreach_cb", - { - "comments": "

Function type for callbacks from git_odb_foreach.

\n", - "decl": "int (*git_odb_foreach_cb)(const git_oid *id, void *payload)", - "file": "odb.h", - "line": 26, - "lineto": 26, - "type": "function pointer", - "used": { - "needs": [ - "git_odb_foreach" - ], - "returns": [] - }, - "value": "git_odb_foreach_cb" - } - ], - [ - "git_odb_object", - { - "block": "", - "comments": "

An object read from the ODB

\n", - "decl": "", - "file": "types.h", - "line": 87, - "lineto": 87, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_odb_object_data", - "git_odb_object_dup", - "git_odb_object_free", - "git_odb_object_id", - "git_odb_object_size", - "git_odb_object_type", - "git_odb_read", - "git_odb_read_prefix" - ], - "returns": [] - }, - "value": "git_odb_object" - } - ], - [ - "git_odb_stream", - { - "block": "", - "comments": "

A stream to read/write from the ODB

\n", - "decl": "", - "file": "types.h", - "line": 90, - "lineto": 90, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_odb_open_rstream", - "git_odb_open_wstream", - "git_odb_stream_finalize_write", - "git_odb_stream_free", - "git_odb_stream_read", - "git_odb_stream_write" - ], - "returns": [] - }, - "value": "git_odb_stream" - } - ], - [ - "git_odb_stream_t", - { - "block": "GIT_STREAM_RDONLY\nGIT_STREAM_WRONLY\nGIT_STREAM_RW", - "comments": "

Streaming mode

\n", - "decl": [ - "GIT_STREAM_RDONLY", - "GIT_STREAM_WRONLY", - "GIT_STREAM_RW" - ], - "file": "odb_backend.h", - "line": 70, - "lineto": 74, - "sections": [ - [ - "

Streaming mode

\n", - [ - "GIT_STREAM_RDONLY", - "GIT_STREAM_WRONLY", - "GIT_STREAM_RW" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [], - "returns": [] - } - } - ], - [ - "git_odb_writepack", - { - "block": "", - "comments": "

A stream to write a packfile to the ODB

\n", - "decl": "", - "file": "types.h", - "line": 93, - "lineto": 93, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_odb_write_pack" - ], - "returns": [] - }, - "value": "git_odb_writepack" - } - ], - [ - "git_oid", - { - "block": "unsigned char id[GIT_OID_RAWSZ]", - "comments": "

Unique identity of any object (commit, tree, blob, tag).

\n", - "decl": [ - "unsigned char id[GIT_OID_RAWSZ]" - ], - "file": "oid.h", - "line": 33, - "lineto": 36, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_blob_create_frombuffer", - "git_blob_create_fromchunks", - "git_blob_create_fromdisk", - "git_blob_create_fromworkdir", - "git_blob_lookup", - "git_blob_lookup_prefix", - "git_commit_create", - "git_commit_create_from_oids", - "git_commit_create_v", - "git_commit_lookup", - "git_commit_lookup_prefix", - "git_graph_ahead_behind", - "git_index_reuc_add", - "git_index_write_tree", - "git_index_write_tree_to", - "git_merge_base", - "git_merge_base_many", - "git_merge_head_from_fetchhead", - "git_merge_head_from_oid", - "git_merge_result_fastforward_oid", - "git_note_create", - "git_note_next", - "git_note_read", - "git_note_remove", - "git_object_lookup", - "git_object_lookup_prefix", - "git_odb_exists", - "git_odb_hash", - "git_odb_hashfile", - "git_odb_open_rstream", - "git_odb_read", - "git_odb_read_header", - "git_odb_read_prefix", - "git_odb_stream_finalize_write", - "git_odb_write", - "git_oid_allocfmt", - "git_oid_cmp", - "git_oid_cpy", - "git_oid_equal", - "git_oid_fmt", - "git_oid_fromraw", - "git_oid_fromstr", - "git_oid_fromstrn", - "git_oid_fromstrp", - "git_oid_iszero", - "git_oid_ncmp", - "git_oid_nfmt", - "git_oid_pathfmt", - "git_oid_strcmp", - "git_oid_streq", - "git_oid_tostr", - "git_packbuilder_insert", - "git_packbuilder_insert_commit", - "git_packbuilder_insert_tree", - "git_reference__alloc", - "git_reference_create", - "git_reference_name_to_id", - "git_reference_set_target", - "git_reflog_append", - "git_reflog_append_to", - "git_repository_hashfile", - "git_repository_set_head_detached", - "git_revwalk_hide", - "git_revwalk_next", - "git_revwalk_push", - "git_stash_save", - "git_tag_annotation_create", - "git_tag_create", - "git_tag_create_frombuffer", - "git_tag_create_lightweight", - "git_tag_lookup", - "git_tag_lookup_prefix", - "git_tree_entry_byoid", - "git_tree_lookup", - "git_tree_lookup_prefix", - "git_treebuilder_insert", - "git_treebuilder_write" - ], - "returns": [ - "git_blob_id", - "git_commit_id", - "git_commit_parent_id", - "git_commit_tree_id", - "git_filter_source_id", - "git_indexer_hash", - "git_note_oid", - "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" - ] - }, - "value": "git_oid" - } - ], - [ - "git_oid_shorten", - { - "block": "", - "comments": "

OID Shortener object

\n", - "decl": "", - "file": "oid.h", - "line": 215, - "lineto": 215, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_oid_shorten_add", - "git_oid_shorten_free" - ], - "returns": [ - "git_oid_shorten_new" - ] - }, - "value": "git_oid_shorten" - } - ], - [ - "git_otype", - { - "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", - "comments": "

Basic type (loose or packed) of any Git object.

\n", - "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" - ], - "file": "types.h", - "line": 67, - "lineto": 78, - "sections": [ - [ - "

Basic type (loose or packed) of any Git object.

\n", - [ - "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" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [ - "git_object__size", - "git_object_lookup", - "git_object_lookup_bypath", - "git_object_lookup_prefix", - "git_object_peel", - "git_object_type2string", - "git_object_typeisloose", - "git_odb_hash", - "git_odb_hashfile", - "git_odb_open_wstream", - "git_odb_read_header", - "git_odb_write", - "git_reference_peel", - "git_repository_hashfile" - ], - "returns": [] - } - } - ], - [ - "git_packbuilder", - { - "block": "", - "comments": "

Representation of a git packbuilder

\n", - "decl": "", - "file": "types.h", - "line": 153, - "lineto": 153, - "tdef": "typedef", - "type": "struct", - "used": { - "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" - ], - "returns": [] - }, - "value": "git_packbuilder" - } - ], - [ - "git_packbuilder_progress", - { - "comments": "

Packbuilder progress notification function

\n", - "decl": "int (*git_packbuilder_progress)(\n\tint stage,\n\tunsigned int current,\n\tunsigned int total,\n\tvoid *payload)", - "file": "pack.h", - "line": 173, - "lineto": 177, - "type": "function pointer", - "used": { - "needs": [ - "git_packbuilder_set_callbacks", - "git_push_set_callbacks" - ], - "returns": [] - }, - "value": "git_packbuilder_progress" - } - ], - [ - "git_packbuilder_stage_t", - { - "block": "GIT_PACKBUILDER_ADDING_OBJECTS\nGIT_PACKBUILDER_DELTAFICATION", - "comments": "

Stages that are reported by the packbuilder progress callback.

\n", - "decl": [ - "GIT_PACKBUILDER_ADDING_OBJECTS", - "GIT_PACKBUILDER_DELTAFICATION" - ], - "file": "pack.h", - "line": 51, - "lineto": 54, - "sections": [ - [ - "

Stages that are reported by the packbuilder progress callback.

\n", - [ - "GIT_PACKBUILDER_ADDING_OBJECTS", - "GIT_PACKBUILDER_DELTAFICATION" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [], - "returns": [] - } - } - ], - [ - "git_patch", - { - "block": "", - "comments": "

The diff patch is used to store all the text diffs for a delta.

\n\n

You can easily loop over the content of patches and get information about\nthem.

\n", - "decl": "", - "file": "patch.h", - "line": 29, - "lineto": 29, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_patch_free", - "git_patch_from_blob_and_buffer", - "git_patch_from_blobs", - "git_patch_from_diff", - "git_patch_get_delta", - "git_patch_get_hunk", - "git_patch_get_line_in_hunk", - "git_patch_line_stats", - "git_patch_num_hunks", - "git_patch_num_lines_in_hunk", - "git_patch_print", - "git_patch_size", - "git_patch_to_str" - ], - "returns": [] - }, - "value": "git_patch" - } - ], - [ - "git_pathspec", - { - "block": "", - "comments": "

Compiled pathspec

\n", - "decl": "", - "file": "pathspec.h", - "line": 18, - "lineto": 18, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_pathspec_free", - "git_pathspec_match_diff", - "git_pathspec_match_index", - "git_pathspec_match_tree", - "git_pathspec_match_workdir", - "git_pathspec_matches_path", - "git_pathspec_new" - ], - "returns": [] - }, - "value": "git_pathspec" - } - ], - [ - "git_pathspec_flag_t", - { - "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", - "comments": "

Options controlling how pathspec match should be executed

\n\n\n", - "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" - ], - "file": "pathspec.h", - "line": 46, - "lineto": 54, - "sections": [ - [ - "

Options controlling how pathspec match should be executed

\n\n\n", - [ - "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" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [], - "returns": [] - } - } - ], - [ - "git_pathspec_match_list", - { - "block": "", - "comments": "

List of filenames matching a pathspec

\n", - "decl": "", - "file": "pathspec.h", - "line": 23, - "lineto": 23, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_pathspec_match_diff", - "git_pathspec_match_index", - "git_pathspec_match_list_diff_entry", - "git_pathspec_match_list_entry", - "git_pathspec_match_list_entrycount", - "git_pathspec_match_list_failed_entry", - "git_pathspec_match_list_failed_entrycount", - "git_pathspec_match_list_free", - "git_pathspec_match_tree", - "git_pathspec_match_workdir" - ], - "returns": [] - }, - "value": "git_pathspec_match_list" - } - ], - [ - "git_push_options", - { - "block": "unsigned int version\nunsigned int pb_parallelism", - "comments": "

Controls the behavior of a git_push object.

\n", - "decl": [ - "unsigned int version", - "unsigned int pb_parallelism" - ], - "file": "push.h", - "line": 25, - "lineto": 33, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_push_set_options" - ], - "returns": [] - }, - "value": "git_push_options" - } - ], - [ - "git_push_transfer_progress", - { - "comments": "

Push network progress notification function

\n", - "decl": "int (*git_push_transfer_progress)(\n\tunsigned int current,\n\tunsigned int total,\n\tsize_t bytes,\n\tvoid* payload)", - "file": "push.h", - "line": 43, - "lineto": 47, - "type": "function pointer", - "used": { - "needs": [ - "git_push_set_callbacks" - ], - "returns": [] - }, - "value": "git_push_transfer_progress" - } - ], - [ - "git_ref_t", - { - "block": "GIT_REF_INVALID\nGIT_REF_OID\nGIT_REF_SYMBOLIC\nGIT_REF_LISTALL", - "comments": "

Basic type of any Git reference.

\n", - "decl": [ - "GIT_REF_INVALID", - "GIT_REF_OID", - "GIT_REF_SYMBOLIC", - "GIT_REF_LISTALL" - ], - "file": "types.h", - "line": 185, - "lineto": 190, - "sections": [ - [ - "

Basic type of any Git reference.

\n", - [ - "GIT_REF_INVALID", - "GIT_REF_OID", - "GIT_REF_SYMBOLIC", - "GIT_REF_LISTALL" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [], - "returns": [] - } - } - ], - [ - "git_refdb", - { - "block": "", - "comments": "

An open refs database handle.

\n", - "decl": "", - "file": "types.h", - "line": 96, - "lineto": 96, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_refdb_compress", - "git_refdb_free", - "git_refdb_new", - "git_refdb_open", - "git_refdb_set_backend", - "git_repository_refdb", - "git_repository_set_refdb" - ], - "returns": [] - }, - "value": "git_refdb" - } - ], - [ - "git_refdb_backend", - { - "block": "", - "comments": "

A custom backend for refs

\n", - "decl": "", - "file": "types.h", - "line": 99, - "lineto": 99, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_refdb_backend_fs", - "git_refdb_set_backend" - ], - "returns": [] - }, - "value": "git_refdb_backend" - } - ], - [ - "git_reference", - { - "block": "", - "comments": "

In-memory representation of a reference.

\n", - "decl": "", - "file": "types.h", - "line": 169, - "lineto": 169, - "tdef": "typedef", - "type": "struct", - "used": { - "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_delete", - "git_reference_dwim", - "git_reference_free", - "git_reference_has_log", - "git_reference_is_branch", - "git_reference_is_remote", - "git_reference_is_tag", - "git_reference_lookup", - "git_reference_name", - "git_reference_next", - "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_set_target", - "git_reference_symbolic_target", - "git_reference_target", - "git_reference_target_peel", - "git_reference_type", - "git_repository_head", - "git_revparse_ext" - ], - "returns": [ - "git_reference__alloc", - "git_reference__alloc_symbolic" - ] - }, - "value": "git_reference" - } - ], - [ - "git_reference_iterator", - { - "block": "", - "comments": "

Iterator for references

\n", - "decl": "", - "file": "types.h", - "line": 172, - "lineto": 172, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_reference_iterator_free", - "git_reference_iterator_glob_new", - "git_reference_iterator_new", - "git_reference_next" - ], - "returns": [] - }, - "value": "git_reference_iterator" - } - ], - [ - "git_reflog", - { - "block": "", - "comments": "

Representation of a reference log

\n", - "decl": "", - "file": "types.h", - "line": 147, - "lineto": 147, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_reflog_append", - "git_reflog_drop", - "git_reflog_entry_byindex", - "git_reflog_entrycount", - "git_reflog_free", - "git_reflog_read", - "git_reflog_write" - ], - "returns": [] - }, - "value": "git_reflog" - } - ], - [ - "git_reflog_entry", - { - "block": "", - "comments": "

Representation of a reference log entry

\n", - "decl": "", - "file": "types.h", - "line": 144, - "lineto": 144, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_reflog_entry_committer", - "git_reflog_entry_id_new", - "git_reflog_entry_id_old", - "git_reflog_entry_message" - ], - "returns": [ - "git_reflog_entry_byindex" - ] - }, - "value": "git_reflog_entry" - } - ], - [ - "git_remote_callbacks", - { - "block": "unsigned int version\nint (*progress)(const char *str, int len, void *data)\nint (*completion)(git_remote_completion_type type, void *data)\nint (*credentials)(git_cred **cred, const char *url, const char *username_from_url, unsigned int allowed_types, void *data)\nint (*transfer_progress)(const git_transfer_progress *stats, void *data)\nint (*update_tips)(const char *refname, const git_oid *a, const git_oid *b, void *data)\nvoid *payload", - "comments": "

The callback settings structure

\n\n

Set the callbacks to be called by the remote when informing the user\nabout the progress of the network operations.

\n", - "decl": [ - "unsigned int version", - "int (*progress)(const char *str, int len, void *data)", - "int (*completion)(git_remote_completion_type type, void *data)", - "int (*credentials)(git_cred **cred, const char *url, const char *username_from_url, unsigned int allowed_types, void *data)", - "int (*transfer_progress)(const git_transfer_progress *stats, void *data)", - "int (*update_tips)(const char *refname, const git_oid *a, const git_oid *b, void *data)", - "void *payload" - ], - "file": "remote.h", - "line": 428, - "lineto": 450, - "tdef": null, - "type": "struct", - "used": { - "needs": [ - "git_remote_set_callbacks" - ], - "returns": [] - }, - "value": "git_remote_callbacks" - } - ], - [ - "git_remote_head", - { - "block": "int local\ngit_oid oid\ngit_oid loid\nchar *name", - "comments": "

Remote head description, given out on ls calls.

\n", - "decl": [ - "int local", - "git_oid oid", - "git_oid loid", - "char *name" - ], - "file": "net.h", - "line": 39, - "lineto": 44, - "tdef": null, - "type": "struct", - "used": { - "needs": [ - "git_remote_ls" - ], - "returns": [] - }, - "value": "git_remote_head" - } - ], - [ - "git_repository", - { - "block": "", - "comments": "

Representation of an existing git repository,\nincluding all its object contents

\n", - "decl": "", - "file": "types.h", - "line": 105, - "lineto": 105, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_attr_add_macro", - "git_attr_cache_flush", - "git_attr_foreach", - "git_attr_get", - "git_attr_get_many", - "git_blame_file", - "git_blob_create_frombuffer", - "git_blob_create_fromchunks", - "git_blob_create_fromdisk", - "git_blob_create_fromworkdir", - "git_blob_lookup", - "git_blob_lookup_prefix", - "git_branch_create", - "git_branch_iterator_new", - "git_branch_lookup", - "git_branch_remote_name", - "git_branch_upstream_name", - "git_checkout_head", - "git_checkout_index", - "git_checkout_tree", - "git_clone", - "git_clone_into", - "git_commit_create", - "git_commit_create_from_oids", - "git_commit_create_v", - "git_commit_lookup", - "git_commit_lookup_prefix", - "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_filter_list_new", - "git_graph_ahead_behind", - "git_ignore_add_rule", - "git_ignore_clear_internal_rules", - "git_ignore_path_is_ignored", - "git_index_write_tree_to", - "git_merge", - "git_merge_base", - "git_merge_base_many", - "git_merge_head_from_fetchhead", - "git_merge_head_from_oid", - "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_object_lookup_prefix", - "git_packbuilder_new", - "git_pathspec_match_workdir", - "git_refdb_backend_fs", - "git_refdb_new", - "git_refdb_open", - "git_reference_create", - "git_reference_dwim", - "git_reference_foreach", - "git_reference_foreach_glob", - "git_reference_iterator_glob_new", - "git_reference_iterator_new", - "git_reference_list", - "git_reference_lookup", - "git_reference_name_to_id", - "git_reference_symbolic_create", - "git_reflog_append_to", - "git_reflog_delete", - "git_reflog_read", - "git_reflog_rename", - "git_remote_create", - "git_remote_create_inmemory", - "git_remote_create_with_fetchspec", - "git_remote_list", - "git_remote_load", - "git_repository__cleanup", - "git_repository_config", - "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_is_bare", - "git_repository_is_empty", - "git_repository_is_shallow", - "git_repository_merge_cleanup", - "git_repository_mergehead_foreach", - "git_repository_message", - "git_repository_message_remove", - "git_repository_new", - "git_repository_odb", - "git_repository_open", - "git_repository_open_bare", - "git_repository_open_ext", - "git_repository_path", - "git_repository_refdb", - "git_repository_reinit_filesystem", - "git_repository_set_config", - "git_repository_set_head", - "git_repository_set_head_detached", - "git_repository_set_index", - "git_repository_set_namespace", - "git_repository_set_odb", - "git_repository_set_refdb", - "git_repository_set_workdir", - "git_repository_state", - "git_repository_workdir", - "git_repository_wrap_odb", - "git_reset", - "git_reset_default", - "git_revparse", - "git_revparse_ext", - "git_revparse_single", - "git_revwalk_new", - "git_signature_default", - "git_stash_drop", - "git_stash_foreach", - "git_stash_save", - "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_tag_lookup_prefix", - "git_tree_entry_to_object", - "git_tree_lookup", - "git_tree_lookup_prefix", - "git_treebuilder_write" - ], - "returns": [ - "git_blob_owner", - "git_commit_owner", - "git_filter_source_repo", - "git_index_owner", - "git_object_owner", - "git_reference_owner", - "git_remote_owner", - "git_revwalk_repository", - "git_submodule_owner", - "git_tag_owner", - "git_tree_owner" - ] - }, - "value": "git_repository" - } - ], - [ - "git_repository_init_flag_t", - { - "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", - "comments": "

Option flags for git_repository_init_ext.

\n\n

These flags configure extra behaviors to git_repository_init_ext.\nIn every case, the default behavior is the zero value (i.e. flag is\nnot set). Just OR the flag values together for the flags parameter\nwhen initializing a new repo. Details of individual values are:

\n\n\n", - "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" - ], - "file": "repository.h", - "line": 202, - "lineto": 209, - "sections": [ - [ - "

Option flags for git_repository_init_ext.

\n\n

These flags configure extra behaviors to git_repository_init_ext.\nIn every case, the default behavior is the zero value (i.e. flag is\nnot set). Just OR the flag values together for the flags parameter\nwhen initializing a new repo. Details of individual values are:

\n\n\n", - [ - "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" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [], - "returns": [] - } - } - ], - [ - "git_repository_init_mode_t", - { - "block": "GIT_REPOSITORY_INIT_SHARED_UMASK\nGIT_REPOSITORY_INIT_SHARED_GROUP\nGIT_REPOSITORY_INIT_SHARED_ALL", - "comments": "

Mode options for git_repository_init_ext.

\n\n

Set the mode field of the git_repository_init_options structure\neither to the custom mode that you would like, or to one of the\nfollowing modes:

\n\n\n", - "decl": [ - "GIT_REPOSITORY_INIT_SHARED_UMASK", - "GIT_REPOSITORY_INIT_SHARED_GROUP", - "GIT_REPOSITORY_INIT_SHARED_ALL" - ], - "file": "repository.h", - "line": 224, - "lineto": 228, - "sections": [ - [ - "

Mode options for git_repository_init_ext.

\n\n

Set the mode field of the git_repository_init_options structure\neither to the custom mode that you would like, or to one of the\nfollowing modes:

\n\n\n", - [ - "GIT_REPOSITORY_INIT_SHARED_UMASK", - "GIT_REPOSITORY_INIT_SHARED_GROUP", - "GIT_REPOSITORY_INIT_SHARED_ALL" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [], - "returns": [] - } - } - ], - [ - "git_repository_init_options", - { - "block": "unsigned int version\nuint32_t flags\nuint32_t mode\nconst char *workdir_path\nconst char *description\nconst char *template_path\nconst char *initial_head\nconst char *origin_url", - "comments": "

Extended options structure for git_repository_init_ext.

\n\n

This contains extra options for git_repository_init_ext that enable\nadditional initialization features. The fields are:

\n\n\n", - "decl": [ - "unsigned int version", - "uint32_t flags", - "uint32_t mode", - "const char *workdir_path", - "const char *description", - "const char *template_path", - "const char *initial_head", - "const char *origin_url" - ], - "file": "repository.h", - "line": 258, - "lineto": 270, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_repository_init_ext" - ], - "returns": [] - }, - "value": "git_repository_init_options" - } - ], - [ - "git_repository_open_flag_t", - { - "block": "GIT_REPOSITORY_OPEN_NO_SEARCH\nGIT_REPOSITORY_OPEN_CROSS_FS\nGIT_REPOSITORY_OPEN_BARE", - "comments": "

Option flags for git_repository_open_ext.

\n\n\n", - "decl": [ - "GIT_REPOSITORY_OPEN_NO_SEARCH", - "GIT_REPOSITORY_OPEN_CROSS_FS", - "GIT_REPOSITORY_OPEN_BARE" - ], - "file": "repository.h", - "line": 101, - "lineto": 105, - "sections": [ - [ - "

Option flags for git_repository_open_ext.

\n\n\n", - [ - "GIT_REPOSITORY_OPEN_NO_SEARCH", - "GIT_REPOSITORY_OPEN_CROSS_FS", - "GIT_REPOSITORY_OPEN_BARE" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [], - "returns": [] - } - } - ], - [ - "git_reset_t", - { - "block": "GIT_RESET_SOFT\nGIT_RESET_MIXED\nGIT_RESET_HARD", - "comments": "

Kinds of reset operation

\n", - "decl": [ - "GIT_RESET_SOFT", - "GIT_RESET_MIXED", - "GIT_RESET_HARD" - ], - "file": "reset.h", - "line": 21, - "lineto": 25, - "sections": [ - [ - "

Kinds of reset operation

\n", - [ - "GIT_RESET_SOFT", - "GIT_RESET_MIXED", - "GIT_RESET_HARD" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [ - "git_reset" - ], - "returns": [] - } - } - ], - [ - "git_revspec", - { - "block": "git_object *from\ngit_object *to\nunsigned int flags", - "comments": "

Git Revision Spec: output of a git_revparse operation

\n", - "decl": [ - "git_object *from", - "git_object *to", - "unsigned int flags" - ], - "file": "revparse.h", - "line": 83, - "lineto": 90, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_revparse" - ], - "returns": [] - }, - "value": "git_revspec" - } - ], - [ - "git_revwalk", - { - "block": "", - "comments": "

Representation of an in-progress walk through the commits in a repo

\n", - "decl": "", - "file": "types.h", - "line": 111, - "lineto": 111, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "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" - ], - "returns": [] - }, - "value": "git_revwalk" - } - ], - [ - "git_signature", - { - "block": "char *name\nchar *email\ngit_time when", - "comments": "

An action signature (e.g. for committers, taggers, etc)

\n", - "decl": [ - "char *name", - "char *email", - "git_time when" - ], - "file": "types.h", - "line": 162, - "lineto": 166, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_commit_create", - "git_commit_create_from_oids", - "git_commit_create_v", - "git_note_create", - "git_note_remove", - "git_reflog_append", - "git_reflog_append_to", - "git_signature_default", - "git_signature_dup", - "git_signature_free", - "git_signature_new", - "git_signature_now", - "git_stash_save", - "git_tag_annotation_create", - "git_tag_create" - ], - "returns": [ - "git_commit_author", - "git_commit_committer", - "git_reflog_entry_committer", - "git_signature_dup", - "git_tag_tagger" - ] - }, - "value": "git_signature" - } - ], - [ - "git_stash_cb", - { - "comments": "

When iterating over all the stashed states, callback that will be\nissued per entry.

\n\n

@param index The position within the stash list. 0 points to the\nmost recent stashed state.

\n\n

@param message The stash message.

\n\n

@param stash_id The commit oid of the stashed state.

\n\n

@param payload Extra parameter to callback function.

\n\n

@return 0 on success, GIT_EUSER on non-zero callback, or error code

\n", - "decl": "int (*git_stash_cb)(\n\tsize_t index,\n\tconst char* message,\n\tconst git_oid *stash_id,\n\tvoid *payload)", - "file": "stash.h", - "line": 79, - "lineto": 83, - "type": "function pointer", - "used": { - "needs": [ - "git_stash_foreach" - ], - "returns": [] - }, - "value": "git_stash_cb" - } - ], - [ - "git_status_cb", - { - "comments": "

Function pointer to receive status on individual files

\n\n

path is the relative path to the file from the root of the repository.

\n\n

status_flags is a combination of git_status_t values that apply.

\n\n

payload is the value you passed to the foreach function as payload.

\n", - "decl": "int (*git_status_cb)(\n\tconst char *path, unsigned int status_flags, void *payload)", - "file": "status.h", - "line": 59, - "lineto": 60, - "type": "function pointer", - "used": { - "needs": [ - "git_status_foreach", - "git_status_foreach_ext" - ], - "returns": [] - }, - "value": "git_status_cb" - } - ], - [ - "git_status_entry", - { - "block": "git_status_t status\ngit_diff_delta *head_to_index\ngit_diff_delta *index_to_workdir", - "comments": "

A status entry, providing the differences between the file as it exists\nin HEAD and the index, and providing the differences between the index\nand the working directory.

\n\n

The status value provides the status flags for this file.

\n\n

The head_to_index value provides detailed information about the\ndifferences between the file in HEAD and the file in the index.

\n\n

The index_to_workdir value provides detailed information about the\ndifferences between the file in the index and the file in the\nworking directory.

\n", - "decl": [ - "git_status_t status", - "git_diff_delta *head_to_index", - "git_diff_delta *index_to_workdir" - ], - "file": "status.h", - "line": 191, - "lineto": 195, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [], - "returns": [ - "git_status_byindex" - ] - }, - "value": "git_status_entry" - } - ], - [ - "git_status_list", - { - "block": "", - "comments": "

Representation of a status collection

\n", - "decl": "", - "file": "types.h", - "line": 181, - "lineto": 181, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_status_byindex", - "git_status_list_entrycount", - "git_status_list_free", - "git_status_list_new" - ], - "returns": [] - }, - "value": "git_status_list" - } - ], - [ - "git_status_opt_t", - { - "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", - "comments": "

Flags to control status callbacks

\n\n\n\n

Calling git_status_foreach() is like calling the extended version\nwith: GIT_STATUS_OPT_INCLUDE_IGNORED, GIT_STATUS_OPT_INCLUDE_UNTRACKED,\nand GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS. Those options are bundled\ntogether as GIT_STATUS_OPT_DEFAULTS if you want them as a baseline.

\n", - "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" - ], - "file": "status.h", - "line": 130, - "lineto": 149, - "sections": [ - [ - "

Flags to control status callbacks

\n\n\n\n

Calling git_status_foreach() is like calling the extended version\nwith: GIT_STATUS_OPT_INCLUDE_IGNORED, GIT_STATUS_OPT_INCLUDE_UNTRACKED,\nand GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS. Those options are bundled\ntogether as GIT_STATUS_OPT_DEFAULTS if you want them as a baseline.

\n", - [ - "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" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [], - "returns": [] - } - } - ], - [ - "git_status_options", - { - "block": "unsigned int version\ngit_status_show_t show\nunsigned int flags\ngit_strarray pathspec", - "comments": "

Options to control how git_status_foreach_ext() will issue callbacks.

\n\n

This structure is set so that zeroing it out will give you relatively\nsane defaults.

\n\n

The show value is one of the git_status_show_t constants that\ncontrol which files to scan and in what order.

\n\n

The flags value is an OR'ed combination of the git_status_opt_t\nvalues above.

\n\n

The pathspec is an array of path patterns to match (using\nfnmatch-style matching), or just an array of paths to match exactly if\nGIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH is specified in the flags.

\n", - "decl": [ - "unsigned int version", - "git_status_show_t show", - "unsigned int flags", - "git_strarray pathspec" - ], - "file": "status.h", - "line": 167, - "lineto": 175, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_status_foreach_ext", - "git_status_list_new" - ], - "returns": [] - }, - "value": "git_status_options" - } - ], - [ - "git_status_show_t", - { - "block": "GIT_STATUS_SHOW_INDEX_AND_WORKDIR\nGIT_STATUS_SHOW_INDEX_ONLY\nGIT_STATUS_SHOW_WORKDIR_ONLY", - "comments": "

Select the files on which to report status.

\n\n

With git_status_foreach_ext, this will control which changes get\ncallbacks. With git_status_list_new, these will control which\nchanges are included in the list.

\n\n\n", - "decl": [ - "GIT_STATUS_SHOW_INDEX_AND_WORKDIR", - "GIT_STATUS_SHOW_INDEX_ONLY", - "GIT_STATUS_SHOW_WORKDIR_ONLY" - ], - "file": "status.h", - "line": 77, - "lineto": 81, - "sections": [ - [ - "

Select the files on which to report status.

\n\n

With git_status_foreach_ext, this will control which changes get\ncallbacks. With git_status_list_new, these will control which\nchanges are included in the list.

\n\n\n", - [ - "GIT_STATUS_SHOW_INDEX_AND_WORKDIR", - "GIT_STATUS_SHOW_INDEX_ONLY", - "GIT_STATUS_SHOW_WORKDIR_ONLY" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [], - "returns": [] - } - } - ], - [ - "git_status_t", - { - "block": "GIT_STATUS_CURRENT\nGIT_STATUS_INDEX_NEW\nGIT_STATUS_INDEX_MODIFIED\nGIT_STATUS_INDEX_DELETED\nGIT_STATUS_INDEX_RENAMED\nGIT_STATUS_INDEX_TYPECHANGE\nGIT_STATUS_WT_NEW\nGIT_STATUS_WT_MODIFIED\nGIT_STATUS_WT_DELETED\nGIT_STATUS_WT_TYPECHANGE\nGIT_STATUS_WT_RENAMED\nGIT_STATUS_IGNORED", - "comments": "

Status flags for a single file.

\n\n

A combination of these values will be returned to indicate the status of\na file. Status compares the working directory, the index, and the\ncurrent HEAD of the repository. The GIT_STATUS_INDEX set of flags\nrepresents the status of file in the index relative to the HEAD, and the\nGIT_STATUS_WT set of flags represent the status of the file in the\nworking directory relative to the index.

\n", - "decl": [ - "GIT_STATUS_CURRENT", - "GIT_STATUS_INDEX_NEW", - "GIT_STATUS_INDEX_MODIFIED", - "GIT_STATUS_INDEX_DELETED", - "GIT_STATUS_INDEX_RENAMED", - "GIT_STATUS_INDEX_TYPECHANGE", - "GIT_STATUS_WT_NEW", - "GIT_STATUS_WT_MODIFIED", - "GIT_STATUS_WT_DELETED", - "GIT_STATUS_WT_TYPECHANGE", - "GIT_STATUS_WT_RENAMED", - "GIT_STATUS_IGNORED" - ], - "file": "status.h", - "line": 32, - "lineto": 48, - "sections": [ - [ - "

Status flags for a single file.

\n\n

A combination of these values will be returned to indicate the status of\na file. Status compares the working directory, the index, and the\ncurrent HEAD of the repository. The GIT_STATUS_INDEX set of flags\nrepresents the status of file in the index relative to the HEAD, and the\nGIT_STATUS_WT set of flags represent the status of the file in the\nworking directory relative to the index.

\n", - [ - "GIT_STATUS_CURRENT", - "GIT_STATUS_INDEX_NEW", - "GIT_STATUS_INDEX_MODIFIED", - "GIT_STATUS_INDEX_DELETED", - "GIT_STATUS_INDEX_RENAMED", - "GIT_STATUS_INDEX_TYPECHANGE", - "GIT_STATUS_WT_NEW", - "GIT_STATUS_WT_MODIFIED", - "GIT_STATUS_WT_DELETED", - "GIT_STATUS_WT_TYPECHANGE", - "GIT_STATUS_WT_RENAMED", - "GIT_STATUS_IGNORED" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [], - "returns": [] - } - } - ], - [ - "git_strarray", - { - "block": "char **strings\nsize_t count", - "comments": "

Array of strings

\n", - "decl": [ - "char **strings", - "size_t count" - ], - "file": "strarray.h", - "line": 22, - "lineto": 25, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_index_add_all", - "git_index_remove_all", - "git_index_update_all", - "git_pathspec_new", - "git_reference_list", - "git_remote_get_fetch_refspecs", - "git_remote_get_push_refspecs", - "git_remote_list", - "git_remote_set_fetch_refspecs", - "git_remote_set_push_refspecs", - "git_reset_default", - "git_strarray_copy", - "git_strarray_free", - "git_tag_list", - "git_tag_list_match" - ], - "returns": [] - }, - "value": "git_strarray" - } - ], - [ - "git_submodule", - { - "block": "", - "comments": "

Opaque structure representing a submodule.

\n", - "decl": "", - "file": "types.h", - "line": 248, - "lineto": 248, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_submodule_add_finalize", - "git_submodule_add_setup", - "git_submodule_add_to_index", - "git_submodule_fetch_recurse_submodules", - "git_submodule_foreach", - "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_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" - ], - "returns": [] - }, - "value": "git_submodule" - } - ], - [ - "git_submodule_ignore_t", - { - "block": "GIT_SUBMODULE_IGNORE_RESET\nGIT_SUBMODULE_IGNORE_NONE\nGIT_SUBMODULE_IGNORE_UNTRACKED\nGIT_SUBMODULE_IGNORE_DIRTY\nGIT_SUBMODULE_IGNORE_ALL\nGIT_SUBMODULE_IGNORE_DEFAULT", - "comments": "

Submodule ignore values

\n\n

These values represent settings for the submodule.$name.ignore\nconfiguration value which says how deeply to look at the working\ndirectory when getting submodule status.

\n\n

You can override this value in memory on a per-submodule basis with\ngit_submodule_set_ignore() and can write the changed value to disk\nwith git_submodule_save(). If you have overwritten the value, you\ncan revert to the on disk value by using GIT_SUBMODULE_IGNORE_RESET.

\n\n

The values are:

\n\n\n", - "decl": [ - "GIT_SUBMODULE_IGNORE_RESET", - "GIT_SUBMODULE_IGNORE_NONE", - "GIT_SUBMODULE_IGNORE_UNTRACKED", - "GIT_SUBMODULE_IGNORE_DIRTY", - "GIT_SUBMODULE_IGNORE_ALL", - "GIT_SUBMODULE_IGNORE_DEFAULT" - ], - "file": "types.h", - "line": 315, - "lineto": 324, - "sections": [ - [ - "

Submodule ignore values

\n\n

These values represent settings for the submodule.$name.ignore\nconfiguration value which says how deeply to look at the working\ndirectory when getting submodule status.

\n\n

You can override this value in memory on a per-submodule basis with\ngit_submodule_set_ignore() and can write the changed value to disk\nwith git_submodule_save(). If you have overwritten the value, you\ncan revert to the on disk value by using GIT_SUBMODULE_IGNORE_RESET.

\n\n

The values are:

\n\n\n", - [ - "GIT_SUBMODULE_IGNORE_RESET", - "GIT_SUBMODULE_IGNORE_NONE", - "GIT_SUBMODULE_IGNORE_UNTRACKED", - "GIT_SUBMODULE_IGNORE_DIRTY", - "GIT_SUBMODULE_IGNORE_ALL", - "GIT_SUBMODULE_IGNORE_DEFAULT" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [ - "git_submodule_set_ignore" - ], - "returns": [] - } - } - ], - [ - "git_submodule_status_t", - { - "block": "GIT_SUBMODULE_STATUS_IN_HEAD\nGIT_SUBMODULE_STATUS_IN_INDEX\nGIT_SUBMODULE_STATUS_IN_CONFIG\nGIT_SUBMODULE_STATUS_IN_WD\nGIT_SUBMODULE_STATUS_INDEX_ADDED\nGIT_SUBMODULE_STATUS_INDEX_DELETED\nGIT_SUBMODULE_STATUS_INDEX_MODIFIED\nGIT_SUBMODULE_STATUS_WD_UNINITIALIZED\nGIT_SUBMODULE_STATUS_WD_ADDED\nGIT_SUBMODULE_STATUS_WD_DELETED\nGIT_SUBMODULE_STATUS_WD_MODIFIED\nGIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED\nGIT_SUBMODULE_STATUS_WD_WD_MODIFIED\nGIT_SUBMODULE_STATUS_WD_UNTRACKED", - "comments": "

Return codes for submodule status.

\n\n

A combination of these flags will be returned to describe the status of a\nsubmodule. Depending on the "ignore" property of the submodule, some of\nthe flags may never be returned because they indicate changes that are\nsupposed to be ignored.

\n\n

Submodule info is contained in 4 places: the HEAD tree, the index, config\nfiles (both .git/config and .gitmodules), and the working directory. Any\nor all of those places might be missing information about the submodule\ndepending on what state the repo is in. We consider all four places to\nbuild the combination of status flags.

\n\n

There are four values that are not really status, but give basic info\nabout what sources of submodule data are available. These will be\nreturned even if ignore is set to "ALL".

\n\n\n\n

The following values will be returned so long as ignore is not "ALL".

\n\n\n\n

The following can only be returned if ignore is "NONE" or "UNTRACKED".

\n\n\n\n

Lastly, the following will only be returned for ignore "NONE".

\n\n\n", - "decl": [ - "GIT_SUBMODULE_STATUS_IN_HEAD", - "GIT_SUBMODULE_STATUS_IN_INDEX", - "GIT_SUBMODULE_STATUS_IN_CONFIG", - "GIT_SUBMODULE_STATUS_IN_WD", - "GIT_SUBMODULE_STATUS_INDEX_ADDED", - "GIT_SUBMODULE_STATUS_INDEX_DELETED", - "GIT_SUBMODULE_STATUS_INDEX_MODIFIED", - "GIT_SUBMODULE_STATUS_WD_UNINITIALIZED", - "GIT_SUBMODULE_STATUS_WD_ADDED", - "GIT_SUBMODULE_STATUS_WD_DELETED", - "GIT_SUBMODULE_STATUS_WD_MODIFIED", - "GIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED", - "GIT_SUBMODULE_STATUS_WD_WD_MODIFIED", - "GIT_SUBMODULE_STATUS_WD_UNTRACKED" - ], - "file": "submodule.h", - "line": 72, - "lineto": 105, - "sections": [ - [ - "

Return codes for submodule status.

\n\n

A combination of these flags will be returned to describe the status of a\nsubmodule. Depending on the "ignore" property of the submodule, some of\nthe flags may never be returned because they indicate changes that are\nsupposed to be ignored.

\n\n

Submodule info is contained in 4 places: the HEAD tree, the index, config\nfiles (both .git/config and .gitmodules), and the working directory. Any\nor all of those places might be missing information about the submodule\ndepending on what state the repo is in. We consider all four places to\nbuild the combination of status flags.

\n\n

There are four values that are not really status, but give basic info\nabout what sources of submodule data are available. These will be\nreturned even if ignore is set to "ALL".

\n\n\n\n

The following values will be returned so long as ignore is not "ALL".

\n\n\n\n

The following can only be returned if ignore is "NONE" or "UNTRACKED".

\n\n\n\n

Lastly, the following will only be returned for ignore "NONE".

\n\n\n", - [ - "GIT_SUBMODULE_STATUS_IN_HEAD", - "GIT_SUBMODULE_STATUS_IN_INDEX", - "GIT_SUBMODULE_STATUS_IN_CONFIG", - "GIT_SUBMODULE_STATUS_IN_WD", - "GIT_SUBMODULE_STATUS_INDEX_ADDED", - "GIT_SUBMODULE_STATUS_INDEX_DELETED", - "GIT_SUBMODULE_STATUS_INDEX_MODIFIED", - "GIT_SUBMODULE_STATUS_WD_UNINITIALIZED", - "GIT_SUBMODULE_STATUS_WD_ADDED", - "GIT_SUBMODULE_STATUS_WD_DELETED", - "GIT_SUBMODULE_STATUS_WD_MODIFIED", - "GIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED", - "GIT_SUBMODULE_STATUS_WD_WD_MODIFIED", - "GIT_SUBMODULE_STATUS_WD_UNTRACKED" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [], - "returns": [] - } - } - ], - [ - "git_submodule_update_t", - { - "block": "GIT_SUBMODULE_UPDATE_RESET\nGIT_SUBMODULE_UPDATE_CHECKOUT\nGIT_SUBMODULE_UPDATE_REBASE\nGIT_SUBMODULE_UPDATE_MERGE\nGIT_SUBMODULE_UPDATE_NONE\nGIT_SUBMODULE_UPDATE_DEFAULT", - "comments": "

Submodule update values

\n\n

These values represent settings for the submodule.$name.update\nconfiguration value which says how to handle git submodule update for\nthis submodule. The value is usually set in the ".gitmodules" file and\ncopied to ".git/config" when the submodule is initialized.

\n\n

You can override this setting on a per-submodule basis with\ngit_submodule_set_update() and write the changed value to disk using\ngit_submodule_save(). If you have overwritten the value, you can\nrevert it by passing GIT_SUBMODULE_UPDATE_RESET to the set function.

\n\n

The values are:

\n\n\n", - "decl": [ - "GIT_SUBMODULE_UPDATE_RESET", - "GIT_SUBMODULE_UPDATE_CHECKOUT", - "GIT_SUBMODULE_UPDATE_REBASE", - "GIT_SUBMODULE_UPDATE_MERGE", - "GIT_SUBMODULE_UPDATE_NONE", - "GIT_SUBMODULE_UPDATE_DEFAULT" - ], - "file": "types.h", - "line": 277, - "lineto": 286, - "sections": [ - [ - "

Submodule update values

\n\n

These values represent settings for the submodule.$name.update\nconfiguration value which says how to handle git submodule update for\nthis submodule. The value is usually set in the ".gitmodules" file and\ncopied to ".git/config" when the submodule is initialized.

\n\n

You can override this setting on a per-submodule basis with\ngit_submodule_set_update() and write the changed value to disk using\ngit_submodule_save(). If you have overwritten the value, you can\nrevert it by passing GIT_SUBMODULE_UPDATE_RESET to the set function.

\n\n

The values are:

\n\n\n", - [ - "GIT_SUBMODULE_UPDATE_RESET", - "GIT_SUBMODULE_UPDATE_CHECKOUT", - "GIT_SUBMODULE_UPDATE_REBASE", - "GIT_SUBMODULE_UPDATE_MERGE", - "GIT_SUBMODULE_UPDATE_NONE", - "GIT_SUBMODULE_UPDATE_DEFAULT" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [ - "git_submodule_set_update" - ], - "returns": [] - } - } - ], - [ - "git_tag", - { - "block": "", - "comments": "

Parsed representation of a tag object.

\n", - "decl": "", - "file": "types.h", - "line": 114, - "lineto": 114, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_tag_free", - "git_tag_id", - "git_tag_lookup", - "git_tag_lookup_prefix", - "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" - ], - "returns": [] - }, - "value": "git_tag" - } - ], - [ - "git_time", - { - "block": "git_time_t time\nint offset", - "comments": "

Time in a signature

\n", - "decl": [ - "git_time_t time", - "int offset" - ], - "file": "types.h", - "line": 156, - "lineto": 159, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [], - "returns": [] - }, - "value": "git_time" - } - ], - [ - "git_trace_callback", - { - "comments": "

An instance for a tracing function

\n", - "decl": "void (*git_trace_callback)(git_trace_level_t level, const char *msg)", - "file": "trace.h", - "line": 52, - "lineto": 52, - "type": "function pointer", - "used": { - "needs": [ - "git_trace_set" - ], - "returns": [] - }, - "value": "git_trace_callback" - } - ], - [ - "git_transfer_progress", - { - "block": "unsigned int total_objects\nunsigned int indexed_objects\nunsigned int received_objects\nunsigned int local_objects\nunsigned int total_deltas\nunsigned int indexed_deltas\nsize_t received_bytes", - "comments": "

This is passed as the first argument to the callback to allow the\nuser to see the progress.

\n\n\n", - "decl": [ - "unsigned int total_objects", - "unsigned int indexed_objects", - "unsigned int received_objects", - "unsigned int local_objects", - "unsigned int total_deltas", - "unsigned int indexed_deltas", - "size_t received_bytes" - ], - "file": "types.h", - "line": 226, - "lineto": 234, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_indexer_append", - "git_indexer_commit" - ], - "returns": [ - "git_remote_stats" - ] - }, - "value": "git_transfer_progress" - } - ], - [ - "git_transfer_progress_callback", - { - "comments": "

Type for progress callbacks during indexing. Return a value less than zero\nto cancel the transfer.

\n\n

@param stats Structure containing information about the state of the transfer\n@param payload Payload provided by caller

\n", - "decl": "int (*git_transfer_progress_callback)(const git_transfer_progress *stats, void *payload)", - "file": "types.h", - "line": 243, - "lineto": 243, - "type": "function pointer", - "used": { - "needs": [ - "git_indexer_new", - "git_odb_write_pack", - "git_packbuilder_write" - ], - "returns": [] - }, - "value": "git_transfer_progress_callback" - } - ], - [ - "git_tree", - { - "block": "", - "comments": "

Representation of a tree object.

\n", - "decl": "", - "file": "types.h", - "line": 126, - "lineto": 126, - "tdef": "typedef", - "type": "struct", - "used": { - "needs": [ - "git_commit_create", - "git_commit_create_v", - "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_byindex", - "git_tree_entry_byname", - "git_tree_entry_byoid", - "git_tree_entry_bypath", - "git_tree_entrycount", - "git_tree_free", - "git_tree_id", - "git_tree_lookup", - "git_tree_lookup_prefix", - "git_tree_owner", - "git_tree_walk", - "git_treebuilder_create" - ], - "returns": [] - }, - "value": "git_tree" - } - ], - [ - "git_tree_entry", - { - "block": "", - "comments": "

Representation of each one of the entries in a tree object.

\n", - "decl": "", - "file": "types.h", - "line": 123, - "lineto": 123, - "tdef": "typedef", - "type": "struct", - "used": { - "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_insert" - ], - "returns": [ - "git_tree_entry_byindex", - "git_tree_entry_byname", - "git_tree_entry_byoid", - "git_tree_entry_dup", - "git_treebuilder_get" - ] - }, - "value": "git_tree_entry" - } - ], - [ - "git_treebuilder", - { - "block": "", - "comments": "

Constructor for in-memory trees

\n", - "decl": "", - "file": "types.h", - "line": 129, - "lineto": 129, - "tdef": "typedef", - "type": "struct", - "used": { - "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" - ], - "returns": [] - }, - "value": "git_treebuilder" - } - ], - [ - "git_treewalk_cb", - { - "comments": "

Callback for the tree traversal method

\n", - "decl": "int (*git_treewalk_cb)(\n\tconst char *root, const git_tree_entry *entry, void *payload)", - "file": "tree.h", - "line": 370, - "lineto": 371, - "type": "function pointer", - "used": { - "needs": [ - "git_tree_walk" - ], - "returns": [] - }, - "value": "git_treewalk_cb" - } - ], - [ - "git_treewalk_mode", - { - "block": "GIT_TREEWALK_PRE\nGIT_TREEWALK_POST", - "comments": "

Tree traversal modes

\n", - "decl": [ - "GIT_TREEWALK_PRE", - "GIT_TREEWALK_POST" - ], - "file": "tree.h", - "line": 374, - "lineto": 377, - "sections": [ - [ - "

Tree traversal modes

\n", - [ - "GIT_TREEWALK_PRE", - "GIT_TREEWALK_POST" - ] - ] - ], - "tdef": "typedef", - "type": "enum", - "used": { - "needs": [ - "git_tree_walk" - ], - "returns": [] - } - } - ] - ] -} diff --git a/generate/descriptor.json b/generate/descriptor.json index ac6ea39e3..df0b39ef4 100644 --- a/generate/descriptor.json +++ b/generate/descriptor.json @@ -34,6 +34,13 @@ } }, + "git_blob_is_binary": { + "ignore": false, + "args": [ + { "isReturn": false, "isSelf": true } + ] + }, + "git_blob_create_frombuffer": { "ignore": false, "isAsync": true, @@ -220,7 +227,7 @@ "isConstructorMethod": true, "args": [ { "isReturn": true }, - { "isSelf": true }, + { "isSelf": false }, {}, {}, { "isOptional": true } @@ -484,8 +491,7 @@ "functions": { "git_reference_lookup": { "ignore": false, - "isConstructorMethod": true, - "args": [{}, { "isSelf": true }] + "isConstructorMethod": true }, "git_reference_type": { @@ -672,7 +678,7 @@ "ignore": false, "isAsync": true, "isConstructorMethod": true, - "args": [{ "isReturn": true }, { "isSelf": true }], + "args": [{ "isReturn": true }], "return": { "isErrorCode": true } diff --git a/install.js b/install.js index 9835136f9..baf432f28 100644 --- a/install.js +++ b/install.js @@ -120,23 +120,13 @@ var dependencies = Q.allSettled([ }); }) -// Configure the native module using node-gyp. -.then(function() { - console.info('[nodegit] Configuring native node module.'); - - return Q.nfcall(exec, systemPath([ - '.', 'node_modules', '.bin', 'node-gyp configure --python ' + python - ]), { - cwd: '.' - }); -}) - // Build the native module using node-gyp. .then(function() { console.info('[nodegit] Building native node module.'); + var pythonFlag = ' --python ' + python; return Q.nfcall(exec, systemPath([ - '.', 'node_modules', '.bin', 'node-gyp build' + '.', 'node_modules', '.bin', 'node-gyp clean configure build' + pythonFlag ]), { cwd: '.', maxBuffer: Number.MAX_VALUE diff --git a/lib/blob.js b/lib/blob.js index 1994db3ad..5c0c87e16 100644 --- a/lib/blob.js +++ b/lib/blob.js @@ -1,31 +1,35 @@ -var git = require('../'); -var TreeEntry = git.TreeEntry; -var Blob = git.Blob; +var NodeGit = require("../"); +var TreeEntry = require("./tree_entry"); -// Assign deprecated methods. -Object.defineProperty(Blob.prototype, "size", { - value: Blob.prototype.rawsize, - enumerable: false -}); +var Blob = NodeGit.Blob; /** - * Retrieve the content of the blob. - * @return {Buffer} content + * Retrieve the content of the Blob. + * + * @return {Buffer} Contents. */ Blob.prototype.content = function() { return this.rawcontent().toBuffer(this.rawsize()); }; /** - * Retrieve the blob's content as String. + * Retrieve the Blob's content as String. + * + * @return {string} Contents. */ Blob.prototype.toString = function() { return this.content().toString(); }; /** - * Retrieve the blob's type. + * Retrieve the Blob's type. + * + * @return {number} The filemode. */ Blob.prototype.filemode = function() { - return this.isBinary() ? TreeEntry.FileMode.Executable : TreeEntry.FileMode.Blob; + var FileMode = TreeEntry.FileMode; + + return this.isBinary() ? FileMode.Executable : FileMode.Blob; }; + +module.exports = Blob; diff --git a/lib/commit.js b/lib/commit.js index b54f9f489..3bdcca7bd 100644 --- a/lib/commit.js +++ b/lib/commit.js @@ -1,34 +1,15 @@ -var git = require('../'); -var Commit = git.Commit; -var Oid = git.Oid; -var Revwalk = git.Revwalk; -var events = require('events'); -var Tree = require("./tree"); - -// Backwards compatibility. -Object.defineProperties(Commit.prototype, { - "oid": { - value: Commit.prototype.id, - enumerable: false - }, - - "offset": { - value: Commit.prototype.timeOffset, - enumerable: false - }, - - "parentCount": { - value: Commit.prototype.parentcount, - enumerable: false - } -}); +var events = require("events"); +var Promise = require("promise"); +var NodeGit = require("../"); + +var Commit = NodeGit.Commit; /** * Retrieve the SHA. * @return {String} */ Commit.prototype.sha = function() { - return this.oid().toString(); + return this.id().toString(); }; /** @@ -49,10 +30,12 @@ Commit.prototype.date = function() { /** * Get the tree associated with this commit. + * + * @param {Function} callback * @return {Tree} */ Commit.prototype.getTree = function(callback) { - this.repo.getTree(this.treeId(), callback); + return this.repo.getTree(this.treeId(), callback); }; /** @@ -64,18 +47,22 @@ Commit.prototype.getTree = function(callback) { * @return {TreeEntry} */ Commit.prototype.getEntry = function(path, callback) { - this.getTree(function(error, tree) { - if (error) return callback(error); + return this.getTree().then(function(tree) { + return tree.getEntry(path).then(function(entry) { + if (typeof callback === "function") { + callback(null, entry); + } - tree.getEntry(path, callback); - }); + return entry; + }); + }, callback); }; /** * Walk the history from this commit backwards. - * An EventEmitter is returned that will emit a 'commit' event for each - * commit in the history, and one 'end' event when the walk is completed. - * Don't forget to call `start()` on the returned event. + * An EventEmitter is returned that will emit a "commit" event for each + * commit in the history, and one "end" event when the walk is completed. + * Don"t forget to call `start()` on the returned event. * * @fires Commit#commit * @fires Commit#end @@ -84,7 +71,7 @@ Commit.prototype.getEntry = function(path, callback) { */ Commit.prototype.history = function() { var event = new events.EventEmitter(); - var oid = this.oid(); + var oid = this.id(); var revwalk = this.repo.createRevWalk(); revwalk.sorting.apply(revwalk, arguments); @@ -93,14 +80,16 @@ Commit.prototype.history = function() { event.start = function() { revwalk.walk(oid, function commitRevWalk(error, commit) { - if (error) return event.emit('error', error); + if (error) { + return event.emit("error", error); + } if (!commit) { - event.emit('end', commits); + event.emit("end", commits); return; } - event.emit('commit', commit); + event.emit("commit", commit); commits.push(commit); }); }; @@ -109,36 +98,70 @@ Commit.prototype.history = function() { }; /** - * Retrieve the commit's parents -- as commit objects. + * Retrieve the commit"s parents -- as commit objects. * + * @param {number} limit - Optional amount of parents to return. * @param {Function} callback * @return {[Commit]} array of commits */ -Commit.prototype.getParents = function(callback) { - var self = this; - function processParents(commit, n, acc, callback) { - if (n < 0) return callback(null, acc); - - self.repo.getCommit(self.parentId(n), function nextParent(error, parent) { - if (error) return callback(error); - processParents(parent, n-1, acc.concat([parent]), callback); +Commit.prototype.getParents = function(limit, callback) { + var parents = []; + var i = 0; + + // Shift arguments. + if (typeof limit === "function") { + callback = limit; + } + + // If no limit was set, default to the maximum parents. + limit = typeof limit === "number" ? limit : this.parentcount(); + + function processParents(commit, callback) { + var oid = commit.parentId(i); + + var parent = commit.repo.getCommit(oid).then(function(parent) { + if (--limit) { + i = i + 1; + return processParents(parent, callback); + } + + return parent; }); + + // Add this parent to the list. + parents.push(parent); + + return parent; } - processParents(this, this.parentCount() - 1, [], callback); + // Process all the parents. + if (limit) { + processParents(this, callback); + } + + // Wait for all parents to complete, before returning. + return Promise.all(parents).then(function(parents) { + if (typeof callback === "function") { + callback(null, parents); + } + + return parents; + }, callback); }; /** - * Retrieve the commit's parent shas. + * Retrieve the commit"s parent shas. * * @param {Function} callback * @return {[Oid]} array of oids */ Commit.prototype.parents = function() { var result = []; - for (var i = 0; i < this.parentCount(); i++) { + + for (var i = 0; i < this.parentcount(); i++) { result.push(this.parentId(i)); } + return result; }; @@ -150,30 +173,25 @@ Commit.prototype.parents = function() { * @return {[Diff]} an array of diffs */ Commit.prototype.getDiff = function(callback) { - var self = this; - self.getParents(function commitParents(error, parents) { - if (error) return callback(error); - - var parentDiffs = []; - parents.forEach(function commitEachParent(parent) { - parent.getTree(function(error, parentTree) { - if (error) return callback(error); - - self.getTree(function(error, thisTree) { - if (error) return callback(error); - - parentTree.diff(thisTree, function walkDiff(error, diff) { - if (error) return callback(error); - - parentDiffs.push(diff); - if (parentDiffs.length === parents.length) { - callback(null, parentDiffs); - } - }); + var commit = this; + + return commit.getParents().then(function(parents) { + var diffs = parents.map(function(parent) { + return parent.getTree().then(function(parentTree) { + return commit.getTree().then(function(thisTree) { + return parentTree.diff(thisTree); }); }); }); - }); + + return Promise.all(diffs); + }).then(function(diffs) { + if (typeof callback === "function") { + callback(null, diffs); + } + + return diffs; + }, callback); }; /** @@ -183,3 +201,5 @@ Commit.prototype.getDiff = function(callback) { Commit.prototype.toString = function() { return this.sha(); }; + +module.exports = Commit; diff --git a/lib/convenient_hunk.js b/lib/convenient_hunk.js index 050f89a6a..601c24186 100644 --- a/lib/convenient_hunk.js +++ b/lib/convenient_hunk.js @@ -32,4 +32,4 @@ ConvenientHunk.prototype.lines = function() { return result; }; -exports.ConvenientHunk = ConvenientHunk; +module.exports = ConvenientHunk; diff --git a/lib/convenient_patch.js b/lib/convenient_patch.js index fbf4fb208..54fedc17e 100644 --- a/lib/convenient_patch.js +++ b/lib/convenient_patch.js @@ -1,6 +1,6 @@ -var git = require('../'); +var git = require("../"); var Diff = git.Diff; -var ConvenientHunk = require('./convenient_hunk').ConvenientHunk; +var ConvenientHunk = require("./convenient_hunk"); function ConvenientPatch(delta, patch) { this.delta = delta; @@ -126,4 +126,4 @@ ConvenientPatch.prototype.isTypeChange = function() { return this.status() == Diff.Delta.TypeChange; }; -exports.ConvenientPatch = ConvenientPatch; +module.exports = ConvenientPatch; diff --git a/lib/diff.js b/lib/diff.js index dab94f83f..9804bc5c9 100644 --- a/lib/diff.js +++ b/lib/diff.js @@ -1,15 +1,8 @@ -var git = require('../'); -var Diff = git.Diff; -var Patch = git.Patch; -var ConvenientPatch = require('./convenient_patch').ConvenientPatch; -var events = require('events'); +var NodeGit = require("../"); +var Patch = require("./patch"); +var ConvenientPatch = require("./convenient_patch"); -Object.defineProperties(Diff.prototype, { - size: { - value: Diff.prototype.numDeltas, - enumerable: false - } -}); +var Diff = NodeGit.Diff; /** * Refer to vendor/libgit2/include/git2/diff.h for delta type definitions. @@ -36,14 +29,14 @@ Diff.Delta = { * @enum {String} */ Diff.LineOrigin = { - /** ' ' */ Context: 32, - /** '+' */ Addition: 43, - /** '-' */ Deletion: 45, - /** '\n' */ AddEofNl: 13, - /** '' */ DelEofNl: 0, - /** 'F' */ FileHdr: 106, - /** 'H' */ HunkHdr: 110, - /** 'B' */ Binary: 102 + /** " " */ Context: 32, + /** "+" */ Addition: 43, + /** "-" */ Deletion: 45, + /** "\n" */ AddEofNl: 13, + /** "" */ DelEofNl: 0, + /** "F" */ FileHdr: 106, + /** "H" */ HunkHdr: 110, + /** "B" */ Binary: 102 }; /** @@ -52,10 +45,14 @@ Diff.LineOrigin = { * @return {[ConvenientPatch]} an array of ConvenientPatches */ Diff.prototype.patches = function() { - var size = this.size(); + var size = this.numDeltas(); var result = []; + for (var i = 0; i < size; i++) { result.push(new ConvenientPatch(this.getDelta(i), Patch.fromDiff(this, i))); } + return result; }; + +module.exports = Diff; diff --git a/lib/index.js b/lib/index.js index 6dd690e54..f9beecba3 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,15 +1,20 @@ -var git = require('../'), - Index = git.Index; +var NodeGit = require("../"); + +var Index = NodeGit.Index; /** * Return an array of the entries in this index. * @return {[IndexEntry]} an array of IndexEntrys */ Index.prototype.entries = function() { - var size = this.size(), - result = []; + var size = this.size(); + var result = []; + for (var i = 0; i < size; i++) { result.push(this.entry(i)); } + return result; }; + +module.exports = Index; diff --git a/lib/nodegit.js b/lib/nodegit.js old mode 100755 new mode 100644 index e8e1f08c2..9b2cdd428 --- a/lib/nodegit.js +++ b/lib/nodegit.js @@ -8,29 +8,10 @@ try { rawApi = require("../build/Release/nodegit"); } catch (e) { + /* istanbul ignore next */ rawApi = require("../build/Debug/nodegit"); } -// Set the exports prototype to the raw API. -exports.__proto__ = rawApi; - -// Import extensions -require("./commit.js"); -require("./diff.js"); -require("./blob.js"); -require("./object.js"); -require("./signature.js"); -require("./odb.js"); -require("./oid.js"); -require("./index.js"); -require("./repository.js"); -require("./reference.js"); -require("./revwalk.js"); -require("./tree.js"); - -// Wrap asynchronous methods to return promises. -promisify(exports); - // Native methods do not return an identifiable function, so this function will // filter down the function identity to match the libgit2 descriptor. descriptors.forEach(function(descriptor) { @@ -54,6 +35,26 @@ descriptors.forEach(function(descriptor) { }); }); +// Set the exports prototype to the raw API. +exports.__proto__ = rawApi; + +// Import extensions +require("./commit.js"); +require("./diff.js"); +require("./blob.js"); +require("./object.js"); +require("./signature.js"); +require("./odb.js"); +require("./oid.js"); +require("./index.js"); +require("./repository.js"); +require("./refs.js"); +require("./revwalk.js"); +require("./tree.js"); + +// Wrap asynchronous methods to return promises. +promisify(exports); + // Set version. exports.version = require("../package").version; diff --git a/lib/object.js b/lib/object.js index 64c774f84..7037cac0d 100644 --- a/lib/object.js +++ b/lib/object.js @@ -1,8 +1,10 @@ -var git = require('../'); +var NodeGit = require("../"); -git.Object.Type = { - Any: -2, /**< Object can be any of the following */ - Bad: -1, /**< Object is invalid. */ +var Obj = NodeGit.Object; + +Obj.Type = { + Any: -2, /**< Obj can be any of the following */ + Bad: -1, /**< Obj is invalid. */ Ext1: 0, /**< Reserved for future use. */ Commit: 1, /**< A commit object. */ Tree: 2, /**< A tree (directory listing) object. */ @@ -17,30 +19,32 @@ git.Object.Type = { * Is this object a commit? * @return {Boolean} */ -git.Object.prototype.isCommit = function() { - return this.type() == git.Object.Type.Commit; +Obj.prototype.isCommit = function() { + return this.type() == Obj.Type.Commit; }; /** * Is this object a tree? * @return {Boolean} */ -git.Object.prototype.isTree = function() { - return this.type() == git.Object.Type.Tree; +Obj.prototype.isTree = function() { + return this.type() == Obj.Type.Tree; }; /** * Is this object a blob? * @return {Boolean} */ -git.Object.prototype.isBlob = function() { - return this.type() == git.Object.Type.Blob; +Obj.prototype.isBlob = function() { + return this.type() == Obj.Type.Blob; }; /** * Is this object a tag? * @return {Boolean} */ -git.Object.prototype.isTag = function() { - return this.type() == git.Object.Type.Tag; +Obj.prototype.isTag = function() { + return this.type() == Obj.Type.Tag; }; + +module.exports = Obj; diff --git a/lib/odb.js b/lib/odb.js index 28213903d..a93bf894c 100644 --- a/lib/odb.js +++ b/lib/odb.js @@ -1,13 +1,5 @@ -var git = require('../'), - util = require('./util.js'), - Odb = git.Odb; +var git = require("../"); -/** - * Retrieve the object identified by oid. - * - * @param {String|Oid} String sha or Oid - * @param {Function} callback - * @return {git.Object} a git odb object - */ -util.normalizeOid(Odb.prototype, 'read'); -util.makeSafe(Odb.prototype, 'read'); +var Odb = git.Odb; + +module.exports = Odb; diff --git a/lib/oid.js b/lib/oid.js index b9c97e757..5cca29e50 100644 --- a/lib/oid.js +++ b/lib/oid.js @@ -1,5 +1,6 @@ -var git = require('../'), - Oid = git.Oid; +var NodeGit = require("../"); + +var Oid = NodeGit.Oid; // Backwards compatibility. Object.defineProperties(Oid.prototype, { @@ -19,3 +20,5 @@ Object.defineProperties(Oid, { Oid.prototype.inspect = function() { return "[Oid " + this.allocfmt() + "]"; }; + +module.exports = Oid; diff --git a/lib/patch.js b/lib/patch.js new file mode 100644 index 000000000..1d486dca3 --- /dev/null +++ b/lib/patch.js @@ -0,0 +1,5 @@ +var NodeGit = require("../"); + +var Patch = NodeGit.Patch; + +module.exports = Patch; diff --git a/lib/reference.js b/lib/reference.js deleted file mode 100644 index 7bcdd114f..000000000 --- a/lib/reference.js +++ /dev/null @@ -1,63 +0,0 @@ -var git = require('../'), - Reference = git.Refs; - -// Backwards compatibility. -Object.defineProperty(git, "Reference", { - value: Reference, - enumerable: false -}); - -var oldSymbolicTarget = Reference.prototype.symbolicTarget, - oldTarget = Reference.prototype.target; - -Reference.Type = { - Oid: 1, - Symbolic: 2, - All: 3 -}; - -/** - * Returns true if this reference is not symbolic - * @return {Boolean} - */ -Reference.prototype.isConcrete = function() { - return this.type() == Reference.Type.Oid; -}; - -/** - * Returns true if this reference is symbolic - * @return {Boolean} - */ -Reference.prototype.isSymbolic = function() { - return this.type() == Reference.Type.Symbolic; -}; - -/** - * Returns the target of this symbolic reference. - * @return {Reference} - * @throws if the target is not symbolic. - */ -Reference.prototype.symbolicTarget = function() { - if (!this.isSymbolic()) throw this.name() + " is not symbolic"; - - return oldSymbolicTarget.call(this); -}; - -/** - * Returns the oid of this non-symbolic reference. - * @return {Oid} - * @throws if the target is symbolic. - */ -Reference.prototype.target = function() { - if (!this.isConcrete()) throw this.name() + " is symbolic"; - - return oldTarget.call(this); -}; - -/** - * Returns the name of the reference. - * @return {String} - */ -Reference.prototype.toString = function() { - return this.name(); -}; diff --git a/lib/refs.js b/lib/refs.js new file mode 100644 index 000000000..ee7d60c41 --- /dev/null +++ b/lib/refs.js @@ -0,0 +1,35 @@ +var NodeGit = require("../"); + +var Reference = NodeGit.Refs; + +Reference.Type = { + Oid: 1, + Symbolic: 2, + All: 3 +}; + +/** + * Returns true if this reference is not symbolic + * @return {Boolean} + */ +Reference.prototype.isConcrete = function() { + return this.type() == Reference.Type.Oid; +}; + +/** + * Returns true if this reference is symbolic + * @return {Boolean} + */ +Reference.prototype.isSymbolic = function() { + return this.type() == Reference.Type.Symbolic; +}; + +/** + * Returns the name of the reference. + * @return {String} + */ +Reference.prototype.toString = function() { + return this.name(); +}; + +module.exports = Reference; diff --git a/lib/repository.js b/lib/repository.js index d998c52f6..c84c39164 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -1,47 +1,34 @@ -var git = require('../'); -var util = require('./util'); -var Refs = require('./reference'); -var Commit = git.Commit; -var Revwalk = git.Revwalk; -var Repo = git.Repository; -var Blob = git.Blob; -var Tree = git.Tree; -//var TreeBuilder = git.TreeBuilder; -var Reference = git.Reference; - -// Backwards compatibility. -Object.defineProperty(git, "Repo", { - value: Repo, - enumerable: false -}); - -var oldGetReference = Reference.lookup, - oldGetTree = Tree.lookup, - oldGetTag = Repo.prototype.getTag, - oldCreateRevwalk = Revwalk.createRevwalk, - oldCreateCommit = Commit.createCommit, - oldCreateBlobFromBuffer = Blob.createFrombuffer; +var NodeGit = require("../"); +var normalizeOid = require("./util/normalize_oid"); +var Blob = require("./blob"); +var Tree = require("./tree"); +var Reference = require("./refs"); +var Revwalk = require("./revwalk"); +var Commit = require("./commit"); + +var TreeBuilder = NodeGit.Treebuilder; +var Repository = NodeGit.Repository; /** - * Look up a branch's most recent commit. + * Look up a branch"s most recent commit. * - * @param {String} name Branch name, e.g. 'master' + * @param {String} name Branch name, e.g. "master" * @param {Function} callback * @return {Branch} */ -Repo.prototype.getBranch = function(name, callback) { - var self = this; - this.getReference('refs/heads/' + name, function referenceLookupCallback(error, reference) { - if (error) return callback(error); +Repository.prototype.getBranch = function(name, callback) { + var repository = this; - self.getCommit(reference.target(), function commitLookupCallback(error, commit) { - if (error) return callback(error); + return this.getReference("refs/heads/" + name).then(function(reference) { + return repository.getCommit(reference.target()).then(function(commit) { + if (typeof callback === "function") { + callback(null, commit); + } - callback(null, commit); + return commit; }); - }); + }, callback); }; -util.makeSafe(Repo.prototype, 'getBranch'); /** * Lookup the reference with the given name. @@ -50,24 +37,29 @@ util.makeSafe(Repo.prototype, 'getBranch'); * @param {Function} callback * @return {Reference} */ -Repo.prototype.getReference = function(name, callback) { - var self = this; - oldGetReference.call(this, name, function(error, reference) { - if (error) return callback(error); +Repository.prototype.getReference = function(name, callback) { + var repository = this; + return Reference.lookup(this, name).then(function(reference) { if (reference.type() == Reference.Type.Symbolic) { - reference.resolve(function (error, reference) { - if (error) return callback(error); - reference.repo = self; - callback(null, reference); + return reference.resolve(function (error, reference) { + reference.repo = repository; + + if (callback) { + callback(null, reference); + } + + return reference; }); } else { - reference.repo = self; - callback(null, reference); + reference.repo = repository; + if (callback) { + callback(null, reference); + } + return reference; } - }); + }, callback); }; -util.makeSafe(Repo.prototype, 'getReference'); /** * Retrieve the commit identified by oid. @@ -76,16 +68,21 @@ util.makeSafe(Repo.prototype, 'getReference'); * @param {Function} callback * @return {Commit} */ -Repo.prototype.getCommit = function(oid, callback) { - var self = this; - Commit.lookup(this, oid, function(error, commit) { - if (error) return callback(error); - commit.repo = self; - callback(null, commit); - }); +Repository.prototype.getCommit = function(oid, callback) { + oid = normalizeOid(oid); + + var repository = this; + + return Commit.lookup(repository, oid).then(function(commit) { + commit.repo = repository; + + if (typeof callback === "function") { + callback(null, commit); + } + + return commit; + }, callback); }; -util.normalizeOid(Repo.prototype, 'getCommit'); -util.makeSafe(Repo.prototype, 'getCommit'); /** * Retrieve the blob represented by the oid. @@ -94,16 +91,21 @@ util.makeSafe(Repo.prototype, 'getCommit'); * @param {Function} callback * @return {Blob} */ -Repo.prototype.getBlob = function(oid, callback) { - var self = this; - Blob.lookup(this, oid, function(error, blob) { - if (error) return callback(error); - blob.repo = self; - callback(null, blob); - }); +Repository.prototype.getBlob = function(oid, callback) { + oid = normalizeOid(oid); + + var repository = this; + + return Blob.lookup(repository, oid).then(function(blob) { + blob.repo = repository; + + if (typeof callback === "function") { + callback(null, blob); + } + + return blob; + }, callback); }; -util.normalizeOid(Repo.prototype, 'getBlob'); -util.makeSafe(Repo.prototype, 'getBlob'); /** * Retrieve the tree represented by the oid. @@ -112,16 +114,21 @@ util.makeSafe(Repo.prototype, 'getBlob'); * @param {Function} callback * @return {Tree} */ -Repo.prototype.getTree = function(oid, callback) { - var self = this; - oldGetTree.call(this, oid, function(error, tree) { - if (error) return callback(error); - tree.repo = self; - callback(null, tree); - }); +Repository.prototype.getTree = function(oid, callback) { + oid = normalizeOid(oid); + + var repository = this; + + return Tree.lookup(repository, oid).then(function(tree) { + tree.repo = repository; + + if (typeof callback === "function") { + callback(null, tree); + } + + return tree; + }, callback); }; -util.normalizeOid(Repo.prototype, 'getTree'); -util.makeSafe(Repo.prototype, 'getTree'); /** * Retrieve the tag represented by the oid. @@ -130,23 +137,32 @@ util.makeSafe(Repo.prototype, 'getTree'); * @param {Function} callback * @return {Tag} */ -Repo.prototype.getTag = function(oid, callback) { - var self = this; - oldGetTag.call(this, oid, callback); +Repository.prototype.getTag = function(oid, callback) { + oid = normalizeOid(oid); + + var repository = this; + + return Reference.lookup(repository, oid).then(function(reference) { + reference.repo = repository; + + if (typeof callback === "function") { + callback(null, reference); + } + + return reference; + }, callback); }; -util.normalizeOid(Repo.prototype, 'getTag'); -util.makeSafe(Repo.prototype, 'getTag'); /** - * Instantiate a new revision walker for browsing the Repo's history. + * Instantiate a new revision walker for browsing the Repository"s history. * See also `Commit.prototype.history()` * * @param {String|Oid} String sha or Oid * @param {Function} callback * @return {RevWalk} */ -Repo.prototype.createRevWalk = function() { - var revWalk = oldCreateRevwalk(this); +Repository.prototype.createRevWalk = function() { + var revWalk = Revwalk.createRevwalk(this); revWalk.repo = this; return revWalk; }; @@ -157,8 +173,8 @@ Repo.prototype.createRevWalk = function() { * @param {Function} callback * @return {Branch} */ -Repo.prototype.getMaster = function(callback) { - this.getBranch('master', callback); +Repository.prototype.getMaster = function(callback) { + return this.getBranch("master", callback); }; /** @@ -166,16 +182,21 @@ Repo.prototype.getMaster = function(callback) { * * @param {String} updateRef * @param {Signature} author - * @param {Signature} commiter + * @param {Signature} committer * @param {String} message * @param {Tree|Oid|String} Tree * @param {Array} parents * @param {Function} callback * @return {Oid} The oid of the commit */ -Repo.prototype.createCommit = function(updateRef, author, committer, message, tree, parents, callback) { +Repository.prototype.createCommit = function( + updateRef, author, committer, message, tree, parents, callback) { + + var createCommit = null; + var commit = this; + if (tree instanceof Tree) { - oldCreateCommit.call( + commit = Commit.createCommit.call( this, updateRef, author, @@ -183,24 +204,32 @@ Repo.prototype.createCommit = function(updateRef, author, committer, message, tr null /* use default message encoding */, message, tree, - parents.length, parents, - callback); + parents.length, + parents + ); } else { - var self = this; - this.getTree(tree, function(error, tree) { - if (error) return callback(error); - oldCreateCommit.call( - self, + createCommit = this.getTree(tree).then(function(tree) { + return Commit.createCommit.call( + commit, updateRef, author, committer, null /* use default message encoding */, message, tree, - parents.length, parents, - callback); + parents.length, + parents + ); }); } + + return createCommit.then(function(commit) { + if (typeof callback === "function") { + callback(null, commit); + } + + return commit; + }, callback); }; /** @@ -210,19 +239,22 @@ Repo.prototype.createCommit = function(updateRef, author, committer, message, tr * @param {Function} callback * @return {Blob} */ -Repo.prototype.createBlobFromBuffer = function(buffer, callback) { - oldCreateBlobFromBuffer.call(this, buffer, buffer.length, callback); +Repository.prototype.createBlobFromBuffer = function(buffer, callback) { + return Blob.createFrombuffer.call(this, buffer, buffer.length, callback); }; /** * Create a new tree builder. * * @param {Tree} tree - * @param {Function} callback */ -Repo.prototype.treeBuilder = function(callback) { +Repository.prototype.treeBuilder = function() { var builder = TreeBuilder.create(null); + builder.root = builder; builder.repo = this; + return builder; }; + +module.exports = Repository; diff --git a/lib/revwalk.js b/lib/revwalk.js index 6f65ce65e..04d064826 100644 --- a/lib/revwalk.js +++ b/lib/revwalk.js @@ -1,9 +1,10 @@ -var git = require('../'); -var util = require('./util'); -var Revwalk = git.Revwalk; +var NodeGit = require("../"); +var normalizeOid = require("./util/normalize_oid"); + +var Revwalk = NodeGit.Revwalk; // Backwards compatibility. -Object.defineProperty(git, "RevWalk", { +Object.defineProperty(NodeGit, "RevWalk", { value: Revwalk, enumerable: false }); @@ -11,7 +12,7 @@ Object.defineProperty(git, "RevWalk", { var oldSorting = Revwalk.prototype.sorting; /** - * Refer to vendor/libgit2/include/git2/revwalk.h for sort definitions. + * Refer to vendor/libNodeGit2/include/NodeGit2/revwalk.h for sort definitions. */ Revwalk.Sort = { None: 0, @@ -22,14 +23,17 @@ Revwalk.Sort = { /** * Set the sort order for the revwalk. This function takes variable arguments - * like `revwalk.sorting(git.RevWalk.Topological, git.RevWalk.Reverse).` + * like `revwalk.sorting(NodeGit.RevWalk.Topological, NodeGit.RevWalk.Reverse).` * * @param {Number} sort */ Revwalk.prototype.sorting = function() { var sort = 0; - for (var i = 0; i < arguments.length; i++) + + for (var i = 0; i < arguments.length; i++) { sort |= arguments[i]; + } + oldSorting.call(this, sort); }; @@ -42,26 +46,33 @@ Revwalk.prototype.sorting = function() { * @return {Commit} */ Revwalk.prototype.walk = function(oid, callback) { - var self = this; + oid = normalizeOid(oid); + + var revwalk = this; this.push(oid); function walk() { - self.next(function revWalkNext(error, oid) { - if (error) return callback(error); - if (!oid) return callback(); + revwalk.next().then(function(oid) { + if (!oid) { + if (typeof callback === "function") { + return callback(); + } + + return; + } - self.repo.getCommit(oid, function revWalkCommitLookup(error, commit) { - if (error) return callback(error); + revwalk.repo.getCommit(oid).then(function(commit) { + if (typeof callback === "function") { + callback(null, commit); + } - callback(null, commit); walk(); }); - }); + }, callback); } walk(); }; -util.normalizeOid(Revwalk.prototype, 'walk'); -util.makeSafe(Revwalk.prototype, 'walk'); +module.exports = Revwalk; diff --git a/lib/signature.js b/lib/signature.js index 652793a07..ed530322a 100644 --- a/lib/signature.js +++ b/lib/signature.js @@ -1,10 +1,13 @@ -var git = require('../'), - Signature = git.Signature; +var NodeGit = require("../"); +var Signature = NodeGit.Signature; /** * Standard string representation of an author. - * @return {String} + * + * @return {string} Representation of the author. */ Signature.prototype.toString = function() { return this.name().toString() + " <" + this.email().toString() + ">"; }; + +module.exports = Signature; diff --git a/lib/tree.js b/lib/tree.js index 9d72b2296..e4d7ec184 100644 --- a/lib/tree.js +++ b/lib/tree.js @@ -1,17 +1,8 @@ -var git = require('../'); +var git = require("../"); var Tree = git.Tree; -var TreeBuilder = git.Treebuilder; +var Treebuilder = git.Treebuilder; var Diff = git.Diff; -var DiffOptions = git.DiffOptions; -var TreeEntry = require('./tree_entry'); -var events = require('events'); -var path = require('path'); - -var oldBuilder = TreeBuilder.create; -var oldEntryByIndex = Tree.prototype.entryByindex; -var oldEntryByName = Tree.prototype.entryByname; -var oldGetEntry = Tree.prototype.entryBypath; -var oldTreeToTree = Diff.treeToTree; +var events = require("events"); // Backwards compatibility. Object.defineProperties(Tree.prototype, { @@ -28,7 +19,13 @@ Object.defineProperties(Tree.prototype, { * @return {DiffList} */ Tree.prototype.diff = function(tree, callback) { - oldTreeToTree.call(this.repo, tree, this, null, callback); + return Diff.treeToTree(this.repo, tree, this, null).then(function(diff) { + if (typeof callback === "function") { + callback(null, diff); + } + + return diff; + }, callback); }; /** @@ -38,7 +35,7 @@ Tree.prototype.diff = function(tree, callback) { * @return {TreeEntry} */ Tree.prototype.entryByIndex = function(i) { - var entry = oldEntryByIndex.call(this, i); + var entry = this.entryByindex(i); entry.parent = this; return entry; }; @@ -50,7 +47,7 @@ Tree.prototype.entryByIndex = function(i) { * @return {TreeEntry} */ Tree.prototype.entryByName = function(name) { - var entry = oldEntryByName.call(this, name); + var entry = this.entryByname(name); entry.parent = this; return entry; }; @@ -63,15 +60,16 @@ Tree.prototype.entryByName = function(name) { * @return {TreeEntry} */ Tree.prototype.getEntry = function(path, callback) { - // FIXME: this method ought to implement the recursion directly, rather than - // rely on oldGetEntry, in order to ensure that `parent` pointers are direct. - var self = this; - oldGetEntry.call(this, path, function(error, entry) { - if (error) return callback(error); + var tree = this; + + return this.entryBypath(path).then(function(entry) { + entry.parent = tree; - entry.parent = self; - entry.path = function() { return path; }; - callback(null, entry); + if (typeof callback === "function") { + callback(null, entry); + } + + return entry; }); }; @@ -80,31 +78,34 @@ Tree.prototype.getEntry = function(path, callback) { * @return {[TreeEntry]} an array of TreeEntrys */ Tree.prototype.entries = function() { - var size = this.entrycount(), - result = []; + var size = this.entrycount(); + var result = []; + for (var i = 0; i < size; i++) { result.push(this.entryByIndex(i)); } + return result; }; /** - * Recursively walk the tree in breadth-first order. Fires an event for each entry. + * Recursively walk the tree in breadth-first order. Fires an event for each + * entry. * * @fires Tree#entry * @fires Tree#end * - * @param {Boolean} [blobsOnly = true] True to emit only blob & blob executable entries. + * @param {Boolean} [blobsOnly = true] True to emit only blob & blob executable + * entries. * * @return {EventEmitter} */ Tree.prototype.walk = function(blobsOnly) { - if (typeof blobsOnly == 'undefined') blobsOnly = true; + blobsOnly = typeof blobsOnly === "boolean" ? blobsOnly : true; - var self = this, - event = new events.EventEmitter(), - entries = [], - errors = []; + var self = this; + var event = new events.EventEmitter(); + var entries = []; var total = 1; @@ -112,12 +113,14 @@ Tree.prototype.walk = function(blobsOnly) { // the recursive call to `entry.getTree(bfs)` function bfs(error, tree) { total--; - if (error) return errors.push(error); + + if (error) { + return event.emit("error", error); + } tree.entries().forEach(function (entry) { - entry.__proto__ = TreeEntry.prototype; if (!blobsOnly || entry.isFile()) { - event.emit('entry', entry); + event.emit("entry", entry); entries.push(entry); } @@ -126,8 +129,10 @@ Tree.prototype.walk = function(blobsOnly) { entry.getTree(bfs); } }); - if (total === 0) - event.emit('end', errors.length ? errors : null, entries); + + if (total === 0) { + event.emit("end", entries); + } } event.start = function() { @@ -142,16 +147,20 @@ Tree.prototype.walk = function(blobsOnly) { * @return {String} */ Tree.prototype.path = function(blobsOnly) { - return this.entry ? this.entry.path() : ''; + return this.entry ? this.entry.path() : ""; }; /** * Make builder. This is helpful for modifying trees. - * @return {TreeBuilder} + * @return {Treebuilder} */ Tree.prototype.builder = function() { - var builder = oldBuilder.call(this); + var builder = Treebuilder.create(this); + builder.root = builder; builder.repo = this.repo; + return builder; }; + +module.exports = Tree; diff --git a/lib/tree_entry.js b/lib/tree_entry.js index a3eaaf830..0b1d1cdaa 100644 --- a/lib/tree_entry.js +++ b/lib/tree_entry.js @@ -1,6 +1,7 @@ -var git = require('../'), - TreeEntry = git.TreeEntry, - path = require('path'); +var path = require("path"); +var NodeGit = require("../"); + +var TreeEntry = NodeGit.TreeEntry; // Backwards compatibility. Object.defineProperty(TreeEntry.prototype, "name", { @@ -65,21 +66,25 @@ TreeEntry.prototype.sha = function() { * @return {Tree} */ TreeEntry.prototype.getTree = function(callback) { - var self = this; - this.parent.repo.getTree(this.oid(), function(error, tree) { - if (error) return callback(error); + var entry = this; + + return this.parent.repo.getTree(this.oid()).then(function(tree) { + tree.entry = entry; + + if (typeof callback === "function") { + callback(null, tree); + } - tree.entry = self; - callback(null, tree); - }); + return tree; + }, callback); }; /** * Retrieve the tree for this entry. Make sure to call `isTree` first! * @return {Blob} */ -TreeEntry.prototype.getBlob = function(callback) { - this.parent.repo.getBlob(this.oid(), callback); +TreeEntry.prototype.getBlob = function() { + return this.parent.repo.getBlob(this.oid()); }; /** diff --git a/lib/util.js b/lib/util.js deleted file mode 100644 index 0bb65223e..000000000 --- a/lib/util.js +++ /dev/null @@ -1,21 +0,0 @@ -var git = require('../'); - -exports.makeSafe = function(object, key) { - var oldFn = object[key]; - object[key] = function() { - try { - oldFn.apply(this, arguments); - } catch (e) { - var callback = arguments[arguments.length - 1]; - callback(e); - } - }; -}; - -exports.normalizeOid = function(object, key) { - var oldFn = object[key]; - object[key] = function(oid) { - if (typeof oid === 'string') oid = git.Oid.fromString(oid); - oldFn.apply(this, arguments); - }; -}; diff --git a/lib/util/normalize_oid.js b/lib/util/normalize_oid.js new file mode 100644 index 000000000..f08efcc07 --- /dev/null +++ b/lib/util/normalize_oid.js @@ -0,0 +1,18 @@ +var NodeGit = require("../../"); + +/** + * Normalize an identifier to always be an OID instance. + * + * @param {String, Object} oid - The oid string or instance. + * @return {Object} An Oid instance. + */ +function normalizeOid(oid) { + try { + return typeof oid === "string" ? NodeGit.Oid.fromString(oid) : oid; + } + catch (ex) { + return null; + } +} + +module.exports = normalizeOid; diff --git a/package.json b/package.json index fc94a81a3..46e04f952 100644 --- a/package.json +++ b/package.json @@ -49,13 +49,16 @@ "rimraf": "~2.2.8", "tar": "~0.1.19", "which": "~1.0.5", + "promise": "~4.0.0", "promisify-node": "~0.1.2" }, "devDependencies": { - "jshint": "~2.5.1", "async": "~0.9.0", "aws-sdk": "~2.0.0-rc.20", "ejs": "~1.0.0", + "istanbul": "~0.2.14", + "jshint": "~2.5.1", + "mocha": "~1.20.1", "nodeunit": "~0.9.0" }, "binary": { @@ -64,8 +67,9 @@ "host": "https://s3.amazonaws.com/nodegit/nodegit/" }, "scripts": { - "lint": "jshint lib test/*.js", - "test": "cd test && nodeunit nodegit.js", + "lint": "jshint lib test/tests", + "mocha": "istanbul cover node_modules/mocha/bin/_mocha -- test/runner test/tests --report=lcov", + "test": "npm run lint && npm run mocha", "publish": "node-pre-gyp package && node-pre-gyp publish", "generate": "node generate/setup && node generate", "install": "npm run generate && node install" diff --git a/test/blob.js b/test/blob.js deleted file mode 100644 index 864d2b74b..000000000 --- a/test/blob.js +++ /dev/null @@ -1,13 +0,0 @@ -var git = require("../"), - path = require("path"); - -exports.content = function(test) { - var testOid = git.Oid.fromstr("111dd657329797f6165f52f5085f61ac976dcf04"); - test.expect(1); - git.Repo.open(path.resolve("repos/workdir/.git"), function(err, repo) { - repo.getBlob(testOid, function(err, blob) { - test.equals(blob.toString().slice(0, 7), "@import"); - test.done(); - }); - }); -}; diff --git a/test/commit.js b/test/commit.js deleted file mode 100644 index cdc4f9a3c..000000000 --- a/test/commit.js +++ /dev/null @@ -1,241 +0,0 @@ -var git = require('../'), - rimraf = require('rimraf'), - fs = require( 'fs' ); - -var historyCountKnownSHA = 'fce88902e66c72b5b93e75bdb5ae717038b221f6'; - -exports.message = function(test) { - test.expect(2); - git.Repo.open('repos/workdir/.git', function(error, repository) { - repository.getCommit(historyCountKnownSHA, function(error, commit) { - var message = commit.message(); - test.equals(error, null, 'There should be no error'); - test.equals(message, 'Update README.md', 'Message should match expected value'); - test.done(); - }); - }); -}; - -exports.sha = function(test) { - test.expect(2); - git.Repo.open('repos/workdir/.git', function(error, repository) { - repository.getCommit(historyCountKnownSHA, function(error, commit) { - var sha = commit.sha(); - test.equals(error, null, 'There should be no error'); - test.equals(sha, historyCountKnownSHA, 'SHA should match expected value'); - test.done(); - }); - }); -}; - -exports.time = function(test) { - test.expect(2); - git.Repo.open('repos/workdir/.git', function(error, repository) { - repository.getCommit(historyCountKnownSHA, function(error, commit) { - var time = commit.timeMs(); - test.equals(error, null, 'There should be no error'); - test.equals(time, 1362012884000, 'Time should match expected value'); - test.done(); - }); - }); -}; - -exports.date = function(test) { - test.expect(2); - git.Repo.open('repos/workdir/.git', function(error, repository) { - repository.getCommit(historyCountKnownSHA, function(error, commit) { - var date = commit.date(); - test.equals(error, null, 'There should be no error'); - test.equals(date.getTime(), 1362012884000, 'Date should match expected value'); - test.done(); - }); - }); -}; - -exports.offset = function(test) { - test.expect(2); - git.Repo.open('repos/workdir/.git', function(error, repository) { - repository.getCommit(historyCountKnownSHA, function(error, commit) { - var offset = commit.offset(); - test.equals(error, null, 'There should be no error'); - test.equals(offset, 780, 'Offset should match expected value'); - test.done(); - }); - }); -}; - -exports.author = function(test) { - test.expect(2); - git.Repo.open('repos/workdir/.git', function(error, repository) { - repository.getCommit(historyCountKnownSHA, function(error, commit) { - var author = commit.author(); - test.equals(error, null, 'There should be no error'); - test.notEqual(author, null, 'Author should not be null'); - test.done(); - }); - }); -}; - -exports.authorName = function(test) { - test.expect(1); - git.Repo.open('repos/workdir/.git', function(error, repository) { - repository.getCommit(historyCountKnownSHA, function(error, commit) { - var author = commit.author(); - var name = author.name(); - test.equals(name, 'Michael Robinson', 'The author name should match expected value'); - test.done(); - }); - }); -}; - -exports.authorEmail = function(test) { - test.expect(1); - git.Repo.open('repos/workdir/.git', function(error, repository) { - repository.getCommit(historyCountKnownSHA, function(error, commit) { - var author = commit.author(); - var email = author.email(); - test.equals(email, 'mike@panmedia.co.nz', 'The author email should match expected value'); - test.done(); - }); - }); -}; - -exports.committerName = function(test) { - test.expect(1); - git.Repo.open('repos/workdir/.git', function(error, repository) { - repository.getCommit(historyCountKnownSHA, function(error, commit) { - var committer = commit.committer(); - var name = committer.name(); - test.equals(name, 'Michael Robinson', 'The author name should match expected value'); - test.done(); - }); - }); -}; - -exports.committerEmail = function(test) { - test.expect(1); - git.Repo.open('repos/workdir/.git', function(error, repository) { - repository.getCommit(historyCountKnownSHA, function(error, commit) { - var committer = commit.committer(); - var email = committer.email(); - test.equals(email, 'mike@panmedia.co.nz', 'The committer email should match expected value'); - test.done(); - }); - }); -}; - -/** - * Test that improper commit ID's result in an error message - */ -exports.improperCommitId = function(test) { - test.expect(1); - git.Repo.open('repos/workdir/.git', function(error, repository) { - repository.getCommit('not a proper commit sha', function(error, commit) { - test.notEqual(error, null, 'Error should occur'); - test.done(); - }); - }); -}; - -/** - * Test that retreiving walking a given commit's history works as expected. - */ -exports.history = function(test) { - test.expect(4); - git.Repo.open('repos/workdir/.git', function(error, repository) { - repository.getCommit(historyCountKnownSHA, function(error, commit) { - test.equals(null, error, 'Getting latest branch commit should not error'); - var historyCount = 0; - var expectedHistoryCount = 364; - commit.history().on('commit', function(commit) { - historyCount++; - }).on('end', function(commits) { - test.equals(null, error, 'There should be no errors'); - test.equals(historyCount, expectedHistoryCount); - test.equals(commits.length, expectedHistoryCount); - test.done(); - }).on('error', function(error) { - test.equals(null, error, 'There should be no errors'); - test.ok(false, 'There should be no errors'); - }).start(); - }); - }); -}; - -/** - * Test that retreiving master branch's HEAD commit works as expected. - */ -exports.masterHead = function(test) { - test.expect(1); - git.Repo.open('repos/workdir/.git', function(error, repository) { - repository.getBranch('master', function(error, branch) { - var sha = branch.sha(); - repository.getCommit(sha, function(error, commit) { - test.equals(error, null, 'Getting latest branch commit should not error'); - test.done(); - }); - }); - }); -}; - -/** - * Test that retreiving parent works as expected. - * - * @param {Object} test - */ -exports.parents = function(test) { - test.expect(3); - git.Repo.open('repos/workdir/.git', function(error, repository) { - repository.getCommit(historyCountKnownSHA, function(error, commit) { - commit.getParents(function(error, parents) { - test.equals(parents.length, 1, 'Commit should have exactly one parent'); - var sha = parents[0].sha(); - test.equals(error, null, 'Getting parent SHA should not error'); - test.equals(sha, 'ecfd36c80a3e9081f200dfda2391acadb56dac27', 'Parent SHA should match expected value'); - test.done(); - }); - }); - }); -}; - -/** - * Test that retrieving and walking a commit's tree works as expected. - */ -exports.tree = function(test) { - test.expect(2); - git.Repo.open('repos/workdir/.git', function(error, repository) { - repository.getCommit(historyCountKnownSHA, function(error, commit) { - test.equals(error, null, 'Getting latest branch commit should not error'); - - var commitTreeEntryCount = 0; - var expectedCommitTreeEntryCount = 198; - commit.getTree(function(error, tree) { - tree.walk().on('entry', function(entry) { - commitTreeEntryCount++; - }).on('end', function(error, entries) { - test.equals(commitTreeEntryCount, expectedCommitTreeEntryCount, 'Commit tree entry count does not match expected'); - test.done(); - }).start(); - }); - }); - }); -}; - -/** - * Test that getDiff works as expected. - */ -exports.getDiff = function(test) { - test.expect(1); - git.Repo.open('repos/workdir/.git', function(error, repository) { - repository.getCommit(historyCountKnownSHA, function(error, commit) { - commit.getDiff(function(error, diff) { - test.equals(diff.length, 1, 'Should be one item in parents diff trees'); - test.done(); - }); - }); - }); -}; - -process.on('uncaughtException', function(err) { - console.log(err.stack); -}); diff --git a/test/diff.js b/test/diff.js deleted file mode 100644 index 70d7279c8..000000000 --- a/test/diff.js +++ /dev/null @@ -1,49 +0,0 @@ -var git = require('../'), - rimraf = require('rimraf'), - fs = require( 'fs' ); - -var historyCountKnownSHA = 'fce88902e66c72b5b93e75bdb5ae717038b221f6'; - -/** - * Test that retreiving parent works as expected. - * - * @param {Object} test - */ -exports.walkingDiffs = function(test) { - test.expect(16); - git.Repo.open('repos/workdir/.git', function(error, repository) { - repository.getCommit(historyCountKnownSHA, function(error, commit) { - commit.getDiff(function(error, diff) { - test.equal(null, error, 'Should not error'); - - diff[0].patches().forEach(function(patch) { - test.equal(null, error, 'Should not error'); - - test.equal(patch.oldFile().path(), 'README.md', 'Old file path should match expected'); - test.equal(patch.newFile().path(), 'README.md', 'New file path should match expected'); - test.equal(patch.size(), 1, 'Content array should be of known length'); - test.ok(patch.isModified(), 'Status should be known type'); - - var hunk = patch.hunks()[0]; - test.equal(hunk.size(), 5, 'Content array should be of known length'); - var lines = hunk.lines(); - - test.equal(lines[0].origin(), git.Diff.LineOrigin.Context, 'First content item should be context'); - test.equal(lines[1].origin(), git.Diff.LineOrigin.Context, 'Second content item should be context'); - test.equal(lines[2].origin(), git.Diff.LineOrigin.Context, 'Third content item should be context'); - - var oldContent = '\n__Before submitting a pull request, please ensure both unit tests and lint checks pass.__\n'; - test.equal(lines[2].content(), oldContent, 'Old content should match known value'); - test.equal(lines[3].origin(), git.Diff.LineOrigin.Deletion, 'Fourth content item should be deletion'); - test.equal(lines[4].contentLen(), 90, 'Fourth content length should match known value'); - - var newContent = '__Before submitting a pull request, please ensure both that you\'ve added unit tests to cover your shiny new code, and that all unit tests and lint checks pass.__\n'; - test.equal(lines[3].content(), newContent, 'New content should match known value'); - test.equal(lines[4].origin(), git.Diff.LineOrigin.Addition, 'Fifth content item should be addition'); - test.equal(lines[3].contentLen(), 162, 'Fifth content length should match known value'); - test.done(); - }); - }); - }); - }); -}; diff --git a/test/nodegit.js b/test/nodegit.js deleted file mode 100644 index 3a66ba805..000000000 --- a/test/nodegit.js +++ /dev/null @@ -1,50 +0,0 @@ -var fs = require('fs'); -var rimraf = require('rimraf'); -var exec = require('child_process').exec; -var path = require('path'); -var async = require('async'); - -var testFiles = [ - 'blob', - 'commit', - 'diff', - 'oid', - 'reference', - 'repository', - 'revwalk', - 'tree_entry', - 'tree', -]; - -function setupReposCache(cb) { - fs.mkdir('repos',function() { - async.series([ - function empty(cb) { exec('git init repos/empty',function() { cb(); }); }, - function workdir(cb) { exec('git clone https://github.com/nodegit/nodegit.git repos/workdir',function() { cb(); }); }, - function nonrepo(cb) { - fs.mkdir('repos/nonrepo',function() { - fs.writeFile('repos/nonrepo/file.txt','This is a bogus file',function() { - cb(); - }); - }); - } - ],function() { - cb(); - }); - }); -} - -exports.setUp = function(cb) { - fs.exists('.reposCache', function(exists) { - if (!exists) { - setupReposCache(function(err) { - cb(); - }); - } - }); -}; - -Object.keys(testFiles).forEach(function(fileName) { - var testFile = testFiles[fileName]; - exports[testFile] = require('./' + testFile); -}); diff --git a/test/oid.js b/test/oid.js deleted file mode 100644 index 5018021a8..000000000 --- a/test/oid.js +++ /dev/null @@ -1,10 +0,0 @@ -var git = require('../'); - -var knownSha = 'fce88902e66c72b5b93e75bdb5ae717038b221f6'; - -exports.fromStringAndSha = function(test) { - test.expect(1); - var oid = git.Oid.fromstr(knownSha); - test.equal(oid.allocfmt(), knownSha, 'SHA should match known value'); - test.done(); -}; diff --git a/test/reference.js b/test/reference.js deleted file mode 100644 index e608a622f..000000000 --- a/test/reference.js +++ /dev/null @@ -1,14 +0,0 @@ -var git = require('../'), - rimraf = require('rimraf'); - -// Ref::Lookup -exports.lookup = function(test) { - test.expect(1); - - git.Repo.open('repos/workdir/.git', function(error, repo) { - repo.getReference('refs/heads/master', function(error, reference) { - test.ok(reference instanceof git.Reference); - test.done(); - }); - }); -}; diff --git a/test/repository.js b/test/repository.js deleted file mode 100644 index d0ad4e306..000000000 --- a/test/repository.js +++ /dev/null @@ -1,57 +0,0 @@ -var git = require('../'), - rimraf = require('rimraf'), - fs = require( 'fs' ); - -/** - * Repo - * Ensure the repo method can handle opening repositories with async/sync - * signatures properly. - */ -exports.openInvalidRepo = function(test){ - test.expect(1); - - // Test invalid repository - git.Repo.open('repos/nonrepo', function(error, repository) { - test.ok(error instanceof Error); - test.done(); - }); -}; - -exports.openValidRepo = function(test){ - test.expect(1); - - // Test valid repository - git.Repo.open('repos/workdir/.git', function(error, repository) { - test.equals(null, error, 'Valid repository error code'); - test.done(); - }); -}; - -/** - * Ensure repo doesn't attempt to open missing directories - */ -exports.nonexistentDirectory = function(test) { - test.expect(2); - git.Repo.open('/surely/this/directory/does/not/exist/on/this/machine', function(error, repository) { - test.notEqual(error, null, 'Attempting to open a nonexistent directory should error'); - test.equals(repository, null, 'Non existent directory should result in null repository'); - test.done(); - }); -}; - -/** - * Ensure the init method can create repositories at the destination path and - * can create either bare/non-bare. - */ -exports.init = function(test) { - test.expect(2); - // Create bare repo and test for creation - git.Repo.init('repos/newrepo', 1, function(error, path, isBare) { - test.equals(null, error, 'Successfully created bare repository'); - // Verify repo exists - git.Repo.open('repos/newrepo', function(error, path, repo) { - test.equals(null, error, 'Valid repository created'); - test.done(); - }); - }); -}; diff --git a/test/revwalk.js b/test/revwalk.js deleted file mode 100644 index 469f18b51..000000000 --- a/test/revwalk.js +++ /dev/null @@ -1,24 +0,0 @@ -var git = require('../').raw, - path = require('path'), - rimraf = require('rimraf'); - -// Helper functions -var helper = { - // Test if obj is a true function - testFunction: function(test, obj, label) { - // The object reports itself as a function - test(typeof obj, 'function', label +' reports as a function.'); - // This ensures the repo is actually a derivative of the Function [[Class]] - test(toString.call(obj), '[object Function]', label +' [[Class]] is of type function.'); - }, - // Test code and handle exception thrown - testException: function(test, fun, label) { - try { - fun(); - test(false, label); - } - catch (ex) { - test(true, label); - } - } -}; diff --git a/test/runner.js b/test/runner.js new file mode 100644 index 000000000..13156ed8b --- /dev/null +++ b/test/runner.js @@ -0,0 +1,28 @@ +var promisify = require("promisify-node"); +var fs = promisify("fs"); + +// Have to wrap exec, since it has a weird callback signature. +var exec = promisify(function(command, callback) { + return require("child_process").exec(command, callback); +}); + +before(function(done) { + this.timeout(15000); + + var url = "https://github.com/nodegit/nodegit"; + var done = done.bind(null, null); + + fs.exists("test/repos").then(function() { + return fs.mkdir("test/repos").then(function() { + return exec("git init test/repos/empty"); + }).then(function() { + return exec("git clone " + url + " test/repos/workdir"); + }).then(function() { + var nonrepo = "test/repos/nonrepo"; + + return fs.mkdir(nonrepo).then(function() { + return fs.writeFile(nonrepo + "/file.txt", "This is a bogus file"); + }); + }) + }).then(done, done); +}); diff --git a/test/tests/blob.js b/test/tests/blob.js new file mode 100644 index 000000000..3370fadd2 --- /dev/null +++ b/test/tests/blob.js @@ -0,0 +1,39 @@ +var assert = require("assert"); +var path = require("path"); + +describe("Blob", function() { + var reposPath = path.resolve("test/repos/workdir/.git"); + var oid = "111dd657329797f6165f52f5085f61ac976dcf04"; + + var Repository = require("../../lib/repository"); + var FileMode = require("../../lib/tree_entry").FileMode; + + before(function() { + var test = this; + + return Repository.open(reposPath).then(function(repository) { + test.repository = repository; + + return repository.getBlob(oid).then(function(blob) { + test.blob = blob; + }); + }); + }); + + it("can provide content as a buffer", function() { + var contents = this.blob.content(); + + assert.ok(Buffer.isBuffer(contents)); + }); + + it("can provide content as a string", function() { + var contents = this.blob.toString(); + + assert.equal(typeof contents, "string"); + assert.equal(contents.slice(0, 7), "@import"); + }); + + it("can determine if a blob is not a binary", function() { + assert.equal(this.blob.filemode(), FileMode.Blob); + }); +}); diff --git a/test/tests/commit.js b/test/tests/commit.js new file mode 100644 index 000000000..5c6970790 --- /dev/null +++ b/test/tests/commit.js @@ -0,0 +1,161 @@ +var assert = require("assert"); +var path = require("path"); + +var NodeGit = require("../../"); +var Repository = NodeGit.Repository; + +describe("Commit", function() { + var reposPath = path.resolve("test/repos/workdir/.git"); + var oid = "fce88902e66c72b5b93e75bdb5ae717038b221f6"; + + beforeEach(function() { + var test = this; + + return Repository.open(reposPath).then(function(repository) { + test.repository = repository; + + return repository.getCommit(oid).then(function(commit) { + test.commit = commit; + }); + }); + }); + + it("will fail with an invalid sha", function() { + return this.repository.getCommit("invalid").then(null, function(err) { + assert.ok(err instanceof Error); + }); + }); + + it("has a message", function() { + assert.equal(this.commit.message(), "Update README.md"); + }); + + it("has a sha", function() { + assert.equal(this.commit.sha(), oid); + }); + + it("has a time", function() { + assert.equal(this.commit.timeMs(), 1362012884000); + }); + + it("has a date", function() { + assert.equal(this.commit.date().getTime(), 1362012884000); + }); + + it("has a time offset", function() { + assert.equal(this.commit.timeOffset(), 780); + }); + + describe("author", function() { + before(function() { + this.author = this.commit.author(); + }); + + it("is available", function() { + assert.ok(this.author instanceof NodeGit.Signature); + }); + + it("has a name", function() { + assert.equal(this.author.name(), "Michael Robinson"); + }); + + it("has an email", function() { + assert.equal(this.author.email(), "mike@panmedia.co.nz"); + }); + }); + + describe("committer", function() { + before(function() { + this.author = this.commit.committer(); + }); + + it("is available", function() { + assert.ok(this.author instanceof NodeGit.Signature); + }); + + it("has a name", function() { + assert.equal(this.author.name(), "Michael Robinson"); + }); + + it("has an email", function() { + assert.equal(this.author.email(), "mike@panmedia.co.nz"); + }); + }); + + it("can walk its repository's history", function(done) { + var historyCount = 0; + var expectedHistoryCount = 364; + + var history = this.commit.history(); + + history.on("commit", function(commit) { + historyCount++; + }); + + history.on("end", function(commits) { + assert.equal(historyCount, expectedHistoryCount); + assert.equal(commits.length, expectedHistoryCount); + + done(); + }); + + history.on("error", function(err) { + assert.ok(false); + }); + + history.start(); + }); + + it("can fetch the master branch HEAD", function() { + var repository = this.repository; + + return repository.getBranch("master").then(function(branch) { + return repository.getCommit(branch.sha()); + }); + }); + + it("can fetch all its parents", function() { + return this.commit.getParents().then(function(parents) { + assert.equal(parents.length, 1); + + var sha = parents[0].sha(); + assert.equal(sha, "ecfd36c80a3e9081f200dfda2391acadb56dac27"); + }); + }); + + it("can specify a parents limit", function() { + return this.commit.getParents(0).then(function(parents) { + assert.equal(parents.length, 0); + }); + }); + + it("can retrieve and walk a commit tree", function(done) { + var commitTreeEntryCount = 0; + var expectedCommitTreeEntryCount = 198; + + this.commit.getTree().then(function(tree) { + var treeWalker = tree.walk(); + + treeWalker.on("entry", function(entry) { + commitTreeEntryCount++; + }); + + treeWalker.on("error", function() { + assert.ok(false); + }); + + treeWalker.on("end", function(entries) { + assert.equal(commitTreeEntryCount, expectedCommitTreeEntryCount); + done(); + }); + + treeWalker.start(); + }); + }); + + it("can get the commit diff", function() { + return this.commit.getDiff().then(function(diff) { + assert.equal(diff.length, 1); + }); + }); +}); diff --git a/test/tests/convenient_hunk.js b/test/tests/convenient_hunk.js new file mode 100644 index 000000000..e69de29bb diff --git a/test/tests/convenient_patch.js b/test/tests/convenient_patch.js new file mode 100644 index 000000000..e69de29bb diff --git a/test/tests/diff.js b/test/tests/diff.js new file mode 100644 index 000000000..eff7a4252 --- /dev/null +++ b/test/tests/diff.js @@ -0,0 +1,56 @@ +var assert = require("assert"); +var path = require("path"); + +describe("Diff", function() { + var reposPath = path.resolve("test/repos/workdir/.git"); + var oid = "fce88902e66c72b5b93e75bdb5ae717038b221f6"; + + var Repository = require("../../lib/repository"); + var Diff = require("../../lib/diff"); + + before(function() { + var test = this; + + return Repository.open(reposPath).then(function(repository) { + test.repository = repository; + + return repository.getCommit(oid).then(function(commit) { + test.commit = commit; + + return commit.getDiff().then(function(diff) { + test.diff = diff; + }); + }); + }); + }); + + it("can walk a DiffList", function() { + var patch = this.diff[0].patches()[0]; + + assert.equal(patch.oldFile().path(), "README.md"); + assert.equal(patch.newFile().path(), "README.md"); + assert.equal(patch.size(), 1); + assert.ok(patch.isModified()); + + var hunk = patch.hunks()[0]; + assert.equal(hunk.size(), 5); + + var lines = hunk.lines(); + assert.equal(lines[0].origin(), Diff.LineOrigin.Context); + assert.equal(lines[1].origin(), Diff.LineOrigin.Context); + assert.equal(lines[2].origin(), Diff.LineOrigin.Context); + + var oldContent = "\n__Before submitting a pull request, please ensure " + + "both unit tests and lint checks pass.__\n"; + assert.equal(lines[2].content(), oldContent); + assert.equal(lines[3].origin(), Diff.LineOrigin.Deletion); + assert.equal(lines[4].contentLen(), 90); + + var newContent = "__Before submitting a pull request, please ensure " + + "both that you've added unit tests to cover your shiny new code, " + + "and that all unit tests and lint checks pass.__\n"; + assert.equal(lines[3].content(), newContent); + assert.equal(lines[4].origin(), Diff.LineOrigin.Addition); + assert.equal(lines[3].contentLen(), 162); + }); +}); diff --git a/test/tests/index.js b/test/tests/index.js new file mode 100644 index 000000000..e69de29bb diff --git a/test/tests/nodegit.js b/test/tests/nodegit.js new file mode 100644 index 000000000..e69de29bb diff --git a/test/tests/object.js b/test/tests/object.js new file mode 100644 index 000000000..e69de29bb diff --git a/test/tests/odb.js b/test/tests/odb.js new file mode 100644 index 000000000..e69de29bb diff --git a/test/tests/oid.js b/test/tests/oid.js new file mode 100644 index 000000000..0862a755a --- /dev/null +++ b/test/tests/oid.js @@ -0,0 +1,29 @@ +var assert = require("assert"); + +var NodeGit = require("../../"); + +describe("Oid", function() { + var oid = "fce88902e66c72b5b93e75bdb5ae717038b221f6"; + + var Oid = require("../../lib/oid"); + + before(function() { + this.oid = Oid.fromstr(oid); + }); + + it("can convert a string to an oid", function() { + assert.ok(this.oid instanceof NodeGit.Oid); + }); + + it("can convert an oid to a string", function() { + var string = this.oid.allocfmt(); + + assert.equal(string, oid); + }); + + it("provides a custom inspect method to improve debugging", function() { + var inspect = this.oid.inspect(); + + assert.equal(inspect, "[Oid " + oid + "]"); + }); +}); diff --git a/test/tests/patch.js b/test/tests/patch.js new file mode 100644 index 000000000..e69de29bb diff --git a/test/tests/refs.js b/test/tests/refs.js new file mode 100644 index 000000000..d05801abb --- /dev/null +++ b/test/tests/refs.js @@ -0,0 +1,37 @@ +var assert = require("assert"); +var path = require("path"); + +describe("Refs", function() { + var reposPath = path.resolve("test/repos/workdir/.git"); + + var Repository = require("../../lib/repository"); + var Refs = require("../../lib/refs"); + + before(function() { + var test = this; + + return Repository.open(reposPath).then(function(repository) { + test.repository = repository; + + return repository.getReference("refs/heads/master").then(function(refs) { + test.refs = refs; + }); + }); + }); + + it("can look up a reference", function() { + assert.ok(this.refs instanceof Refs); + }); + + it("can determine if the reference is symbolic", function() { + assert.equal(this.refs.isSymbolic(), false); + }); + + it("will fail looking up the target if not symbolic", function() { + var refs = this.refs; + + assert.throws(function() { + refs.symbolicTarget(); + }); + }); +}); diff --git a/test/tests/repository.js b/test/tests/repository.js new file mode 100644 index 000000000..67d8c1f0d --- /dev/null +++ b/test/tests/repository.js @@ -0,0 +1,41 @@ +var assert = require("assert"); +var path = require("path"); + +describe("Repository", function() { + var reposPath = path.resolve("test/repos/workdir/.git"); + var newRepo = path.resolve("test/repos/newrepo"); + + var Repository = require("../../lib/repository"); + + before(function() { + var test = this; + + return Repository.open(reposPath).then(function(repository) { + test.repository = repository; + }); + }); + + it("can open a valid repository", function() { + assert.ok(this.repository instanceof Repository); + }); + + it("cannot open an invalid repository", function() { + return Repository.open("repos/nonrepo").then(null, function(err) { + assert.ok(err instanceof Error); + }); + }); + + it("does not try to open paths that don't exist", function() { + var missingPath = "/surely/this/directory/does/not/exist/on/this/machine"; + + return Repository.open(missingPath).then(null, function(err) { + assert.ok(err instanceof Error); + }); + }); + + it("can initialize a repository into a folder", function() { + return Repository.init(newRepo, 1).then(function(path, isBare) { + return Repository.open(newRepo); + }); + }); +}); diff --git a/test/tests/revwalk.js b/test/tests/revwalk.js new file mode 100644 index 000000000..e69de29bb diff --git a/test/tests/tree_entry.js b/test/tests/tree_entry.js new file mode 100644 index 000000000..e617aa555 --- /dev/null +++ b/test/tests/tree_entry.js @@ -0,0 +1,79 @@ +var assert = require("assert"); +var path = require("path"); + +describe("TreeEntry", function() { + var reposPath = path.resolve("test/repos/workdir/.git"); + var oid = "5716e9757886eaf38d51c86b192258c960d9cfea"; + + var Repository = require("../../lib/repository"); + var Tree = require("../../lib/tree"); + + beforeEach(function() { + var test = this; + + return Repository.open(reposPath).then(function(repository) { + test.repository = repository; + + return repository.getCommit(oid).then(function(commit) { + test.commit = commit; + }); + }); + }); + + it("will fail on a missing file", function() { + return this.commit.getEntry("test/-entry.js").then(null, function(err) { + assert.ok(err instanceof Error); + }); + }); + + it("provides the correct sha for a file", function() { + return this.commit.getEntry("README.md").then(function(entry) { + var sha = entry.sha(); + + assert.equal(sha, "6cb45ba5d32532bf0d1310dc31ca4f20f59964bc"); + }); + }); + + it("provides the filename", function() { + return this.commit.getEntry("test/raw-commit.js").then(function(entry) { + var name = entry.name(); + + assert.equal(name, "raw-commit.js"); + }); + }); + + it("provides the blob representation of the entry", function() { + return this.commit.getEntry("test/raw-commit.js").then(function(entry) { + return entry.getBlob().then(function(blob) { + var size = blob.rawsize(); + + assert.equal(size, 2736); + }); + }); + }); + + it("provides the tree the entry is part of", function() { + return this.commit.getEntry("test").then(function(entry) { + return entry.getTree().then(function(tree) { + assert.ok(tree instanceof Tree); + }); + }); + }); + + it("can determine if an entry is a file", function() { + return this.commit.getEntry("README.md").then(function(entry) { + var isFile = entry.isFile(); + + assert.equal(isFile, true); + }); + }); + + it("can determine if an entry is a directory", function() { + return this.commit.getEntry("example").then(function(entry) { + var isFile = entry.isFile(); + + assert.equal(isFile, false); + }); + }); +}); + diff --git a/test/tree.js b/test/tree.js deleted file mode 100644 index a17f6e84e..000000000 --- a/test/tree.js +++ /dev/null @@ -1,63 +0,0 @@ -var git = require('../'), - rimraf = require('rimraf'), - fs = require('fs'), - path = require('path'); - -var sha = '5716e9757886eaf38d51c86b192258c960d9cfea'; -var fileCount = 512; // Number of blob & blob executabless - -exports.walk = function(test) { - test.expect(515); - - git.Repo.open('repos/workdir/.git', function(error, repo) { - repo.getCommit(sha, function(error, commit) { - var entryCount = 0; - commit.getTree(function(error, tree) { - tree.walk().on('entry', function(index, entry) { - test.equals(error, null, 'There should be no error'); - entryCount++; - }).on('end', function(errors, entries) { - test.equals(errors, null, 'There should be no error'); - test.equals(entryCount, fileCount, 'The manual tree entry count and the "end" tree entry count do not match'); - test.equals(entries.length, fileCount, 'The end entries count and the manual entry count do not match'); - test.done(); - }).start(); - }); - }); - }); -}; - -exports.insert = function(test) { - test.expect(1); - - git.Repo.open('repos/workdir/.git', function(error, repo) { - repo.getCommit(sha, function(error, commit) { - commit.getTree(function(error, tree) { - var text = "this is a file\n", - buffer = new Buffer(text); - repo.createBlobFromBuffer(buffer, function(error, blobId) { - var builder = tree.builder(); - builder.insert("lib_baz_bar.txt", blobId, git.TreeEntry.FileMode.Blob); - builder.write(repo, function(error, treeId) { - repo.getTree(treeId, function(error, tree) { - var author = git.Signature.create("Scott Chacon", "schacon@gmail.com", 123456789, 60), - committer = git.Signature.create("Scott A Chacon", "scott@github.com", 987654321, 90); - repo.createCommit(null, author, committer, "message", tree, [commit], function(error, commitId) { - repo.getCommit(commitId, function(error, commit) { - commit.getTree(function(error, tree) { - tree.getEntry('lib_baz_bar.txt', function(error, entry) { - entry.getBlob(function(error, blob) { - test.equals(blob.toString(), text); - test.done(); - }); - }); - }); - }); - }); - }); - }); - }); - }); - }); - }); -}; diff --git a/test/tree_entry.js b/test/tree_entry.js deleted file mode 100644 index c3d14fe0b..000000000 --- a/test/tree_entry.js +++ /dev/null @@ -1,84 +0,0 @@ -var git = require('../'); - -var sha = '5716e9757886eaf38d51c86b192258c960d9cfea'; - -var getEntry = function(path, callback) { - git.Repo.open('repos/workdir/.git', function(error, repo) { - repo.getCommit(sha, function(error, commit) { - commit.getEntry(path, callback); - }); - }); -}; - -exports.missingFile = function(test) { - test.expect(1); - - getEntry('test/convenience-entry.js', function(error, entry) { - test.notEqual(error, null, 'Missing file should error'); - test.done(); - }); -}; - -exports.sha = function(test) { - test.expect(1); - getEntry('README.md', function(error, entry) { - var sha = entry.sha(); - - test.equal(sha, '6cb45ba5d32532bf0d1310dc31ca4f20f59964bc', 'Entry SHA should match expected value'); - test.done(); - }); -}; - -exports.isFile = function(test) { - test.expect(2); - getEntry('README.md', function(error, entry) { - var isFile = entry.isFile(); - test.equal(isFile, true, 'Entry is a file'); - getEntry('example', function(error, entry) { - var isFile = entry.isFile(); - test.equal(isFile, false, 'Entry is a directory'); - test.done(); - }); - }); -}; - -exports.isDirectory = function(test) { - test.expect(2); - getEntry('example', function(error, entry) { - test.equal(entry.isFile(), false, 'Entry is a directory'); - getEntry('README.md', function(error, entry) { - test.equal(entry.isFile(), true, 'Entry is a file'); - test.done(); - }); - }); -}; - -exports.name = function(test) { - test.expect(2); - getEntry('test/raw-commit.js', function(error, entry) { - test.equal(error, null, 'Should not error'); - var name = entry.name(); - test.equal(name, 'raw-commit.js', 'Name should match expected value'); - test.done(); - }); -}; - -exports.getBlob = function(test) { - test.expect(1); - getEntry('test/raw-commit.js', function(error, entry) { - entry.getBlob(function(error, blob) { - test.equal(blob.size(), 2736, 'Content length should match expected value'); - test.done(); - }); - }); -}; - -exports.getTree = function(test) { - test.expect(1); - getEntry('test', function(error, entry) { - entry.getTree(function(error, tree) { - test.equal(tree instanceof git.Tree, true, 'Expected instance of Tree'); - test.done(); - }); - }); -};