author | Shawn O. Pearce <spearce@spearce.org> | |
Thu, 25 Jan 2007 02:30:23 +0000 (21:30 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Thu, 25 Jan 2007 05:25:32 +0000 (00:25 -0500) | ||
commit | 30b14ed390f543e52665c8fc4f626aab78e3dcab | |
tree | e94be76467c04397bd5a4575d8ea9f17bded0d0a | tree | snapshot |
parent | a25c51893317bcbd8e8a85b6da3a573fcd096d86 | commit | diff |
git-gui: Elide CRs appearing in diff output from display.
If we are displaying a diff for a DOS-style (CRLF) formatted file then
the Tk text widget would normally show the CR at the end of every line;
in most fonts this will come out as a square box. Rather than showing
this character we'll tag it with a tag which forces the character to
be elided away, so its not displayed. However since the character is
still within the text buffer we can still obtain it and supply it over
to `git apply` when staging or unstaging an individual hunk, ensuring
that the file contents is always fully preserved as-is.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
If we are displaying a diff for a DOS-style (CRLF) formatted file then
the Tk text widget would normally show the CR at the end of every line;
in most fonts this will come out as a square box. Rather than showing
this character we'll tag it with a tag which forces the character to
be elided away, so its not displayed. However since the character is
still within the text buffer we can still obtain it and supply it over
to `git apply` when staging or unstaging an individual hunk, ensuring
that the file contents is always fully preserved as-is.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh | diff | blob | history |