On Thu, Jun 20, 2019 at 1:59 AM Jeff King <peff@xxxxxxxx> wrote: > I was surprised that we needed a new command-line option here, but I > guess the sub-fetch processes really have no idea that they're > subservient to a multi-remote fetch (they do get "--append", but of > course somebody could specify that independently). > > Another option would be to just pass "-c gc.auto=0" to the child > processes to inhibit auto-gc. But maybe it makes sense to have a nicer > interface (after all, somebody else could be doing the same "let's do a > bunch of fetches in a row" without using the multi-fetch code). Nah to me -c is much nicer (and flexible too). The only thing I'm not sure about is whether a user could override it. If fetch.c adds -c gc.auto=0 automatically, and the user wants auto gc back, will "git -c gc.auto=non-zero fetch --multiple" still work? I haven't checked git_config_push_parameter() carefully, but I have an impression that the parameter order there is "wrong", at least in this case. > Though there I kind of wonder if this would apply to other scripted > uses, too. E.g., if I'm doing a bunch of commits, I might want to > inhibit auto-gc and then run it myself at the end. Should we support > "GIT_AUTO_GC=0" in the environment (and a matching "git --no-auto-gc > ..." option that could be used here)? export GIT_CONFIG=gc.auto=0 ? -- Duy