Steve Purcell <[email protected]> writes:
> This broke the listing of git-svn unpushed/unpulled commits: git-svn
> remotes were not detected by the regexps in magit-list-interesting-
> refs: I've attached a patch to fix this.
Upps. Yeah, I forgot to say that I didn"t test git-svn, sorry...
What about the following, though:
(defun magit-get-svn-ref ()
(cond ((magit-ref-exists-p "refs/remotes/git-svn")
"refs/remote/git-svn")
((magit-ref-exists-p "refs/remotes/trunk")
"refs/remote/trunk")
(t
nil)))
It seems better to me to just check for the expected refs directly.
magit-list-interesting-refs is mostly a UI thing and we want to change
it easily and maybe even make it customizable.
I have applied your patch, and then made this change on top of it.
> Note that one should not try switching to a git-svn remote branch then
> telling magit to create a local tracking branch, since magit would not
> do the right thing in that situation.
Is it even useful to switch to refs/remotes/git-svn ever? If not, we
can just not return it from magit-list-interesting-refs.