Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] Re: Quick local CVS change scan, and bug in read?



On Sat, May 18, 2013 at 4:24 PM, Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
> some CVS/Entries files end with the line "D" with none of the usual
> field-separator slashes.  When the "while IFS=/ read ..." loop
> encounters such a line, it assigns type=D but leaves name, version,
> date, flags, and branch set to their existing values from the previous
> loop pass.  I'm pretty sure this is wrong; bash read assigns empty
> string to all the "unused" variables in the list.

The bug turned out to be very easy to fix.  The reason it went
unnoticed for so long is, the variables were correctly cleared when
bin_read reached EOF.

I generally don't like attaching patches rather than in-lining them,
but I'm still stuck with gmail for the nonce and it tends to mangle
patches in-line, so I'm going to try attaching this one.  It's very
short.

Attachment: 0001-upon-read-of-a-short-line-assign-all-variables-passe.patch
Description: Binary data



Messages sorted by: Reverse Date, Date, Thread, Author