]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jk/list-objects-filter-cleanup'
authorJunio C Hamano <gitster@pobox.com>
Mon, 19 Sep 2022 21:35:24 +0000 (14:35 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 19 Sep 2022 21:35:24 +0000 (14:35 -0700)
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

1  2 
builtin/clone.c
builtin/fetch.c
builtin/submodule--helper.c
revision.c
transport.c
upload-pack.c

diff --cc builtin/clone.c
Simple merge
diff --cc builtin/fetch.c
Simple merge
index ad834f9ed5852c0068434eca8f94c4304ab384d1,f5dc63fab4580a4278bca13f0c9feab8eb50d4a5..0b4acb442b209305949a2715ead54d9de518e10f
@@@ -1746,8 -1754,9 +1746,10 @@@ static int module_clone(int argc, cons
  {
        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"),
@@@ -2617,11 -2579,12 +2619,12 @@@ cleanup
  
  static int module_update(int argc, const char **argv, const char *prefix)
  {
 -      struct pathspec pathspec;
 +      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),
                OPT_BOOL(0, "init", &opt.init,
diff --cc revision.c
Simple merge
diff --cc transport.c
Simple merge
diff --cc upload-pack.c
Simple merge