commit | 7fe9031920be5c98a7e58eea6be34442390392ec | [log] [tgz] |
---|---|---|
author | Eduardo R. D'Avila <erdavila@gmail.com> | Wed Jun 26 00:05:14 2013 -0300 |
committer | Junio C Hamano <gitster@pobox.com> | Wed Jun 26 13:02:57 2013 -0700 |
tree | fdb688b5732627d9a904220351e1a498ee325040 | |
parent | 1572e18e60e0702561d1d59d140615ab7ff54295 [diff] |
git-prompt.sh: refactor colored prompt code __git_ps1_colorize_gitstring() sets color codes and builds the prompt gitstring. It has duplicated code to handle color codes for bash and zsh shells. __git_ps1() also has duplicated logic to build the prompt gitstring. Remove duplication of logic to build gitstring in __git_ps1_colorize_gitstring() and __git_ps1(). Leave in __git_ps1_colorize_gitstring() only logic to set color codes. Signed-off-by: Eduardo R. D'Avila <erdavila@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>