Re: fast-import fails in read-only tree
- From
- Stefan Monnier <monnier@iro.umontreal.ca>
- Date
- Jan 30, 2016, 13:56 UTC
- Message-ID
- <jwvtwlv18jw.fsf-monnier+gmane.comp.version-control.git@gnu.org>
- In-Reply-To
- <20160130051340.GA1677@sigill.intra.peff.net>
> You can use custom cat-file formatting to output your "name" strings as > part of the same field. IOW, something like:
[...]
> If you're really going to do a lot of interactive back-and-forth access > of objects, though, I think you want to set up pipes to cat-file.
OMG, I didn't realize that cat-file doesn't buffer its output so it can be read&write to/from the same process. And the "%(rest)" thingy takes care of the rest of my needs, indeed.
Thanks!
> It's a little tedious to allocate fifos, but something like:
That's not a problem.
Show 9 quoted lines
> One feature I do think would be useful (and almost implemented when I > added --batch-check=<format>) is a formatter for the object content, > with a pretty modifier. I.e., it would be nice to do: > > echo $some_tree | > git cat-file --batch-check="%(objectsize:pretty) %(contents:pretty)" > > to work as the rough equivalent of "git cat-file -p" (but here you could > feed multiple trees and get multiple answers).
Yes, that would be a good improvement,
Stefan