GNU bug report logs -
#29139
add --include for recursive searches
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hello List,
I've been annoyed and confused when I'm on autopilot and attempting to
recursively compare directory trees. I've become accustomed to Grep's
--include functionality, and have more than a few times been surprised
(to the tune of "What? Unrecognized option??") that diff does not have
it. Well, with the attached patch, it now does.
Thanks to diff and grep both using gnulib, and the expressiveness of
add_exclude(), this was a much easier change that I was expecting when I
embarked on this a couple of hours ago.
Further, in the past hour since implementing it, this patch has already
saved me a ton of time (no thanks to an unfortunately slow VPN setup and
other beleaguered business requirements).
Use is exactly like with grep. For example:
$ diff --recursive --brief -w --include="*.c" --include="*.h" \
dir1/ \
dir2/
Would this be of use to the community?
Thanks,
Kevin
[diff-Add-include-command-line-option.patch (text/x-patch, attachment)]
This bug report was last modified 7 years and 280 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.