summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 74daedb)
raw | patch | inline | side by side (parent: 74daedb)
author | Paul Mackerras <paulus@samba.org> | |
Mon, 27 Jun 2005 10:04:26 +0000 (20:04 +1000) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Mon, 27 Jun 2005 10:04:26 +0000 (20:04 +1000) |
If we have a very long commit message, and we end up getting a
bufferfull of data from git-rev-list that all belongs to one commit,
we ended up throwing away the data from a previous read that should
have been included. The result was a error message about not being
able to parse the output of git-rev-list.
Also, if the git-rev-list output that we can't parse is long, only put
the first 80 chars in the error message. Otherwise we end up with an
enormous error window.
bufferfull of data from git-rev-list that all belongs to one commit,
we ended up throwing away the data from a previous read that should
have been included. The result was a error message about not being
able to parse the output of git-rev-list.
Also, if the git-rev-list output that we can't parse is long, only put
the first 80 chars in the error message. Otherwise we end up with an
enormous error window.
gitk | patch | blob | history |
index 0e95d9d71107a6385cbb570c98ebee38e3c41ee7..e72c9c7bdbed8d316d87d9f2ddda89f57ef94639 100755 (executable)
--- a/gitk
+++ b/gitk
while 1 {
set i [string first "\0" $stuff $start]
if {$i < 0} {
- set leftover [string range $stuff $start end]
+ append leftover [string range $stuff $start end]
return
}
set cmit [string range $stuff $start [expr {$i - 1}]]
if {$start == 0} {
set cmit "$leftover$cmit"
+ set leftover {}
}
set start [expr {$i + 1}]
if {![regexp {^([0-9a-f]{40})\n} $cmit match id]} {
- error_popup "Can't parse git-rev-list output: {$cmit}"
+ set shortcmit $cmit
+ if {[string length $shortcmit] > 80} {
+ set shortcmit "[string range $shortcmit 0 80]..."
+ }
+ error_popup "Can't parse git-rev-list output: {$shortcmit}"
exit 1
}
set cmit [string range $cmit 41 end]