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

Re: [PATCH v2] all: new command used for multi-repo operations

From
LHLars Hjemli <hjemli@gmail.com>
Date
Jan 23, 2013, 09:24 UTC
Message-ID
<CAFXTnz6mU999DBQG9mPKyjtit4e4WF=bUf_E8XwGR8d5sUPO0w@mail.gmail.com>
In-Reply-To
<CACsJy8DskoCi9Lg+HW0JeQBe4HX-bMXNHUgfrsg+DoqBN9-ntQ@mail.gmail.com>
On Wed, Jan 23, 2013 at 9:55 AM, Duy Nguyen <pclouds@gmail.com> wrote:
> Perhaps we could add the subrepo's object data to the in-memory object
> database of git-all, then do the diff without launching new commands?

The `git all` command is regularly invoked outside of git repos, so I'm not sure if this would work.

>
> I'm not a user of this command so this is more of bikeshedding. I
> think we should have an option to list repos listed in index.

git-submodule uses something like `git ls-files --stage|grep "^160000"`. Having a better way to achieve this would be nice, but I don't think it is a job for 'git [all|for-each-repo|ls-repo].

> For
> directory walk, how about reusing fill_directory() to do the job for
> you? You could then limit repositories by name. "ls-files -o" code
> should be very similar.

A cursory look into dir.c seems to indicate that this could work (possibly except for get_index_dtype()), but it would also load the complete directory tree (which could be extremly big) into ram, including file entries (which is not necessary) while dropping '.git' entries (which is what we're looking for).

-- 
larsh
Previous: Duy NguyenNext: Duy Nguyen
Message 3 of 9 in “all: new command used for multi-repo operations”
  1. all: new command used for multi-repo operationsLars Hjemli, Jan 23, 2013
  2. Duy NguyenJan 23, 2013
  3. Lars HjemliJan 23, 2013
  4. Duy NguyenJan 23, 2013
  5. Jens LehmannJan 23, 2013
  6. Junio C HamanoJan 23, 2013
  7. Junio C HamanoJan 23, 2013
  8. Lars HjemliJan 23, 2013
  9. Lars HjemliJan 23, 2013

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.