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>
Shawn O. Pearce committed
May 8, 2008 at 20:29 UTC
76bb40cde0e15e8d0e8493abb0bd18a5d6386ad7
1 file changed
+1
-1
lib/branch_delete.tcl
+1
-1
@@ -127,7 +127,7 @@ method _delete {} {
127
foreach i $to_delete {
128
set b [lindex $i 0]
129
set o [lindex $i 1]
130
- if {[catch {git update-ref -d "refs/heads/$b" $o} err]} {
130
+ if {[catch {git branch -D $b} err]} {
131
append failed " - $b: $err\n"
132
}
133
}