8000 strarray: remove deprecated declaration by ethomson · Pull Request #6486 · libgit2/libgit2 · GitHub
[go: up one dir, main page]

Skip to content

strarray: remove deprecated declaration #6486

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

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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
  • Loading branch information
ethomson committed Feb 16, 2023
commit 7c6df9e12543577f5efd52383435336bb84279cc
13 changes: 0 additions & 13 deletions include/git2/strarray.h
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
0