How do I get the contents of a directory in fast-import
- From
- Stefan Monnier <monnier@iro.umontreal.ca>
- Date
- Jan 1, 2016, 15:54 UTC
- Message-ID
- <jwvio3d7152.fsf-monnier+gmane.comp.version-control.git.user@gnu.org>
I have a program which tries to collect info from lots of branches and generate some table from that data into another branch.
For performance reasons, I'd like to do that from fast-import, and as long as I know the name of all the files I need to consult, everything is fine since I can use the "ls" and "cat-blob" commands of fast-import to get efficiently the data I need.
But I also need to look at some files whose names I don't know beforehand (i.e. all the files in some directories). If I do "cat-blob" on those directories I get some binary "thing" which I don't understand.
So how do I get a directory listing from fast-inmport, i.e. like I can get with "git cat-file -p", but without having to fork a separate git process?
Stefan