Compare commits
9 Commits
v1.5.5.5
...
gitgui-0.1
Author | SHA1 | Date | |
---|---|---|---|
95dcfa3633 | |||
7f83aa2d3d | |||
16dd62ac4d | |||
76bb40cde0 | |||
fe70225dc7 | |||
259cd0fddb | |||
ca19404876 | |||
ddc3603145 | |||
dd70f3dbe4 |
59
git-gui.sh
59
git-gui.sh
@ -122,6 +122,14 @@ set _reponame {}
|
|||||||
set _iscygwin {}
|
set _iscygwin {}
|
||||||
set _search_path {}
|
set _search_path {}
|
||||||
|
|
||||||
|
set _trace [lsearch -exact $argv --trace]
|
||||||
|
if {$_trace >= 0} {
|
||||||
|
set argv [lreplace $argv $_trace $_trace]
|
||||||
|
set _trace 1
|
||||||
|
} else {
|
||||||
|
set _trace 0
|
||||||
|
}
|
||||||
|
|
||||||
proc appname {} {
|
proc appname {} {
|
||||||
global _appname
|
global _appname
|
||||||
return $_appname
|
return $_appname
|
||||||
@ -245,6 +253,21 @@ proc get_config {name} {
|
|||||||
##
|
##
|
||||||
## handy utils
|
## handy utils
|
||||||
|
|
||||||
|
proc _trace_exec {cmd} {
|
||||||
|
if {!$::_trace} return
|
||||||
|
set d {}
|
||||||
|
foreach v $cmd {
|
||||||
|
if {$d ne {}} {
|
||||||
|
append d { }
|
||||||
|
}
|
||||||
|
if {[regexp {[ \t\r\n'"$?*]} $v]} {
|
||||||
|
set v [sq $v]
|
||||||
|
}
|
||||||
|
append d $v
|
||||||
|
}
|
||||||
|
puts stderr $d
|
||||||
|
}
|
||||||
|
|
||||||
proc _git_cmd {name} {
|
proc _git_cmd {name} {
|
||||||
global _git_cmd_path
|
global _git_cmd_path
|
||||||
|
|
||||||
@ -339,7 +362,7 @@ proc _lappend_nice {cmd_var} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc git {args} {
|
proc git {args} {
|
||||||
set opt [list exec]
|
set opt [list]
|
||||||
|
|
||||||
while {1} {
|
while {1} {
|
||||||
switch -- [lindex $args 0] {
|
switch -- [lindex $args 0] {
|
||||||
@ -359,12 +382,18 @@ proc git {args} {
|
|||||||
set cmdp [_git_cmd [lindex $args 0]]
|
set cmdp [_git_cmd [lindex $args 0]]
|
||||||
set args [lrange $args 1 end]
|
set args [lrange $args 1 end]
|
||||||
|
|
||||||
return [eval $opt $cmdp $args]
|
_trace_exec [concat $opt $cmdp $args]
|
||||||
|
set result [eval exec $opt $cmdp $args]
|
||||||
|
if {$::_trace} {
|
||||||
|
puts stderr "< $result"
|
||||||
|
}
|
||||||
|
return $result
|
||||||
}
|
}
|
||||||
|
|
||||||
proc _open_stdout_stderr {cmd} {
|
proc _open_stdout_stderr {cmd} {
|
||||||
|
_trace_exec $cmd
|
||||||
if {[catch {
|
if {[catch {
|
||||||
set fd [open $cmd r]
|
set fd [open [concat [list | ] $cmd] r]
|
||||||
} err]} {
|
} err]} {
|
||||||
if { [lindex $cmd end] eq {2>@1}
|
if { [lindex $cmd end] eq {2>@1}
|
||||||
&& $err eq {can not find channel named "1"}
|
&& $err eq {can not find channel named "1"}
|
||||||
@ -375,6 +404,7 @@ proc _open_stdout_stderr {cmd} {
|
|||||||
# to try to start it a second time.
|
# to try to start it a second time.
|
||||||
#
|
#
|
||||||
set fd [open [concat \
|
set fd [open [concat \
|
||||||
|
[list | ] \
|
||||||
[lrange $cmd 0 end-1] \
|
[lrange $cmd 0 end-1] \
|
||||||
[list |& cat] \
|
[list |& cat] \
|
||||||
] r]
|
] r]
|
||||||
@ -387,7 +417,7 @@ proc _open_stdout_stderr {cmd} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc git_read {args} {
|
proc git_read {args} {
|
||||||
set opt [list |]
|
set opt [list]
|
||||||
|
|
||||||
while {1} {
|
while {1} {
|
||||||
switch -- [lindex $args 0] {
|
switch -- [lindex $args 0] {
|
||||||
@ -415,7 +445,7 @@ proc git_read {args} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc git_write {args} {
|
proc git_write {args} {
|
||||||
set opt [list |]
|
set opt [list]
|
||||||
|
|
||||||
while {1} {
|
while {1} {
|
||||||
switch -- [lindex $args 0] {
|
switch -- [lindex $args 0] {
|
||||||
@ -435,7 +465,8 @@ proc git_write {args} {
|
|||||||
set cmdp [_git_cmd [lindex $args 0]]
|
set cmdp [_git_cmd [lindex $args 0]]
|
||||||
set args [lrange $args 1 end]
|
set args [lrange $args 1 end]
|
||||||
|
|
||||||
return [open [concat $opt $cmdp $args] w]
|
_trace_exec [concat $opt $cmdp $args]
|
||||||
|
return [open [concat [list | ] $opt $cmdp $args] w]
|
||||||
}
|
}
|
||||||
|
|
||||||
proc githook_read {hook_name args} {
|
proc githook_read {hook_name args} {
|
||||||
@ -455,12 +486,12 @@ proc githook_read {hook_name args} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set scr {if test -x "$1";then exec "$@";fi}
|
set scr {if test -x "$1";then exec "$@";fi}
|
||||||
set sh_c [list | $interp -c $scr $interp $pchook]
|
set sh_c [list $interp -c $scr $interp $pchook]
|
||||||
return [_open_stdout_stderr [concat $sh_c $args]]
|
return [_open_stdout_stderr [concat $sh_c $args]]
|
||||||
}
|
}
|
||||||
|
|
||||||
if {[file executable $pchook]} {
|
if {[file executable $pchook]} {
|
||||||
return [_open_stdout_stderr [concat [list | $pchook] $args]]
|
return [_open_stdout_stderr [concat [list $pchook] $args]]
|
||||||
}
|
}
|
||||||
|
|
||||||
return {}
|
return {}
|
||||||
@ -601,6 +632,7 @@ proc apply_config {} {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set default_config(branch.autosetupmerge) true
|
||||||
set default_config(merge.diffstat) true
|
set default_config(merge.diffstat) true
|
||||||
set default_config(merge.summary) false
|
set default_config(merge.summary) false
|
||||||
set default_config(merge.verbosity) 2
|
set default_config(merge.verbosity) 2
|
||||||
@ -1095,16 +1127,10 @@ proc rescan {after {honor_trustmtime 1}} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if {[is_Cygwin]} {
|
if {[is_Cygwin]} {
|
||||||
set is_git_info_link {}
|
|
||||||
set is_git_info_exclude {}
|
set is_git_info_exclude {}
|
||||||
proc have_info_exclude {} {
|
proc have_info_exclude {} {
|
||||||
global is_git_info_link is_git_info_exclude
|
global is_git_info_exclude
|
||||||
|
|
||||||
if {$is_git_info_link eq {}} {
|
|
||||||
set is_git_info_link [file isfile [gitdir info.lnk]]
|
|
||||||
}
|
|
||||||
|
|
||||||
if {$is_git_info_link} {
|
|
||||||
if {$is_git_info_exclude eq {}} {
|
if {$is_git_info_exclude eq {}} {
|
||||||
if {[catch {exec test -f [gitdir info exclude]}]} {
|
if {[catch {exec test -f [gitdir info exclude]}]} {
|
||||||
set is_git_info_exclude 0
|
set is_git_info_exclude 0
|
||||||
@ -1113,9 +1139,6 @@ if {[is_Cygwin]} {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $is_git_info_exclude
|
return $is_git_info_exclude
|
||||||
} else {
|
|
||||||
return [file readable [gitdir info exclude]]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
proc have_info_exclude {} {
|
proc have_info_exclude {} {
|
||||||
|
@ -183,6 +183,9 @@ method _create {} {
|
|||||||
if {$spec ne {} && $opt_fetch} {
|
if {$spec ne {} && $opt_fetch} {
|
||||||
$co enable_fetch $spec
|
$co enable_fetch $spec
|
||||||
}
|
}
|
||||||
|
if {$spec ne {}} {
|
||||||
|
$co remote_source $spec
|
||||||
|
}
|
||||||
|
|
||||||
if {[$co run]} {
|
if {[$co run]} {
|
||||||
destroy $w
|
destroy $w
|
||||||
|
@ -127,7 +127,7 @@ method _delete {} {
|
|||||||
foreach i $to_delete {
|
foreach i $to_delete {
|
||||||
set b [lindex $i 0]
|
set b [lindex $i 0]
|
||||||
set o [lindex $i 1]
|
set o [lindex $i 1]
|
||||||
if {[catch {git update-ref -d "refs/heads/$b" $o} err]} {
|
if {[catch {git branch -D $b} err]} {
|
||||||
append failed " - $b: $err\n"
|
append failed " - $b: $err\n"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@ field merge_base {}; # merge base if we have another ref involved
|
|||||||
field fetch_spec {}; # refetch tracking branch if used?
|
field fetch_spec {}; # refetch tracking branch if used?
|
||||||
field checkout 1; # actually checkout the branch?
|
field checkout 1; # actually checkout the branch?
|
||||||
field create 0; # create the branch if it doesn't exist?
|
field create 0; # create the branch if it doesn't exist?
|
||||||
|
field remote_source {}; # same as fetch_spec, to setup tracking
|
||||||
|
|
||||||
field reset_ok 0; # did the user agree to reset?
|
field reset_ok 0; # did the user agree to reset?
|
||||||
field fetch_ok 0; # did the fetch succeed?
|
field fetch_ok 0; # did the fetch succeed?
|
||||||
@ -44,6 +45,10 @@ method enable_fetch {spec} {
|
|||||||
set fetch_spec $spec
|
set fetch_spec $spec
|
||||||
}
|
}
|
||||||
|
|
||||||
|
method remote_source {spec} {
|
||||||
|
set remote_source $spec
|
||||||
|
}
|
||||||
|
|
||||||
method enable_checkout {co} {
|
method enable_checkout {co} {
|
||||||
set checkout $co
|
set checkout $co
|
||||||
}
|
}
|
||||||
@ -145,7 +150,7 @@ method _finish_fetch {ok} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
method _update_ref {} {
|
method _update_ref {} {
|
||||||
global null_sha1 current_branch
|
global null_sha1 current_branch repo_config
|
||||||
|
|
||||||
set ref $new_ref
|
set ref $new_ref
|
||||||
set new $new_hash
|
set new $new_hash
|
||||||
@ -172,6 +177,23 @@ method _update_ref {} {
|
|||||||
|
|
||||||
set reflog_msg "branch: Created from $new_expr"
|
set reflog_msg "branch: Created from $new_expr"
|
||||||
set cur $null_sha1
|
set cur $null_sha1
|
||||||
|
|
||||||
|
if {($repo_config(branch.autosetupmerge) eq {true}
|
||||||
|
|| $repo_config(branch.autosetupmerge) eq {always})
|
||||||
|
&& $remote_source ne {}
|
||||||
|
&& "refs/heads/$newbranch" eq $ref} {
|
||||||
|
|
||||||
|
set c_remote [lindex $remote_source 1]
|
||||||
|
set c_merge [lindex $remote_source 2]
|
||||||
|
if {[catch {
|
||||||
|
git config branch.$newbranch.remote $c_remote
|
||||||
|
git config branch.$newbranch.merge $c_merge
|
||||||
|
} err]} {
|
||||||
|
_error $this [strcat \
|
||||||
|
[mc "Failed to configure simplified git-pull for '%s'." $newbranch] \
|
||||||
|
"\n\n$err"]
|
||||||
|
}
|
||||||
|
}
|
||||||
} elseif {$create && $merge_type eq {none}} {
|
} elseif {$create && $merge_type eq {none}} {
|
||||||
# We were told to create it, but not do a merge.
|
# We were told to create it, but not do a merge.
|
||||||
# Bad. Name shouldn't have existed.
|
# Bad. Name shouldn't have existed.
|
||||||
|
@ -388,9 +388,7 @@ method _do_new {} {
|
|||||||
-command [cb _new_local_path]
|
-command [cb _new_local_path]
|
||||||
set w_localpath $w_body.where.t
|
set w_localpath $w_body.where.t
|
||||||
|
|
||||||
pack $w_body.where.b -side right
|
grid $w_body.where.l $w_body.where.t $w_body.where.b -sticky ew
|
||||||
pack $w_body.where.l -side left
|
|
||||||
pack $w_body.where.t -fill x
|
|
||||||
pack $w_body.where -fill x
|
pack $w_body.where -fill x
|
||||||
|
|
||||||
trace add variable @local_path write [cb _write_local_path]
|
trace add variable @local_path write [cb _write_local_path]
|
||||||
@ -987,9 +985,7 @@ method _do_open {} {
|
|||||||
-text [mc "Browse"] \
|
-text [mc "Browse"] \
|
||||||
-command [cb _open_local_path]
|
-command [cb _open_local_path]
|
||||||
|
|
||||||
pack $w_body.where.b -side right
|
grid $w_body.where.l $w_body.where.t $w_body.where.b -sticky ew
|
||||||
pack $w_body.where.l -side left
|
|
||||||
pack $w_body.where.t -fill x
|
|
||||||
pack $w_body.where -fill x
|
pack $w_body.where -fill x
|
||||||
|
|
||||||
trace add variable @local_path write [cb _write_local_path]
|
trace add variable @local_path write [cb _write_local_path]
|
||||||
|
@ -102,8 +102,8 @@ proc hint_gc {} {
|
|||||||
*]]
|
*]]
|
||||||
|
|
||||||
if {$objects_current >= $object_limit} {
|
if {$objects_current >= $object_limit} {
|
||||||
set objects_current [expr {$objects_current * 256}]
|
set objects_current [expr {$objects_current * 250}]
|
||||||
set object_limit [expr {$object_limit * 256}]
|
set object_limit [expr {$object_limit * 250}]
|
||||||
if {[ask_popup \
|
if {[ask_popup \
|
||||||
[mc "This repository currently has approximately %i loose objects.
|
[mc "This repository currently has approximately %i loose objects.
|
||||||
|
|
||||||
|
@ -84,13 +84,19 @@ method _connect {pipe_fd} {
|
|||||||
regexp \
|
regexp \
|
||||||
{International Ispell Version .* \(but really (Aspell .*?)\)$} \
|
{International Ispell Version .* \(but really (Aspell .*?)\)$} \
|
||||||
$s_version _junk s_version
|
$s_version _junk s_version
|
||||||
|
regexp {^Aspell (\d)+\.(\d+)} $s_version _junk major minor
|
||||||
|
|
||||||
puts $pipe_fd ! ; # enable terse mode
|
puts $pipe_fd ! ; # enable terse mode
|
||||||
puts $pipe_fd {$$cr master} ; # fetch the language
|
|
||||||
flush $pipe_fd
|
|
||||||
|
|
||||||
|
# fetch the language
|
||||||
|
if {$major > 0 || ($major == 0 && $minor >= 60)} {
|
||||||
|
puts $pipe_fd {$$cr master}
|
||||||
|
flush $pipe_fd
|
||||||
gets $pipe_fd s_lang
|
gets $pipe_fd s_lang
|
||||||
regexp {[/\\]([^/\\]+)\.[^\.]+$} $s_lang _ s_lang
|
regexp {[/\\]([^/\\]+)\.[^\.]+$} $s_lang _ s_lang
|
||||||
|
} else {
|
||||||
|
set s_lang {}
|
||||||
|
}
|
||||||
|
|
||||||
if {$::default_config(gui.spellingdictionary) eq {}
|
if {$::default_config(gui.spellingdictionary) eq {}
|
||||||
&& [get_config gui.spellingdictionary] eq {}} {
|
&& [get_config gui.spellingdictionary] eq {}} {
|
||||||
|
26
po/de.po
26
po/de.po
@ -8,7 +8,7 @@ msgstr ""
|
|||||||
"Project-Id-Version: git-gui\n"
|
"Project-Id-Version: git-gui\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2008-03-14 07:18+0100\n"
|
"POT-Creation-Date: 2008-03-14 07:18+0100\n"
|
||||||
"PO-Revision-Date: 2008-02-16 21:52+0100\n"
|
"PO-Revision-Date: 2008-05-01 11:51+0200\n"
|
||||||
"Last-Translator: Christian Stimming <stimming@tuhh.de>\n"
|
"Last-Translator: Christian Stimming <stimming@tuhh.de>\n"
|
||||||
"Language-Team: German\n"
|
"Language-Team: German\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@ -1754,9 +1754,8 @@ msgid "Number of Diff Context Lines"
|
|||||||
msgstr "Anzahl der Kontextzeilen beim Vergleich"
|
msgstr "Anzahl der Kontextzeilen beim Vergleich"
|
||||||
|
|
||||||
#: lib/option.tcl:127
|
#: lib/option.tcl:127
|
||||||
#, fuzzy
|
|
||||||
msgid "Commit Message Text Width"
|
msgid "Commit Message Text Width"
|
||||||
msgstr "Versionsbeschreibung:"
|
msgstr "Textbreite der Versionsbeschreibung"
|
||||||
|
|
||||||
#: lib/option.tcl:128
|
#: lib/option.tcl:128
|
||||||
msgid "New Branch Name Template"
|
msgid "New Branch Name Template"
|
||||||
@ -1895,40 +1894,36 @@ msgstr "Fehler beim Erstellen des Icons:"
|
|||||||
|
|
||||||
#: lib/spellcheck.tcl:57
|
#: lib/spellcheck.tcl:57
|
||||||
msgid "Unsupported spell checker"
|
msgid "Unsupported spell checker"
|
||||||
msgstr ""
|
msgstr "Rechtschreibprüfungsprogramm nicht unterstützt"
|
||||||
|
|
||||||
#: lib/spellcheck.tcl:65
|
#: lib/spellcheck.tcl:65
|
||||||
#, fuzzy
|
|
||||||
msgid "Spell checking is unavailable"
|
msgid "Spell checking is unavailable"
|
||||||
msgstr "Rechtschreibprüfung fehlgeschlagen"
|
msgstr "Rechtschreibprüfung nicht verfügbar"
|
||||||
|
|
||||||
#: lib/spellcheck.tcl:68
|
#: lib/spellcheck.tcl:68
|
||||||
msgid "Invalid spell checking configuration"
|
msgid "Invalid spell checking configuration"
|
||||||
msgstr ""
|
msgstr "Unbenutzbare Konfiguration der Rechtschreibprüfung"
|
||||||
|
|
||||||
#: lib/spellcheck.tcl:70
|
#: lib/spellcheck.tcl:70
|
||||||
#, tcl-format
|
#, tcl-format
|
||||||
msgid "Reverting dictionary to %s."
|
msgid "Reverting dictionary to %s."
|
||||||
msgstr ""
|
msgstr "Wörterbuch auf %s zurückgesetzt."
|
||||||
|
|
||||||
#: lib/spellcheck.tcl:73
|
#: lib/spellcheck.tcl:73
|
||||||
#, fuzzy
|
|
||||||
msgid "Spell checker silently failed on startup"
|
msgid "Spell checker silently failed on startup"
|
||||||
msgstr "Rechtschreibprüfung fehlgeschlagen"
|
msgstr "Rechtschreibprüfungsprogramm mit Fehler abgebrochen"
|
||||||
|
|
||||||
#: lib/spellcheck.tcl:80
|
#: lib/spellcheck.tcl:80
|
||||||
#, fuzzy
|
|
||||||
msgid "Unrecognized spell checker"
|
msgid "Unrecognized spell checker"
|
||||||
msgstr "Unbekannte Version von »aspell«"
|
msgstr "Unbekanntes Rechtschreibprüfungsprogramm"
|
||||||
|
|
||||||
#: lib/spellcheck.tcl:180
|
#: lib/spellcheck.tcl:180
|
||||||
msgid "No Suggestions"
|
msgid "No Suggestions"
|
||||||
msgstr "Keine Vorschläge"
|
msgstr "Keine Vorschläge"
|
||||||
|
|
||||||
#: lib/spellcheck.tcl:381
|
#: lib/spellcheck.tcl:381
|
||||||
#, fuzzy
|
|
||||||
msgid "Unexpected EOF from spell checker"
|
msgid "Unexpected EOF from spell checker"
|
||||||
msgstr "Unerwartetes EOF von »aspell«"
|
msgstr "Unerwartetes EOF vom Rechtschreibprüfungsprogramm"
|
||||||
|
|
||||||
#: lib/spellcheck.tcl:385
|
#: lib/spellcheck.tcl:385
|
||||||
msgid "Spell Checker Failed"
|
msgid "Spell Checker Failed"
|
||||||
@ -2002,6 +1997,3 @@ msgstr "Kompaktes Datenformat benutzen (für langsame Netzverbindungen)"
|
|||||||
#: lib/transport.tcl:168
|
#: lib/transport.tcl:168
|
||||||
msgid "Include tags"
|
msgid "Include tags"
|
||||||
msgstr "Mit Markierungen übertragen"
|
msgstr "Mit Markierungen übertragen"
|
||||||
|
|
||||||
#~ msgid "Not connected to aspell"
|
|
||||||
#~ msgstr "Keine Verbindung zu »aspell«"
|
|
||||||
|
Reference in New Issue
Block a user