GNU utils: [diff] wishlist / add option --exlude-path=PATTERN

View: New views
3 Messages — Rating Filter:   Alert me  

GNU utils: [diff] wishlist / add option --exlude-path=PATTERN

by Jari Aalto-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


The diff(1) contains options:

    -x PAT  --exclude=PAT
           Exclude files that match PAT.

    -X FILE  --exclude-from=FILE
           Exclude files that match any pattern in FILE.

SUGGESTION

When doing a recursive diffing, there is a need for one option more:

    --exlude-path=PATTERN

This would make it possible to match path name to exclude version
control related subdirectories from the diff. Those like

    *.bzr*
    *.git*
    *.hg*
    *CVS*
    *.svn*
    *.darcs*
    *.mtn*

It would also help if this option were made to use (extended) regular
expressions, and not only shell-like match patterns.

Jari




Re: GNU utils: [diff] wishlist / add option --exlude-path=PATTERN

by Andreas Schwab-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jari Aalto <jari.aalto@...> writes:

> When doing a recursive diffing, there is a need for one option more:
>
>     --exlude-path=PATTERN
>
> This would make it possible to match path name to exclude version
> control related subdirectories from the diff. Those like
>
>     *.bzr*
>     *.git*
>     *.hg*
>     *CVS*
>     *.svn*
>     *.darcs*
>     *.mtn*

You can do that already with -x.bzr, etc.  GNU diff will not descent
directories that match the exclude patterns.

Andreas.

--
Andreas Schwab, schwab@...
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



Re: GNU utils: [diff] wishlist / add option --exlude-path=PATTERN

by Jari Aalto-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Andreas Schwab <schwab@...> writes:

> Jari Aalto <jari.aalto@...> writes:
>
>> When doing a recursive diffing, there is a need for one option more:
>>
>>     --exlude-path=PATTERN
>>
>> This would make it possible to match path name to exclude version
>> control related subdirectories from the diff. Those like
>>
>>     *.bzr*
>>     *.git*
>>     *.hg*
>>     *CVS*
>>     *.svn*
>>     *.darcs*
>>     *.mtn*
>
> You can do that already with -x.bzr, etc.  GNU diff will not descent
> directories that match the exclude patterns.

Ah, the info pages are clear:

`--exclude=PATTERN'
     When comparing directories, ignore files and subdirectories whose
     basenames match PATTERN.  *Note Comparing Directories::.

It would be nice if the manual page would be a little more wordy:

       -x PAT  --exclude=PAT
              Exclude files that match PAT.

This is a little too spartan.

For a submitting a patch, I had trouble accessing the git repo:

    https://savannah.gnu.org/git/?group=diffutils
    git clone git://git.savannah.gnu.org/diffutils.git

For some reason, the clone turned out to be empty. Is this the
correct location of latest sources?

Jari