beyondgrep / ack2

**ack 2 is no longer being maintained. ack 3 is the latest version.**
https://github.com/beyondgrep/ack3/
Other
1.48k stars 138 forks source link

Don't pass `$opt` to functions that don't use it #509

Closed sth closed 7 years ago

sth commented 9 years ago

Functions used to use a $opt parameter to access the search options. In many cases they don't do that anymore (they use the global $opt_... variables instead). The $opt parameter is not necessary anymore in these cases and can be removed.

petdance commented 9 years ago

This looks helpful. Thank you.

@hoelzro , please sit on this for right now. It sounds like a good optimization, but right now I'm more interested in getting features stabilized and a new version out. Also, I'm not sure I want to continue down the road of global %opt.

hoelzro commented 9 years ago

@petdance Sounds good. When you say you're opposed to global %opt, are you referring to the options hash itself, or the variables beginning with $opt_ that I recently introduced? Because I can make an argument for the latter.

petdance commented 7 years ago

I either want to get this into 2.18 or not merge it at all.

petdance commented 7 years ago

Thanks for this. I applied the changes manual because of branch conflicts and committed as 490e914e89a938625179c60e6a0094387c679f47. It will go out in 2.17_01.

sth commented 7 years ago

Nice!