Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 30a7418

Browse files
committed
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 parent 46bb574 commit 30a7418

File tree

2 files changed

+29
-4
lines changed

2 files changed

+29
-4
lines changed

include/git2/deprecated.h

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,35 @@ GIT_EXTERN(void) giterr_set_oom(void);
245245

246246
/**@}*/
247247

248+
/** @name Deprecated Transfer Progress Types
249+
*
250+
* These types are retained for backward compatibility. The newer
251+
* versions of these values should be preferred in all new code.
252+
*
253+
* There is no plan to remove these backward compatibility values at
254+
* this time.
255+
*/
256+
/**@{*/
257+
258+
/**
259+
* This structure is used to provide callers information about the
260+
* progress of indexing a packfile.
261+
*
262+
* This type is deprecated, but there is no plan to remove this
263+
* type definition at this time.
264+
*/
265+
typedef git_indexer_progress git_transfer_progress;
266+
267+
/**
268+
* Type definition for progress callbacks during indexing.
269+
*
270+
* This type is deprecated, but there is no plan to remove this
271+
* type definition at this time.
272+
*/
273+
typedef git_indexer_progress_cb git_transfer_progress_cb;
274+
275+
/**@}*/
276+
248277
/** @} */
249278
GIT_END_DECL
250279

include/git2/indexer.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ typedef struct git_indexer_progress {
4646
size_t received_bytes;
4747
} git_indexer_progress;
4848

49-
typedef git_indexer_progress git_transfer_progress;
50-
5149
/**
5250
* Type for progress callbacks during indexing. Return a value less
5351
* than zero to cancel the indexing or download.
@@ -57,8 +55,6 @@ typedef git_indexer_progress git_transfer_progress;
5755
*/
5856
typedef int GIT_CALLBACK(git_indexer_progress_cb)(const git_indexer_progress *stats, void *payload);
5957

60-
typedef git_indexer_progress_cb git_transfer_progress_cb;
61-
6258

6359
typedef struct git_indexer_options {
6460
unsigned int version;

0 commit comments

Comments
 (0)