提交 ed560490 编写于 作者: J Junio C Hamano

Merge git://repo.or.cz/git-gui

* git://repo.or.cz/git-gui:
  git-gui: Teach start_push_anywhere_action{} to notice when remote is a mirror.
......@@ -33,10 +33,15 @@ proc push_to {remote} {
proc start_push_anywhere_action {w} {
global push_urltype push_remote push_url push_thin push_tags
global push_force
global repo_config
set is_mirror 0
set r_url {}
switch -- $push_urltype {
remote {set r_url $push_remote}
remote {
set r_url $push_remote
catch {set is_mirror $repo_config(remote.$push_remote.mirror)}
}
url {set r_url $push_url}
}
if {$r_url eq {}} return
......@@ -53,6 +58,11 @@ proc start_push_anywhere_action {w} {
lappend cmd --tags
}
lappend cmd $r_url
if {$is_mirror} {
set cons [console::new \
[mc "push %s" $r_url] \
[mc "Mirroring to %s" $r_url]]
} else {
set cnt 0
foreach i [$w.source.l curselection] {
set b [$w.source.l get $i]
......@@ -70,6 +80,7 @@ proc start_push_anywhere_action {w} {
set cons [console::new \
[mc "push %s" $r_url] \
[mc "Pushing %s %s to %s" $cnt $unit $r_url]]
}
console::exec $cons $cmd
destroy $w
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册