author | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 23 Jan 2007 03:41:13 +0000 (22:41 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 23 Jan 2007 06:48:50 +0000 (01:48 -0500) | ||
commit | 124355d32c0612192e729e12f1d3d68849754f29 | |
tree | 67cacd99d5bd6af80c2e91d24b522269cdb76138 | tree | snapshot |
parent | e54a1bd122007af30fcf174a57f892157501673f | commit | diff |
git-gui: Always start a rescan on an empty diff.
If we got an empty diff its probably because the modification time of
the file was changed but the file content hasn't been changed. Typically
this happens because an outside program modified the file and git-gui
was told to not run 'update-index --refresh', as the user generally
trusts file modification timestamps. But we can also get an empty diff
when a program undos a file change and still updates the modification
timestamp upon saving, but has undone the file back to the same as what
is in the index or in PARENT.
So even if gui.trustmtime is false we should still run a rescan on
an empty diff. This change also lets us cleanup the dialog message
that we show when this case occurs, as its no longer got anything to
do with Trust File Modification Timestamps.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
If we got an empty diff its probably because the modification time of
the file was changed but the file content hasn't been changed. Typically
this happens because an outside program modified the file and git-gui
was told to not run 'update-index --refresh', as the user generally
trusts file modification timestamps. But we can also get an empty diff
when a program undos a file change and still updates the modification
timestamp upon saving, but has undone the file back to the same as what
is in the index or in PARENT.
So even if gui.trustmtime is false we should still run a rescan on
an empty diff. This change also lets us cleanup the dialog message
that we show when this case occurs, as its no longer got anything to
do with Trust File Modification Timestamps.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh | diff | blob | history |