indexer: deprecate git_transfer_progress Safely deprecate `git_transfer_progress` and `git_transfer_progress_cb` types, forwarding them to the new `git_indexer_progress` and `git_indexer_progress_cb`.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
diff --git a/include/git2/deprecated.h b/include/git2/deprecated.h
index 9d3a091..3777c0e 100644
--- a/include/git2/deprecated.h
+++ b/include/git2/deprecated.h
@@ -245,6 +245,35 @@ GIT_EXTERN(void) giterr_set_oom(void);
/**@}*/
+/** @name Deprecated Transfer Progress Types
+ *
+ * These types are retained for backward compatibility. The newer
+ * versions of these values should be preferred in all new code.
+ *
+ * There is no plan to remove these backward compatibility values at
+ * this time.
+ */
+/**@{*/
+
+/**
+ * This structure is used to provide callers information about the
+ * progress of indexing a packfile.
+ *
+ * This type is deprecated, but there is no plan to remove this
+ * type definition at this time.
+ */
+typedef git_indexer_progress git_transfer_progress;
+
+/**
+ * Type definition for progress callbacks during indexing.
+ *
+ * This type is deprecated, but there is no plan to remove this
+ * type definition at this time.
+ */
+typedef git_indexer_progress_cb git_transfer_progress_cb;
+
+/**@}*/
+
/** @} */
GIT_END_DECL
diff --git a/include/git2/indexer.h b/include/git2/indexer.h
index 094a12b..47c0289 100644
--- a/include/git2/indexer.h
+++ b/include/git2/indexer.h
@@ -46,8 +46,6 @@ typedef struct git_indexer_progress {
size_t received_bytes;
} git_indexer_progress;
-typedef git_indexer_progress git_transfer_progress;
-
/**
* Type for progress callbacks during indexing. Return a value less
* than zero to cancel the indexing or download.
@@ -57,8 +55,6 @@ typedef git_indexer_progress git_transfer_progress;
*/
typedef int GIT_CALLBACK(git_indexer_progress_cb)(const git_indexer_progress *stats, void *payload);
-typedef git_indexer_progress_cb git_transfer_progress_cb;
-
typedef struct git_indexer_options {
unsigned int version;