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

Re: [PATCH 1/4 v4] submodules: make submodule-prefix option

From
BWBrandon Williams <bmwill@google.com>
Date
Sep 27, 2016, 20:29 UTC
Message-ID
<20160927202925.GA32565@google.com>
In-Reply-To
<xmqqtwd1nr56.fsf@gitster.mtv.corp.google.com>
On 09/27, Junio C Hamano wrote:
Show 26 quoted lines
> Brandon Williams <bmwill@google.com> writes:
> 
> > +--submodule-prefix=<path>::
> > +	Set a prefix which gives submodules context about the superproject that
> > +	invoked it.  Only allowed for commands which support submodules.
> 
> This, and also the message in die(), uses a phrase "support
> submodules", but it is unclear what it exactly means to the end
> users and readers.
> 
> A "ls-files" that is recursively run as an implementation detail of
> the "grep --recurse-submodules" would be taught to support this
> option with this series.  Who is supporting submodules in that
> context?
> 
> I'd imagine (close to) 100% of the people would say it is "grep"
> that is supporting submodules, not "ls-files", but what this
> paragraph and die() message want to express by the phrase "support
> submodules" is the fact that "ls-files" knows how to react to
> "--submodule-prefix" option.
> 
> I'd suggest not to worry too much about this phrasing at this point,
> until we figure out exactly how we want to present these to end
> users.  For now, perhaps drop the second sentence and replace it
> with "The end-users are not expected to use this option" or
> something like that?

K can do. The intention is that each command has to do whatever internal rework needed so that it understands how to interact with subomodules (be that calling another command or internally supporting it).

> > +		die("%s doesn't support submodules", p->cmd);
> 
> s/submodules/submodule-prefix/ at least.

So should the #define be SUPPORT_SUBMODULE_PREFIX instead? That may be too narrow minded and not looking toward future submodule options support but I'm not sure.

-- 
Brandon Williams
Previous: Junio C HamanoNext: Junio C Hamano
Message 16 of 67 in “recursive support for ls-files”
  1. 0/3 recursive support for ls-filesBrandon Williams, Sep 24, 2016
  2. 1/3 submodules: make submodule-prefix option an envvarBrandon Williams, Sep 24, 2016
  3. Junio C HamanoSep 25, 2016
  4. 2/3 ls-files: optionally recurse into submodulesBrandon Williams, Sep 24, 2016
  5. 3/3 ls-files: add pathspec matching for submodulesBrandon Williams, Sep 24, 2016
  6. Jeff KingSep 25, 2016
  7. Brandon WilliamsSep 25, 2016
  8. Junio C HamanoSep 25, 2016
  9. Brandon WilliamsSep 26, 2016
  10. Junio C HamanoSep 26, 2016
  11. Brandon WilliamsSep 26, 2016
  12. Junio C HamanoSep 26, 2016
  13. 0/4 recursive support for ls-filesBrandon Williams, Sep 26, 2016
  14. 1/4 submodules: make submodule-prefix optionBrandon Williams, Sep 26, 2016
  15. Junio C HamanoSep 27, 2016
  16. Brandon WilliamsSep 27, 2016
  17. Junio C HamanoSep 27, 2016
  18. Brandon WilliamsSep 27, 2016
  19. 2/4 ls-files: optionally recurse into submodulesBrandon Williams, Sep 26, 2016
  20. Junio C HamanoSep 27, 2016
  21. Brandon WilliamsSep 27, 2016
  22. 4/4 ls-files: add pathspec matching for submodulesBrandon Williams, Sep 26, 2016
  23. Junio C HamanoSep 27, 2016
  24. Brandon WilliamsSep 27, 2016
  25. 3/4 ls-files: pass through safe options for --recurse-submodulesBrandon Williams, Sep 26, 2016
  26. Junio C HamanoSep 27, 2016
  27. Junio C HamanoSep 27, 2016
  28. Brandon WilliamsSep 27, 2016
  29. Junio C HamanoSep 27, 2016
  30. Stefan BellerSep 27, 2016
  31. Brandon WilliamsSep 28, 2016
  32. Junio C HamanoSep 28, 2016
  33. Brandon WilliamsSep 27, 2016
  34. Junio C HamanoSep 27, 2016
  35. Brandon WilliamsSep 27, 2016
  36. Junio C HamanoSep 27, 2016
  37. 0/4 recursive support for ls-filesBrandon Williams, Sep 28, 2016
  38. 1/4 git: make super-prefix optionBrandon Williams, Sep 28, 2016
  39. Stefan BellerSep 28, 2016
  40. Junio C HamanoSep 28, 2016
  41. Jeff KingSep 29, 2016
  42. Brandon WilliamsSep 29, 2016
  43. 2/4 ls-files: optionally recurse into submodulesBrandon Williams, Sep 28, 2016
  44. Stefan BellerSep 28, 2016
  45. Junio C HamanoSep 28, 2016
  46. 3/4 ls-files: pass through safe options for --recurse-submodulesBrandon Williams, Sep 28, 2016
  47. 4/4 ls-files: add pathspec matching for submodulesBrandon Williams, Sep 28, 2016
  48. 0/4 recursive support for ls-filesBrandon Williams, Sep 29, 2016
  49. 1/4 git: make super-prefix optionBrandon Williams, Sep 29, 2016
  50. Stefan BellerOct 4, 2016
  51. Junio C HamanoOct 4, 2016
  52. Jeff KingOct 4, 2016
  53. 2/4 ls-files: optionally recurse into submodulesBrandon Williams, Sep 29, 2016
  54. 3/4 ls-files: pass through safe options for --recurse-submodulesBrandon Williams, Sep 29, 2016
  55. Junio C HamanoSep 30, 2016
  56. Brandon WilliamsSep 30, 2016
  57. Brandon WilliamsSep 30, 2016
  58. 4/4 ls-files: add pathspec matching for submodulesBrandon Williams, Sep 29, 2016
  59. Stefan BellerOct 4, 2016
  60. 0/4 recursive support for ls-filesBrandon Williams, Oct 7, 2016
  61. 1/4 git: make super-prefix optionBrandon Williams, Oct 7, 2016
  62. 2/4 ls-files: optionally recurse into submodulesBrandon Williams, Oct 7, 2016
  63. 3/4 ls-files: pass through safe options for --recurse-submodulesBrandon Williams, Oct 7, 2016
  64. 4/4 ls-files: add pathspec matching for submodulesBrandon Williams, Oct 7, 2016
  65. Stefan BellerOct 7, 2016
  66. Stefan BellerOct 7, 2016
  67. Brandon WilliamsOct 7, 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.