Thien-Thi Nguyen <[EMAIL PROTECTED]> writes: > below is a script (write to /tmp/z ; chmod +x) that shows little output > and exit code 0 with the patch and spurious "0 files changed" and exit > code 1 without. i am curious how it behaves w/ other versions of git.
As a workaround, you can run git-status before git-diff. This is semi-documented in the documentation for git-status: If any paths have been touched in the working tree (that is, their modification times have changed) but their contents and permissions are identical to those in the index file, the command updates the index file. Running git-status can thus speed up subsequent operations such as git-diff if the working tree contains many paths that have been touched but not modified. -- Ben Pfaff http://benpfaff.org