diff options
author | Vincent Ambo <tazjin@google.com> | 2020-05-25T23·06+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-05-25T23·06+0100 |
commit | 93ba78d6f4632ef1c5228965e3edc8c0faf88c1e (patch) | |
tree | 85730c182a9f5f492ade8e8ccdb1c2356f9900bd /third_party/git/gitk-git/gitk | |
parent | 6f8fbf4aa4b1654ab27d4829e114538761817de0 (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/gitk-git/gitk')
-rwxr-xr-x | third_party/git/gitk-git/gitk | 64 |
1 files changed, 4 insertions, 60 deletions
diff --git a/third_party/git/gitk-git/gitk b/third_party/git/gitk-git/gitk index abe4805adedb..a14d7a16b2dd 100755 --- a/third_party/git/gitk-git/gitk +++ b/third_party/git/gitk-git/gitk @@ -3404,8 +3404,6 @@ set rectmask { } image create bitmap reficon-H -background black -foreground "#00ff00" \ -data $rectdata -maskdata $rectmask -image create bitmap reficon-R -background black -foreground "#ffddaa" \ - -data $rectdata -maskdata $rectmask image create bitmap reficon-o -background black -foreground "#ddddff" \ -data $rectdata -maskdata $rectmask @@ -7018,7 +7016,6 @@ proc commit_descriptor {p} { # append some text to the ctext widget, and make any SHA1 ID # that we know about be a clickable link. -# Also look for URLs of the form "http[s]://..." and make them web links. proc appendwithlinks {text tags} { global ctext linknum curview @@ -7035,18 +7032,6 @@ proc appendwithlinks {text tags} { setlink $linkid link$linknum incr linknum } - set wlinks [regexp -indices -all -inline -line \ - {https?://[^[:space:]]+} $text] - foreach l $wlinks { - set s2 [lindex $l 0] - set e2 [lindex $l 1] - set url [string range $text $s2 $e2] - incr e2 - $ctext tag delete link$linknum - $ctext tag add link$linknum "$start + $s2 c" "$start + $e2 c" - setwlink $url link$linknum - incr linknum - } } proc setlink {id lk} { @@ -7079,18 +7064,6 @@ proc setlink {id lk} { } } -proc setwlink {url lk} { - global ctext - global linkfgcolor - global web_browser - - if {$web_browser eq {}} return - $ctext tag conf $lk -foreground $linkfgcolor -underline 1 - $ctext tag bind $lk <1> [list browseweb $url] - $ctext tag bind $lk <Enter> {linkcursor %W 1} - $ctext tag bind $lk <Leave> {linkcursor %W -1} -} - proc appendshortlink {id {pre {}} {post {}}} { global ctext linknum @@ -7125,16 +7098,6 @@ proc linkcursor {w inc} { } } -proc browseweb {url} { - global web_browser - - if {$web_browser eq {}} return - # Use eval here in case $web_browser is a command plus some arguments - if {[catch {eval exec $web_browser [list $url] &} err]} { - error_popup "[mc "Error starting web browser:"] $err" - } -} - proc viewnextline {dir} { global canv linespc @@ -8228,11 +8191,11 @@ proc parseblobdiffline {ids line} { } else { $ctext insert end "$line\n" filesep } - } elseif {$currdiffsubmod != "" && ![string compare -length 3 " >" $line]} { + } elseif {![string compare -length 3 " >" $line]} { set $currdiffsubmod "" set line [encoding convertfrom $diffencoding $line] $ctext insert end "$line\n" dresult - } elseif {$currdiffsubmod != "" && ![string compare -length 3 " <" $line]} { + } elseif {![string compare -length 3 " <" $line]} { set $currdiffsubmod "" set line [encoding convertfrom $diffencoding $line] $ctext insert end "$line\n" d0 @@ -10059,7 +10022,6 @@ proc sel_reflist {w x y} { set n [lindex $ref 0] switch -- [lindex $ref 1] { "H" {selbyid $headids($n)} - "R" {selbyid $headids($n)} "T" {selbyid $tagids($n)} "o" {selbyid $otherrefids($n)} } @@ -10089,11 +10051,7 @@ proc refill_reflist {} { foreach n [array names headids] { if {[string match $reflistfilter $n]} { if {[commitinview $headids($n) $curview]} { - if {[string match "remotes/*" $n]} { - lappend refs [list $n R] - } else { - lappend refs [list $n H] - } + lappend refs [list $n H] } else { interestedin $headids($n) {run refill_reflist} } @@ -11530,7 +11488,7 @@ proc create_prefs_page {w} { proc prefspage_general {notebook} { global NS maxwidth maxgraphpct showneartags showlocalchanges global tabstop limitdiffs autoselect autosellen extdifftool perfile_attrs - global hideremotes want_ttk have_ttk maxrefs web_browser + global hideremotes want_ttk have_ttk maxrefs set page [create_prefs_page $notebook.general] @@ -11581,13 +11539,6 @@ proc prefspage_general {notebook} { pack configure $page.extdifff.l -padx 10 grid x $page.extdifff $page.extdifft -sticky ew - ${NS}::entry $page.webbrowser -textvariable web_browser - ${NS}::frame $page.webbrowserf - ${NS}::label $page.webbrowserf.l -text [mc "Web browser" ] - pack $page.webbrowserf.l -side left - pack configure $page.webbrowserf.l -padx 10 - grid x $page.webbrowserf $page.webbrowser -sticky ew - ${NS}::label $page.lgen -text [mc "General options"] grid $page.lgen - -sticky w -pady 10 ${NS}::checkbutton $page.want_ttk -variable want_ttk \ @@ -12359,7 +12310,6 @@ if {[tk windowingsystem] eq "win32"} { set bgcolor SystemWindow set fgcolor SystemWindowText set selectbgcolor SystemHighlight - set web_browser "cmd /c start" } else { set uicolor grey85 set uifgcolor black @@ -12367,11 +12317,6 @@ if {[tk windowingsystem] eq "win32"} { set bgcolor white set fgcolor black set selectbgcolor gray85 - if {[tk windowingsystem] eq "aqua"} { - set web_browser "open" - } else { - set web_browser "xdg-open" - } } set diffcolors {red "#00a000" blue} set diffcontext 3 @@ -12445,7 +12390,6 @@ set config_variables { filesepbgcolor filesepfgcolor linehoverbgcolor linehoverfgcolor linehoveroutlinecolor mainheadcirclecolor workingfilescirclecolor indexcirclecolor circlecolors linkfgcolor circleoutlinecolor - web_browser } foreach var $config_variables { config_init_trace $var |