about summary refs log tree commit diff
path: root/third_party/git/git-gui/lib/blame.tcl
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-25T23·06+0100
committerVincent Ambo <tazjin@google.com>2020-05-25T23·06+0100
commit93ba78d6f4632ef1c5228965e3edc8c0faf88c1e (patch)
tree85730c182a9f5f492ade8e8ccdb1c2356f9900bd /third_party/git/git-gui/lib/blame.tcl
parent6f8fbf4aa4b1654ab27d4829e114538761817de0 (diff)
revert(3p/git): Revert merge of git upstream at v2.26.2 r/852
This causes cgit to serve error pages, which is undesirable.

This reverts commit 5229c9b232de5bfa959ad6ebbb4c8192ac513352, reversing
changes made to f2b211131f2347342dde63975b09cf603149f1a3.
Diffstat (limited to 'third_party/git/git-gui/lib/blame.tcl')
-rw-r--r--third_party/git/git-gui/lib/blame.tcl24
1 files changed, 7 insertions, 17 deletions
diff --git a/third_party/git/git-gui/lib/blame.tcl b/third_party/git/git-gui/lib/blame.tcl
index 62ec08366768..a1aeb8b96e2d 100644
--- a/third_party/git/git-gui/lib/blame.tcl
+++ b/third_party/git/git-gui/lib/blame.tcl
@@ -24,7 +24,6 @@ field w_cviewer  ; # pane showing commit message
 field finder     ; # find mini-dialog frame
 field gotoline   ; # line goto mini-dialog frame
 field status     ; # status mega-widget instance
-field status_operation ; # operation displayed by status mega-widget
 field old_height ; # last known height of $w.file_pane
 
 
@@ -275,7 +274,6 @@ constructor new {i_commit i_path i_jump} {
 	pack $w_cviewer -expand 1 -fill both
 
 	set status [::status_bar::new $w.status]
-	set status_operation {}
 
 	menu $w.ctxm -tearoff 0
 	$w.ctxm add command \
@@ -604,23 +602,16 @@ method _exec_blame {cur_w cur_d options cur_s} {
 	} else {
 		lappend options $commit
 	}
-
-	# We may recurse in from another call to _exec_blame and already have
-	# a status operation.
-	if {$status_operation == {}} {
-		set status_operation [$status start \
-			$cur_s \
-			[mc "lines annotated"]]
-	} else {
-		$status_operation restart $cur_s
-	}
-
 	lappend options -- $path
 	set fd [eval git_read --nice blame $options]
 	fconfigure $fd -blocking 0 -translation lf -encoding utf-8
 	fileevent $fd readable [cb _read_blame $fd $cur_w $cur_d]
 	set current_fd $fd
 	set blame_lines 0
+
+	$status start \
+		$cur_s \
+		[mc "lines annotated"]
 }
 
 method _read_blame {fd cur_w cur_d} {
@@ -815,11 +806,10 @@ method _read_blame {fd cur_w cur_d} {
 				[mc "Loading original location annotations..."]
 		} else {
 			set current_fd {}
-			$status_operation stop [mc "Annotation complete."]
-			set status_operation {}
+			$status stop [mc "Annotation complete."]
 		}
 	} else {
-		$status_operation update $blame_lines $total_lines
+		$status update $blame_lines $total_lines
 	}
 } ifdeleted { catch {close $fd} }
 
@@ -1134,7 +1124,7 @@ method _blameparent {} {
 			set diffcmd [list diff-tree --unified=0 $cparent $cmit -- $new_path]
 		}
 		if {[catch {set fd [eval git_read $diffcmd]} err]} {
-			$status_operation stop [mc "Unable to display parent"]
+			$status stop [mc "Unable to display parent"]
 			error_popup [strcat [mc "Error loading diff:"] "\n\n$err"]
 			return
 		}