author | Junio C Hamano <gitster@pobox.com> | |
Thu, 1 Mar 2012 02:14:15 +0000 (18:14 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 1 Mar 2012 20:00:01 +0000 (12:00 -0800) | ||
commit | 5597e84b514454f18bba7b13eee2feea04f0165b | |
tree | c106fefb2671cda492a7f1830e26252d2fd84aaf | tree | snapshot |
parent | 13a4899886958c211b96bced228fdaaa42674491 | commit | diff |
t4011: illustrate "diff-index -p" on stat-dirty paths
The plumbing that looks at the working tree, i.e. "diff-index" and
"diff-files", always emit the "diff --git a/path b/path" header lines
without anything else for paths that are only stat-dirty (i.e. different
only because the cached stat information in the index no longer matches
that of the working tree, but the real contents are the same), when
these commands are run with "-p" option to produce patches.
Illustrate this current behaviour. Also demonstrate that with the "-w"
option, we (correctly) hold off showing a "diff --git" header until actual
differences have been found. This also suppresses the header for merely
stat-dirty files, which is inconsistent.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The plumbing that looks at the working tree, i.e. "diff-index" and
"diff-files", always emit the "diff --git a/path b/path" header lines
without anything else for paths that are only stat-dirty (i.e. different
only because the cached stat information in the index no longer matches
that of the working tree, but the real contents are the same), when
these commands are run with "-p" option to produce patches.
Illustrate this current behaviour. Also demonstrate that with the "-w"
option, we (correctly) hold off showing a "diff --git" header until actual
differences have been found. This also suppresses the header for merely
stat-dirty files, which is inconsistent.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4011-diff-symlink.sh | diff | blob | history |