Re: [PATCH alt-v2] Improve function dir.c:trim_trailing_spaces()

2014-06-02 Thread Junio C Hamano
Pasha Bolokhov writes: > Discard the unnecessary 'nr_spaces' variable, remove 'strlen()' and > improve the 'if' structure. Switch to pointers instead of integers > > Slightly more rare occurrences of 'text \' with a backslash > in between spaces are handled correctly. Namely, the code in > 8

[PATCH alt-v2] Improve function dir.c:trim_trailing_spaces()

2014-06-02 Thread Pasha Bolokhov
Discard the unnecessary 'nr_spaces' variable, remove 'strlen()' and improve the 'if' structure. Switch to pointers instead of integers Slightly more rare occurrences of 'text \' with a backslash in between spaces are handled correctly. Namely, the code in 8ba87adad6 does not reset 'last_space