diff options
Diffstat (limited to 'git-gui')
-rw-r--r-- | git-gui/.gitattributes | 1 | ||||
-rw-r--r-- | git-gui/Makefile | 4 | ||||
-rwxr-xr-x | git-gui/git-gui.sh | 3 | ||||
-rw-r--r-- | git-gui/lib/choose_repository.tcl | 17 | ||||
-rw-r--r-- | git-gui/po/README | 2 |
5 files changed, 16 insertions, 11 deletions
diff --git a/git-gui/.gitattributes b/git-gui/.gitattributes index 33d07c06bd..59cd41dbff 100644 --- a/git-gui/.gitattributes +++ b/git-gui/.gitattributes @@ -2,3 +2,4 @@ * encoding=US-ASCII git-gui.sh encoding=UTF-8 /po/*.po encoding=UTF-8 +/GIT-VERSION-GEN eol=lf diff --git a/git-gui/Makefile b/git-gui/Makefile index fe30be38dc..f10caedaa7 100644 --- a/git-gui/Makefile +++ b/git-gui/Makefile @@ -161,7 +161,9 @@ ifeq ($(uname_S),Darwin) endif endif ifneq (,$(findstring MINGW,$(uname_S))) +ifeq ($(shell expr "$(uname_R)" : '1\.'),2) NO_MSGFMT=1 +endif GITGUI_WINDOWS_WRAPPER := YesPlease GITGUI_RELATIVE := 1 endif @@ -252,7 +254,7 @@ $(ALL_MSGFILES): %.msg : %.po lib/tclIndex: $(ALL_LIBFILES) GIT-GUI-VARS $(QUIET_INDEX)if echo \ $(foreach p,$(PRELOAD_FILES),source $p\;) \ - auto_mkindex lib '*.tcl' \ + auto_mkindex lib $(patsubst lib/%,%,$(sort $(ALL_LIBFILES))) \ | $(TCL_PATH) $(QUIET_2DEVNULL); then : ok; \ else \ echo >&2 " * $(TCL_PATH) failed; using unoptimized loading"; \ diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh index 5bc21b878d..ed24aa9d2f 100755 --- a/git-gui/git-gui.sh +++ b/git-gui/git-gui.sh @@ -24,8 +24,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA}] +along with this program; if not, see <http://www.gnu.org/licenses/>.}] ###################################################################### ## diff --git a/git-gui/lib/choose_repository.tcl b/git-gui/lib/choose_repository.tcl index 75d1da8d31..80f5a59bbb 100644 --- a/git-gui/lib/choose_repository.tcl +++ b/git-gui/lib/choose_repository.tcl @@ -142,6 +142,10 @@ constructor pick {} { -label [mc "Recent Repositories"] } + if {[set lenrecent [llength $sorted_recent]] < $maxrecent} { + set lenrecent $maxrecent + } + ${NS}::label $w_body.space ${NS}::label $w_body.recentlabel \ -anchor w \ @@ -153,7 +157,7 @@ constructor pick {} { -background [get_bg_color $w_body.recentlabel] \ -wrap none \ -width 50 \ - -height $maxrecent + -height $lenrecent $w_recentlist tag conf link \ -foreground blue \ -underline 1 @@ -235,19 +239,19 @@ method _invoke_next {} { proc _get_recentrepos {} { set recent [list] - foreach p [get_config gui.recentrepo] { + foreach p [lsort -unique [get_config gui.recentrepo]] { if {[_is_git [file join $p .git]]} { lappend recent $p } else { _unset_recentrepo $p } } - return [lsort $recent] + return $recent } proc _unset_recentrepo {p} { regsub -all -- {([()\[\]{}\.^$+*?\\])} $p {\\\1} p - git config --global --unset gui.recentrepo "^$p\$" + catch {git config --global --unset-all gui.recentrepo "^$p\$"} load_config 1 } @@ -262,12 +266,11 @@ proc _append_recentrepos {path} { set i [lsearch $recent $path] if {$i >= 0} { _unset_recentrepo $path - set recent [lreplace $recent $i $i] } - lappend recent $path git config --global --add gui.recentrepo $path load_config 1 + set recent [get_config gui.recentrepo] if {[set maxrecent [get_config gui.maxrecentrepo]] eq {}} { set maxrecent 10 @@ -275,7 +278,7 @@ proc _append_recentrepos {path} { while {[llength $recent] > $maxrecent} { _unset_recentrepo [lindex $recent 0] - set recent [lrange $recent 1 end] + set recent [get_config gui.recentrepo] } } diff --git a/git-gui/po/README b/git-gui/po/README index 0f5837d48e..2514bc22ab 100644 --- a/git-gui/po/README +++ b/git-gui/po/README @@ -165,7 +165,7 @@ to contribute an update. This may be because you would want to improve the translation of existing messages, or because the git-gui software itself was updated and there are new messages that need translation. -In any case, make sure you are up-to-date before starting your work: +In any case, make sure you are up to date before starting your work: $ git checkout master $ git pull |