summaryrefslogtreecommitdiff
path: root/git-gui.sh
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-02-08 22:13:51 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-02-08 22:13:51 (GMT)
commit42b922fcf6f3bd16c4579f2b9e1e52c79096eba2 (patch)
treea5c4f7e47377f1a606dcefd6b157e004df95af79 /git-gui.sh
parent9bccb782c35b864988e51d433271faba2ac3e96f (diff)
downloadgit-42b922fcf6f3bd16c4579f2b9e1e52c79096eba2.zip
git-42b922fcf6f3bd16c4579f2b9e1e52c79096eba2.tar.gz
git-42b922fcf6f3bd16c4579f2b9e1e52c79096eba2.tar.bz2
git-gui: Replace \ with \\ when showing paths.
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>
Diffstat (limited to 'git-gui.sh')
-rwxr-xr-xgit-gui.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 8db8789..1d22564 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -1381,6 +1381,7 @@ proc mapdesc {state path} {
}
proc escape_path {path} {
+ regsub -all {\\} $path "\\\\" path
regsub -all "\n" $path "\\n" path
return $path
}