summaryrefslogtreecommitdiff
path: root/archive.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-06-02 14:09:22 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-06-02 14:09:22 -0700
commited6e8038f98e7f15e571a9a291ee4acf438b4dc5 (patch)
tree82560db1d8fef5db3c449213f992bd26a5473ac5 /archive.c
parentGit 2.9-rc1 (diff)
downloadtgif-ed6e8038f98e7f15e571a9a291ee4acf438b4dc5.tar.xz
pathspec: rename free_pathspec() to 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 'archive.c')
-rw-r--r--archive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/archive.c b/archive.c
index 5d735ae603..42df9748d6 100644
--- a/archive.c
+++ b/archive.c
@@ -322,7 +322,7 @@ static int path_exists(struct tree *tree, const char *path)
pathspec.recursive = 1;
ret = read_tree_recursive(tree, "", 0, 0, &pathspec,
reject_entry, &pathspec);
- free_pathspec(&pathspec);
+ clear_pathspec(&pathspec);
return ret != 0;
}