{"thread":{"id":"9823","subject":"[PATCH] git-gui: lib/index.tcl: handle files with % in the filename properly","startedAt":"2007-09-07T17:16:59Z","lastAt":"2007-09-07T17:16:59Z","messageCount":1,"participants":["Gerrit Pape"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"52925","messageId":"20070907171659.28846.qmail@3fa9e2237b61c9.315fe32.mid.smarden.org","threadId":"9823","inReplyTo":null,"subject":"[PATCH] git-gui: lib/index.tcl: handle files with % in the filename properly","fromName":"Gerrit Pape","fromEmail":"pape@smarden.org","sentAt":"2007-09-07T17:16:59Z","receivedAt":"2007-09-07T17:16:59Z","isPatch":true,"sender":{"key":"pape@smarden.org","avatar":"https://avatars.githubusercontent.com/u/143170252?v=4"},"body":"Steps to reproduce the bug:\n\n $ mkdir repo && cd repo && git init\n Initialized empty Git repository in .git/\n $ touch 'foo%3Fsuite'\n $ git-gui\n\nThen click on the 'foo%3Fsuite' icon to include it in a changeset, a\npopup comes with:\n'Error: bad field specifier \"F\"'\n\nVincent Danjean noticed the problem and also suggested the fix, reported\nthrough\n http://bugs.debian.org/441167\n\nSigned-off-by: Gerrit Pape <pape@smarden.org>\n---\n lib/index.tcl |   18 ++++++++++++------\n 1 files changed, 12 insertions(+), 6 deletions(-)\n\ndiff --git a/lib/index.tcl b/lib/index.tcl\nindex b3f5e17..78e2101 100644\n--- a/lib/index.tcl\n+++ b/lib/index.tcl\n@@ -13,7 +13,8 @@ proc update_indexinfo {msg pathList after} {\n \tif {$batch > 25} {set batch 25}\n \n \tui_status [format \\\n-\t\t\"$msg... %i/%i files (%.2f%%)\" \\\n+\t\t\"%s... %i/%i files (%.2f%%)\" \\\n+\t\t$msg \\\n \t\t$update_index_cp \\\n \t\t$totalCnt \\\n \t\t0.0]\n@@ -68,7 +69,8 @@ proc write_update_indexinfo {fd pathList totalCnt batch msg after} {\n \t}\n \n \tui_status [format \\\n-\t\t\"$msg... %i/%i files (%.2f%%)\" \\\n+\t\t\"%s... %i/%i files (%.2f%%)\" \\\n+\t\t$msg \\\n \t\t$update_index_cp \\\n \t\t$totalCnt \\\n \t\t[expr {100.0 * $update_index_cp / $totalCnt}]]\n@@ -86,7 +88,8 @@ proc update_index {msg pathList after} {\n \tif {$batch > 25} {set batch 25}\n \n \tui_status [format \\\n-\t\t\"$msg... %i/%i files (%.2f%%)\" \\\n+\t\t\"%s... %i/%i files (%.2f%%)\" \\\n+\t\t$msg \\\n \t\t$update_index_cp \\\n \t\t$totalCnt \\\n \t\t0.0]\n@@ -145,7 +148,8 @@ proc write_update_index {fd pathList totalCnt batch msg after} {\n \t}\n \n \tui_status [format \\\n-\t\t\"$msg... %i/%i files (%.2f%%)\" \\\n+\t\t\"%s... %i/%i files (%.2f%%)\" \\\n+\t\t$msg \\\n \t\t$update_index_cp \\\n \t\t$totalCnt \\\n \t\t[expr {100.0 * $update_index_cp / $totalCnt}]]\n@@ -163,7 +167,8 @@ proc checkout_index {msg pathList after} {\n \tif {$batch > 25} {set batch 25}\n \n \tui_status [format \\\n-\t\t\"$msg... %i/%i files (%.2f%%)\" \\\n+\t\t\"%s... %i/%i files (%.2f%%)\" \\\n+\t\t$msg\n \t\t$update_index_cp \\\n \t\t$totalCnt \\\n \t\t0.0]\n@@ -218,7 +223,8 @@ proc write_checkout_index {fd pathList totalCnt batch msg after} {\n \t}\n \n \tui_status [format \\\n-\t\t\"$msg... %i/%i files (%.2f%%)\" \\\n+\t\t\"%s... %i/%i files (%.2f%%)\" \\\n+\t\t$msg \\\n \t\t$update_index_cp \\\n \t\t$totalCnt \\\n \t\t[expr {100.0 * $update_index_cp / $totalCnt}]]\n-- \n1.5.3.1\n"}]}