check the length of lists given in options before writing them - #48
Conversation
|
I should make this parameter optional since there's only one call where it's anything other than 1, standby for force push... |
|
Hmm I think that's doable, but we really need to check them all before default to min=1. Can you split the bugfixes/whitespace fixes into a different commit, that wrong code number is a good find. If after we check them all, it might be that the option could be something like emptyok=true instead of giving a min_len, I suspect we will only use min_len=0. Since we are here, we might consider minimum length checks on single options too, like strings Hah, only now I saw that the inverse is already done in options_of_buf. |
|
On March 29, 2017 5:48:04 PM CDT, Christiano Haesbaert ***@***.***> wrote:
Hmm I think that's doable, but we really need to check them all before
default to min=1.
Can you split the bugfixes/whitespace fixes into a different commit,
that wrong code number is a good find.
If after we check them all, it might be that the option could be
something like emptyok=true instead of giving a min_len, I suspect we
will only use min_len=0
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#48 (comment)
Sure, I can split up the commits.
I did check everything that's a list here against the relevant RFCs, just couldn't find any others that had a different minimum - definitely wouldn't hurt for someone else to double check though.
--
composed on a touchscreen keyboard; please forgive typos and brevity
|
|
I think the diff is fine, we're already enforcing min_len for every list option on the other way. So we should enforce when encoding too. Just split them up and I'll merge :D. Thanks for this ! |
|
This actually prompted me to have a look at get_8_list and get_16_list, they don't enforce min_len, I'll write a diff. |
/cc @haesbaert - I don't think this is too gory, what do you think?