From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Markus Klinik <markus.klinik@gmx.de>, git@vger.kernel.org
Subject: Re: git-cvsexportcommit fails for huge commits
Date: Wed, 12 Dec 2007 01:21:14 -0800 [thread overview]
Message-ID: <7vir348e0l.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20071212083154.GB7676@coredump.intra.peff.net> (Jeff King's message of "Wed, 12 Dec 2007 03:31:54 -0500")
Jeff King <peff@peff.net> writes:
> @@ -335,6 +335,22 @@ sub safe_pipe_capture {
> return wantarray ? @output : join('',@output);
> }
>
> +sub xargs_safe_pipe_capture {
> + my $MAX_ARG_LENGTH = 1024;
> + my $cmd = shift;
> + my @output;
> + while(@_) {
> + my @args;
> + my $length = 0;
> + while(@_ && $length < $MAX_ARG_LENGTH) {
> + push @args, shift;
> + $length += length($args[$#args]);
> + }
> + push @output, safe_pipe_capture(@$cmd, @args);
> + }
> + return @output;
> +}
> +
Makes me wonder why you are not spawning xargs by doing it by hand. If
the path at the beginning happens to be longer than 1024 then you will
run path-less "cvs status"?
next prev parent reply other threads:[~2007-12-12 9:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-11 20:04 git-cvsexportcommit fails for huge commits Markus Klinik
2007-12-12 8:31 ` Jeff King
2007-12-12 9:21 ` Junio C Hamano [this message]
2007-12-12 9:25 ` Jeff King
2007-12-14 3:22 ` Junio C Hamano
2007-12-14 4:45 ` Jeff King
2007-12-14 9:15 ` Jeff King
2007-12-14 13:47 ` Robin Rosenberg
2007-12-15 10:09 ` Jeff King
2007-12-12 16:02 ` Linus Torvalds
2007-12-12 16:17 ` Jeff King
2007-12-12 19:58 ` Martin Langhoff
2007-12-13 4:17 ` Jeff King
2007-12-13 8:39 ` Markus Klinik
2007-12-13 9:01 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vir348e0l.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=markus.klinik@gmx.de \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).