Skip to content

Commit

Permalink
Call git-branch with --no-color
Browse files Browse the repository at this point in the history
Having color.ui=always in ~/.gitconfig makes counsel-git-branch-list
show escape sequences in the branch list.

* counsel.el (counsel-git-branch-list): Call git-branch with
--no-color (abo-abo#2973).

Copyright-paperwork-exempt: yes
  • Loading branch information
jsynacek authored and basil-conto committed Jun 26, 2022
1 parent 8bf8027 commit 7163194
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion counsel.el
Original file line number Diff line number Diff line change
Expand Up @@ -1793,7 +1793,8 @@ currently checked out."
(and (string-match "\\`[[:blank:]]+" line)
(list (substring line (match-end 0)))))
(let ((default-directory (counsel-locate-git-root)))
(split-string (shell-command-to-string "git branch -vv --all")
(split-string (shell-command-to-string
"git branch -vv --all --no-color")
"\n" t))))

;;;###autoload
Expand Down

0 comments on commit 7163194

Please sign in to comment.