[PATCH] notmuch-dev: Forcibly delete branches.

2012-01-13 Thread David Edmondson
`magit-delete-branch' runs "git branch -d ", which refuses to
delete branches that are not fully merged. Given that we don't care
and don't want to be stalled, use "git branch -D " directly.
---

This should address the problems removing un-merged branches.

 emacs/notmuch-dev.el |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch-dev.el b/emacs/notmuch-dev.el
index ac427ec..871ce3b 100644
--- a/emacs/notmuch-dev.el
+++ b/emacs/notmuch-dev.el
@@ -64,7 +64,9 @@
   (magit-checkout "master"))

 (defun notmuch-dev-delete-branch (name)
-  (magit-delete-branch name))
+  ;; `magit-delete-branch' uses "-d", which is not sufficiently
+  ;; aggressive for us.
+  (magit-run-git "branch" "-D" name))

 (defun notmuch-dev-create-branch (name)
   ;; Switches to the new branch automatically.
-- 
1.7.7.3



[PATCH] notmuch-dev: Forcibly delete branches.

2012-01-13 Thread David Bremner
On Fri, 13 Jan 2012 10:25:29 +, David Edmondson  wrote:
> `magit-delete-branch' runs "git branch -d ", which refuses to
> delete branches that are not fully merged. Given that we don't care
> and don't want to be stalled, use "git branch -D " directly.
> ---

Yes, that seems to fix it. 

Two more questions/comments.

- Should n-d-s-review-patch update to current master? perhaps with
  prefix?

- I think more escaping of branch names is needed. In particular, branch
  names with {} in them get created ok, but then don't work very well in
  magit.  E.g. running log I get "Args out of range: "face}s", 5, 10"
  with the branch name

   review/patch-v2-emacs-logically-group-def{custom,face}s

d


[PATCH] notmuch-dev: Forcibly delete branches.

2012-01-13 Thread David Edmondson
`magit-delete-branch' runs git branch -d branch, which refuses to
delete branches that are not fully merged. Given that we don't care
and don't want to be stalled, use git branch -D branch directly.
---

This should address the problems removing un-merged branches.

 emacs/notmuch-dev.el |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch-dev.el b/emacs/notmuch-dev.el
index ac427ec..871ce3b 100644
--- a/emacs/notmuch-dev.el
+++ b/emacs/notmuch-dev.el
@@ -64,7 +64,9 @@
   (magit-checkout master))
 
 (defun notmuch-dev-delete-branch (name)
-  (magit-delete-branch name))
+  ;; `magit-delete-branch' uses -d, which is not sufficiently
+  ;; aggressive for us.
+  (magit-run-git branch -D name))
 
 (defun notmuch-dev-create-branch (name)
   ;; Switches to the new branch automatically.
-- 
1.7.7.3

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch