diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-06-02 14:09:22 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-06-02 14:09:22 -0700 |
commit | ed6e8038f98e7f15e571a9a291ee4acf438b4dc5 (patch) | |
tree | 82560db1d8fef5db3c449213f992bd26a5473ac5 /tree-diff.c | |
parent | 60bd4b1c513bb652cdffad44382046ca872140eb (diff) | |
download | git-ed6e8038f98e7f15e571a9a291ee4acf438b4dc5.tar.gz |
pathspec: rename free_pathspec() to clear_pathspec()jc/clear-pathspec
The function takes a pointer to a pathspec structure, and releases
the resources held by it, but does not free() the structure itself.
Such a function should be called "clear", not "free".
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tree-diff.c')
-rw-r--r-- | tree-diff.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tree-diff.c b/tree-diff.c index ff4e0d3cb6..edb4de9b72 100644 --- a/tree-diff.c +++ b/tree-diff.c @@ -607,7 +607,7 @@ static void try_to_follow_renames(const unsigned char *old, const unsigned char diff_setup_done(&diff_opts); ll_diff_tree_sha1(old, new, base, &diff_opts); diffcore_std(&diff_opts); - free_pathspec(&diff_opts.pathspec); + clear_pathspec(&diff_opts.pathspec); /* Go through the new set of filepairing, and see if we find a more interesting one */ opt->found_follow = 0; @@ -630,7 +630,7 @@ static void try_to_follow_renames(const unsigned char *old, const unsigned char /* Update the path we use from now on.. */ path[0] = p->one->path; path[1] = NULL; - free_pathspec(&opt->pathspec); + clear_pathspec(&opt->pathspec); parse_pathspec(&opt->pathspec, PATHSPEC_ALL_MAGIC & ~PATHSPEC_LITERAL, PATHSPEC_LITERAL_PATH, "", path); |