summaryrefslogtreecommitdiff
path: root/lib/branch_delete.tcl
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2008-05-09 00:29:42 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2008-05-09 00:29:42 (GMT)
commit76bb40cde0e15e8d0e8493abb0bd18a5d6386ad7 (patch)
treeff33f87a50e81ce0c5396399554c85dd5faeeb8d /lib/branch_delete.tcl
parentfe70225dc730c5af4c491106d1e0226d1c014d1e (diff)
downloadgit-76bb40cde0e15e8d0e8493abb0bd18a5d6386ad7.zip
git-76bb40cde0e15e8d0e8493abb0bd18a5d6386ad7.tar.gz
git-76bb40cde0e15e8d0e8493abb0bd18a5d6386ad7.tar.bz2
git-gui: Delete branches with 'git branch -D' to clear config
If we are deleting a local branch from refs/heads/ we need to make sure any associated configuration stored in .git/config is also removed (such as branch.$name.remote and branch.$name.merge). The easiest way to do this is to use git-branch as that automatically will look for and delete configuration keys as necessary. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'lib/branch_delete.tcl')
-rw-r--r--lib/branch_delete.tcl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/branch_delete.tcl b/lib/branch_delete.tcl
index 86c4f73..ef1930b 100644
--- a/lib/branch_delete.tcl
+++ b/lib/branch_delete.tcl
@@ -127,7 +127,7 @@ method _delete {} {
foreach i $to_delete {
set b [lindex $i 0]
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"
}
}