summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e73bfa7)
raw | patch | inline | side by side (parent: e73bfa7)
author | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 2 Oct 2007 16:52:22 +0000 (12:52 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 3 Oct 2007 04:21:50 +0000 (00:21 -0400) |
Some workflows allow the user to forcefully update a remote branch,
such as in a "proposed updates" (aka "pu") branch where the branch
is rewound and rebuilt on a daily basis against the current master
branch. In such a case the "--force" or leading + must be used to
make git-push execute anyway, even though it may be discarding one
or more commits on the remote side.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
such as in a "proposed updates" (aka "pu") branch where the branch
is rewound and rebuilt on a daily basis against the current master
branch. In such a case the "--force" or leading + must be used to
make git-push execute anyway, even though it may be discarding one
or more commits on the remote side.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
lib/transport.tcl | patch | blob | history |
diff --git a/lib/transport.tcl b/lib/transport.tcl
index 3b05b8fc2c5620a03014274cd7855868ea468f0e..8e6a9d0a6010cf5efee069a2d488124bcbdb54cd 100644 (file)
--- a/lib/transport.tcl
+++ b/lib/transport.tcl
proc start_push_anywhere_action {w} {
global push_urltype push_remote push_url push_thin push_tags
+ global push_force
set r_url {}
switch -- $push_urltype {
if {$push_thin} {
lappend cmd --thin
}
+ if {$push_force} {
+ lappend cmd --force
+ }
if {$push_tags} {
lappend cmd --tags
}
proc do_push_anywhere {} {
global all_remotes current_branch
global push_urltype push_remote push_url push_thin push_tags
+ global push_force
set w .push_setup
toplevel $w
pack $w.dest -anchor nw -fill x -pady 5 -padx 5
labelframe $w.options -text [mc "Transfer Options"]
+ checkbutton $w.options.force \
+ -text [mc "Force overwrite existing branch (may discard changes)"] \
+ -variable push_force
+ grid $w.options.force -columnspan 2 -sticky w
checkbutton $w.options.thin \
-text [mc "Use thin pack (for slow network connections)"] \
-variable push_thin
pack $w.options -anchor nw -fill x -pady 5 -padx 5
set push_url {}
+ set push_force 0
set push_thin 0
set push_tags 0