diff options
Diffstat (limited to 'git-gui/lib')
| -rw-r--r-- | git-gui/lib/choose_repository.tcl | 27 | ||||
| -rw-r--r-- | git-gui/lib/index.tcl | 6 | ||||
| -rw-r--r-- | git-gui/lib/mergetool.tcl | 2 |
3 files changed, 7 insertions, 28 deletions
diff --git a/git-gui/lib/choose_repository.tcl b/git-gui/lib/choose_repository.tcl index e54f3e66d8..af1fee7c75 100644 --- a/git-gui/lib/choose_repository.tcl +++ b/git-gui/lib/choose_repository.tcl @@ -357,31 +357,10 @@ proc _is_git {path {outdir_var ""}} { if {$outdir_var ne ""} { upvar 1 $outdir_var outdir } - if {[file isfile $path]} { - set fp [open $path r] - gets $fp line - close $fp - if {[regexp "^gitdir: (.+)$" $line line link_target]} { - set path [file join [file dirname $path] $link_target] - set path [file normalize $path] - } - } - - if {[file exists [file join $path HEAD]] - && [file exists [file join $path objects]] - && [file exists [file join $path config]]} { - set outdir $path - return 1 - } - if {[is_Cygwin]} { - if {[file exists [file join $path HEAD]] - && [file exists [file join $path objects.lnk]] - && [file exists [file join $path config.lnk]]} { - set outdir $path - return 1 - } + if {[catch {set outdir [git rev-parse --resolve-git-dir $path]}]} { + return 0 } - return 0 + return 1 } proc _objdir {path} { diff --git a/git-gui/lib/index.tcl b/git-gui/lib/index.tcl index 1fc5b42300..d2ec24bd80 100644 --- a/git-gui/lib/index.tcl +++ b/git-gui/lib/index.tcl @@ -60,7 +60,7 @@ proc rescan_on_error {err {after {}}} { $::main_status stop_all unlock_index - rescan [concat $after [list ui_ready]] 0 + rescan [concat $after {ui_ready;}] 0 } proc update_indexinfo {msg path_list after} { @@ -314,7 +314,7 @@ proc unstage_helper {txt paths} { update_indexinfo \ $txt \ $path_list \ - [concat $after [list ui_ready]] + [concat $after {ui_ready;}] } } @@ -366,7 +366,7 @@ proc add_helper {txt paths} { update_index \ $txt \ $path_list \ - [concat $after {ui_status [mc "Ready to commit."]}] + [concat $after {ui_status [mc "Ready to commit."];}] } } diff --git a/git-gui/lib/mergetool.tcl b/git-gui/lib/mergetool.tcl index 120bc4064b..e688b016ef 100644 --- a/git-gui/lib/mergetool.tcl +++ b/git-gui/lib/mergetool.tcl @@ -59,7 +59,7 @@ proc merge_add_resolution {path} { update_index \ [mc "Adding resolution for %s" [short_path $path]] \ [list $path] \ - [concat $after [list ui_ready]] + [concat $after {ui_ready;}] } proc merge_force_stage {stage} { |
