pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/gitgitgadget/git/commit/7468c297fa88f0035dc719e996b93b1404eee6e3

ink crossorigen="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-9c8f61f9f58ad7b2.css" /> Merge branch 'maint' of git://repo.or.cz/git-gui into maint · gitgitgadget/git@7468c29 · GitHub
Skip to content

Commit 7468c29

Browse files
committed
Merge branch 'maint' of git://repo.or.cz/git-gui into maint
* 'maint' of git://repo.or.cz/git-gui: git-gui: Don't display CR within console windows git-gui: Handle progress bars from newer gits git-gui: Correctly report failures from git-write-tree git-gui: accept versions containing text annotations, like 1.5.3.mingw.1 git-gui: Don't crash when starting gitk from a browser session git-gui: Allow gitk to be started on Cygwin with native Tcl/Tk 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 git-gui: Avoid using bold text in entire gui for some fonts
2 parents 0b8293f + bbbadf6 commit 7468c29

4 files changed

Lines changed: 73 additions & 11 deletions

File tree

git-gui/git-gui.sh

Lines changed: 67 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ proc _which {what} {
305305
global env _search_exe _search_path
306306

307307
if {$_search_path eq {}} {
308-
if {[is_Cygwin]} {
308+
if {[is_Cygwin] && [regexp {^(/|\.:)} $env(PATH)]} {
309309
set _search_path [split [exec cygpath \
310310
--windows \
311311
--path \
@@ -498,7 +498,11 @@ proc rmsel_tag {text} {
498498
set _git [_which git]
499499
if {$_git eq {}} {
500500
catch {wm withdraw .}
501-
error_popup "Cannot find git in PATH."
501+
tk_messageBox \
502+
-icon error \
503+
-type ok \
504+
-title [mc "git-gui: fatal error"] \
505+
-message [mc "Cannot find git in PATH."]
502506
exit 1
503507
}
504508

@@ -534,6 +538,7 @@ regsub -- {-dirty$} $_git_version {} _git_version
534538
regsub {\.[0-9]+\.g[0-9a-f]+$} $_git_version {} _git_version
535539
regsub {\.rc[0-9]+$} $_git_version {} _git_version
536540
regsub {\.GIT$} $_git_version {} _git_version
541+
regsub {\.[a-zA-Z]+\.[0-9]+$} $_git_version {} _git_version
537542

538543
if {![regexp {^[1-9]+(\.[0-9]+)+$} $_git_version]} {
539544
catch {wm withdraw .}
@@ -903,6 +908,35 @@ proc rescan {after {honor_trustmtime 1}} {
903908
}
904909
}
905910

911+
if {[is_Cygwin]} {
912+
set is_git_info_link {}
913+
set is_git_info_exclude {}
914+
proc have_info_exclude {} {
915+
global is_git_info_link is_git_info_exclude
916+
917+
if {$is_git_info_link eq {}} {
918+
set is_git_info_link [file isfile [gitdir info.lnk]]
919+
}
920+
921+
if {$is_git_info_link} {
922+
if {$is_git_info_exclude eq {}} {
923+
if {[catch {exec test -f [gitdir info exclude]}]} {
924+
set is_git_info_exclude 0
925+
} else {
926+
set is_git_info_exclude 1
927+
}
928+
}
929+
return $is_git_info_exclude
930+
} else {
931+
return [file readable [gitdir info exclude]]
932+
}
933+
}
934+
} else {
935+
proc have_info_exclude {} {
936+
return [file readable [gitdir info exclude]]
937+
}
938+
}
939+
906940
proc rescan_stage2 {fd after} {
907941
global rescan_active buf_rdi buf_rdf buf_rlo
908942

@@ -913,9 +947,8 @@ proc rescan_stage2 {fd after} {
913947
}
914948

915949
set ls_others [list --exclude-per-directory=.gitignore]
916-
set info_exclude [gitdir info exclude]
917-
if {[file readable $info_exclude]} {
918-
lappend ls_others "--exclude-from=$info_exclude"
950+
if {[have_info_exclude]} {
951+
lappend ls_others "--exclude-from=[gitdir info exclude]"
919952
}
920953
set user_exclude [get_config core.excludesfile]
921954
if {$user_exclude ne {} && [file readable $user_exclude]} {
@@ -1093,11 +1126,17 @@ proc mapdesc {state path} {
10931126
}
10941127

10951128
proc ui_status {msg} {
1096-
$::main_status show $msg
1129+
global main_status
1130+
if {[info exists main_status]} {
1131+
$main_status show $msg
1132+
}
10971133
}
10981134

10991135
proc ui_ready {{test {}}} {
1100-
$::main_status show {Ready.} $test
1136+
global main_status
1137+
if {[info exists main_status]} {
1138+
$main_status show [mc "Ready."] $test
1139+
}
11011140
}
11021141

11031142
proc escape_path {path} {
@@ -1436,7 +1475,27 @@ proc do_gitk {revs} {
14361475
if {! [file exists $exe]} {
14371476
error_popup "Unable to start gitk:\n\n$exe does not exist"
14381477
} else {
1478+
global env
1479+
1480+
if {[info exists env(GIT_DIR)]} {
1481+
set old_GIT_DIR $env(GIT_DIR)
1482+
} else {
1483+
set old_GIT_DIR {}
1484+
}
1485+
1486+
set pwd [pwd]
1487+
cd [file dirname [gitdir]]
1488+
set env(GIT_DIR) [file tail [gitdir]]
1489+
14391490
eval exec $cmd $revs &
1491+
1492+
if {$old_GIT_DIR eq {}} {
1493+
unset env(GIT_DIR)
1494+
} else {
1495+
set env(GIT_DIR) $old_GIT_DIR
1496+
}
1497+
cd $pwd
1498+
14401499
ui_status $::starting_gitk_msg
14411500
after 10000 {
14421501
ui_ready $starting_gitk_msg
@@ -1648,7 +1707,7 @@ proc apply_config {} {
16481707
set font [lindex $option 1]
16491708
if {[catch {
16501709
foreach {cn cv} $repo_config(gui.$name) {
1651-
font configure $font $cn $cv
1710+
font configure $font $cn $cv -weight normal
16521711
}
16531712
} err]} {
16541713
error_popup "Invalid font specified in gui.$name:\n\n$err"

git-gui/lib/commit.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ proc commit_committree {fd_wt curHEAD msg} {
253253
global repo_config
254254

255255
gets $fd_wt tree_id
256-
if {$tree_id eq {} || [catch {close $fd_wt} err]} {
256+
if {[catch {close $fd_wt} err]} {
257257
error_popup "write-tree failed:\n\n$err"
258258
ui_status {Commit failed.}
259259
unlock_index

git-gui/lib/console.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ method _read {fd after} {
122122
} else {
123123
$w.m.t delete $console_cr end
124124
$w.m.t insert end "\n"
125-
$w.m.t insert end [string range $buf $c $cr]
125+
$w.m.t insert end [string range $buf $c [expr {$cr - 1}]]
126126
set c $cr
127127
incr c
128128
}

git-gui/lib/status_bar.tcl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ method update_meter {buf} {
6969

7070
set prior [string range $meter 0 $r]
7171
set meter [string range $meter [expr {$r + 1}] end]
72-
if {[regexp "\\((\\d+)/(\\d+)\\)\\s+done\r\$" $prior _j a b]} {
72+
set p "\\((\\d+)/(\\d+)\\)"
73+
if {[regexp ":\\s*\\d+% $p\(?:, done.\\s*\n|\\s*\r)\$" $prior _j a b]} {
74+
update $this $a $b
75+
} elseif {[regexp "$p\\s+done\r\$" $prior _j a b]} {
7376
update $this $a $b
7477
}
7578
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy