Re: [PATCH 2/5] am: teach StGit patch parser how to read from stdin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 9, 2015 at 3:57 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Paul Tan <pyokagan@xxxxxxxxx> writes:
>
>> git-mailsplit, which splits mbox patches, will read the patch from stdin
>> when the filename is "-" or there are no files listed on the
>> command-line.
>>
>> To be consistent with this behavior, teach the StGit patch parser to
>> read from stdin if the filename is "-" or no files are listed on the
>> command-line.
>
> Hmm, doesn't
>
>         perl -ne 'processing for each line'
>
> with or without a BEGIN {} block, read from the standard input (if
> no filename is given) or the given file (if given), and more
> importantly, doesn't it treat a lone "-" as STDIN anyway?
>
> That is, wouldn't it make more sense to do something like:
>
>         test $# != 0 || set -- -
>         for stgit
>         do
>                 ...
>                 @@PERL@@ -ne 'BEGIN { $subject = 0 }
>                         ...
>                 ' "$stgit" >"$dotest/$msgnum" || clean_abort
>         done
>
> Same for patch 5/5.

Ah yes, this makes more sense.

Thanks,
Paul
--
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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]