[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch] (but not for gnulib) squash git diff spurious exit code 1
From: |
Ben Pfaff |
Subject: |
Re: [patch] (but not for gnulib) squash git diff spurious exit code 1 |
Date: |
Thu, 27 Dec 2007 14:46:26 -0800 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Thien-Thi Nguyen <address@hidden> 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