Re: [PATCH] Avoid interpreting too-long parameter as file name

2016-02-08 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > Even if it is easier to write HEAD~2000, it is legal to write > HEAD^^^... (repeats "^" 2000 times in total). However, such a string is > too long to be a legal filename (and on Windows, by default even much, > much shorter strings are still illegal because they ex

[PATCH] Avoid interpreting too-long parameter as file name

2016-02-07 Thread Nguyễn Thái Ngọc Duy
Even if it is easier to write HEAD~2000, it is legal to write HEAD^^^... (repeats "^" 2000 times in total). However, such a string is too long to be a legal filename (and on Windows, by default even much, much shorter strings are still illegal because they exceed MAX_PATH). Therefore, if the check