Skip to contentSkip to conversation

git-gui: Fix merge conflict display error when filename contains spaces

PATCH RESEND In review Jens Lehmann 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 git-gui: Fix merge conflict display error when filename contains spaces

When a merge conflict occurs in a file with spaces in the filename, git-gui showed wrongly "LOCAL: deleted".

---

Resending this patch, as i have not received any reply so far.

To reproduce the error with git 1.6.2.1.136.g8e24, i used the following commands:
mkdir spaces
cd spaces/
git init
echo "a" >file\ with\ spaces
git add file\ with\ spaces
git commit -m a .
git checkout -b b
echo "b" >file\ with\ spaces
git commit -m b .
git checkout master
echo "c" >file\ with\ spaces
git commit -m c .
git merge b
git gui
git gui doesn't show the conflict markers as it should, displaying "LOCAL: deleted" instead (but an older git-gui works as expected).

Jens

 git-gui/lib/mergetool.tcl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
git-gui/lib/mergetool.tcl +1 -1
index eb2b4b5..3e1b42b 100644
@@ -88,7 +88,7 @@ proc merge_load_stages {path cont} {
 	set merge_stages(3) {}
 	set merge_stages_buf {}
 
-	set merge_stages_fd [eval git_read ls-files -u -z -- $path]
+	set merge_stages_fd [eval git_read ls-files -u -z -- {$path}]
 
 	fconfigure $merge_stages_fd -blocking 0 -translation binary -encoding binary
 	fileevent $merge_stages_fd readable [list read_merge_stages $merge_stages_fd $cont]
Signature · 1 line
1.6.2.1.215.g5d16f
#1 lore raw

Jens Lehmann, 20.03.2009:

Quoted 7 lines

When a merge conflict occurs in a file with spaces in the filename, git-gui showed wrongly "LOCAL: deleted".

---

Resending this patch, as i have not received any reply so far.

You should send git-gui patches to Shawn O. Pearce <[email protected]>, since he is the maintainer, and CCing the git list.
This will raise the chance of a reply. Or maybe it will simply be commited to http://repo.or.cz/w/git-gui.git without a reply.

Markus