diff options
| author | Patrick Steinhardt <ps@pks.im> | 2018-06-29 11:45:15 +0200 |
|---|---|---|
| committer | Patrick Steinhardt <ps@pks.im> | 2018-06-29 11:45:15 +0200 |
| commit | af3088e4642a0babb1cd26f5ed143f087f5a71f8 (patch) | |
| tree | 1e652f38b57561cabf9a1ba4425125131537c58d /src/refspec.c | |
| parent | 7192e26fb4ae56f2e20a2af4253d9dea19f38577 (diff) | |
| download | libgit2-af3088e4642a0babb1cd26f5ed143f087f5a71f8.tar.gz | |
refspec: rename `git_refspec__free` to `git_refspec__dispose`
Since commit 630a67366 (refspec: add public parsing api, 2018-02-07), we
now have two functions `git_refspec_free` and `git_refspec__free`. The
difference is that the first one will free the structure itself, while
the second one will only free the structure's contents. Use our new
`dispose` naming pattern for the latter function to help avoid
confusion.
Diffstat (limited to 'src/refspec.c')
| -rw-r--r-- | src/refspec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/refspec.c b/src/refspec.c index b058d5fc1..bc1d84aa3 100644 --- a/src/refspec.c +++ b/src/refspec.c @@ -144,11 +144,11 @@ int git_refspec__parse(git_refspec *refspec, const char *input, bool is_fetch) giterr_set( GITERR_INVALID, "'%s' is not a valid refspec.", input); - git_refspec__free(refspec); + git_refspec__dispose(refspec); return -1; } -void git_refspec__free(git_refspec *refspec) +void git_refspec__dispose(git_refspec *refspec) { if (refspec == NULL) return; @@ -181,7 +181,7 @@ int git_refspec_parse(git_refspec **out_refspec, const char *input, int is_fetch void git_refspec_free(git_refspec *refspec) { - git_refspec__free(refspec); + git_refspec__dispose(refspec); git__free(refspec); } |
