Re: fast-import fails in read-only tree

2016-01-30 Thread Stefan Monnier
> 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 ca

Re: fast-import fails in read-only tree

2016-01-30 Thread Andreas Schwab
Jeff King writes: > 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. It's a > little tedious to allocate fifos, but something like: With bash's coproc it's a bit less tedious: > mkfifo in out > (exec

Re: fast-import fails in read-only tree

2016-01-29 Thread Jeff King
On Fri, Jan 29, 2016 at 09:28:44AM -0500, Stefan Monnier wrote: > > The primary goal of fast-import is to write that packfile. It kind of > > sounds like you are using the wrong tool for the job. > > Yes, I realize that. But in some cases it's the best tool available. > `fast-import' is very cl

Re: fast-import fails in read-only tree

2016-01-29 Thread Stefan Monnier
>> I recently discovered that "git fast-import" signals an error if used in >> a tree to which we do not have write-access, because it tries to create >> a "objects/pack/tmp_pack_XXX" file even before starting to process >> the commands. > The primary goal of fast-import is to write that packfile.

Re: fast-import fails in read-only tree

2016-01-28 Thread Jeff King
On Thu, Jan 28, 2016 at 05:17:36PM -0500, Stefan Monnier wrote: > I recently discovered that "git fast-import" signals an error if used in > a tree to which we do not have write-access, because it tries to create > a "objects/pack/tmp_pack_XXX" file even before starting to process > the commands.