author | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 12 Nov 2006 02:52:06 +0000 (21:52 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 12 Nov 2006 05:16:05 +0000 (00:16 -0500) | ||
commit | 16403d0b1f9d17bec6bce488356ec8bf84cace48 | |
tree | de57d528594253c0206c4f11591efa9865990952 | tree | snapshot |
parent | 2c26e6f5279286aa844a54363d877acffb4a4310 | commit | diff |
git-gui: Refresh a file if it has an empty diff.
When the user has enabled the Trust File Modification Timestamp option
then we may display a file as being modified yet that file may not have
a difference. When the user clicks on that file we wind up displaying
an empty diff viewer, which makes no sense to the user.
So instead if we get an empty diff and the user has this option enabled
and the file's current state is _M (no change in index but the working
file appears modified) then run a quick update-index on just that file
and remove it from the list of modified files. We also give the user
a quick dialog stating we are removing it, and why.
Usually I don't run into this situation when I have the Trust File
Modification Timestamp option enabled, so its not that annoying to
have a dialog pop open to remind me why there are no differences.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
When the user has enabled the Trust File Modification Timestamp option
then we may display a file as being modified yet that file may not have
a difference. When the user clicks on that file we wind up displaying
an empty diff viewer, which makes no sense to the user.
So instead if we get an empty diff and the user has this option enabled
and the file's current state is _M (no change in index but the working
file appears modified) then run a quick update-index on just that file
and remove it from the list of modified files. We also give the user
a quick dialog stating we are removing it, and why.
Usually I don't run into this situation when I have the Trust File
Modification Timestamp option enabled, so its not that annoying to
have a dialog pop open to remind me why there are no differences.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui | diff | blob | history |