bug#22144: --exclude no longer works against arguments with a directory name

2015-12-30 Thread Paul Eggert
Vincent Lefevre wrote: I've done various tests, and it seems fine. Thanks. You're welcome; closing the bug report.

bug#22144: --exclude no longer works against arguments with a directory name

2015-12-30 Thread Vincent Lefevre
On 2015-12-28 01:09:40 -0800, Paul Eggert wrote: > Vincent Lefevre wrote: > > The documentation is still ambiguous. For the "main case", is this > > the canonical name as returned by realpath? > > > > > >As you say, the 2.22 behavior does not seem ideal. > > By doing a difference for subfiles of a

bug#22144: --exclude no longer works against arguments with a directory name

2015-12-28 Thread Paul Eggert
Vincent Lefevre wrote: The documentation is still ambiguous. For the "main case", is this the canonical name as returned by realpath? >As you say, the 2.22 behavior does not seem ideal. By doing a difference for subfiles of a recursive search, this is even worse! Please try the attached patc

bug#22144: --exclude no longer works against arguments with a directory name

2015-12-16 Thread Paul Eggert
Vincent Lefevre wrote: So, for instance, "foo" and "./foo" are regarded as different? Yes. Grep does not need to worry about inodes or realpath or anything like that, so it doesn't.

bug#22144: --exclude no longer works against arguments with a directory name

2015-12-16 Thread Vincent Lefevre
On 2015-12-15 22:24:25 -0800, Paul Eggert wrote: > Vincent Lefevre wrote: > >How is the file name defined, then? > > It's built as a string, which is passed to 'open' without worrying > about realpath. So, for instance, "foo" and "./foo" are regarded as different? The way how files are regarded

bug#22144: --exclude no longer works against arguments with a directory name

2015-12-15 Thread Paul Eggert
Vincent Lefevre wrote: How is the file name defined, then? It's built as a string, which is passed to 'open' without worrying about realpath. By the way in case it's not already clear, I agree with you that the current behavior is not good, it's just that we can't simply revert (as that was

bug#22144: --exclude no longer works against arguments with a directory name

2015-12-15 Thread Vincent Lefevre
On 2015-12-15 15:27:27 -0800, Paul Eggert wrote: > Vincent Lefevre wrote: > >For the "main case", is this > >the canonical name as returned by realpath? > > I don't see why. grep doesn't need to compute anything's realpath. How is the file name defined, then? -- Vincent Lefèvre - Web:

bug#22144: --exclude no longer works against arguments with a directory name

2015-12-15 Thread Paul Eggert
Vincent Lefevre wrote: For the "main case", is this the canonical name as returned by realpath? I don't see why. grep doesn't need to compute anything's realpath.

bug#22144: --exclude no longer works against arguments with a directory name

2015-12-15 Thread Vincent Lefevre
On 2015-12-11 19:31:46 -0800, Paul Eggert wrote: > On 12/11/2015 05:56 PM, Vincent Lefevre wrote: > >or --exclude, the description is clear: > > The description changed in grep 2.22, to match the 2.22 (also, > 2.6-and-earlier) behavior. My quote was from the grep 2.22 description (grep 2.22-1 Deb

bug#22144: --exclude no longer works against arguments with a directory name

2015-12-11 Thread Paul Eggert
On 12/11/2015 05:56 PM, Vincent Lefevre wrote: or --exclude, the description is clear: The description changed in grep 2.22, to match the 2.22 (also, 2.6-and-earlier) behavior. As you say, the 2.22 behavior does not seem ideal. However, the 2.7 through 2.21 behavior wasn't ideal either. It'

bug#22144: --exclude no longer works against arguments with a directory name

2015-12-11 Thread Vincent Lefevre
On 2015-12-11 13:37:46 -0800, Paul Eggert wrote: > The change in grep 2.22 is due to an earlier bug report: > > http://bugs.gnu.org/21027 This one was about --exclude-dir, whose description in grep 2.21 is very unclear and it was already broken anyway: zira:~> grep -rl e --exclude-dir='usr*' /us

bug#22144: --exclude no longer works against arguments with a directory name

2015-12-11 Thread Paul Eggert
The change in grep 2.22 is due to an earlier bug report: http://bugs.gnu.org/21027 and was implemented by this patch: http://git.savannah.gnu.org/cgit/grep.git/commit/?id=c5c70eae261133d71a9436557d998a48aaf0a5fe Although I can see arguments either way, the grep 2.22 behavior is consistent wit

bug#22144: --exclude no longer works against arguments with a directory name

2015-12-11 Thread Vincent Lefevre
In grep 2.22, --exclude no longer works in some cases: $ cd /usr/share/doc/grep $ grep e --exclude README README is OK, but not: $ grep e --exclude README /usr/share/doc/grep/README Copyright (C) 1992, 1997-2002, 2004-2015 Free Software Foundation, Inc. [...] This breaks at least one of my sc