John Keeping <john@xxxxxxxxxxxxx> 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? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html