Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

0 views
Skip to first unread message

Jari Aalto

unread,
Oct 24, 2009, 7:34:47 AM10/24/09
to GNU Project

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

Andreas Schwab

unread,
Oct 24, 2009, 8:50:51 AM10/24/09
to Jari Aalto, GNU Project
Jari Aalto <jari....@cante.net> 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, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Jari Aalto

unread,
Oct 25, 2009, 2:26:45 AM10/25/09
to Andreas Schwab, GNU Project
Andreas Schwab <sch...@linux-m68k.org> writes:

> Jari Aalto <jari....@cante.net> 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


0 new messages