1 /* 2 * Copyright (C) the libgit2 contributors. All rights reserved. 3 * 4 * This file is part of libgit2, distributed under the GNU GPL v2 with 5 * a Linking Exception. For full terms see the included COPYING file. 6 */ 7 #ifndef INCLUDE_git_deprecated_h__ 8 #define INCLUDE_git_deprecated_h__ 9 10 #include "attr.h" 11 #include "config.h" 12 #include "common.h" 13 #include "blame.h" 14 #include "buffer.h" 15 #include "checkout.h" 16 #include "cherrypick.h" 17 #include "clone.h" 18 #include "describe.h" 19 #include "diff.h" 20 #include "errors.h" 21 #include "filter.h" 22 #include "index.h" 23 #include "indexer.h" 24 #include "merge.h" 25 #include "object.h" 26 #include "proxy.h" 27 #include "refs.h" 28 #include "rebase.h" 29 #include "remote.h" 30 #include "trace.h" 31 #include "repository.h" 32 #include "revert.h" 33 #include "revparse.h" 34 #include "stash.h" 35 #include "status.h" 36 #include "submodule.h" 37 #include "worktree.h" 38 #include "credential.h" 39 #include "credential_helpers.h" 40 41 /* 42 * Users can avoid deprecated functions by defining `GIT_DEPRECATE_HARD`. 43 */ 44 #ifndef GIT_DEPRECATE_HARD 45 46 /* 47 * The credential structures are now opaque by default, and their 48 * definition has moved into the `sys/credential.h` header; include 49 * them here for backward compatibility. 50 */ 51 #include "sys/credential.h" 52 53 /** 54 * @file git2/deprecated.h 55 * @brief libgit2 deprecated functions and values 56 * @ingroup Git 57 * @{ 58 */ 59 GIT_BEGIN_DECL 60 61 /** @name Deprecated Attribute Constants 62 * 63 * These enumeration values are retained for backward compatibility. 64 * The newer versions of these functions should be preferred in all 65 * new code. 66 * 67 * There is no plan to remove these backward compatibility values at 68 * this time. 69 */ 70 /**@{*/ 71 72 #define GIT_ATTR_UNSPECIFIED_T GIT_ATTR_VALUE_UNSPECIFIED 73 #define GIT_ATTR_TRUE_T GIT_ATTR_VALUE_TRUE 74 #define GIT_ATTR_FALSE_T GIT_ATTR_VALUE_FALSE 75 #define GIT_ATTR_VALUE_T GIT_ATTR_VALUE_STRING 76 77 #define GIT_ATTR_TRUE(attr) GIT_ATTR_IS_TRUE(attr) 78 #define GIT_ATTR_FALSE(attr) GIT_ATTR_IS_FALSE(attr) 79 #define GIT_ATTR_UNSPECIFIED(attr) GIT_ATTR_IS_UNSPECIFIED(attr) 80 81 typedef git_attr_value_t git_attr_t; 82 83 /**@}*/ 84 85 /** @name Deprecated Blob Functions and Constants 86 * 87 * These functions and enumeration values are retained for backward 88 * compatibility. The newer versions of these functions and values 89 * should be preferred in all new code. 90 * 91 * There is no plan to remove these backward compatibility values at 92 * this time. 93 */ 94 /**@{*/ 95 96 #define GIT_BLOB_FILTER_ATTTRIBUTES_FROM_HEAD GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD 97 98 GIT_EXTERN(int) git_blob_create_fromworkdir(git_oid *id, git_repository *repo, const char *relative_path); 99 GIT_EXTERN(int) git_blob_create_fromdisk(git_oid *id, git_repository *repo, const char *path); 100 GIT_EXTERN(int) git_blob_create_fromstream( 101 git_writestream **out, 102 git_repository *repo, 103 const char *hintpath); 104 GIT_EXTERN(int) git_blob_create_fromstream_commit( 105 git_oid *out, 106 git_writestream *stream); 107 GIT_EXTERN(int) git_blob_create_frombuffer( 108 git_oid *id, git_repository *repo, const void *buffer, size_t len); 109 110 /** Deprecated in favor of `git_blob_filter`. 111 * 112 * @deprecated Use git_blob_filter 113 * @see git_blob_filter 114 */ 115 GIT_EXTERN(int) git_blob_filtered_content( 116 git_buf *out, 117 git_blob *blob, 118 const char *as_path, 119 int check_for_binary_data); 120 121 /**@}*/ 122 123 /** @name Deprecated Filter Functions 124 * 125 * These functions are retained for backward compatibility. The 126 * newer versions of these functions should be preferred in all 127 * new code. 128 * 129 * There is no plan to remove these backward compatibility values at 130 * this time. 131 */ 132 /**@{*/ 133 134 /** Deprecated in favor of `git_filter_list_stream_buffer`. 135 * 136 * @deprecated Use git_filter_list_stream_buffer 137 * @see Use git_filter_list_stream_buffer 138 */ 139 GIT_EXTERN(int) git_filter_list_stream_data( 140 git_filter_list *filters, 141 git_buf *data, 142 git_writestream *target); 143 144 /** Deprecated in favor of `git_filter_list_apply_to_buffer`. 145 * 146 * @deprecated Use git_filter_list_apply_to_buffer 147 * @see Use git_filter_list_apply_to_buffer 148 */ 149 GIT_EXTERN(int) git_filter_list_apply_to_data( 150 git_buf *out, 151 git_filter_list *filters, 152 git_buf *in); 153 154 /**@}*/ 155 156 /** @name Deprecated Tree Functions 157 * 158 * These functions are retained for backward compatibility. The 159 * newer versions of these functions and values should be preferred 160 * in all new code. 161 * 162 * There is no plan to remove these backward compatibility values at 163 * this time. 164 */ 165 /**@{*/ 166 167 /** 168 * Write the contents of the tree builder as a tree object. 169 * This is an alias of `git_treebuilder_write` and is preserved 170 * for backward compatibility. 171 * 172 * This function is deprecated, but there is no plan to remove this 173 * function at this time. 174 * 175 * @deprecated Use git_treebuilder_write 176 * @see git_treebuilder_write 177 */ 178 GIT_EXTERN(int) git_treebuilder_write_with_buffer( 179 git_oid *oid, git_treebuilder *bld, git_buf *tree); 180 181 /**@}*/ 182 183 /** @name Deprecated Buffer Functions 184 * 185 * These functions and enumeration values are retained for backward 186 * compatibility. The newer versions of these functions should be 187 * preferred in all new code. 188 * 189 * There is no plan to remove these backward compatibility values at 190 * this time. 191 */ 192 /**@{*/ 193 194 /** 195 * Free the memory referred to by the git_buf. This is an alias of 196 * `git_buf_dispose` and is preserved for backward compatibility. 197 * 198 * This function is deprecated, but there is no plan to remove this 199 * function at this time. 200 * 201 * @deprecated Use git_buf_dispose 202 * @see git_buf_dispose 203 */ 204 GIT_EXTERN(void) git_buf_free(git_buf *buffer); 205 206 /**@}*/ 207 208 /** @name Deprecated Config Functions and Constants 209 */ 210 /**@{*/ 211 212 #define GIT_CVAR_FALSE GIT_CONFIGMAP_FALSE 213 #define GIT_CVAR_TRUE GIT_CONFIGMAP_TRUE 214 #define GIT_CVAR_INT32 GIT_CONFIGMAP_INT32 215 #define GIT_CVAR_STRING GIT_CONFIGMAP_STRING 216 217 typedef git_configmap git_cvar_map; 218 219 /**@}*/ 220 221 /** @name Deprecated Error Functions and Constants 222 * 223 * These functions and enumeration values are retained for backward 224 * compatibility. The newer versions of these functions and values 225 * should be preferred in all new code. 226 * 227 * There is no plan to remove these backward compatibility values at 228 * this time. 229 */ 230 /**@{*/ 231 232 #define GITERR_NONE GIT_ERROR_NONE 233 #define GITERR_NOMEMORY GIT_ERROR_NOMEMORY 234 #define GITERR_OS GIT_ERROR_OS 235 #define GITERR_INVALID GIT_ERROR_INVALID 236 #define GITERR_REFERENCE GIT_ERROR_REFERENCE 237 #define GITERR_ZLIB GIT_ERROR_ZLIB 238 #define GITERR_REPOSITORY GIT_ERROR_REPOSITORY 239 #define GITERR_CONFIG GIT_ERROR_CONFIG 240 #define GITERR_REGEX GIT_ERROR_REGEX 241 #define GITERR_ODB GIT_ERROR_ODB 242 #define GITERR_INDEX GIT_ERROR_INDEX 243 #define GITERR_OBJECT GIT_ERROR_OBJECT 244 #define GITERR_NET GIT_ERROR_NET 245 #define GITERR_TAG GIT_ERROR_TAG 246 #define GITERR_TREE GIT_ERROR_TREE 247 #define GITERR_INDEXER GIT_ERROR_INDEXER 248 #define GITERR_SSL GIT_ERROR_SSL 249 #define GITERR_SUBMODULE GIT_ERROR_SUBMODULE 250 #define GITERR_THREAD GIT_ERROR_THREAD 251 #define GITERR_STASH GIT_ERROR_STASH 252 #define GITERR_CHECKOUT GIT_ERROR_CHECKOUT 253 #define GITERR_FETCHHEAD GIT_ERROR_FETCHHEAD 254 #define GITERR_MERGE GIT_ERROR_MERGE 255 #define GITERR_SSH GIT_ERROR_SSH 256 #define GITERR_FILTER GIT_ERROR_FILTER 257 #define GITERR_REVERT GIT_ERROR_REVERT 258 #define GITERR_CALLBACK GIT_ERROR_CALLBACK 259 #define GITERR_CHERRYPICK GIT_ERROR_CHERRYPICK 260 #define GITERR_DESCRIBE GIT_ERROR_DESCRIBE 261 #define GITERR_REBASE GIT_ERROR_REBASE 262 #define GITERR_FILESYSTEM GIT_ERROR_FILESYSTEM 263 #define GITERR_PATCH GIT_ERROR_PATCH 264 #define GITERR_WORKTREE GIT_ERROR_WORKTREE 265 #define GITERR_SHA1 GIT_ERROR_SHA1 266 267 /** 268 * Return the last `git_error` object that was generated for the 269 * current thread. This is an alias of `git_error_last` and is 270 * preserved for backward compatibility. 271 * 272 * This function is deprecated, but there is no plan to remove this 273 * function at this time. 274 * 275 * @deprecated Use git_error_last 276 * @see git_error_last 277 */ 278 GIT_EXTERN(const git_error *) giterr_last(void); 279 280 /** 281 * Clear the last error. This is an alias of `git_error_last` and is 282 * preserved for backward compatibility. 283 * 284 * This function is deprecated, but there is no plan to remove this 285 * function at this time. 286 * 287 * @deprecated Use git_error_clear 288 * @see git_error_clear 289 */ 290 GIT_EXTERN(void) giterr_clear(void); 291 292 /** 293 * Sets the error message to the given string. This is an alias of 294 * `git_error_set_str` and is preserved for backward compatibility. 295 * 296 * This function is deprecated, but there is no plan to remove this 297 * function at this time. 298 * 299 * @deprecated Use git_error_set_str 300 * @see git_error_set_str 301 */ 302 GIT_EXTERN(void) giterr_set_str(int error_class, const char *string); 303 304 /** 305 * Indicates that an out-of-memory situation occurred. This is an alias 306 * of `git_error_set_oom` and is preserved for backward compatibility. 307 * 308 * This function is deprecated, but there is no plan to remove this 309 * function at this time. 310 * 311 * @deprecated Use git_error_set_oom 312 * @see git_error_set_oom 313 */ 314 GIT_EXTERN(void) giterr_set_oom(void); 315 316 /**@}*/ 317 318 /** @name Deprecated Index Functions and Constants 319 * 320 * These functions and enumeration values are retained for backward 321 * compatibility. The newer versions of these values should be 322 * preferred in all new code. 323 * 324 * There is no plan to remove these backward compatibility values at 325 * this time. 326 */ 327 /**@{*/ 328 329 #define GIT_IDXENTRY_NAMEMASK GIT_INDEX_ENTRY_NAMEMASK 330 #define GIT_IDXENTRY_STAGEMASK GIT_INDEX_ENTRY_STAGEMASK 331 #define GIT_IDXENTRY_STAGESHIFT GIT_INDEX_ENTRY_STAGESHIFT 332 333 /* The git_indxentry_flag_t enum */ 334 #define GIT_IDXENTRY_EXTENDED GIT_INDEX_ENTRY_EXTENDED 335 #define GIT_IDXENTRY_VALID GIT_INDEX_ENTRY_VALID 336 337 #define GIT_IDXENTRY_STAGE(E) GIT_INDEX_ENTRY_STAGE(E) 338 #define GIT_IDXENTRY_STAGE_SET(E,S) GIT_INDEX_ENTRY_STAGE_SET(E,S) 339 340 /* The git_idxentry_extended_flag_t enum */ 341 #define GIT_IDXENTRY_INTENT_TO_ADD GIT_INDEX_ENTRY_INTENT_TO_ADD 342 #define GIT_IDXENTRY_SKIP_WORKTREE GIT_INDEX_ENTRY_SKIP_WORKTREE 343 #define GIT_IDXENTRY_EXTENDED_FLAGS (GIT_INDEX_ENTRY_INTENT_TO_ADD | GIT_INDEX_ENTRY_SKIP_WORKTREE) 344 #define GIT_IDXENTRY_EXTENDED2 (1 << 15) 345 #define GIT_IDXENTRY_UPDATE (1 << 0) 346 #define GIT_IDXENTRY_REMOVE (1 << 1) 347 #define GIT_IDXENTRY_UPTODATE (1 << 2) 348 #define GIT_IDXENTRY_ADDED (1 << 3) 349 #define GIT_IDXENTRY_HASHED (1 << 4) 350 #define GIT_IDXENTRY_UNHASHED (1 << 5) 351 #define GIT_IDXENTRY_WT_REMOVE (1 << 6) 352 #define GIT_IDXENTRY_CONFLICTED (1 << 7) 353 #define GIT_IDXENTRY_UNPACKED (1 << 8) 354 #define GIT_IDXENTRY_NEW_SKIP_WORKTREE (1 << 9) 355 356 /* The git_index_capability_t enum */ 357 #define GIT_INDEXCAP_IGNORE_CASE GIT_INDEX_CAPABILITY_IGNORE_CASE 358 #define GIT_INDEXCAP_NO_FILEMODE GIT_INDEX_CAPABILITY_NO_FILEMODE 359 #define GIT_INDEXCAP_NO_SYMLINKS GIT_INDEX_CAPABILITY_NO_SYMLINKS 360 #define GIT_INDEXCAP_FROM_OWNER GIT_INDEX_CAPABILITY_FROM_OWNER 361 362 GIT_EXTERN(int) git_index_add_frombuffer( 363 git_index *index, 364 const git_index_entry *entry, 365 const void *buffer, size_t len); 366 367 /**@}*/ 368 369 /** @name Deprecated Object Constants 370 * 371 * These enumeration values are retained for backward compatibility. The 372 * newer versions of these values should be preferred in all new code. 373 * 374 * There is no plan to remove these backward compatibility values at 375 * this time. 376 */ 377 /**@{*/ 378 379 #define git_otype git_object_t 380 381 #define GIT_OBJ_ANY GIT_OBJECT_ANY 382 #define GIT_OBJ_BAD GIT_OBJECT_INVALID 383 #define GIT_OBJ__EXT1 0 384 #define GIT_OBJ_COMMIT GIT_OBJECT_COMMIT 385 #define GIT_OBJ_TREE GIT_OBJECT_TREE 386 #define GIT_OBJ_BLOB GIT_OBJECT_BLOB 387 #define GIT_OBJ_TAG GIT_OBJECT_TAG 388 #define GIT_OBJ__EXT2 5 389 #define GIT_OBJ_OFS_DELTA GIT_OBJECT_OFS_DELTA 390 #define GIT_OBJ_REF_DELTA GIT_OBJECT_REF_DELTA 391 392 /** 393 * Get the size in bytes for the structure which 394 * acts as an in-memory representation of any given 395 * object type. 396 * 397 * For all the core types, this would the equivalent 398 * of calling `sizeof(git_commit)` if the core types 399 * were not opaque on the external API. 400 * 401 * @param type object type to get its size 402 * @return size in bytes of the object 403 */ 404 GIT_EXTERN(size_t) git_object__size(git_object_t type); 405 406 /**@}*/ 407 408 /** @name Deprecated Remote Functions 409 * 410 * These functions are retained for backward compatibility. The newer 411 * versions of these functions should be preferred in all new code. 412 * 413 * There is no plan to remove these backward compatibility functions at 414 * this time. 415 */ 416 /**@{*/ 417 418 /** 419 * Ensure the remote name is well-formed. 420 * 421 * @deprecated Use git_remote_name_is_valid 422 * @param remote_name name to be checked. 423 * @return 1 if the reference name is acceptable; 0 if it isn't 424 */ 425 GIT_EXTERN(int) git_remote_is_valid_name(const char *remote_name); 426 427 /**@}*/ 428 429 /** @name Deprecated Reference Functions and Constants 430 * 431 * These functions and enumeration values are retained for backward 432 * compatibility. The newer versions of these values should be 433 * preferred in all new code. 434 * 435 * There is no plan to remove these backward compatibility values at 436 * this time. 437 */ 438 /**@{*/ 439 440 /** Basic type of any Git reference. */ 441 #define git_ref_t git_reference_t 442 #define git_reference_normalize_t git_reference_format_t 443 444 #define GIT_REF_INVALID GIT_REFERENCE_INVALID 445 #define GIT_REF_OID GIT_REFERENCE_DIRECT 446 #define GIT_REF_SYMBOLIC GIT_REFERENCE_SYMBOLIC 447 #define GIT_REF_LISTALL GIT_REFERENCE_ALL 448 449 #define GIT_REF_FORMAT_NORMAL GIT_REFERENCE_FORMAT_NORMAL 450 #define GIT_REF_FORMAT_ALLOW_ONELEVEL GIT_REFERENCE_FORMAT_ALLOW_ONELEVEL 451 #define GIT_REF_FORMAT_REFSPEC_PATTERN GIT_REFERENCE_FORMAT_REFSPEC_PATTERN 452 #define GIT_REF_FORMAT_REFSPEC_SHORTHAND GIT_REFERENCE_FORMAT_REFSPEC_SHORTHAND 453 454 /** 455 * Ensure the reference name is well-formed. 456 * 457 * Valid reference names must follow one of two patterns: 458 * 459 * 1. Top-level names must contain only capital letters and underscores, 460 * and must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD"). 461 * 2. Names prefixed with "refs/" can be almost anything. You must avoid 462 * the characters '~', '^', ':', '\\', '?', '[', and '*', and the 463 * sequences ".." and "@{" which have special meaning to revparse. 464 * 465 * @deprecated Use git_reference_name_is_valid 466 * @param refname name to be checked. 467 * @return 1 if the reference name is acceptable; 0 if it isn't 468 */ 469 GIT_EXTERN(int) git_reference_is_valid_name(const char *refname); 470 471 GIT_EXTERN(int) git_tag_create_frombuffer( 472 git_oid *oid, 473 git_repository *repo, 474 const char *buffer, 475 int force); 476 477 /**@}*/ 478 479 /** @name Deprecated Revspec Constants 480 * 481 * These enumeration values are retained for backward compatibility. 482 * The newer versions of these values should be preferred in all new 483 * code. 484 * 485 * There is no plan to remove these backward compatibility values at 486 * this time. 487 */ 488 /**@{*/ 489 490 typedef git_revspec_t git_revparse_mode_t; 491 492 #define GIT_REVPARSE_SINGLE GIT_REVSPEC_SINGLE 493 #define GIT_REVPARSE_RANGE GIT_REVSPEC_RANGE 494 #define GIT_REVPARSE_MERGE_BASE GIT_REVSPEC_MERGE_BASE 495 496 /**@}*/ 497 498 /** @name Deprecated Credential Types 499 * 500 * These types are retained for backward compatibility. The newer 501 * versions of these values should be preferred in all new code. 502 * 503 * There is no plan to remove these backward compatibility values at 504 * this time. 505 */ 506 /**@{*/ 507 508 typedef git_credential git_cred; 509 typedef git_credential_userpass_plaintext git_cred_userpass_plaintext; 510 typedef git_credential_username git_cred_username; 511 typedef git_credential_default git_cred_default; 512 typedef git_credential_ssh_key git_cred_ssh_key; 513 typedef git_credential_ssh_interactive git_cred_ssh_interactive; 514 typedef git_credential_ssh_custom git_cred_ssh_custom; 515 516 typedef git_credential_acquire_cb git_cred_acquire_cb; 517 typedef git_credential_sign_cb git_cred_sign_callback; 518 typedef git_credential_sign_cb git_cred_sign_cb; 519 typedef git_credential_ssh_interactive_cb git_cred_ssh_interactive_callback; 520 typedef git_credential_ssh_interactive_cb git_cred_ssh_interactive_cb; 521 522 #define git_credtype_t git_credential_t 523 524 #define GIT_CREDTYPE_USERPASS_PLAINTEXT GIT_CREDENTIAL_USERPASS_PLAINTEXT 525 #define GIT_CREDTYPE_SSH_KEY GIT_CREDENTIAL_SSH_KEY 526 #define GIT_CREDTYPE_SSH_CUSTOM GIT_CREDENTIAL_SSH_CUSTOM 527 #define GIT_CREDTYPE_DEFAULT GIT_CREDENTIAL_DEFAULT 528 #define GIT_CREDTYPE_SSH_INTERACTIVE GIT_CREDENTIAL_SSH_INTERACTIVE 529 #define GIT_CREDTYPE_USERNAME GIT_CREDENTIAL_USERNAME 530 #define GIT_CREDTYPE_SSH_MEMORY GIT_CREDENTIAL_SSH_MEMORY 531 532 GIT_EXTERN(void) git_cred_free(git_credential *cred); 533 GIT_EXTERN(int) git_cred_has_username(git_credential *cred); 534 GIT_EXTERN(const char *) git_cred_get_username(git_credential *cred); 535 GIT_EXTERN(int) git_cred_userpass_plaintext_new( 536 git_credential **out, 537 const char *username, 538 const char *password); 539 GIT_EXTERN(int) git_cred_default_new(git_credential **out); 540 GIT_EXTERN(int) git_cred_username_new(git_credential **out, const char *username); 541 GIT_EXTERN(int) git_cred_ssh_key_new( 542 git_credential **out, 543 const char *username, 544 const char *publickey, 545 const char *privatekey, 546 const char *passphrase); 547 GIT_EXTERN(int) git_cred_ssh_key_memory_new( 548 git_credential **out, 549 const char *username, 550 const char *publickey, 551 const char *privatekey, 552 const char *passphrase); 553 GIT_EXTERN(int) git_cred_ssh_interactive_new( 554 git_credential **out, 555 const char *username, 556 git_credential_ssh_interactive_cb prompt_callback, 557 void *payload); 558 GIT_EXTERN(int) git_cred_ssh_key_from_agent( 559 git_credential **out, 560 const char *username); 561 GIT_EXTERN(int) git_cred_ssh_custom_new( 562 git_credential **out, 563 const char *username, 564 const char *publickey, 565 size_t publickey_len, 566 git_credential_sign_cb sign_callback, 567 void *payload); 568 569 /* Deprecated Credential Helper Types */ 570 571 typedef git_credential_userpass_payload git_cred_userpass_payload; 572 573 GIT_EXTERN(int) git_cred_userpass( 574 git_credential **out, 575 const char *url, 576 const char *user_from_url, 577 unsigned int allowed_types, 578 void *payload); 579 580 /**@}*/ 581 582 /** @name Deprecated Trace Callback Types 583 * 584 * These types are retained for backward compatibility. The newer 585 * versions of these values should be preferred in all new code. 586 * 587 * There is no plan to remove these backward compatibility values at 588 * this time. 589 */ 590 /**@{*/ 591 592 typedef git_trace_cb git_trace_callback; 593 594 /**@}*/ 595 596 /** @name Deprecated Object ID Types 597 * 598 * These types are retained for backward compatibility. The newer 599 * versions of these values should be preferred in all new code. 600 * 601 * There is no plan to remove these backward compatibility values at 602 * this time. 603 */ 604 /**@{*/ 605 606 GIT_EXTERN(int) git_oid_iszero(const git_oid *id); 607 608 /**@}*/ 609 610 /** @name Deprecated Transfer Progress Types 611 * 612 * These types are retained for backward compatibility. The newer 613 * versions of these values should be preferred in all new code. 614 * 615 * There is no plan to remove these backward compatibility values at 616 * this time. 617 */ 618 /**@{*/ 619 620 /** 621 * This structure is used to provide callers information about the 622 * progress of indexing a packfile. 623 * 624 * This type is deprecated, but there is no plan to remove this 625 * type definition at this time. 626 */ 627 typedef git_indexer_progress git_transfer_progress; 628 629 /** 630 * Type definition for progress callbacks during indexing. 631 * 632 * This type is deprecated, but there is no plan to remove this 633 * type definition at this time. 634 */ 635 typedef git_indexer_progress_cb git_transfer_progress_cb; 636 637 /** 638 * Type definition for push transfer progress callbacks. 639 * 640 * This type is deprecated, but there is no plan to remove this 641 * type definition at this time. 642 */ 643 typedef git_push_transfer_progress_cb git_push_transfer_progress; 644 645 /** The type of a remote completion event */ 646 #define git_remote_completion_type git_remote_completion_t 647 648 /** 649 * Callback for listing the remote heads 650 */ 651 typedef int GIT_CALLBACK(git_headlist_cb)(git_remote_head *rhead, void *payload); 652 653 /**@}*/ 654 655 /** @name Deprecated String Array Functions 656 * 657 * These types are retained for backward compatibility. The newer 658 * versions of these values should be preferred in all new code. 659 * 660 * There is no plan to remove these backward compatibility values at 661 * this time. 662 */ 663 /**@{*/ 664 665 /** 666 * Copy a string array object from source to target. 667 * 668 * This function is deprecated, but there is no plan to remove this 669 * function at this time. 670 * 671 * @param tgt target 672 * @param src source 673 * @return 0 on success, < 0 on allocation failure 674 */ 675 GIT_EXTERN(int) git_strarray_copy(git_strarray *tgt, const git_strarray *src); 676 677 /** 678 * Free the memory referred to by the git_strarray. This is an alias of 679 * `git_strarray_dispose` and is preserved for backward compatibility. 680 * 681 * This function is deprecated, but there is no plan to remove this 682 * function at this time. 683 * 684 * @deprecated Use git_strarray_dispose 685 * @see git_strarray_dispose 686 */ 687 GIT_EXTERN(void) git_strarray_free(git_strarray *array); 688 689 /**@}*/ 690 691 /** @name Deprecated Options Initialization Functions 692 * 693 * These functions are retained for backward compatibility. The newer 694 * versions of these functions should be preferred in all new code. 695 * 696 * There is no plan to remove these backward compatibility functions at 697 * this time. 698 */ 699 /**@{*/ 700 701 GIT_EXTERN(int) git_blame_init_options(git_blame_options *opts, unsigned int version); 702 GIT_EXTERN(int) git_checkout_init_options(git_checkout_options *opts, unsigned int version); 703 GIT_EXTERN(int) git_cherrypick_init_options(git_cherrypick_options *opts, unsigned int version); 704 GIT_EXTERN(int) git_clone_init_options(git_clone_options *opts, unsigned int version); 705 GIT_EXTERN(int) git_describe_init_options(git_describe_options *opts, unsigned int version); 706 GIT_EXTERN(int) git_describe_init_format_options(git_describe_format_options *opts, unsigned int version); 707 GIT_EXTERN(int) git_diff_init_options(git_diff_options *opts, unsigned int version); 708 GIT_EXTERN(int) git_diff_find_init_options(git_diff_find_options *opts, unsigned int version); 709 GIT_EXTERN(int) git_diff_format_email_init_options(git_diff_format_email_options *opts, unsigned int version); 710 GIT_EXTERN(int) git_diff_patchid_init_options(git_diff_patchid_options *opts, unsigned int version); 711 GIT_EXTERN(int) git_fetch_init_options(git_fetch_options *opts, unsigned int version); 712 GIT_EXTERN(int) git_indexer_init_options(git_indexer_options *opts, unsigned int version); 713 GIT_EXTERN(int) git_merge_init_options(git_merge_options *opts, unsigned int version); 714 GIT_EXTERN(int) git_merge_file_init_input(git_merge_file_input *input, unsigned int version); 715 GIT_EXTERN(int) git_merge_file_init_options(git_merge_file_options *opts, unsigned int version); 716 GIT_EXTERN(int) git_proxy_init_options(git_proxy_options *opts, unsigned int version); 717 GIT_EXTERN(int) git_push_init_options(git_push_options *opts, unsigned int version); 718 GIT_EXTERN(int) git_rebase_init_options(git_rebase_options *opts, unsigned int version); 719 GIT_EXTERN(int) git_remote_create_init_options(git_remote_create_options *opts, unsigned int version); 720 GIT_EXTERN(int) git_repository_init_init_options(git_repository_init_options *opts, unsigned int version); 721 GIT_EXTERN(int) git_revert_init_options(git_revert_options *opts, unsigned int version); 722 GIT_EXTERN(int) git_stash_apply_init_options(git_stash_apply_options *opts, unsigned int version); 723 GIT_EXTERN(int) git_status_init_options(git_status_options *opts, unsigned int version); 724 GIT_EXTERN(int) git_submodule_update_init_options(git_submodule_update_options *opts, unsigned int version); 725 GIT_EXTERN(int) git_worktree_add_init_options(git_worktree_add_options *opts, unsigned int version); 726 GIT_EXTERN(int) git_worktree_prune_init_options(git_worktree_prune_options *opts, unsigned int version); 727 728 /**@}*/ 729 730 /** @} */ 731 GIT_END_DECL 732 733 #endif 734 735 #endif 736