summaryrefslogtreecommitdiffstats
path: root/gitk
diff options
context:
space:
mode:
authorKevin Ballard <kevin@sb.org>2008-12-18 10:26:48 +0100
committerPaul Mackerras <paulus@samba.org>2008-12-22 00:16:18 +0100
commit61f57cb07d88e06a2027a4a4c571c59d353361a5 (patch)
tree7433a0aa1a47b6211eadffdfeee11efdfa277713 /gitk
parentgitk: Update German translation (diff)
downloadgit-61f57cb07d88e06a2027a4a4c571c59d353361a5.tar.xz
git-61f57cb07d88e06a2027a4a4c571c59d353361a5.zip
gitk: Allow unbalanced quotes/braces in commit headers
When parsing commits, gitk treats the headers of the commit as tcl lists. This causes errors if the header contains an unbalanced quote or open brace. Splitting the line on spaces allows us to treat it as a set of words instead of as a tcl list, which prevents errors. Signed-off-by: Kevin Ballard <kevin@sb.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to '')
-rwxr-xr-xgitk5
1 files changed, 3 insertions, 2 deletions
diff --git a/gitk b/gitk
index 6d9e528d2c..d72196911c 100755
--- a/gitk
+++ b/gitk
@@ -1601,13 +1601,14 @@ proc parsecommit {id contents listed} {
set header [string range $contents 0 [expr {$hdrend - 1}]]
set comment [string range $contents [expr {$hdrend + 2}] end]
foreach line [split $header "\n"] {
+ set line [split $line " "]
set tag [lindex $line 0]
if {$tag == "author"} {
set audate [lindex $line end-1]
- set auname [lrange $line 1 end-2]
+ set auname [join [lrange $line 1 end-2] " "]
} elseif {$tag == "committer"} {
set comdate [lindex $line end-1]
- set comname [lrange $line 1 end-2]
+ set comname [join [lrange $line 1 end-2] " "]
}
}
set headline {}