summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9bccb78)
raw | patch | inline | side by side (parent: 9bccb78)
author | Shawn O. Pearce <spearce@spearce.org> | |
Thu, 8 Feb 2007 22:13:51 +0000 (17:13 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Thu, 8 Feb 2007 22:13:51 +0000 (17:13 -0500) |
We already replace \n with \\n so that Tk widgets don't start a new
display line with part of a file path which is just unlucky enough
to contain an LF. But then its confusing to read a path whose name
actually contains \n as literal characters. Escaping \ to \\ would
make that case display as \\n, clarifying the output.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
display line with part of a file path which is just unlucky enough
to contain an LF. But then its confusing to read a path whose name
actually contains \n as literal characters. Escaping \ to \\ would
make that case display as \\n, clarifying the output.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh | patch | blob | history |
diff --git a/git-gui.sh b/git-gui.sh
index 8db878966263f5b26c6f31ff2b0261b742990fbf..1d225644aab9e32c6d8d0340c406d048dd16a582 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
}
proc escape_path {path} {
+ regsub -all {\\} $path "\\\\" path
regsub -all "\n" $path "\\n" path
return $path
}