global HEAD ui_status_value current_branch
set cmd [list git merge]
- if {![is_config_true merge.summary]} {
- lappend cmd --no-summary
- }
-
set names {}
set revcnt 0
foreach i [$w.source.l curselection] {
set optid 0
foreach option {
- {b merge.summary {Show Merge Summary}}
+ {b merge.summary {Summarize Merge Commits}}
{i-1..5 merge.verbosity {Merge Verbosity}}
{b gui.trustmtime {Trust File Modification Timestamps}}
}
}
-set default_config(merge.summary) true
+set default_config(merge.summary) false
set default_config(merge.verbosity) 2
set default_config(gui.trustmtime) false
set default_config(gui.diffcontext) 5
lappend disable_on_lock \
[list .mbar.tools entryconf [.mbar.tools index last] -state]
}
+}
- # -- Help Menu
- #
- .mbar add cascade -label Help -menu .mbar.help
- menu .mbar.help
+# -- Help Menu
+#
+.mbar add cascade -label Help -menu .mbar.help
+menu .mbar.help
+if {![is_MacOSX]} {
.mbar.help add command -label "About [appname]" \
-command do_about \
-font font_ui
}
+set browser {}
+catch {set browser $repo_config(instaweb.browser)}
+set doc_path [file dirname [exec git --exec-path]]
+set doc_path [file join $doc_path Documentation index.html]
+
+if {[is_Windows]} {
+ set doc_path [exec cygpath --windows $doc_path]
+}
+
+if {$browser eq {}} {
+ if {[is_MacOSX]} {
+ set browser open
+ } elseif {[is_Windows]} {
+ set program_files [file dirname [exec cygpath --windir]]
+ set program_files [file join $program_files {Program Files}]
+ set firefox [file join $program_files {Mozilla Firefox} firefox.exe]
+ set ie [file join $program_files {Internet Explorer} IEXPLORE.EXE]
+ if {[file exists $firefox]} {
+ set browser $firefox
+ } elseif {[file exists $ie]} {
+ set browser $ie
+ }
+ unset program_files firefox ie
+ }
+}
+
+if {[file isfile $doc_path]} {
+ set doc_url "file:$doc_path"
+} else {
+ set doc_url {http://www.kernel.org/pub/software/scm/git/docs/}
+}
+
+if {$browser ne {}} {
+ .mbar.help add command -label {Online Documentation} \
+ -command [list exec $browser $doc_url &] \
+ -font font_ui
+}
+unset browser doc_path doc_url
# -- Branch Control
#