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

Re: [PATCH 1/2] ls-files: adding support for submodules

From
Jeff King <peff@peff.net>
Date
Sep 22, 2016, 04:18 UTC
Message-ID
<20160922041854.7754ujcynhk7mdnh@sigill.intra.peff.net>
In-Reply-To
<xmqqponw6e3x.fsf@gitster.mtv.corp.google.com>
On Wed, Sep 21, 2016 at 04:13:22PM -0700, Junio C Hamano wrote:
Show 9 quoted lines
> Brandon Williams <bmwill@google.com> writes:
> 
> > yes you mentioned this and I meant to change that before sending it out.
> > Looks like it slipped through have slipped through.
> 
> I already fixed it up locally when I sent the reply, but thanks for
> resending (which assures me that your local copy is up-to-date and I
> do not have to worry about having to repeat me in the future, if
> this ever needs further rerolling ;-).

While we are on the subject, the commit message also uses some past tense:

  Allow ls-files to recognize submodules in order to retrieve a list of
  files from a repository's submodules.  This is done by forking off a
  process to recursively call ls-files on all submodules. Also added a
  submodule-prefix command in order to prepend paths to child processes.
The final sentence should be "Also add...".

Since this final bit of logic was sufficiently non-obvious that it only came about in v2, maybe it is worth describing a little more fully:

  Also add a submodule-prefix option, which instructs the child
  processes to prepend the prefix to each path they output. This makes
  the output paths match what is on the filesystem (i.e., as if the
  submodule boundaries were not there at all).

Should this option just be "--prefix", or maybe "--output-prefix"? Submodules are the obvious use case here, but I could see somebody adapting this for other uses (alternatively, if we _do_ want to keep it just as an implementation detail for submodules, we should probably discourage people in the documentation from using it themselves).

-Peff
Previous: Junio C HamanoNext: Stefan Beller
Message 16 of 29 in “ls-files: adding support for submodules”
  1. 1/2 ls-files: adding support for submodulesBrandon Williams, Sep 21, 2016
  2. 2/2 ls-files: add pathspec matching for submodulesBrandon Williams, Sep 21, 2016
  3. Junio C HamanoSep 21, 2016
  4. Brandon WilliamsSep 21, 2016
  5. 2/2 ls-files: add pathspec matching for submodulesBrandon Williams, Sep 21, 2016
  6. Junio C HamanoSep 23, 2016
  7. Junio C HamanoSep 23, 2016
  8. Brandon WilliamsSep 23, 2016
  9. Brandon WilliamsSep 21, 2016
  10. Junio C HamanoSep 21, 2016
  11. Brandon WilliamsSep 21, 2016
  12. 1/2 ls-files: optionally recurse into submodulesBrandon Williams, Sep 21, 2016
  13. Jeff KingSep 22, 2016
  14. Brandon WilliamsSep 23, 2016
  15. Junio C HamanoSep 21, 2016
  16. Jeff KingSep 22, 2016
  17. Stefan BellerSep 22, 2016
  18. Junio C HamanoSep 22, 2016
  19. Jeff KingSep 23, 2016
  20. Stefan BellerSep 23, 2016
  21. Jeff KingSep 23, 2016
  22. Brandon WilliamsSep 23, 2016
  23. Stefan BellerSep 23, 2016
  24. Nazri RamliySep 25, 2016
  25. Junio C HamanoSep 27, 2016
  26. Brandon WilliamsSep 27, 2016
  27. Junio C HamanoSep 27, 2016
  28. Brandon WilliamsSep 27, 2016
  29. Junio C HamanoSep 27, 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.