git-gui: Correctly handle files containing LF in their name.
If we are given a file whose path name contains an LF (\n) we now
escape it by inserting the common escape string \n instead of the
LF character whenever we display the name in the UI. This way the
text fields don't start to span multiple lines just to display one
file, and it keeps the line numbers correct within the file lists.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
set ui_status_value "Unable to display [escape_path $path]"
error_popup "Error loading diff:\n$err"
return
}
@ -569,7 +569,7 @@ before committing.
@@ -569,7 +569,7 @@ before committing.
U* {
error_popup "Unmerged files cannot be committed.
File $path has merge conflicts.
File [escape_path $path] has merge conflicts.
You must resolve them and include the file before committing.
"
unlock_index
@ -578,7 +578,7 @@ You must resolve them and include the file before committing.
@@ -578,7 +578,7 @@ You must resolve them and include the file before committing.
default {
error_popup "Unknown file state [lindex $s 0] detected.
File $path cannot be committed by this program.
File [escape_path $path] cannot be committed by this program.