From: Shawn O. Pearce Date: Wed, 8 Apr 2009 14:41:13 +0000 (-0700) Subject: Merge branch 'maint' X-Git-Tag: v1.6.3-rc4~1^2~3 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/4339d5109c847fc938cd8405001ffde4d230c09f?ds=inline;hp=-c Merge branch 'maint' * maint: git-gui: Ensure consistent usage of mergetool.keepBackup git-gui: fix use of undeclared variable diff_empty_count --- 4339d5109c847fc938cd8405001ffde4d230c09f diff --combined git-gui.sh index e4a9230ea0,5404f7e4b5..c8f850d1ef --- a/git-gui.sh +++ b/git-gui.sh @@@ -122,7 -122,6 +122,7 @@@ unset oguims set _appname {Git Gui} set _gitdir {} set _gitexec {} +set _githtmldir {} set _reponame {} set _iscygwin {} set _search_path {} @@@ -169,28 -168,6 +169,28 @@@ proc gitexec {args} return [eval [list file join $_gitexec] $args] } +proc githtmldir {args} { + global _githtmldir + if {$_githtmldir eq {}} { + if {[catch {set _githtmldir [git --html-path]}]} { + # Git not installed or option not yet supported + return {} + } + if {[is_Cygwin]} { + set _githtmldir [exec cygpath \ + --windows \ + --absolute \ + $_githtmldir] + } else { + set _githtmldir [file normalize $_githtmldir] + } + } + if {$args eq {}} { + return $_githtmldir + } + return [eval [list file join $_githtmldir] $args] +} + proc reponame {} { return $::_reponame } @@@ -722,7 -699,7 +722,7 @@@ proc apply_config {} set default_config(branch.autosetupmerge) true set default_config(merge.tool) {} - set default_config(merge.keepbackup) true + set default_config(mergetool.keepbackup) true set default_config(merge.diffstat) true set default_config(merge.summary) false set default_config(merge.verbosity) 2 @@@ -1131,6 -1108,7 +1131,7 @@@ set current_diff_path { set is_3way_diff 0 set is_conflict_diff 0 set selected_commit_type new + set diff_empty_count 0 set nullid "0000000000000000000000000000000000000000" set nullid2 "0000000000000000000000000000000000000001" @@@ -1947,7 -1925,7 +1948,7 @@@ proc do_explore {} # freedesktop.org-conforming system is our best shot set explorer "xdg-open" } - eval exec $explorer [file dirname [gitdir]] & + eval exec $explorer [list [file nativename [file dirname [gitdir]]]] & } set is_quitting 0 @@@ -2614,13 -2592,11 +2615,13 @@@ if {![is_MacOSX]} } -set doc_path [file dirname [gitexec]] -set doc_path [file join $doc_path Documentation index.html] +set doc_path [githtmldir] +if {$doc_path ne {}} { + set doc_path [file join $doc_path index.html] -if {[is_Cygwin]} { - set doc_path [exec cygpath --mixed $doc_path] + if {[is_Cygwin]} { + set doc_path [exec cygpath --mixed $doc_path] + } } if {[file isfile $doc_path]} {