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

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

From
Stefan Beller <sbeller@google.com>
Date
Sep 9, 2016, 23:47 UTC
Message-ID
<CAGZ79kaWNykEAZcjZ2Y19j2_3TF+qcz+vb8zSi1U+me3k+06LA@mail.gmail.com>
In-Reply-To
<xmqqh99o8ypm.fsf@gitster.mtv.corp.google.com>
On Fri, Sep 9, 2016 at 4:01 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 10 quoted lines
> Brandon Williams <bmwill@google.com> writes:
>
>> 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.
>
> While I see why "ls-files --recurse-submodules" sounds nice ("hey, I
> can get list of _all_ the files here"), and I am quite happy with
> the quality of implementation (not just the code but its
> documentation and test)

The plan is to hook the ls-files machinery into git-grep as the way of obtaining files to grep for a pattern.

As git-grep has a thread pool already, getting the list of files single threaded is more beneficial as e.g. calling git-grep recursively for submodules, as then you may have a fork bomb.

>
>> diff --git a/t/t3007-ls-files-recurse-submodules.sh b/t/t3007-ls-files-recurse-submodules.sh
> We used to do that when we didn't know better.
>
Oops, a lot of stuff slipped through the first internal review.
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 22 in “ls-files: adding support for submodules”
  1. ls-files: adding support for submodulesBrandon Williams, Sep 9, 2016
  2. Jeff KingSep 9, 2016
  3. Junio C HamanoSep 9, 2016
  4. Junio C HamanoSep 9, 2016
  5. Stefan BellerSep 9, 2016
  6. Junio C HamanoSep 11, 2016
  7. Jeff KingSep 12, 2016
  8. Jeff KingSep 12, 2016
  9. Junio C HamanoSep 12, 2016
  10. Junio C HamanoSep 12, 2016
  11. ls-files: adding support for submodulesBrandon Williams, Sep 13, 2016
  12. Brandon WilliamsSep 13, 2016
  13. Junio C HamanoSep 13, 2016
  14. Junio C HamanoSep 15, 2016
  15. Junio C HamanoSep 15, 2016
  16. Junio C HamanoSep 15, 2016
  17. Junio C HamanoSep 15, 2016
  18. 2/2 SQUASH??? UndecidedJunio C Hamano, Sep 15, 2016
  19. Stefan BellerSep 15, 2016
  20. Brandon WilliamsSep 15, 2016
  21. 1/2 SQUASH???Junio C Hamano, Sep 15, 2016
  22. Brandon WilliamsSep 12, 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.