aboutsummaryrefslogtreecommitdiff
path: root/server-info.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2015-06-22 06:45:17 -0400
committerJunio C Hamano <gitster@pobox.com>2015-06-22 14:55:52 -0700
commitfc4937c37219347f4e2c25a271577b333942453f (patch)
treec62993cbd67f3ec4e766e7cd470e9cfb28d436dc /server-info.c
parentbfd155943eecedb7b7e759ff022ca09e68f941b0 (diff)
downloadgit-fc4937c37219347f4e2c25a271577b333942453f.tar.gz
git-fc4937c37219347f4e2c25a271577b333942453f.tar.xz
cat-file: add --buffer option
We use a direct write() to output the results of --batch and --batch-check. This is good for processes feeding the input and reading the output interactively, but it introduces measurable overhead if you do not want this feature. For example, on linux.git: $ git rev-list --objects --all | cut -d' ' -f1 >objects $ time git cat-file --batch-check='%(objectsize)' \ <objects >/dev/null real 0m5.440s user 0m5.060s sys 0m0.384s This patch adds an option to use regular stdio buffering: $ time git cat-file --batch-check='%(objectsize)' \ --buffer <objects >/dev/null real 0m4.975s user 0m4.888s sys 0m0.092s Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'server-info.c')
0 files changed, 0 insertions, 0 deletions