prep_exclude: remove the artificial PATH_MAX limit

This fixes a segfault in git-status with long paths on Windows,
where PATH_MAX is only 260.

This also fixes the problem of silently ignoring .gitignore if the
full path exceeds PATH_MAX. Now add_excludes_from_file() will report
if it gets ENAMETOOLONG.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2014-07-14 11:50:22 +02:00
committed by Junio C Hamano
parent 709359c85c
commit aceb9429b3
2 changed files with 29 additions and 20 deletions

2
dir.h
View File

@ -119,7 +119,7 @@ struct dir_struct {
*/
struct exclude_stack *exclude_stack;
struct exclude *exclude;
char basebuf[PATH_MAX];
struct strbuf basebuf;
};
/*