@@ -63,28 +63,17 @@ proc force_diff_encoding {enc} {
6363}
6464
6565proc handle_empty_diff {} {
66- global current_diff_path file_states file_lists
67- global diff_empty_count
66+ global current_diff_path file_states
67+ global ui_diff
6868
6969 set path $current_diff_path
7070 set s $file_states($path)
7171 if {[lindex $s 0] ne {_M} || [has_textconv $path ]} return
7272
73- # Prevent infinite rescan loops
74- incr diff_empty_count
75- if {$diff_empty_count > 1} return
76-
77- info_popup [mc " No differences detected.
78-
79- %s has no changes.
80-
81- The modification date of this file was updated by another application, but the content within the file was not changed.
82-
83- A rescan will be automatically started to find other files which may have the same state." [short_path $path ]]
84-
85- clear_diff
86- display_file $path __
87- rescan ui_ready 0
73+ $ui_diff conf -state normal
74+ $ui_diff insert end [mc " * No differences detected; stage the file to de-list it from Unstaged Changes.\n " ] d_info
75+ $ui_diff insert end [mc " * Click to find other files that may have the same state.\n " ] d_rescan
76+ $ui_diff conf -state disabled
8877}
8978
9079proc show_diff {path w {lno {}} {scroll_pos {}} {callback {}}} {
@@ -387,7 +376,6 @@ proc read_diff {fd conflict_size cont_info} {
387376 global ui_diff diff_active is_submodule_diff
388377 global is_3way_diff is_conflict_diff current_diff_header
389378 global current_diff_queue
390- global diff_empty_count
391379
392380 $ui_diff conf -state normal
393381 while {[gets $fd line] >= 0} {
@@ -559,8 +547,6 @@ proc read_diff {fd conflict_size cont_info} {
559547
560548 if {[$ui_diff index end] eq {2.0}} {
561549 handle_empty_diff
562- } else {
563- set diff_empty_count 0
564550 }
565551
566552 set callback [lindex $cont_info 1]
0 commit comments