git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC] How to pass Git config command line instructions to Submodule commands?

From
Jeff King <peff@peff.net>
Date
Apr 25, 2016, 21:24 UTC
Message-ID
<20160425212449.GA7636@sigill.intra.peff.net>
In-Reply-To
<CA+P7+xoaqNF+uBHVnD2QR7j-=0Hyvd-scTc_vOdV+etC0VS9jA@mail.gmail.com>
On Mon, Apr 25, 2016 at 01:59:03PM -0700, Jacob Keller wrote:
Show 15 quoted lines
> >> However, I noticed that git config command line instructions such as
> >> "-c filter.lfs.smudge=" are not passed to Git submodule operations. Thus
> >> this does not work as expected:
> >>
> >>     git -c filter.lfs.smudge= -c filter.lfs.required=false clone --recursive <url> <path>
> >
> > I have cc'd Jacob Keller, who authored origin/jk/submodule-c-credential,
> > which does work in that area (deciding which config option to pass down
> > into the submodule commands).
> >
> 
> This is a tricky question. The problem is that some configurations are
> obviously not intended to go into the submodules, but determining how
> is somewhat troublesome. There was some discussion on this previous
> thread when we added support for credential options to pass through.

Right. I think it may be reasonable to pass through filter.* in the whitelist. They are not activated without a matching .gitattributes entry in the repository (and people would generally configure them in their user-level ~/.gitconfig for that reason).

It does mean that somebody would be stuck who really wanted to run the smudge filter in their local repo, but for some reason not in the subrepos. I am trying to think of a case in which that might be security-relevant if you didn't trust the sub-repos[1]. But I really don't see it. The filter is arbitrary code, but that's specified by the user; we're just feeding it possibly untrusted blobs.

-Peff
Previous: Jacob KellerNext: Jeff King
Message 4 of 36 in “[RFC] How to pass Git config command line instructions to Submodule commands?”
  1. Lars SchneiderApr 25, 2016
  2. Stefan BellerApr 25, 2016
  3. Jacob KellerApr 25, 2016
  4. Jeff KingApr 25, 2016
  5. Jeff KingApr 25, 2016
  6. Lars SchneiderApr 28, 2016
  7. Jeff KingApr 28, 2016
  8. Jeff KingApr 28, 2016
  9. Jeff KingApr 28, 2016
  10. 0/5 fixes for sanitized submodule configJeff King, Apr 28, 2016
  11. 1/5 t5550: fix typo in $HTTPD_URLJeff King, Apr 28, 2016
  12. Jacob KellerApr 28, 2016
  13. Jeff KingApr 28, 2016
  14. Jacob KellerApr 28, 2016
  15. 2/5 t5550: break submodule config test into multiple sub-testsJeff King, Apr 28, 2016
  16. Stefan BellerApr 28, 2016
  17. Jeff KingApr 28, 2016
  18. Jacob KellerApr 28, 2016
  19. 3/5 submodule: export sanitized GIT_CONFIG_PARAMETERSJeff King, Apr 28, 2016
  20. Stefan BellerApr 28, 2016
  21. Jeff KingApr 28, 2016
  22. Stefan BellerApr 28, 2016
  23. Johannes SchindelinApr 28, 2016
  24. Jacob KellerApr 28, 2016
  25. Jeff KingApr 28, 2016
  26. Jacob KellerApr 28, 2016
  27. 4/5 submodule--helper: move config-sanitizing to submodule.cJeff King, Apr 28, 2016
  28. Stefan BellerApr 28, 2016
  29. Jeff KingApr 28, 2016
  30. Lars SchneiderApr 28, 2016
  31. 5/5 submodule: use prepare_submodule_repo_env consistentlyJeff King, Apr 28, 2016
  32. Johannes SchindelinApr 28, 2016
  33. Stefan BellerApr 28, 2016
  34. Jacob KellerApr 28, 2016
  35. Lars SchneiderApr 28, 2016
  36. Jeff KingApr 28, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.