summaryrefslogtreecommitdiff
path: root/builtin/submodule--helper.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-09-19 21:35:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-09-19 21:35:24 (GMT)
commit298a9582249255fe00660a78dba0bb0ef0e1dbe8 (patch)
treeb8abd825bb52a214a901553078b17634147ac826 /builtin/submodule--helper.c
parentf876b5a6868faa69a3d12aa59d65c5af37a91ff3 (diff)
parentc54980ab83661e8e290003fbd5ab44b12e4e77b1 (diff)
downloadgit-298a9582249255fe00660a78dba0bb0ef0e1dbe8.zip
git-298a9582249255fe00660a78dba0bb0ef0e1dbe8.tar.gz
git-298a9582249255fe00660a78dba0bb0ef0e1dbe8.tar.bz2
Merge branch 'jk/list-objects-filter-cleanup'
A couple of bugfixes with code clean-up. * jk/list-objects-filter-cleanup: list-objects-filter: convert filter_spec to a strbuf list-objects-filter: add and use initializers list-objects-filter: handle null default filter spec list-objects-filter: don't memset after releasing filter struct
Diffstat (limited to 'builtin/submodule--helper.c')
-rw-r--r--builtin/submodule--helper.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index ad834f9..0b4acb4 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -1746,8 +1746,10 @@ static int module_clone(int argc, const char **argv, const char *prefix)
{
int dissociate = 0, quiet = 0, progress = 0, require_init = 0;
struct module_clone_data clone_data = MODULE_CLONE_DATA_INIT;
- struct list_objects_filter_options filter_options = { 0 };
struct string_list reference = STRING_LIST_INIT_NODUP;
+ struct list_objects_filter_options filter_options =
+ LIST_OBJECTS_FILTER_INIT;
+
struct option module_clone_options[] = {
OPT_STRING(0, "prefix", &clone_data.prefix,
N_("path"),
@@ -2620,7 +2622,8 @@ static int module_update(int argc, const char **argv, const char *prefix)
struct pathspec pathspec = { 0 };
struct pathspec pathspec2 = { 0 };
struct update_data opt = UPDATE_DATA_INIT;
- struct list_objects_filter_options filter_options = { 0 };
+ struct list_objects_filter_options filter_options =
+ LIST_OBJECTS_FILTER_INIT;
int ret;
struct option module_update_options[] = {
OPT__FORCE(&opt.force, N_("force checkout updates"), 0),