gitserver: Rename NoTimeout to EnableTimeout
Created by: indradhanush
Follow up from #30790.
Rationale for this change:
When using a flag with a negative word, NOT conditions become a double negative. For example:
if !NoTimeout {}
This makes the reader work harder to first flip the NOT condition and then flip the flag in their head again based on the name. Dropping the negative from the name would simplify the condition:
if Timeout {}
However, using Timeout
would be confusing in this case for a boolean
flag as it usually implies an integer value to indicate a timeout in
seconds.
As a result, EnableTimeout
makes for a better fit:
if EnableTimeout {}
All the three conditions imply the same while the last name makes it the easiest and fastest to derive the correct meaning when reading the code.
Finally, this commit also removes what apears to be dead code on the gitserver.Cmd struct.
Test plan
This PR does not introduce new functionality, but merely renames some variables for easier reading.