Re: [RFC v2] cat-file: add a --stdin-cmd mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



John Cai <johncai86@xxxxxxxxx> wrote:
> This RFC patch proposes a new flag --stdin-cmd that works with
> git-cat-file --batch. Similar to git-update-ref --stdin, it will accept
> commands and arguments from stdin.
> 
> The start of this idea was discussed in [1], where the original
> motivation was to be able to control when the buffer was flushed to
> stdout in --buffer mode.
> 
> However, this can actually be much more useful in situations when
> git-cat-file --batch is being used as a long lived backend query
> process. At GitLab, we use a pair of cat-file processes. One for
> iterating over object metadata with --batch-check, and the other to grab
> object contents with --batch. However, if we had --stdin-cmd, we could
> get rid of the second --batch-check process, and just have one progress
> where we can flip between getting object info, and getting object contents.
> This can lead to huge savings.

Cool.  I wish I had this back when I worked on a project which uses git.
In case I ever continue, having 2-3 features in git itself would be useful:

1) ability to add new alternates / object directories on-the-fly
2) ability to deal with unlinked packs

And maybe:

3) ability to remove alternates

I've implemented 1 and 2 via libgit2; but not yet 3 (not really
important, atm).

Thanks.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux