threads / discuss / 9309

Arbitrary long file lists?

Subject: Arbitrary long file lists?

## tl;dr

3 messages between Jul 30, 2007 and Jul 30, 2007.

replies: 2people: 2as markdown or json

David Kastrup· Jul 30, 2007, 12:33 UTC · lore
Hi,

commands like git-archive take a file list on the command line. If the number of files does no longer fit the argv limitations, this causes a problem.

So it might be nice to be able to treat some "filenames" in a file list special:

-@=filename (read LF-lines with filenames from filename) -@=- (read lines with filenames from stdin) -@z=filename (read NUL-terminated list with filenames from filename) -@z=- (same from stdin)

Of course, this particular syntax, very loosely inspired by infozip, leaves a lot to be desired: prettier proposals welcome.

But the feature itself would not be unimportant. I am also fuzzy on what sort of quoting should be interpreted outside of the NUL-terminated case.

-- 
David Kastrup
Alex Riesen· Jul 30, 2007, 12:43 UTC · re: David Kastrup · lore

Re: Arbitrary long file lists?

On 7/30/07, David Kastrup <dak@gnu.org> wrote:
Show 11 quoted lines
> commands like git-archive take a file list on the command line.  If
> the number of files does no longer fit the argv limitations, this
> causes a problem.
>
> So it might be nice to be able to treat some "filenames" in a file
> list special:
>
> -@=filename (read LF-lines with filenames from filename)
> -@=- (read lines with filenames from stdin)
> -@z=filename (read NUL-terminated list with filenames from filename)
> -@z=- (same from stdin)

git-update-index and the like use --stdin and -z. What do you need the one with filename for?

David Kastrup· Jul 30, 2007, 13:18 UTC · re: Alex Riesen · lore

Re: Arbitrary long file lists?

"Alex Riesen" <raa.lkml@gmail.com> writes:
Show 15 quoted lines
> On 7/30/07, David Kastrup <dak@gnu.org> wrote:
>> commands like git-archive take a file list on the command line.  If
>> the number of files does no longer fit the argv limitations, this
>> causes a problem.
>>
>> So it might be nice to be able to treat some "filenames" in a file
>> list special:
>>
>> -@=filename (read LF-lines with filenames from filename)
>> -@=- (read lines with filenames from stdin)
>> -@z=filename (read NUL-terminated list with filenames from filename)
>> -@z=- (same from stdin)
>
> git-update-index and the like use --stdin and -z.
> What do you need the one with filename for?
Uh, git-archive?

I was thinking that -z could conflict with other uses for in/output, but indeed git-archive does not seem to have any other area that would be affected by -z.

So this request at the current point of time can be reduced to let git-archive have --stdin and -z options. That is actually important as one can't concatenate zip-files, and so xargs does not help.

But file lists are also important for things like git-diff (for which the NUL-endedness of input is a separate issue from its output). So instead of adding stdin piecemeal, it was some sort of idea to have this generally available in file lists.

If somebody can come up with a nice syntax.
-- 
David Kastrup

← back to recent threads