summaryrefslogtreecommitdiff
path: root/git-gui.sh
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-09-22 02:03:27 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-09-22 02:03:27 (GMT)
commitf31c14b30b49f76330e6e7c192865e0230dec8c9 (patch)
tree5d174c3f915fb445052ed92600f7bbbe2b308441 /git-gui.sh
parent2f7c9a7f310dae23989b4acd49514abc58334e5b (diff)
parent2fe167b67a479b19e52b974f9518436565e6793b (diff)
downloadgit-f31c14b30b49f76330e6e7c192865e0230dec8c9.zip
git-f31c14b30b49f76330e6e7c192865e0230dec8c9.tar.gz
git-f31c14b30b49f76330e6e7c192865e0230dec8c9.tar.bz2
Merge branch 'maint'
* maint: git-gui: Ensure .git/info/exclude is honored in Cygwin workdirs git-gui: Handle starting on mapped shares under Cygwin git-gui: Display message box when we cannot find git in $PATH Conflicts: git-gui.sh
Diffstat (limited to 'git-gui.sh')
-rwxr-xr-xgit-gui.sh42
1 files changed, 37 insertions, 5 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 5a465e1..e19fb68 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -335,7 +335,7 @@ proc _which {what} {
global env _search_exe _search_path
if {$_search_path eq {}} {
- if {[is_Cygwin]} {
+ if {[is_Cygwin] && [regexp {^(/|\.:)} $env(PATH)]} {
set _search_path [split [exec cygpath \
--windows \
--path \
@@ -528,7 +528,11 @@ proc rmsel_tag {text} {
set _git [_which git]
if {$_git eq {}} {
catch {wm withdraw .}
- error_popup [mc "Cannot find git in PATH."]
+ tk_messageBox \
+ -icon error \
+ -type ok \
+ -title [mc "git-gui: fatal error"] \
+ -message [mc "Cannot find git in PATH."]
exit 1
}
@@ -924,6 +928,35 @@ proc rescan {after {honor_trustmtime 1}} {
}
}
+if {[is_Cygwin]} {
+ set is_git_info_link {}
+ set is_git_info_exclude {}
+ proc have_info_exclude {} {
+ global is_git_info_link is_git_info_exclude
+
+ if {$is_git_info_link eq {}} {
+ set is_git_info_link [file isfile [gitdir info.lnk]]
+ }
+
+ if {$is_git_info_link} {
+ if {$is_git_info_exclude eq {}} {
+ if {[catch {exec test -f [gitdir info exclude]}]} {
+ set is_git_info_exclude 0
+ } else {
+ set is_git_info_exclude 1
+ }
+ }
+ return $is_git_info_exclude
+ } else {
+ return [file readable [gitdir info exclude]]
+ }
+ }
+} else {
+ proc have_info_exclude {} {
+ return [file readable [gitdir info exclude]]
+ }
+}
+
proc rescan_stage2 {fd after} {
global rescan_active buf_rdi buf_rdf buf_rlo
@@ -934,9 +967,8 @@ proc rescan_stage2 {fd after} {
}
set ls_others [list --exclude-per-directory=.gitignore]
- set info_exclude [gitdir info exclude]
- if {[file readable $info_exclude]} {
- lappend ls_others "--exclude-from=$info_exclude"
+ if {[have_info_exclude]} {
+ lappend ls_others "--exclude-from=[gitdir info exclude]"
}
set user_exclude [get_config core.excludesfile]
if {$user_exclude ne {} && [file readable $user_exclude]} {