git-diff on touched files: bug or feature?
- From
Matthieu Moy <matthieu.moy@imag.fr>
- Date
- Aug 1, 2007, 16:17 UTC
- Message-ID
- <vpqwswf8c1i.fsf@bauges.imag.fr>
Hi,
When a file is "touched" (ie. stat information not matching the index, but the content still matching), git-status doesn't report the file as modified (as expected), but git-diff does (with an empty diff):
$ git st # On branch master nothing to commit (working directory clean) $ ls bar $ touch bar $ git diff
diff --git a/bar b/bar <--- here ---< $ git status # On branch master nothing to commit (working directory clean) $ git diff <--- status updated the stat in the index. Is this intended, or just that the code that reconciles the file and the index has been written for status, but not used in diff? Thanks,
-- Matthieu