path: root/git-gui/lib/blame.tcl
diff options
authorJunio C Hamano <>2007-07-30 05:53:33 (GMT)
committerJunio C Hamano <>2007-07-30 05:53:33 (GMT)
commitb8de7f764e1a9f6e8dfb587a6145906394fa607d (patch)
tree43c913e5455026cfa8d721e47663acebd01bf5df /git-gui/lib/blame.tcl
parent89b2f19cb516249b8d9546bb1f3f46a1ec5b3242 (diff)
parent84f67537b13bf0a959b1cad50b0d490071dc921a (diff)
Merge branch 'master' of git://
* 'master' of git:// (50 commits) git-gui: Minor refactoring of merge command line in merge support git-gui: Use more modern looking icons in the tree browser git-gui: Don't offer to stage hunks from untracked files git-gui: Make sure remotes are loaded when picking revisions git-gui: Use progress bar while resetting/aborting files git-gui: Honor core.excludesfile when listing extra files git-gui: Unify wording to say "to stage" instead of "to add" git-gui: Don't kill modified commit message buffer with merge templates git-gui: Remove usernames from absolute SSH urls during merging git-gui: Format tracking branch merges as though they were pulls git-gui: Cleanup bindings within merge dialog git-gui: Replace merge dialog with our revision picker widget git-gui: Show ref last update times in revision chooser tooltips git-gui: Display commit/tag/remote info in tooltip of revision picker git-gui: Save remote urls obtained from config/remotes setup git-gui: Avoid unnecessary symbolic-ref call during checkout git-gui: Refactor current branch menu items to make i18n easier git-gui: Refactor diff popup into a procedure to ease i18n work git-gui: Paper bag fix quitting crash after commit git-gui: Clarify meaning of add tracked menu option ...
Diffstat (limited to 'git-gui/lib/blame.tcl')
1 files changed, 18 insertions, 7 deletions
diff --git a/git-gui/lib/blame.tcl b/git-gui/lib/blame.tcl
index 4bdb9a2..9607284 100644
--- a/git-gui/lib/blame.tcl
+++ b/git-gui/lib/blame.tcl
@@ -370,6 +370,7 @@ method _load {jump} {
$w_path conf -text [escape_path $path]
if {$commit eq {}} {
set fd [open $path r]
+ fconfigure $fd -eofchar {}
} else {
set fd [git_read cat-file blob "$commit:$path"]
@@ -770,15 +771,20 @@ method _showcommit {cur_w lno} {
set enc [string tolower [string range $line 9 end]]
- set msg [encoding convertfrom $enc [read $fd]]
- set msg [string trim $msg]
+ set msg [read $fd]
close $fd
- set author_name [encoding convertfrom $enc $author_name]
- set committer_name [encoding convertfrom $enc $committer_name]
- set header($cmit,author) $author_name
- set header($cmit,committer) $committer_name
+ set enc [tcl_encoding $enc]
+ if {$enc ne {}} {
+ set msg [encoding convertfrom $enc $msg]
+ set author_name [encoding convertfrom $enc $author_name]
+ set committer_name [encoding convertfrom $enc $committer_name]
+ set header($cmit,author) $author_name
+ set header($cmit,committer) $committer_name
+ set header($cmit,summary) \
+ [encoding convertfrom $enc $header($cmit,summary)]
+ }
+ set msg [string trim $msg]
set header($cmit,message) $msg
@@ -873,6 +879,11 @@ method _open_tooltip {cur_w} {
set org [lindex $amov_data $lno]
+ if {$dat eq {}} {
+ _hide_tooltip $this
+ return
+ }
set cmit [lindex $dat 0]
set tooltip_commit [list $cmit]