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>
This commit is contained in:
@ -170,7 +170,7 @@ static struct notes_merge_pair *diff_tree_remote(struct notes_merge_options *o,
|
||||
sha1_to_hex(mp->remote));
|
||||
}
|
||||
diff_flush(&opt);
|
||||
free_pathspec(&opt.pathspec);
|
||||
clear_pathspec(&opt.pathspec);
|
||||
|
||||
*num_changes = len;
|
||||
return changes;
|
||||
@ -256,7 +256,7 @@ static void diff_tree_local(struct notes_merge_options *o,
|
||||
sha1_to_hex(mp->local));
|
||||
}
|
||||
diff_flush(&opt);
|
||||
free_pathspec(&opt.pathspec);
|
||||
clear_pathspec(&opt.pathspec);
|
||||
}
|
||||
|
||||
static void check_notes_merge_worktree(struct notes_merge_options *o)
|
||||
|
Reference in New Issue
Block a user