File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -856,16 +856,18 @@ shown via annotate in bitbucket."
856856 " src" )))
857857
858858;;;### autoload
859- (defun git-link-diffrent -branch (branch )
859+ (defun git-link-different -branch (branch )
860860 " Invoke `git-link' , but with the `branch' name set to a different
861861branch than the one you're currently working on."
862862 (interactive " P" )
863- (let* ((default-remote-branch-name " main" )
863+ (let* ((default-remote-branch-name (magit- main-branch) )
864864 (git-link-current-branch-setting git-link-default-branch)
865865 (git-link-default-branch (if branch
866866 (completing-read
867867 (format " Instead of '%s ' branch replace with branch: " (git-link--branch))
868- (magit-list-branch-names))
868+ (mapcar (lambda (branch )
869+ (replace-regexp-in-string " ^refs/heads/" " " branch))
870+ (magit-list-local-branches)))
869871 default-remote-branch-name)))
870872 (setq current-prefix-arg nil )
871873 (call-interactively 'git-link )
You can’t perform that action at this time.
0 commit comments