On Mon, 09 Jan 2012 08:23:53 +0000, David Edmondson <dme@dme.org> wrote: > On Sat, 07 Jan 2012 07:53:54 -0400, David Bremner <david@tethera.net> wrote: > > On Fri, 6 Jan 2012 10:03:19 +0000, David Edmondson <dme@dme.org> wrote: > > > --- > > > > > > - Prefix the branch name with 'review/' > > > - Avoid `shell-command', which also results in better error reporting > > > when 'git-am' fails. > > > > > > > One thing I noticed is that reviewing a patch for the second time fails > > because the branch already exists. I'm not sure if this is covered under > > "upkeep of the repo" but it is a little inconvenient. > > Oh. It's supposed to delete the existing branch. It did in my test. What > happens for you? FWIW, I loaded notmuch-dev.el on top of current master. The magit buffer shows $ git --no-pager checkout -b review/patch-emacs-don't-signal-an-error-when-reaching-the-end-of-the-search-results master fatal: A branch named 'review/patch-emacs-don't-signal-an-error-when-reaching-the-end-of-the-search-results' already exists. The backtrace is signal(error ("Git failed")) error("Git failed") magit-run*(("git" "--no-pager" "checkout" "-b" "review/patch-emacs-don't-signal-an-error-when-reaching-the-end-of-the-search-results" "master")) #[nil "\303\304 B\n\"!\207" [magit-git-executable magit-git-standard-options args magit-run* append] 4]() magit-refresh-wrapper(#[nil "\303\304 B\n\"!\207" [magit-git-executable magit-git-standard-options args magit-run* append] 4]) magit-run-git("checkout" "-b" "review/patch-emacs-don't-signal-an-error-when-reaching-the-end-of-the-search-results" "master") magit-create-branch("review/patch-emacs-don't-signal-an-error-when-reaching-the-end-of-the-search-results" "master") notmuch-dev-create-branch("review/patch-emacs-don't-signal-an-error-when-reaching-the-end-of-the-search-results") (let ((default-directory notmuch-dev-temporary-repository-path)) (notmuch-dev-checkout-master) (condition-case nil (notmuch-dev-delete-branch patch-name) (error nil)) (notmuch-dev-create-branch patch-name) (with-temp-file mbox-path (erase-buffer) (call-process notmuch-command nil t nil "show" "--format=mbox" search-terms)) (magit-run* (list magit-git-executable "am" mbox-path)) (magit-status notmuch-dev-temporary-repository-path)) (let ((patch-name ...) (mbox-path ...)) (notmuch-dev-make-temporary-repository) (let (...) (notmuch-dev-checkout-master) (condition-case nil ... ...) (notmuch-dev-create-branch patch-name) (with-temp-file mbox-path ... ...) (magit-run* ...) (magit-status notmuch-dev-temporary-repository-path))) notmuch-dev-review-patch("[PATCH] emacs: Don't signal an error when reaching the end of the search results." "id:\"1324370714-28545-1-git-send-email-dme@dme.org\"") notmuch-dev-show-review-patch() call-interactively(notmuch-dev-show-review-patch t nil) execute-extended-command(nil) call-interactively(execute-extended-command nil nil)