[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] find: doc: Fix -prune SCM example directories and make it more e
From: |
raf |
Subject: |
[PATCH] find: doc: Fix -prune SCM example directories and make it more efficient |
Date: |
Sat, 19 Nov 2022 09:48:27 +1100 |
Hi,
Here's the second attempt. I've made it clear that the only "fix"
is to the example directories and output, not to the command itself.
I've restored the three-exec version of the command in both find.1 and
find.texi, so that the only improvement is the addition of "-type d"
to prevent the three execs happening for every file as well. In
find.texi (only), I've added the even more efficient single-exec
version of the command, and I chose this version:
-exec sh -c 'test -d "$1"/.svn || test -d "$1"/.git || test -d "$1"/CVS' . {}
\;
rather than this version:
-exec sh -c '[ -d "$1"/.svn ] || [ -d "$1"/.git ] || [ -d "$1"/CVS ]' . {} \;
But note that the first version is longer, and the line is 82 characters
long. If that's no good, the second version might be preferable.
But I did notice other lines in find.texi that were longer than 80 characters,
so I assume it's OK.
cheers,
raf
- [PATCH] find: doc: Fix -prune SCM example directories and make it more efficient,
raf <=