Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strarray: remove deprecated declaration #6486

Merged
merged 1 commit into from Feb 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 0 additions & 13 deletions include/git2/strarray.h
Expand Up @@ -36,19 +36,6 @@ typedef struct git_strarray {
*/
GIT_EXTERN(void) git_strarray_dispose(git_strarray *array);

/**
* Copy a string array object from source to target.
*
* Note: target is overwritten and hence should be empty, otherwise its
* contents are leaked. Call git_strarray_free() if necessary.
*
* @param tgt target
* @param src source
* @return 0 on success, < 0 on allocation failure
*/
GIT_EXTERN(int) git_strarray_copy(git_strarray *tgt, const git_strarray *src);


/** @} */
GIT_END_DECL

Expand Down
2 changes: 1 addition & 1 deletion src/libgit2/describe.c
Expand Up @@ -8,7 +8,6 @@
#include "common.h"

#include "git2/describe.h"
#include "git2/strarray.h"
#include "git2/diff.h"
#include "git2/status.h"

Expand All @@ -19,6 +18,7 @@
#include "refs.h"
#include "repository.h"
#include "revwalk.h"
#include "strarray.h"
#include "tag.h"
#include "vector.h"
#include "wildmatch.h"
Expand Down
1 change: 1 addition & 0 deletions src/libgit2/remote.c
Expand Up @@ -17,6 +17,7 @@
#include "fetchhead.h"
#include "push.h"
#include "proxy.h"
#include "strarray.h"

#include "git2/config.h"
#include "git2/types.h"
Expand Down
1 change: 1 addition & 0 deletions src/libgit2/strarray.c
Expand Up @@ -8,6 +8,7 @@
#include "util.h"

#include "common.h"
#include "strarray.h"

int git_strarray_copy(git_strarray *tgt, const git_strarray *src)
{
Expand Down
25 changes: 25 additions & 0 deletions src/libgit2/strarray.h
@@ -0,0 +1,25 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_strarray_h__
#define INCLUDE_strarray_h__

#include "common.h"
#include "git2/strarray.h"

/**
* Copy a string array object from source to target.
*
* Note: target is overwritten and hence should be empty, otherwise its
* contents are leaked. Call git_strarray_free() if necessary.
*
* @param tgt target
* @param src source
* @return 0 on success, < 0 on allocation failure
*/
extern int git_strarray_copy(git_strarray *tgt, const git_strarray *src);

#endif