Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-08-24 19:57:43 +0300
committerJunio C Hamano <gitster@pobox.com>2023-08-24 19:57:43 +0300
commita793520380eb0f9b4a970ace0e9ee41c0ccb82aa (patch)
treefa5b3b47012c26b1c043d7396da93d3228f3b82e /git-gui/lib
parentcd9da15a85bfbcb0bddc799e5fe6bed50644f269 (diff)
parente25cbdf3576f07bda742a4f13d9380a815e43502 (diff)
Merge https://github.com/prati0100/git-gui
* https://github.com/prati0100/git-gui: git-gui - use mkshortcut on Cygwin git-gui - use cygstart to browse on Cygwin git-gui - remove obsolete Cygwin specific code git gui Makefile - remove Cygwin modifications Makefiles: change search through $(MAKEFLAGS) for GNU make 4.4 Work around Tcl's default `PATH` lookup Move the `_which` function (almost) to the top Move is_<platform> functions to the beginning is_Cygwin: avoid `exec`ing anything windows: ignore empty `PATH` elements git-gui: Fix a typo in README
Diffstat (limited to 'git-gui/lib')
-rw-r--r--git-gui/lib/choose_repository.tcl27
-rw-r--r--git-gui/lib/shortcut.tcl31
2 files changed, 15 insertions, 43 deletions
diff --git a/git-gui/lib/choose_repository.tcl b/git-gui/lib/choose_repository.tcl
index af1fee7c75..d23abedcb3 100644
--- a/git-gui/lib/choose_repository.tcl
+++ b/git-gui/lib/choose_repository.tcl
@@ -174,9 +174,6 @@ constructor pick {} {
-foreground blue \
-underline 1
set home $::env(HOME)
- if {[is_Cygwin]} {
- set home [exec cygpath --windows --absolute $home]
- }
set home "[file normalize $home]/"
set hlen [string length $home]
foreach p $sorted_recent {
@@ -374,18 +371,6 @@ proc _objdir {path} {
return $objdir
}
- if {[is_Cygwin]} {
- set objdir [file join $path .git objects.lnk]
- if {[file isfile $objdir]} {
- return [win32_read_lnk $objdir]
- }
-
- set objdir [file join $path objects.lnk]
- if {[file isfile $objdir]} {
- return [win32_read_lnk $objdir]
- }
- }
-
return {}
}
@@ -623,12 +608,6 @@ method _do_clone2 {} {
}
set giturl $origin_url
- if {[is_Cygwin] && [file isdirectory $giturl]} {
- set giturl [exec cygpath --unix --absolute $giturl]
- if {$clone_type eq {shared}} {
- set objdir [exec cygpath --unix --absolute $objdir]
- }
- }
if {[file exists $local_path]} {
error_popup [mc "Location %s already exists." $local_path]
@@ -668,11 +647,7 @@ method _do_clone2 {} {
fconfigure $f_cp -translation binary -encoding binary
cd $objdir
while {[gets $f_in line] >= 0} {
- if {[is_Cygwin]} {
- puts $f_cp [exec cygpath --unix --absolute $line]
- } else {
- puts $f_cp [file normalize $line]
- }
+ puts $f_cp [file normalize $line]
}
close $f_in
close $f_cp
diff --git a/git-gui/lib/shortcut.tcl b/git-gui/lib/shortcut.tcl
index 97d1d7aa02..674a41f5e0 100644
--- a/git-gui/lib/shortcut.tcl
+++ b/git-gui/lib/shortcut.tcl
@@ -27,13 +27,10 @@ proc do_windows_shortcut {} {
}
proc do_cygwin_shortcut {} {
- global argv0 _gitworktree
+ global argv0 _gitworktree oguilib
if {[catch {
set desktop [exec cygpath \
- --windows \
- --absolute \
- --long-name \
--desktop]
}]} {
set desktop .
@@ -48,19 +45,19 @@ proc do_cygwin_shortcut {} {
set fn ${fn}.lnk
}
if {[catch {
- set sh [exec cygpath \
- --windows \
- --absolute \
- /bin/sh.exe]
- set me [exec cygpath \
- --unix \
- --absolute \
- $argv0]
- win32_create_lnk $fn [list \
- $sh -c \
- "CHERE_INVOKING=1 source /etc/profile;[sq $me] &" \
- ] \
- [file normalize $_gitworktree]
+ set repodir [file normalize $_gitworktree]
+ set shargs {-c \
+ "CHERE_INVOKING=1 \
+ source /etc/profile; \
+ git gui"}
+ exec /bin/mkshortcut.exe \
+ --arguments $shargs \
+ --desc "git-gui on $repodir" \
+ --icon $oguilib/git-gui.ico \
+ --name $fn \
+ --show min \
+ --workingdir $repodir \
+ /bin/sh.exe
} err]} {
error_popup [strcat [mc "Cannot write shortcut:"] "\n\n$err"]
}