Re: [PATCH] ls-files: do not trust stat info if lstat() fails

2014-04-07 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: Or even better to show an error message when the error code is unexpected? The unkown tag '!' says there are problems but if it shows up sort of permanently, '!' won't help much, I think. I am OK with that approach, but then one question remains: should

Re: [PATCH] ls-files: do not trust stat info if lstat() fails

2014-04-05 Thread Duy Nguyen
On Thu, Apr 3, 2014 at 11:30 PM, Junio C Hamano gits...@pobox.com wrote: Duy Nguyen pclo...@gmail.com writes: On Thu, Apr 3, 2014 at 1:15 AM, Junio C Hamano gits...@pobox.com wrote: I am guessing that, even though this was discovered during the development of list-files, is a fix applicable

Re: [PATCH] ls-files: do not trust stat info if lstat() fails

2014-04-03 Thread Duy Nguyen
On Thu, Apr 3, 2014 at 1:15 AM, Junio C Hamano gits...@pobox.com wrote: I am guessing that, even though this was discovered during the development of list-files, is a fix applicable outside the context of that series. I do think the patched result is an improvement than the status quo, but

Re: [PATCH] ls-files: do not trust stat info if lstat() fails

2014-04-03 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: On Thu, Apr 3, 2014 at 1:15 AM, Junio C Hamano gits...@pobox.com wrote: I am guessing that, even though this was discovered during the development of list-files, is a fix applicable outside the context of that series. I do think the patched result is an

Re: [PATCH] ls-files: do not trust stat info if lstat() fails

2014-04-02 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: If 'err' is non-zero, lstat() has failed. Consider the entry modified without passing the (unreliable) stat info to ce_modified() in this case. Noticed-by: Eric Sunshine sunsh...@sunshineco.com Signed-off-by: Nguyễn Thái Ngọc Duy

[PATCH] ls-files: do not trust stat info if lstat() fails

2014-03-28 Thread Nguyễn Thái Ngọc Duy
If 'err' is non-zero, lstat() has failed. Consider the entry modified without passing the (unreliable) stat info to ce_modified() in this case. Noticed-by: Eric Sunshine sunsh...@sunshineco.com Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- On Fri, Mar 28, 2014 at 11:04 AM, Eric