-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQCVAwUAVTI85mB90JXwhOSJAQIAwAP+Lcm1TuAKXdiCMcYJFLPHhSvHJJRHPiN8
 ydBIRP5UO6BJrmbo+w9tx3qAda4TS/crqRwSnRa5cXOWB+aDkuH8zm4IfkQKXIjI
 qG4Q2t53q8vLBtRd6Y4uNlDQ04mh/J64E9tJoCaIzMj2m6W/Xizo2zslnOfo6F2Z
 Z2rJhBMe1PY=
 =4pD7
 -----END PGP SIGNATURE-----

Merge tag 'gitgui-0.20.0' of http://repo.or.cz/r/git-gui

git-gui 0.20.0

* tag 'gitgui-0.20.0' of http://repo.or.cz/r/git-gui:
  git-gui: set version 0.20
  git-gui: sv.po: Update Swedish translation (547t0f0u)
  git-gui i18n: Updated Bulgarian translation (547t,0f,0u)
  git-gui: Makes chooser set 'gitdir' to the resolved path
  git-gui: Fixes chooser not accepting gitfiles
  git-gui: reinstate support for Tcl 8.4
  git-gui: fix problem with gui.maxfilesdisplayed
  git-gui: fix verbose loading when git path contains spaces.
  git-gui/gitk: Do not depend on Cygwin's "kill" command on Windows
  git-gui: add configurable tab size to the diff view
  git-gui: Make git-gui lib dir configurable at runime
  git-gui i18n: Updated Bulgarian translation (520t,0f,0u)
  L10n: vi.po (543t): Init translation for Vietnamese
  git-gui: align the new recursive checkbox with the radiobuttons.
  git-gui: Add a 'recursive' checkbox in the clone menu.
This commit is contained in:
Junio C Hamano 2015-04-18 18:35:48 -07:00
Родитель 3d6bc9a763 4498b3a50a
Коммит 1eb0545cce
10 изменённых файлов: 4793 добавлений и 1876 удалений

Просмотреть файл

@ -1,7 +1,7 @@
#!/bin/sh
GVF=GIT-VERSION-FILE
DEF_VER=0.19.GITGUI
DEF_VER=0.20.GITGUI
LF='
'

Просмотреть файл

@ -177,7 +177,8 @@ git-gui: GIT-VERSION-FILE GIT-GUI-VARS
echo then >>$@+ && \
echo ' 'echo \'git-gui version '$(GITGUI_VERSION)'\' >>$@+ && \
echo else >>$@+ && \
echo ' 'exec \''$(libdir_SQ)/Git Gui.app/Contents/MacOS/$(subst \,,$(TKEXECUTABLE))'\' \
echo ' libdir="$${GIT_GUI_LIB_DIR:-$(libdir_SQ)}"' >>$@+ && \
echo ' 'exec \"'$$libdir/Git Gui.app/Contents/MacOS/$(subst \,,$(TKEXECUTABLE))'\" \
'"$$0" "$$@"' >>$@+ && \
echo fi >>$@+ && \
chmod +x $@+ && \

Просмотреть файл

@ -49,7 +49,11 @@ catch {rename send {}} ; # What an evil concept...
##
## locate our library
set oguilib {@@GITGUI_LIBDIR@@}
if { [info exists ::env(GIT_GUI_LIB_DIR) ] } {
set oguilib $::env(GIT_GUI_LIB_DIR)
} else {
set oguilib {@@GITGUI_LIBDIR@@}
}
set oguirel {@@GITGUI_RELATIVE@@}
if {$oguirel eq {1}} {
set oguilib [file dirname [file normalize $argv0]]
@ -79,9 +83,9 @@ if {![catch {set _verbose $env(GITGUI_VERBOSE)}]} {
return [uplevel 1 real__auto_load $name $args]
}
rename source real__source
proc source {name} {
puts stderr "source $name"
uplevel 1 real__source $name
proc source {args} {
puts stderr "source $args"
uplevel 1 [linsert $args 0 real__source]
}
if {[tk windowingsystem] eq "win32"} { console show }
}
@ -666,9 +670,7 @@ proc kill_file_process {fd} {
catch {
if {[is_Windows]} {
# Use a Cygwin-specific flag to allow killing
# native Windows processes
exec kill -f $process
exec taskkill /pid $process
} else {
exec kill $process
}
@ -908,6 +910,7 @@ set default_config(gui.fontdiff) [font configure font_diff]
set default_config(gui.maxfilesdisplayed) 5000
set default_config(gui.usettk) 1
set default_config(gui.warndetachedcommit) 1
set default_config(gui.tabsize) 8
set font_descs {
{fontui font_ui {mc "Main Font"}}
{fontdiff font_diff {mc "Diff/Console Font"}}
@ -1283,7 +1286,7 @@ load_config 0
apply_config
# v1.7.0 introduced --show-toplevel to return the canonical work-tree
if {[package vsatisfies $_git_version 1.7.0-]} {
if {[package vcompare $_git_version 1.7.0] >= 0} {
if { [is_Cygwin] } {
catch {set _gitworktree [exec cygpath --windows [git rev-parse --show-toplevel]]}
} else {
@ -1539,7 +1542,7 @@ proc rescan_stage2 {fd after} {
close $fd
}
if {[package vsatisfies $::_git_version 1.6.3-]} {
if {[package vcompare $::_git_version 1.6.3] >= 0} {
set ls_others [list --exclude-standard]
} else {
set ls_others [list --exclude-per-directory=.gitignore]
@ -1962,20 +1965,22 @@ proc display_all_files {} {
set to_display [lsort [array names file_states]]
set display_limit [get_config gui.maxfilesdisplayed]
if {[llength $to_display] > $display_limit} {
if {!$files_warning} {
# do not repeatedly warn:
set files_warning 1
info_popup [mc "Displaying only %s of %s files." \
$display_limit [llength $to_display]]
}
set to_display [lrange $to_display 0 [expr {$display_limit-1}]]
}
set displayed 0
foreach path $to_display {
set s $file_states($path)
set m [lindex $s 0]
set icon_name [lindex $s 1]
if {$displayed > $display_limit && [string index $m 1] eq {O} } {
if {!$files_warning} {
# do not repeatedly warn:
set files_warning 1
info_popup [mc "Display limit (gui.maxfilesdisplayed = %s) reached, not showing all %s files." \
$display_limit [llength $to_display]]
}
continue
}
set s [string index $m 0]
if {$s ne {U} && $s ne {_}} {
display_all_files_helper $ui_index $path \
@ -1990,6 +1995,7 @@ proc display_all_files {} {
if {$s ne {_}} {
display_all_files_helper $ui_workdir $path \
$icon_name $s
incr displayed
}
}

Просмотреть файл

@ -18,6 +18,7 @@ field local_path {} ; # Where this repository is locally
field origin_url {} ; # Where we are cloning from
field origin_name origin ; # What we shall call 'origin'
field clone_type hardlink ; # Type of clone to construct
field recursive true ; # Recursive cloning flag
field readtree_err ; # Error output from read-tree (if any)
field sorted_recent ; # recent repositories (sorted)
@ -337,16 +338,31 @@ method _git_init {} {
return 1
}
proc _is_git {path} {
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
}
}
@ -525,6 +541,11 @@ method _do_clone {} {
foreach r $w_types {
pack $r -anchor w
}
${NS}::checkbutton $args.type_f.recursive \
-text [mc "Recursively clone submodules too"] \
-variable @recursive \
-onvalue true -offvalue false
pack $args.type_f.recursive -anchor w
grid $args.type_l $args.type_f -sticky new
grid columnconfigure $args 1 -weight 1
@ -952,6 +973,30 @@ method _do_clone_checkout {HEAD} {
fileevent $fd readable [cb _readtree_wait $fd]
}
method _do_validate_submodule_cloning {ok} {
if {$ok} {
$o_cons done $ok
set done 1
} else {
_clone_failed $this [mc "Cannot clone submodules."]
}
}
method _do_clone_submodules {} {
if {$recursive eq {true}} {
destroy $w_body
set o_cons [console::embed \
$w_body \
[mc "Cloning submodules"]]
pack $w_body -fill both -expand 1 -padx 10
$o_cons exec \
[list git submodule update --init --recursive] \
[cb _do_validate_submodule_cloning]
} else {
set done 1
}
}
method _readtree_wait {fd} {
set buf [read $fd]
$o_cons update_meter $buf
@ -982,7 +1027,7 @@ method _readtree_wait {fd} {
fconfigure $fd_ph -blocking 0 -translation binary -eofchar {}
fileevent $fd_ph readable [cb _postcheckout_wait $fd_ph]
} else {
set done 1
_do_clone_submodules $this
}
}
@ -996,7 +1041,7 @@ method _postcheckout_wait {fd_ph} {
hook_failed_popup post-checkout $pch_error 0
}
unset pch_error
set done 1
_do_clone_submodules $this
return
}
fconfigure $fd_ph -blocking 0
@ -1063,7 +1108,7 @@ method _open_local_path {} {
}
method _do_open2 {} {
if {![_is_git [file join $local_path .git]]} {
if {![_is_git [file join $local_path .git] actualgit]} {
error_popup [mc "Not a Git repository: %s" [file tail $local_path]]
return
}
@ -1076,7 +1121,7 @@ method _do_open2 {} {
}
_append_recentrepos [pwd]
set ::_gitdir .git
set ::_gitdir $actualgit
set ::_prefix {}
set done 1
}

Просмотреть файл

@ -1,6 +1,19 @@
# git-gui diff viewer
# Copyright (C) 2006, 2007 Shawn Pearce
proc apply_tab_size {{firsttab {}}} {
global have_tk85 repo_config ui_diff
set w [font measure font_diff "0"]
if {$have_tk85 && $firsttab != 0} {
$ui_diff configure -tabs [list [expr {$firsttab * $w}] [expr {($firsttab + $repo_config(gui.tabsize)) * $w}]]
} elseif {$have_tk85 || $repo_config(gui.tabsize) != 8} {
$ui_diff configure -tabs [expr {$repo_config(gui.tabsize) * $w}]
} else {
$ui_diff configure -tabs {}
}
}
proc clear_diff {} {
global ui_diff current_diff_path current_diff_header
global ui_index ui_workdir
@ -105,6 +118,8 @@ proc show_diff {path w {lno {}} {scroll_pos {}} {callback {}}} {
set cont_info [list $scroll_pos $callback]
apply_tab_size 0
if {[string first {U} $m] >= 0} {
merge_load_stages $path [list show_unmerged_diff $cont_info]
} elseif {$m eq {_O}} {
@ -401,7 +416,10 @@ proc read_diff {fd conflict_size cont_info} {
# -- Automatically detect if this is a 3 way diff.
#
if {[string match {@@@ *} $line]} {set is_3way_diff 1}
if {[string match {@@@ *} $line]} {
set is_3way_diff 1
apply_tab_size 1
}
if {$::current_diff_inheader} {

Просмотреть файл

@ -161,6 +161,7 @@ proc do_options {} {
{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"}}
{i-1..99 gui.tabsize {mc "Tab spacing"}}
} {
set type [lindex $option 0]
set name [lindex $option 1]

Просмотреть файл

@ -1,5 +1,10 @@
set gitexecdir {@@gitexecdir@@}
set gitguilib {@@GITGUI_LIBDIR@@}
if { [info exists ::env(GIT_GUI_LIB_DIR) ] } {
set gitguilib $::env(GIT_GUI_LIB_DIR)
} else {
set gitguilib {@@GITGUI_LIBDIR@@}
}
set env(PATH) "$gitexecdir:$env(PATH)"
if {[string first -psn [lindex $argv 0]] == 0} {

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

2690
git-gui/po/vi.po Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу