[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-diffutils] bug#29139: add --include for recursive searches

From: Kevin Hunter Kesling
Subject: [bug-diffutils] bug#29139: add --include for recursive searches
Date: Fri, 3 Nov 2017 16:13:57 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

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/   \

Would this be of use to the community?



Attachment: diff-Add-include-command-line-option.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]