New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
args-out-of-range on branches where the upstream branch is gone #1723
Comments
I forgot to say: that's for current |
I can reproduce this. The issue seems to be that Until @tarsius gets back, you could try the patch below as a temporary fix. diff --git c/magit.el w/magit.el
index 5dd7a30..04e5119 100644
--- c/magit.el
+++ w/magit.el
@@ -432,8 +432,9 @@ (defun magit-insert-status-headers (&optional branch upstream)
(and branch
(concat (propertize branch 'face 'magit-branch-local) " "))
msg "\n")
- (when (or upstream (setq upstream (magit-get-tracked-branch branch)))
- (setq line (or (magit-rev-format "%h %s" upstream) ""))
+ (when (and (or upstream
+ (setq upstream (magit-get-tracked-branch branch)))
+ (setq line (magit-rev-format "%h %s" upstream)))
(string-match "^\\([^ ]+\\) \\(.*\\)" line)
(magit-bind-match-strings (hash msg) line
(magit-insert-section (branch upstream |
@kyleam works fine for me! Thanks! |
I've applied this patch, thanks. |
If I check out any branch that has had it's upstream branch deleted, magit will fail with this error:
If I run
git branch --unset-upstream
everything is fine again.Thanks!
The text was updated successfully, but these errors were encountered: