Message ID | xmqqa6le5x1f.fsf_-_@gitster.g (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | fixup! clone: set submodule.recurse=true if submodule.stickyRecursiveClone enabled | expand |
On Wed, Aug 18, 2021 at 01:15:56PM -0700, Junio C Hamano wrote: > > Narrow the scope of a temporary variable used only once and > immediately die, and rename it to a shorter, throw-away name. > > Also lose a {} around a single statement block. > > Signed-off-by: Junio C Hamano <gitster@pobox.com> Acked-by: Emily Shaffer <emilyshaffer@google.com> Thanks.
On Thu, Aug 19, 2021 at 10:41:03AM -0700, Emily Shaffer wrote: > > On Wed, Aug 18, 2021 at 01:15:56PM -0700, Junio C Hamano wrote: > > > > Narrow the scope of a temporary variable used only once and > > immediately die, and rename it to a shorter, throw-away name. > > > > Also lose a {} around a single statement block. > > > > Signed-off-by: Junio C Hamano <gitster@pobox.com> > Acked-by: Emily Shaffer <emilyshaffer@google.com> > > Thanks. Having not heard from Mahi last week, if you are happy with the patch+squash, I think it would be OK to take this without waiting longer for her. Up to you of course. - Emily
Emily Shaffer <emilyshaffer@google.com> writes: > On Thu, Aug 19, 2021 at 10:41:03AM -0700, Emily Shaffer wrote: >> >> On Wed, Aug 18, 2021 at 01:15:56PM -0700, Junio C Hamano wrote: >> > >> > Narrow the scope of a temporary variable used only once and >> > immediately die, and rename it to a shorter, throw-away name. >> > >> > Also lose a {} around a single statement block. >> > >> > Signed-off-by: Junio C Hamano <gitster@pobox.com> >> Acked-by: Emily Shaffer <emilyshaffer@google.com> >> >> Thanks. > > Having not heard from Mahi last week, if you are happy with the > patch+squash, I think it would be OK to take this without waiting longer > for her. Up to you of course. Thanks for a nudge.
diff --git a/builtin/clone.c b/builtin/clone.c index a08d901224..9c0c68a8ef 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -986,7 +986,6 @@ int cmd_clone(int argc, const char **argv, const char *prefix) struct remote *remote; int err = 0, complete_refs_before_fetch = 1; int submodule_progress; - int sticky_recursive_clone; struct transport_ls_refs_options transport_ls_refs_options = TRANSPORT_LS_REFS_OPTIONS_INIT; @@ -1115,6 +1114,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix) if (option_recurse_submodules.nr > 0) { struct string_list_item *item; struct strbuf sb = STRBUF_INIT; + int val; /* remove duplicates */ string_list_sort(&option_recurse_submodules); @@ -1131,10 +1131,9 @@ int cmd_clone(int argc, const char **argv, const char *prefix) strbuf_detach(&sb, NULL)); } - if (!git_config_get_bool("submodule.stickyRecursiveClone", &sticky_recursive_clone) - && sticky_recursive_clone) { - string_list_append(&option_config, "submodule.recurse=true"); - } + if (!git_config_get_bool("submodule.stickyRecursiveClone", &val) && + val) + string_list_append(&option_config, "submodule.recurse=true"); if (option_required_reference.nr && option_optional_reference.nr)
Narrow the scope of a temporary variable used only once and immediately die, and rename it to a shorter, throw-away name. Also lose a {} around a single statement block. Signed-off-by: Junio C Hamano <gitster@pobox.com> --- * To be squashed into mk/clone-recurse-submodules topic 1a0e8231 (clone: set submodule.recurse=true if submodule.stickyRecursiveClone enabled, 2021-08-14) builtin/clone.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)