I have a directory with the following files and a .git directory, e.g.
.
├── .git
│ ├── branches
│ ├── COMMIT_EDITMSG
│ ├── packed-refs
│ └── refs
├── readme.md
├── server_build.sh
└── tags
If I run GNU find command with the -prune test, find prints the directory which is prune'd:
% find . -name '.git' -prune
./.git
If add another OR option, then the directory which is pruned not longer appears in the output:
% find . -name '.git' -prune -o -name '*.md' -print
./readme.md
In this case, both -name '.git' and -name '*.md' tests must be returning true, it can't be possible that adding another OR test suddenly makes the -name '.git' -prune test untrue.
Is there some implicit switch being added to the first statement?
In other words is find turning
find . -name '.git' -prune
into
find . -name '.git' -prune -print
at run time? and the implicit -print is taken away when the next test when is added?
Why doesn't find print the -prune'd directory when another "-or" test is applied?