From: Junio C Hamano <gitster@pobox.com>
To: John Keeping <john@keeping.me.uk>
Cc: Jan Vales <jan@jvales.net>, git@vger.kernel.org
Subject: Re: unexplained behavior/issue with git archive?
Date: Thu, 23 Jul 2015 10:21:12 -0700 [thread overview]
Message-ID: <xmqqwpxqpz7b.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20150723155936.GC14935@serenity.lan> (John Keeping's message of "Thu, 23 Jul 2015 16:59:36 +0100")
John Keeping <john@keeping.me.uk> writes:
> With a small number of items, there should only be one output line, but
> if xargs invokes the command multiple times there will be multiple
> lines. For example (using -L2 to force a maximum of two arguments per
> invocation):
>
> $ printf '%s\n' a b c | xargs -d'\n' echo | wc -l
> 1
> $ printf '%s\n' a b c | xargs -d'\n' -L2 echo | wc -l
> 2
Yup, I think this thread is mistitled; it looks like an "unexpected
behaviour with xargs". Or "common pitfalls with xargs", perhaps.
Now, what would be a reasonable workaround. To work around command
line length limits (not necessarily for xargs, but the exact same
issue would arise if you are trying to specify too many pathspecs on
the command line), many of our commands take paths from their
standard input. Would it be reasonable to teach "git archive" to
also do so?
Or would it make sense to teach "git archive -o" a new mode to
append to an existing archive, so that repeated invocations of "git
archive" via such a use of "xargs" would create in the first
invocation and then keep appending to the same archive in the
subsequent invocations?
prev parent reply other threads:[~2015-07-23 17:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-23 15:23 unexplained behavior/issue with git archive? Jan Vales
2015-07-23 15:59 ` John Keeping
2015-07-23 17:21 ` Junio C Hamano [this message]
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=xmqqwpxqpz7b.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jan@jvales.net \
--cc=john@keeping.me.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.