[PATCH v3] grep: stop looking at random places for .gitattributes

2012-10-12 Thread Nguyễn Thái Ngọc Duy
grep searches for .gitattributes using name field in struct grep_source but that field is not real on-disk path name. For example, grep pattern rev fills the field with rev:path, and Git looks for .gitattributes in the (non-existent but exploitable) path rev:path instead of path. This patch

Re: [PATCH v3] grep: stop looking at random places for .gitattributes

2012-10-12 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: grep searches for .gitattributes using name field in struct grep_source but that field is not real on-disk path name. For example, grep pattern rev fills the field with rev:path, and Git looks for .gitattributes in the (non-existent but