Merge git://repo.or.cz/git-gui

* git://repo.or.cz/git-gui:
  git-gui: Fixes for Mac OS X TkAqua
  git-gui: Update Russian translation
  git-gui: run post-checkout hook after clone
  git-gui: Ensure consistent usage of mergetool.keepBackup
  git-gui: fix use of undeclared variable diff_empty_count
  git-gui (Win): make starting via "Git GUI Here" on .git/ possible
  git-gui (Win): make "Explore Working Copy" more robust
  git-gui: run post-checkout hook on checkout
  git-gui: When calling post-commit hook wrong variable was cleared.
  git-gui: use `git --html-path` to get the location of installed HTML docs
  git-gui: fix deleting from the context menu with empty selection
  git-gui: minor spelling fix and string factorisation.
  git-gui: various French translation fixes
  git-gui: Fix merge conflict display error when filename contains spaces
  git-gui: don't hide the Browse button when resizing the repo chooser
  Append ampersand to "Target" of lnk files created by do_cygwin_shortcut
  git-gui: Support more git version notations.
  git-gui: Avoid an infinite rescan loop in handle_empty_diff.
  git-gui: Fix post-commit status with subject in non-locale encoding
This commit is contained in:
Junio C Hamano
2009-05-01 22:11:57 -07:00
22 changed files with 1273 additions and 676 deletions

View File

@ -51,11 +51,16 @@ proc force_diff_encoding {enc} {
proc handle_empty_diff {} {
global current_diff_path file_states file_lists
global diff_empty_count
set path $current_diff_path
set s $file_states($path)
if {[lindex $s 0] ne {_M}} return
# Prevent infinite rescan loops
incr diff_empty_count
if {$diff_empty_count > 1} return
info_popup [mc "No differences detected.
%s has no changes.
@ -310,6 +315,7 @@ proc read_diff {fd cont_info} {
global ui_diff diff_active
global is_3way_diff is_conflict_diff current_diff_header
global current_diff_queue
global diff_empty_count
$ui_diff conf -state normal
while {[gets $fd line] >= 0} {
@ -415,7 +421,10 @@ proc read_diff {fd cont_info} {
if {[$ui_diff index end] eq {2.0}} {
handle_empty_diff
} else {
set diff_empty_count 0
}
set callback [lindex $cont_info 1]
if {$callback ne {}} {
eval $callback