From: Gerrit Pape <pape@smarden.org>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: git@vger.kernel.org
Subject: [PATCH] git-gui: lib/index.tcl: handle files with % in the filename properly
Date: Fri, 7 Sep 2007 17:16:59 +0000 [thread overview]
Message-ID: <20070907171659.28846.qmail@3fa9e2237b61c9.315fe32.mid.smarden.org> (raw)
Steps to reproduce the bug:
$ mkdir repo && cd repo && git init
Initialized empty Git repository in .git/
$ touch 'foo%3Fsuite'
$ git-gui
Then click on the 'foo%3Fsuite' icon to include it in a changeset, a
popup comes with:
'Error: bad field specifier "F"'
Vincent Danjean noticed the problem and also suggested the fix, reported
through
http://bugs.debian.org/441167
Signed-off-by: Gerrit Pape <pape@smarden.org>
---
lib/index.tcl | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/lib/index.tcl b/lib/index.tcl
index b3f5e17..78e2101 100644
--- a/lib/index.tcl
+++ b/lib/index.tcl
@@ -13,7 +13,8 @@ proc update_indexinfo {msg pathList after} {
if {$batch > 25} {set batch 25}
ui_status [format \
- "$msg... %i/%i files (%.2f%%)" \
+ "%s... %i/%i files (%.2f%%)" \
+ $msg \
$update_index_cp \
$totalCnt \
0.0]
@@ -68,7 +69,8 @@ proc write_update_indexinfo {fd pathList totalCnt batch msg after} {
}
ui_status [format \
- "$msg... %i/%i files (%.2f%%)" \
+ "%s... %i/%i files (%.2f%%)" \
+ $msg \
$update_index_cp \
$totalCnt \
[expr {100.0 * $update_index_cp / $totalCnt}]]
@@ -86,7 +88,8 @@ proc update_index {msg pathList after} {
if {$batch > 25} {set batch 25}
ui_status [format \
- "$msg... %i/%i files (%.2f%%)" \
+ "%s... %i/%i files (%.2f%%)" \
+ $msg \
$update_index_cp \
$totalCnt \
0.0]
@@ -145,7 +148,8 @@ proc write_update_index {fd pathList totalCnt batch msg after} {
}
ui_status [format \
- "$msg... %i/%i files (%.2f%%)" \
+ "%s... %i/%i files (%.2f%%)" \
+ $msg \
$update_index_cp \
$totalCnt \
[expr {100.0 * $update_index_cp / $totalCnt}]]
@@ -163,7 +167,8 @@ proc checkout_index {msg pathList after} {
if {$batch > 25} {set batch 25}
ui_status [format \
- "$msg... %i/%i files (%.2f%%)" \
+ "%s... %i/%i files (%.2f%%)" \
+ $msg
$update_index_cp \
$totalCnt \
0.0]
@@ -218,7 +223,8 @@ proc write_checkout_index {fd pathList totalCnt batch msg after} {
}
ui_status [format \
- "$msg... %i/%i files (%.2f%%)" \
+ "%s... %i/%i files (%.2f%%)" \
+ $msg \
$update_index_cp \
$totalCnt \
[expr {100.0 * $update_index_cp / $totalCnt}]]
--
1.5.3.1
reply other threads:[~2007-09-07 17:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070907171659.28846.qmail@3fa9e2237b61c9.315fe32.mid.smarden.org \
--to=pape@smarden.org \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).