Skip to content

Commit 1dafb85

Browse files
committed
strarray: remove deprecated declaration
`git_strarray_copy` is deprecated (and has been included in `deprecated.h` for some time). It should not have remained in the public `strarray.h`. Remove it.
1 parent cefe6c4 commit 1dafb85

File tree

4 files changed

+27
-14
lines changed

4 files changed

+27
-14
lines changed

include/git2/strarray.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,6 @@ typedef struct git_strarray {
3636
*/
3737
GIT_EXTERN(void) git_strarray_dispose(git_strarray *array);
3838

39-
/**
40-
* Copy a string array object from source to target.
41-
*
42-
* Note: target is overwritten and hence should be empty, otherwise its
43-
* contents are leaked. Call git_strarray_free() if necessary.
44-
*
45-
* @param tgt target
46-
* @param src source
47-
* @return 0 on success, < 0 on allocation failure
48-
*/
49-
GIT_EXTERN(int) git_strarray_copy(git_strarray *tgt, const git_strarray *src);
50-
51-
5239
/** @} */
5340
GIT_END_DECL
5441

src/libgit2/describe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include "common.h"
99

1010
#include "git2/describe.h"
11-
#include "git2/strarray.h"
1211
#include "git2/diff.h"
1312
#include "git2/status.h"
1413

@@ -19,6 +18,7 @@
1918
#include "refs.h"
2019
#include "repository.h"
2120
#include "revwalk.h"
21+
#include "strarray.h"
2222
#include "tag.h"
2323
#include "vector.h"
2424
#include "wildmatch.h"

src/libgit2/remote.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "fetchhead.h"
1818
#include "push.h"
1919
#include "proxy.h"
20+
#include "strarray.h"
2021

2122
#include "git2/config.h"
2223
#include "git2/types.h"

src/libgit2/strarray.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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_strarray_h__
8+
#define INCLUDE_strarray_h__
9+
10+
#include "common.h"
11+
#include "git2/strarray.h"
12+
13+
/**
14+
* Copy a string array object from source to target.
15+
*
16+
* Note: target is overwritten and hence should be empty, otherwise its
17+
* contents are leaked. Call git_strarray_free() if necessary.
18+
*
19+
* @param tgt target
20+
* @param src source
21+
* @return 0 on success, < 0 on allocation failure
22+
*/
23+
extern int git_strarray_copy(git_strarray *tgt, const git_strarray *src);
24+
25+
#endif

0 commit comments

Comments
 (0)