Hide Forgot
Description of problem: --include not working as expected See "How reproducible" and "Additional info" for example Version-Release number of selected component (if applicable): 2.6.3 How reproducible: cseraphi@DESK 14:47:49 /tmp/test$ echo foo >1 ; echo foo > 2 cseraphi@DESK 14:47:54 /tmp/test$ grep -H foo * 1:foo 2:foo cseraphi@DESK 14:48:00 /tmp/test$ grep --exclude 1 -H foo * 2:foo cseraphi@DESK 14:48:03 /tmp/test$ grep --include 1 -H foo * 2:foo Actual results: Expected results: Additional info: We're experiencing strange behavior with grep that appears to be a known bug in 2.6.3. http://savannah.gnu.org/bugs/index.php?29876 As you can see in the release notes below, 2.7 specifically mentions --include not working http://savannah.gnu.org/forum/forum.php?forum_id=6521 As an addendum-- in recursive mode, --include seems to work properly on subdirs. Stuff specifically named on the command line behaves very differently from stuff brought in implicitly by recursion. cseraphi@DESK 14:53:04 /tmp/test$ echo foo >1 ; echo foo > 2 ; echo foo > subdir/10; echo foo > subdir/20 cseraphi@DESK 14:53:12 /tmp/test$ grep --include 1 -H foo * 2:foo cseraphi@DESK 14:53:17 /tmp/test$ grep -r --include 1 -H foo * 2:foo cseraphi@DESK 14:53:20 /tmp/test$ grep -r --include 10 -H foo * 1:foo 2:foo subdir/10:foo cseraphi@DESK 14:53:34 /tmp/test$ grep -r --include 10 -H foo . ./subdir/10:foo The commitdiff for the patch that our user seems to be referring to (http://git.savannah.gnu.org/gitweb/?p=grep.git;a=commitdiff;h=9c45c193825d1f59e1d341e556ecf4adeb7a03a2) seems to basically show a '!' being dropped from a conditional
Created attachment 835720 [details] Backported upstream patch