From: Lars Hjemli Date: Wed, 23 Jan 2013 09:24:19 GMT Subject: Re: [PATCH v2] all: new command used for multi-repo operations Message-ID: In-Reply-To: On Wed, Jan 23, 2013 at 9:55 AM, Duy Nguyen 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