git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH RESEND] git-gui: Fix merge conflict display error when filename contains spaces

From
Jens Lehmann <jens.lehmann@web.de>
Date
Mar 20, 2009, 07:52 UTC
Message-ID
<49C34B5A.2040807@web.de>
When a merge conflict occurs in a file with spaces in the filename, git-gui showed wrongly "LOCAL: deleted".
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
---
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(-)
diff --git a/git-gui/lib/mergetool.tcl b/git-gui/lib/mergetool.tcl
index eb2b4b5..3e1b42b 100644
--- a/git-gui/lib/mergetool.tcl
+++ b/git-gui/lib/mergetool.tcl
@@ -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]
-- 
1.6.2.1.215.g5d16f
Next: Markus Heidelberg
Message 1 of 2 in “git-gui: Fix merge conflict display error when filename contains spaces”
  1. git-gui: Fix merge conflict display error when filename contains spacesJens Lehmann, Mar 20, 2009
  2. Markus HeidelbergMar 20, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.