From 317797bce44f57b0fcdb735a42a6340de09b4257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mads=20D=C3=B8rup?= Date: Sun, 21 Jul 2013 14:23:48 +0200 Subject: git-gui: Improve font rendering on retina macbooks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mads Dørup Signed-off-by: Pat Thoyts diff --git a/macosx/Info.plist b/macosx/Info.plist index b3bf15f..1ade121 100644 --- a/macosx/Info.plist +++ b/macosx/Info.plist @@ -24,5 +24,7 @@ GITg CFBundleVersion @@GITGUI_VERSION@@ + NSHighResolutionCapable + -- cgit v0.10.2-6-g49f6 From a86560453ba8a81527d5d119ea8985a3269af1fa Mon Sep 17 00:00:00 2001 From: Pat Thoyts Date: Wed, 10 Jul 2013 13:31:13 +0100 Subject: git-gui: added gui.maxrecentrepo to extend the number of remembered repos The list of recently opened repositories shown when launching git-gui from outside a repository was hard coded to only show a maximum of 10 items. This config variable allows the user to override this default. Signed-off-by: Pat Thoyts diff --git a/lib/choose_repository.tcl b/lib/choose_repository.tcl index ee58981..3c10bc6 100644 --- a/lib/choose_repository.tcl +++ b/lib/choose_repository.tcl @@ -24,6 +24,10 @@ field sorted_recent ; # recent repositories (sorted) constructor pick {} { global M1T M1B use_ttk NS + if {[set maxrecent [get_config gui.maxrecentrepo]] eq {}} { + set maxrecent 10 + } + make_dialog top w wm title $top [mc "Git Gui"] @@ -148,7 +152,7 @@ constructor pick {} { -background [get_bg_color $w_body.recentlabel] \ -wrap none \ -width 50 \ - -height 10 + -height $maxrecent $w_recentlist tag conf link \ -foreground blue \ -underline 1 @@ -264,7 +268,11 @@ proc _append_recentrepos {path} { git config --global --add gui.recentrepo $path load_config 1 - while {[llength $recent] > 10} { + if {[set maxrecent [get_config gui.maxrecentrepo]] eq {}} { + set maxrecent 10 + } + + while {[llength $recent] > $maxrecent} { _unset_recentrepo [lindex $recent 0] set recent [lrange $recent 1 end] } -- cgit v0.10.2-6-g49f6 From d478056c7dcc2aab690edf0036238e761c789007 Mon Sep 17 00:00:00 2001 From: Pat Thoyts Date: Tue, 27 Aug 2013 11:11:15 +0100 Subject: git-gui: show the maxrecentrepo config option in the preferences dialog Signed-off-by: Pat Thoyts diff --git a/git-gui.sh b/git-gui.sh index 153f85d..4a6929e 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -894,6 +894,7 @@ set default_config(gui.textconv) true set default_config(gui.pruneduringfetch) false set default_config(gui.trustmtime) false set default_config(gui.fastcopyblame) false +set default_config(gui.maxrecentrepo) 10 set default_config(gui.copyblamethreshold) 40 set default_config(gui.blamehistoryctx) 7 set default_config(gui.diffcontext) 5 diff --git a/lib/option.tcl b/lib/option.tcl index 0cf1da1..07dee60 100644 --- a/lib/option.tcl +++ b/lib/option.tcl @@ -150,6 +150,7 @@ proc do_options {} { {b gui.matchtrackingbranch {mc "Match Tracking Branches"}} {b gui.textconv {mc "Use Textconv For Diffs and Blames"}} {b gui.fastcopyblame {mc "Blame Copy Only On Changed Files"}} + {i-0..100 gui.maxrecentrepo {mc "Maximum Length of Recent Repositories List"}} {i-20..200 gui.copyblamethreshold {mc "Minimum Letters To Blame Copy On"}} {i-0..300 gui.blamehistoryctx {mc "Blame History Context Radius (days)"}} {i-1..99 gui.diffcontext {mc "Number of Diff Context Lines"}} -- cgit v0.10.2-6-g49f6 From e632b3c0d37e5f61012dad6bb44c9a2a53a69f67 Mon Sep 17 00:00:00 2001 From: Max Kirillov Date: Wed, 21 Aug 2013 06:29:13 +0300 Subject: git-gui: Add gui.displayuntracked option When git is used to track only a subset of a directory, or there is no sure way to divide files to ignore from files to track, git user have to live with large number of untracked files. These files present in file list, and should always be scrolled through to handle real changes. Situation can become even worse, then number of the untracked files grows above the maxfilesdisplayed limit. In the case, even staged can be hidden by git-gui. This change introduces new configuration variable gui.displayuntracked, which, when set to false, instructs git-gui not to show untracked files in files list. They can be staged from commandline or other tools (like IDE of file manager), then they become visible. Default value of the option is true, which is compatible with current behavior. Signed-off-by: Max Kirillov Signed-off-by: Pat Thoyts diff --git a/git-gui.sh b/git-gui.sh index 4a6929e..32303b0 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -913,6 +913,7 @@ set font_descs { {fontdiff font_diff {mc "Diff/Console Font"}} } set default_config(gui.stageuntracked) ask +set default_config(gui.displayuntracked) true ###################################################################### ## @@ -1551,18 +1552,23 @@ proc rescan_stage2 {fd after} { set buf_rdf {} set buf_rlo {} - set rescan_active 3 + set rescan_active 2 ui_status [mc "Scanning for modified files ..."] set fd_di [git_read diff-index --cached -z [PARENT]] set fd_df [git_read diff-files -z] - set fd_lo [eval git_read ls-files --others -z $ls_others] fconfigure $fd_di -blocking 0 -translation binary -encoding binary fconfigure $fd_df -blocking 0 -translation binary -encoding binary - fconfigure $fd_lo -blocking 0 -translation binary -encoding binary + fileevent $fd_di readable [list read_diff_index $fd_di $after] fileevent $fd_df readable [list read_diff_files $fd_df $after] - fileevent $fd_lo readable [list read_ls_others $fd_lo $after] + + if {[is_config_true gui.displayuntracked]} { + set fd_lo [eval git_read ls-files --others -z $ls_others] + fconfigure $fd_lo -blocking 0 -translation binary -encoding binary + fileevent $fd_lo readable [list read_ls_others $fd_lo $after] + incr rescan_active + } } proc load_message {file {encoding {}}} { diff --git a/lib/option.tcl b/lib/option.tcl index 07dee60..23c9ae7 100644 --- a/lib/option.tcl +++ b/lib/option.tcl @@ -160,6 +160,7 @@ proc do_options {} { {c gui.encoding {mc "Default File Contents Encoding"}} {b gui.warndetachedcommit {mc "Warn before committing to a detached head"}} {s gui.stageuntracked {mc "Staging of untracked files"} {list "yes" "no" "ask"}} + {b gui.displayuntracked {mc "Show untracked files"}} } { set type [lindex $option 0] set name [lindex $option 1] -- cgit v0.10.2-6-g49f6 From 918dbf5887f68409f9225b8f84f7418c89e79a5f Mon Sep 17 00:00:00 2001 From: Max Kirillov Date: Wed, 21 Aug 2013 06:38:40 +0300 Subject: git-gui: right half window is paned For long descriptions it would be nice to be able to resize the comment text field. Signed-off-by: Max Kirillov Signed-off-by: Pat Thoyts diff --git a/git-gui.sh b/git-gui.sh index 32303b0..b62ae4a 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -3210,13 +3210,19 @@ unset i # -- Diff and Commit Area # -${NS}::frame .vpane.lower -height 300 -width 400 +${NS}::panedwindow .vpane.lower -orient vertical ${NS}::frame .vpane.lower.commarea -${NS}::frame .vpane.lower.diff -relief sunken -borderwidth 1 -pack .vpane.lower.diff -fill both -expand 1 -pack .vpane.lower.commarea -side bottom -fill x +${NS}::frame .vpane.lower.diff -relief sunken -borderwidth 1 -height 500 +.vpane.lower add .vpane.lower.diff +.vpane.lower add .vpane.lower.commarea .vpane add .vpane.lower -if {!$use_ttk} {.vpane paneconfigure .vpane.lower -sticky nsew} +if {$use_ttk} { + .vpane.lower pane .vpane.lower.diff -weight 1 + .vpane.lower pane .vpane.lower.commarea -weight 0 +} else { + .vpane.lower paneconfigure .vpane.lower.diff -stretch always + .vpane.lower paneconfigure .vpane.lower.commarea -stretch never +} # -- Commit Area Buttons # -- cgit v0.10.2-6-g49f6 From 4394faf6e53e8b91c82332aa4f2b77616350a81b Mon Sep 17 00:00:00 2001 From: John Murphy Date: Wed, 4 Sep 2013 11:03:48 -0400 Subject: git-gui: corrected setup of git worktree under cygwin. Under cygwin the _gitworktree variable needs to contain the Windows style path string so the output provided by git rev-parse must be converted from cygwin path style to native. Reviewed-by: Jesse Welch Signed-off-by: John Patrick Murphy Signed-off-by: Pat Thoyts diff --git a/git-gui.sh b/git-gui.sh index b62ae4a..66db995 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -1284,7 +1284,11 @@ apply_config # v1.7.0 introduced --show-toplevel to return the canonical work-tree if {[package vsatisfies $_git_version 1.7.0]} { - set _gitworktree [git rev-parse --show-toplevel] + if { [is_Cygwin] } { + catch {set _gitworktree [exec cygpath --windows [git rev-parse --show-toplevel]]} + } else { + set _gitworktree [git rev-parse --show-toplevel] + } } else { # try to set work tree from environment, core.worktree or use # cdup to obtain a relative path to the top of the worktree. If -- cgit v0.10.2-6-g49f6 From 224cce8f9bb0403ec441ec709d2769adb8f66eb0 Mon Sep 17 00:00:00 2001 From: Pat Thoyts Date: Thu, 12 Sep 2013 21:15:19 +0100 Subject: git-gui: add menu item to launch a bash shell on Windows. When using git-gui as the primary git application on Windows it can be awkward obtaining a suitable shell. This commit adds a menu item to the Repository menu that launches the bash shell provided with the git installation on Windows. Signed-off-by: Pat Thoyts diff --git a/git-gui.sh b/git-gui.sh index 66db995..db46ac5 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -2665,6 +2665,16 @@ if {![is_bare]} { .mbar.repository add command \ -label [mc "Explore Working Copy"] \ -command {do_explore} +} + +if {[is_Windows]} { + .mbar.repository add command \ + -label [mc "Git Bash"] \ + -command {eval exec [auto_execok start] \ + [list "Git Bash" bash --login -l &]} +} + +if {[is_Windows] || ![is_bare]} { .mbar.repository add separator } -- cgit v0.10.2-6-g49f6 From 73fd416b291cdd70e30cb889e9ebcf10188d2342 Mon Sep 17 00:00:00 2001 From: Masanari Iida Date: Wed, 13 Nov 2013 00:17:44 +0900 Subject: git-gui: correct spelling errors in comments Signed-off-by: Masanari Iida Signed-off-by: Pat Thoyts diff --git a/Makefile b/Makefile index e9c2bc3..cde8b2e 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ all:: # # Define NO_MSGFMT if you do not have msgfmt from the GNU gettext # package and want to use our rough pure Tcl po->msg translator. -# TCL_PATH must be vaild for this to work. +# TCL_PATH must be valid for this to work. # GIT-VERSION-FILE: FORCE diff --git a/lib/blame.tcl b/lib/blame.tcl index 324f774..b1d15f4 100644 --- a/lib/blame.tcl +++ b/lib/blame.tcl @@ -5,7 +5,7 @@ class blame { image create photo ::blame::img_back_arrow -data {R0lGODlhGAAYAIUAAPwCBEzKXFTSZIz+nGzmhGzqfGTidIT+nEzGXHTqhGzmfGzifFzadETCVES+VARWDFzWbHzyjAReDGTadFTOZDSyRDyyTCymPARaFGTedFzSbDy2TCyqRCyqPARaDAyCHES6VDy6VCyiPAR6HCSeNByWLARyFARiDARqFGTifARiFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAYABgAAAajQIBwSCwaj8ikcsk0BppJwRPqHEypQwHBis0WDAdEFyBIKBaMAKLBdjQeSkFBYTBAIvgEoS6JmhUTEwIUDQ4VFhcMGEhyCgoZExoUaxsWHB0THkgfAXUGAhoBDSAVFR0XBnCbDRmgog0hpSIiDJpJIyEQhBUcJCIlwA22SSYVogknEg8eD82qSigdDSknY0IqJQXPYxIl1dZCGNvWw+Dm510GQQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7} -# Persistant data (survives loads) +# Persistent data (survives loads) # field history {}; # viewer history: {commit path} field header ; # array commit,key -> header field diff --git a/lib/index.tcl b/lib/index.tcl index 8efbbdd..74a81a7 100644 --- a/lib/index.tcl +++ b/lib/index.tcl @@ -414,7 +414,7 @@ proc revert_helper {txt paths} { # such distinction is needed in some languages. Previously, the # code used "Revert changes in" for both, but that can't work # in languages where 'in' must be combined with word from - # rest of string (in diffrent way for both cases of course). + # rest of string (in different way for both cases of course). # # FIXME: Unfortunately, even that isn't enough in some languages # as they have quite complex plural-form rules. Unfortunately, diff --git a/lib/spellcheck.tcl b/lib/spellcheck.tcl index e612030..538d61c 100644 --- a/lib/spellcheck.tcl +++ b/lib/spellcheck.tcl @@ -14,7 +14,7 @@ field w_menu ; # context menu for the widget field s_menuidx 0 ; # last index of insertion into $w_menu field s_i {} ; # timer registration for _run callbacks -field s_clear 0 ; # did we erase mispelled tags yet? +field s_clear 0 ; # did we erase misspelled tags yet? field s_seen [list] ; # lines last seen from $w_text in _run field s_checked [list] ; # lines already checked field s_pending [list] ; # [$line $data] sent to ispell/aspell @@ -259,7 +259,7 @@ method _run {} { if {$n == $cur_line && ![regexp {^\W$} [$w_text get $cur_pos insert]]} { - # If the current word is mispelled remove the tag + # If the current word is misspelled remove the tag # but force a spellcheck later. # set tags [$w_text tag names $cur_pos] -- cgit v0.10.2-6-g49f6